public class mxConnectPreview extends mxEventSource
mxEventSource.mxIEventListener
Modifier and Type | Field and Description |
---|---|
protected mxGraphComponent |
graphComponent |
protected mxCellState |
previewState |
protected mxCellState |
sourceState |
protected mxPoint |
startPoint |
eventListeners, eventsEnabled, eventSource
Constructor and Description |
---|
mxConnectPreview(mxGraphComponent graphComponent) |
Modifier and Type | Method and Description |
---|---|
protected Object |
createCell(mxCellState startState,
String style)
Creates a new instance of mxShape for previewing the edge.
|
protected Rectangle |
getDirtyRect() |
protected Rectangle |
getDirtyRect(mxRectangle dirty) |
mxCellState |
getPreviewState() |
mxCellState |
getSourceState() |
mxPoint |
getStartPoint() |
boolean |
isActive() |
void |
paint(Graphics g) |
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 edge
|
Object |
stop(boolean commit) |
Object |
stop(boolean commit,
MouseEvent e) |
protected mxPoint |
transformScreenPoint(double x,
double y) |
void |
update(MouseEvent e,
mxCellState targetState,
double x,
double y) |
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
protected mxGraphComponent graphComponent
protected mxCellState previewState
protected mxCellState sourceState
protected mxPoint startPoint
public mxConnectPreview(mxGraphComponent graphComponent)
graphComponent
- protected Object createCell(mxCellState startState, String style)
public boolean isActive()
public mxCellState getSourceState()
public mxCellState getPreviewState()
public mxPoint getStartPoint()
public void start(MouseEvent e, mxCellState startState, String style)
public void update(MouseEvent e, mxCellState targetState, double x, double y)
protected Rectangle getDirtyRect()
protected Rectangle getDirtyRect(mxRectangle dirty)
protected mxPoint transformScreenPoint(double x, double y)
public void revalidate(mxCellState state)
public void paint(Graphics g)
protected void paintPreview(mxGraphics2DCanvas canvas)
public Object stop(boolean commit)
public Object stop(boolean commit, MouseEvent e)
Copyright (c) 2010-2017 Gaudenz Alder, JGraph Ltd. All rights reserved.