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 Rectangle |
initialPlaceholder |
protected mxRectangle |
lastDirty |
protected Object[] |
movingCells |
protected 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() |
Object[] |
getCells(mxCellState initialState) |
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(Object cell) |
boolean |
isClonePreview() |
boolean |
isContextPreview() |
boolean |
isHideSelectionHandler() |
boolean |
isPlaceholderPreview() |
void |
paint(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(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.
|
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 Object[] movingCells
protected transient Rectangle initialPlaceholder
protected transient 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 Object[] getMovingCells()
public Object[] getCells(mxCellState initialState)
protected mxCellState[] getPreviewStates()
protected boolean isCellOpaque(Object cell)
public void start(MouseEvent e, mxCellState state)
protected mxRectangle getPlaceholderBounds(mxCellState startState)
public mxCellStatePreview createCellStatePreview()
public void update(MouseEvent e, double dx, double dy, boolean clone)
protected void repaint(mxRectangle dirty)
protected void reset()
public Object[] stop(boolean commit, MouseEvent e, double dx, double dy, boolean clone, Object target)
public void paint(Graphics g)
Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.