Package com.mxgraph.swing.handler
Class mxConnectPreview
java.lang.Object
com.mxgraph.util.mxEventSource
com.mxgraph.swing.handler.mxConnectPreview
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 mxGraphComponent
protected mxCellState
protected mxCellState
protected mxPoint
Fields inherited from class com.mxgraph.util.mxEventSource
eventListeners, eventsEnabled, eventSource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
createCell
(mxCellState startState, String style) Creates a new instance of mxShape for previewing the edge.protected Rectangle
protected Rectangle
getDirtyRect
(mxRectangle dirty) boolean
isActive()
void
protected void
paintPreview
(mxGraphics2DCanvas canvas) Draws the preview using the graphics canvas.void
revalidate
(mxCellState state) void
start
(MouseEvent e, mxCellState startState, String style) Updates the style of the edge preview from the incoming edgestop
(boolean commit) stop
(boolean commit, MouseEvent e) protected mxPoint
transformScreenPoint
(double x, double y) void
update
(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 Details
-
graphComponent
-
previewState
-
sourceState
-
startPoint
-
-
Constructor Details
-
mxConnectPreview
- Parameters:
graphComponent
-
-
-
Method Details
-
createCell
Creates a new instance of mxShape for previewing the edge. -
isActive
public boolean isActive() -
getSourceState
-
getPreviewState
-
getStartPoint
-
start
Updates the style of the edge preview from the incoming edge -
update
-
getDirtyRect
-
getDirtyRect
-
transformScreenPoint
-
revalidate
-
paint
-
paintPreview
Draws the preview using the graphics canvas. -
stop
-
stop
-