JGraph X 1.4.0.9

## com.mxgraph.swing.handler
Class mxMovePreview

    java.lang.Object
      com.mxgraph.util.mxEventSource
          com.mxgraph.swing.handler.mxMovePreview

    public class mxMovePreview

extends mxEventSource

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
`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.

Fields inherited from class com.mxgraph.util.mxEventSource
`eventListeners, eventsEnabled, eventSource`

Constructor Summary
`mxMovePreview(mxGraphComponent graphComponent)` Constructs a new rubberband selection for the given graph component.

Method Summary
`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.

Methods inherited from class com.mxgraph.util.mxEventSource
`addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### graphComponent

    protected mxGraphComponent graphComponent

### threshold

    protected int threshold

  Maximum number of cells to preview individually. Default is 200.

### placeholderPreview

    protected boolean placeholderPreview

  Specifies if the placeholder rectangle should be used for all previews. Default is false. This overrides all other preview settings if true.

### clonePreview

    protected boolean clonePreview

  Specifies if the preview should use clones of the original shapes. Default is true.

### contextPreview

    protected boolean contextPreview

  Specifies 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 hideSelectionHandler

  Specifies if the selection cells handler should be hidden while the preview is visible. Default is false.

### startState

    protected transient mxCellState startState

### previewStates

    protected transient mxCellState[] previewStates

### movingCells

    protected transient java.lang.Object[] movingCells

### initialPlaceholder

    protected transient java.awt.Rectangle initialPlaceholder

### placeholder

    protected transient java.awt.Rectangle placeholder

### lastDirty

    protected transient mxRectangle lastDirty

### preview

    protected transient mxCellStatePreview preview

Constructor Detail

### mxMovePreview

    public mxMovePreview(mxGraphComponent graphComponent)

  Constructs a new rubberband selection for the given graph component.

  Parameters:
    `graphComponent` - Component that contains the rubberband.

Method Detail

### 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

    public java.lang.Object[] getMovingCells()

  FIXME: Cells should be assigned outside of getPreviewStates

### getCells

    public java.lang.Object[] getCells(mxCellState initialState)

### getPreviewStates

    protected mxCellState[] getPreviewStates()

  Returns the states that are affected by the move operation.

### isCellOpaque

    protected boolean isCellOpaque(java.lang.Object cell)

### start

    public void start(java.awt.event.MouseEvent e,
                      mxCellState state)

  Sets the translation of the preview.

### getPlaceholderBounds

    protected mxRectangle getPlaceholderBounds(mxCellState startState)

### createCellStatePreview

    public mxCellStatePreview createCellStatePreview()

### update

    public void update(java.awt.event.MouseEvent e,
                       double dx,
                       double dy,
                       boolean clone)

  Sets the translation of the preview.

### repaint

    protected void repaint(mxRectangle dirty)

### reset

    protected void reset()

### stop

    public java.lang.Object[] stop(boolean commit,
                                   java.awt.event.MouseEvent e,
                                   double dx,
                                   double dy,
                                   boolean clone,
                                   java.lang.Object target)

### paint

    public void paint(java.awt.Graphics g)

JGraph X 1.4.0.9

Copyright (c) 2010 Gaudenz Alder. All rights reserved.