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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
graphComponent
protected mxGraphComponent graphComponent
previewState
protected mxCellState previewState
sourceState
protected mxCellState sourceState
startPoint
protected mxPoint startPoint
mxConnectPreview
public mxConnectPreview(mxGraphComponent graphComponent)
- Parameters:
graphComponent
-
createCell
protected Object createCell(mxCellState startState,
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(MouseEvent e,
mxCellState startState,
String style)
- Updates the style of the edge preview from the incoming edge
update
public void update(MouseEvent e,
mxCellState targetState,
double x,
double y)
getDirtyRect
protected Rectangle getDirtyRect()
getDirtyRect
protected Rectangle getDirtyRect(mxRectangle dirty)
transformScreenPoint
protected mxPoint transformScreenPoint(double x,
double y)
revalidate
public void revalidate(mxCellState state)
paint
public void paint(Graphics g)
paintPreview
protected void paintPreview(mxGraphics2DCanvas canvas)
- Draws the preview using the graphics canvas.
stop
public Object stop(boolean commit)
stop
public Object stop(boolean commit,
MouseEvent e)
Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.