public class mxMovePreview extends mxEventSource
mxEventSource.mxIEventListener
Modifier and Type | Field and Description |
---|---|
protected boolean |
clonePreview
Specifies if the preview should use clones of the original shapes.
|
protected boolean |
contextPreview
Specifies if connected, unselected edges should be included in the
preview.
|
protected mxGraphComponent |
graphComponent |
protected boolean |
hideSelectionHandler
Specifies if the selection cells handler should be hidden while the
preview is visible.
|
protected java.awt.Rectangle |
initialPlaceholder |
protected mxRectangle |
lastDirty |
protected java.lang.Object[] |
movingCells |
protected java.awt.Rectangle |
placeholder |
protected boolean |
placeholderPreview
Specifies if the placeholder rectangle should be used for all
previews.
|
protected mxCellStatePreview |
preview |
protected mxCellState[] |
previewStates |
protected mxCellState |
startState |
protected int |
threshold
Maximum number of cells to preview individually.
|
eventListeners, eventsEnabled, eventSource
Constructor and Description |
---|
mxMovePreview(mxGraphComponent graphComponent)
Constructs a new rubberband selection for the given graph component.
|
Modifier and Type | Method and Description |
---|---|
mxCellStatePreview |
createCellStatePreview() |
java.lang.Object[] |
getCells(mxCellState initialState) |
java.lang.Object[] |
getMovingCells()
FIXME: Cells should be assigned outside of getPreviewStates
|
protected mxRectangle |
getPlaceholderBounds(mxCellState startState) |
protected mxCellState[] |
getPreviewStates()
Returns the states that are affected by the move operation.
|
int |
getThreshold() |
boolean |
isActive() |
protected boolean |
isCellOpaque(java.lang.Object cell) |
boolean |
isClonePreview() |
boolean |
isContextPreview() |
boolean |
isHideSelectionHandler() |
boolean |
isPlaceholderPreview() |
void |
paint(java.awt.Graphics g) |
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(java.awt.event.MouseEvent e,
mxCellState state)
Sets the translation of the preview.
|
java.lang.Object[] |
stop(boolean commit,
java.awt.event.MouseEvent e,
double dx,
double dy,
boolean clone,
java.lang.Object target) |
void |
update(java.awt.event.MouseEvent e,
double dx,
double dy,
boolean clone)
Sets the translation of the preview.
|
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
protected mxGraphComponent graphComponent
protected int threshold
protected boolean placeholderPreview
protected boolean clonePreview
protected boolean contextPreview
protected boolean hideSelectionHandler
protected transient mxCellState startState
protected transient mxCellState[] previewStates
protected transient java.lang.Object[] movingCells
protected transient java.awt.Rectangle initialPlaceholder
protected transient java.awt.Rectangle placeholder
protected transient mxRectangle lastDirty
protected transient mxCellStatePreview preview
public mxMovePreview(mxGraphComponent graphComponent)
graphComponent
- Component that contains the rubberband.public int getThreshold()
public void setThreshold(int value)
public boolean isPlaceholderPreview()
public void setPlaceholderPreview(boolean value)
public boolean isClonePreview()
public void setClonePreview(boolean value)
public boolean isContextPreview()
public void setContextPreview(boolean value)
public boolean isHideSelectionHandler()
public void setHideSelectionHandler(boolean value)
public boolean isActive()
public java.lang.Object[] getMovingCells()
public java.lang.Object[] getCells(mxCellState initialState)
protected mxCellState[] getPreviewStates()
protected boolean isCellOpaque(java.lang.Object cell)
public void start(java.awt.event.MouseEvent e, mxCellState state)
protected mxRectangle getPlaceholderBounds(mxCellState startState)
public mxCellStatePreview createCellStatePreview()
public void update(java.awt.event.MouseEvent e, double dx, double dy, boolean clone)
protected void repaint(mxRectangle dirty)
protected void reset()
public java.lang.Object[] stop(boolean commit, java.awt.event.MouseEvent e, double dx, double dy, boolean clone, java.lang.Object target)
public void paint(java.awt.Graphics g)
Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.