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 mxGraphComponentprotected mxCellStateprotected mxCellStateprotected mxPointFields inherited from class com.mxgraph.util.mxEventSource
eventListeners, eventsEnabled, eventSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectcreateCell(mxCellState startState, String style) Creates a new instance of mxShape for previewing the edge.protected Rectangleprotected RectanglegetDirtyRect(mxRectangle dirty) booleanisActive()voidprotected voidpaintPreview(mxGraphics2DCanvas canvas) Draws the preview using the graphics canvas.voidrevalidate(mxCellState pState, Object cell) voidstart(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 mxPointtransformScreenPoint(double x, double y) voidupdate(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
-