|
JGraph X 0.15.0.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mxgraph.swing.handler.mxCellHandler
com.mxgraph.swing.handler.mxEdgeHandler
public class mxEdgeHandler
Field Summary | |
---|---|
protected boolean |
cloneEnabled
|
protected boolean |
constrainedEvent
Workaround for shift-key-state not correct in mouseReleased. |
protected String |
error
|
protected boolean |
gridEnabledEvent
Workaround for alt-key-state not correct in mouseReleased. |
protected mxCellMarker |
marker
|
protected Point[] |
p
|
Fields inherited from class com.mxgraph.swing.handler.mxCellHandler |
---|
graphComponent, handles, handlesVisible, index, labelMovable, preview, start, state |
Constructor Summary | |
---|---|
mxEdgeHandler(mxGraphComponent graphComponent,
mxCellState state)
|
Method Summary | |
---|---|
protected void |
connect(Object edge,
Object terminal,
boolean isSource,
boolean isClone)
Connects the given edge to the given source or target terminal. |
protected mxPoint |
convertPoint(mxPoint point,
boolean gridEnabled)
|
protected Rectangle |
createHandle(Point center)
|
protected Rectangle |
createHandle(Point center,
int size)
|
protected Rectangle[] |
createHandles()
|
protected Point[] |
createPoints(mxCellState s)
|
protected JComponent |
createPreview()
|
protected Cursor |
getCursor(MouseEvent e,
int index)
|
protected Color |
getHandleFillColor(int index)
|
protected int |
getIndexAt(int x,
int y)
|
protected Rectangle |
getPreviewBounds()
|
boolean |
isCloneEnabled()
|
protected boolean |
isFlipEvent(MouseEvent e)
|
protected boolean |
isIgnoredEvent(MouseEvent e)
No flip event is ignored. |
boolean |
isSource(int index)
Returns true if the current index is 0. |
boolean |
isTarget(int index)
Returns true if the current index is the last index. |
void |
mouseDragged(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
protected void |
moveLabelTo(mxCellState edgeState,
double x,
double y)
Moves the label to the given position. |
protected void |
movePoint(Object edge,
int pointIndex,
mxPoint point)
Moves the edges control point with the given index to the given point. |
void |
paint(Graphics g)
|
void |
setCloneEnabled(boolean cloneEnabled)
|
String |
validateConnection(Object source,
Object target)
Returns the error message or an empty string if the connection for the given source target pair is not valid. |
Methods inherited from class com.mxgraph.swing.handler.mxCellHandler |
---|
getHandleBorderColor, getHandleCount, getState, getToolTipText, isHandlesVisible, isHandleVisible, isLabel, isLabelMovable, mouseMoved, reset, setHandlesVisible, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean cloneEnabled
protected Point[] p
protected transient String error
protected transient boolean gridEnabledEvent
protected transient boolean constrainedEvent
protected mxCellMarker marker
Constructor Detail |
---|
public mxEdgeHandler(mxGraphComponent graphComponent, mxCellState state)
graphComponent
- state
- Method Detail |
---|
public void setCloneEnabled(boolean cloneEnabled)
public boolean isCloneEnabled()
protected boolean isIgnoredEvent(MouseEvent e)
isIgnoredEvent
in class mxCellHandler
protected boolean isFlipEvent(MouseEvent e)
public String validateConnection(Object source, Object target)
public boolean isSource(int index)
public boolean isTarget(int index)
protected Rectangle[] createHandles()
createHandles
in class mxCellHandler
protected Color getHandleFillColor(int index)
getHandleFillColor
in class mxCellHandler
protected int getIndexAt(int x, int y)
getIndexAt
in class mxCellHandler
x
- y
-
protected Rectangle createHandle(Point center)
protected Rectangle createHandle(Point center, int size)
protected Point[] createPoints(mxCellState s)
protected JComponent createPreview()
createPreview
in class mxCellHandler
protected mxPoint convertPoint(mxPoint point, boolean gridEnabled)
point
- gridEnabled
-
protected Rectangle getPreviewBounds()
public void mousePressed(MouseEvent e)
mousePressed
in class mxCellHandler
public void mouseDragged(MouseEvent e)
mouseDragged
in class mxCellHandler
public void mouseReleased(MouseEvent e)
mouseReleased
in class mxCellHandler
protected void movePoint(Object edge, int pointIndex, mxPoint point)
protected void connect(Object edge, Object terminal, boolean isSource, boolean isClone)
edge
- terminal
- isSource
- protected void moveLabelTo(mxCellState edgeState, double x, double y)
protected Cursor getCursor(MouseEvent e, int index)
getCursor
in class mxCellHandler
public void paint(Graphics g)
paint
in class mxCellHandler
|
JGraph X 0.15.0.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |