Package com.mxgraph.swing.handler
Class mxMovePreview
java.lang.Object
com.mxgraph.util.mxEventSource
com.mxgraph.swing.handler.mxMovePreview
Connection handler creates new connections between cells. This control is used to display the connector
icon, while the preview is used to draw the line.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.mxgraph.util.mxEventSource
mxEventSource.mxIEventListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Specifies if the preview should use clones of the original shapes.protected boolean
Specifies if connected, unselected edges should be included in the preview.protected mxGraphComponent
protected boolean
Specifies if the selection cells handler should be hidden while the preview is visible.protected Rectangle
protected mxRectangle
protected Object[]
protected Rectangle
protected boolean
Specifies if the placeholder rectangle should be used for all previews.protected mxCellStatePreview
protected mxCellState[]
protected mxCellState
protected int
Maximum number of cells to preview individually.Fields inherited from class com.mxgraph.util.mxEventSource
eventListeners, eventsEnabled, eventSource
-
Constructor Summary
ConstructorsConstructorDescriptionmxMovePreview
(mxGraphComponent graphComponent) Constructs a new rubberband selection for the given graph component. -
Method Summary
Modifier and TypeMethodDescriptionObject[]
getCells
(mxCellState initialState) Object[]
FIXME: Cells should be assigned outside of getPreviewStatesprotected mxRectangle
getPlaceholderBounds
(mxCellState startState) protected mxCellState[]
Returns the states that are affected by the move operation.int
boolean
isActive()
protected boolean
isCellOpaque
(Object cell) boolean
boolean
boolean
boolean
void
protected void
repaint
(mxRectangle dirty) protected void
reset()
void
setClonePreview
(boolean value) void
setContextPreview
(boolean value) void
setHideSelectionHandler
(boolean value) void
setPlaceholderPreview
(boolean value) void
setThreshold
(int value) void
start
(MouseEvent e, mxCellState state) Sets the translation of the preview.Object[]
stop
(boolean commit, MouseEvent e, double dx, double dy, boolean clone, Object target) void
update
(MouseEvent e, double dx, double dy, boolean clone) Sets the translation of the preview.Methods inherited from class com.mxgraph.util.mxEventSource
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
-
Field Details
-
graphComponent
-
threshold
protected int thresholdMaximum number of cells to preview individually. Default is 200. -
placeholderPreview
protected boolean placeholderPreviewSpecifies if the placeholder rectangle should be used for all previews. Default is false. This overrides all other preview settings if true. -
clonePreview
protected boolean clonePreviewSpecifies if the preview should use clones of the original shapes. Default is true. -
contextPreview
protected boolean contextPreviewSpecifies if connected, unselected edges should be included in the preview. Default is true. This should not be used if cloning is enabled. -
hideSelectionHandler
protected boolean hideSelectionHandlerSpecifies if the selection cells handler should be hidden while the preview is visible. Default is false. -
startState
-
previewStates
-
movingCells
-
initialPlaceholder
-
placeholder
-
lastDirty
-
preview
-
-
Constructor Details
-
mxMovePreview
Constructs a new rubberband selection for the given graph component.- Parameters:
graphComponent
- Component that contains the rubberband.
-
-
Method Details
-
getThreshold
public int getThreshold() -
setThreshold
public void setThreshold(int value) -
isPlaceholderPreview
public boolean isPlaceholderPreview() -
setPlaceholderPreview
public void setPlaceholderPreview(boolean value) -
isClonePreview
public boolean isClonePreview() -
setClonePreview
public void setClonePreview(boolean value) -
isContextPreview
public boolean isContextPreview() -
setContextPreview
public void setContextPreview(boolean value) -
isHideSelectionHandler
public boolean isHideSelectionHandler() -
setHideSelectionHandler
public void setHideSelectionHandler(boolean value) -
isActive
public boolean isActive() -
getMovingCells
FIXME: Cells should be assigned outside of getPreviewStates -
getCells
-
getPreviewStates
Returns the states that are affected by the move operation. -
isCellOpaque
-
start
Sets the translation of the preview. -
getPlaceholderBounds
-
createCellStatePreview
-
update
Sets the translation of the preview. -
repaint
-
reset
protected void reset() -
stop
public Object[] stop(boolean commit, MouseEvent e, double dx, double dy, boolean clone, Object target) -
paint
-