Package com.mxgraph.swing.handler
Class mxConnectPreview
- java.lang.Object
-
- com.mxgraph.util.mxEventSource
-
- com.mxgraph.swing.handler.mxConnectPreview
-
public class mxConnectPreview 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
Fields Modifier and Type Field Description protected mxGraphComponentgraphComponentprotected mxCellStatepreviewStateprotected mxCellStatesourceStateprotected mxPointstartPoint-
Fields inherited from class com.mxgraph.util.mxEventSource
eventListeners, eventsEnabled, eventSource
-
-
Constructor Summary
Constructors Constructor Description mxConnectPreview(mxGraphComponent graphComponent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectcreateCell(mxCellState startState, java.lang.String style)Creates a new instance of mxShape for previewing the edge.protected java.awt.RectanglegetDirtyRect()protected java.awt.RectanglegetDirtyRect(mxRectangle dirty)mxCellStategetPreviewState()mxCellStategetSourceState()mxPointgetStartPoint()booleanisActive()voidpaint(java.awt.Graphics g)protected voidpaintPreview(mxGraphics2DCanvas canvas)Draws the preview using the graphics canvas.voidrevalidate(mxCellState state)voidstart(java.awt.event.MouseEvent e, mxCellState startState, java.lang.String style)Updates the style of the edge preview from the incoming edgejava.lang.Objectstop(boolean commit)java.lang.Objectstop(boolean commit, java.awt.event.MouseEvent e)protected mxPointtransformScreenPoint(double x, double y)voidupdate(java.awt.event.MouseEvent e, mxCellState targetState, double x, double y)-
Methods inherited from class com.mxgraph.util.mxEventSource
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
-
-
-
-
Field Detail
-
graphComponent
protected mxGraphComponent graphComponent
-
previewState
protected mxCellState previewState
-
sourceState
protected mxCellState sourceState
-
startPoint
protected mxPoint startPoint
-
-
Constructor Detail
-
mxConnectPreview
public mxConnectPreview(mxGraphComponent graphComponent)
- Parameters:
graphComponent-
-
-
Method Detail
-
createCell
protected java.lang.Object createCell(mxCellState startState, java.lang.String style)
Creates a new instance of mxShape for previewing the edge.
-
isActive
public boolean isActive()
-
getSourceState
public mxCellState getSourceState()
-
getPreviewState
public mxCellState getPreviewState()
-
getStartPoint
public mxPoint getStartPoint()
-
start
public void start(java.awt.event.MouseEvent e, mxCellState startState, java.lang.String style)Updates the style of the edge preview from the incoming edge
-
update
public void update(java.awt.event.MouseEvent e, mxCellState targetState, double x, double y)
-
getDirtyRect
protected java.awt.Rectangle getDirtyRect()
-
getDirtyRect
protected java.awt.Rectangle getDirtyRect(mxRectangle dirty)
-
transformScreenPoint
protected mxPoint transformScreenPoint(double x, double y)
-
revalidate
public void revalidate(mxCellState state)
-
paint
public void paint(java.awt.Graphics g)
-
paintPreview
protected void paintPreview(mxGraphics2DCanvas canvas)
Draws the preview using the graphics canvas.
-
stop
public java.lang.Object stop(boolean commit)
-
stop
public java.lang.Object stop(boolean commit, java.awt.event.MouseEvent e)
-
-