com.mxgraph.swing.handler
Class mxEdgeHandler
- java.lang.Object
-
- com.mxgraph.swing.handler.mxCellHandler
-
- com.mxgraph.swing.handler.mxEdgeHandler
-
- Direct Known Subclasses:
- mxElbowEdgeHandler
public class mxEdgeHandler extends mxCellHandler
-
-
Constructor Summary
Constructors Constructor and Description mxEdgeHandler(mxGraphComponent graphComponent, mxCellState state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetIndexAt(int x, int y)Returns the index of the handle at the given location.java.awt.ColorgetSelectionColor()Returns the color used to draw the selection border.java.awt.StrokegetSelectionStroke()Returns the stroke used to draw the selection border.booleanisCloneEnabled()booleanisSource(int index)Returns true if the current index is 0.booleanisTarget(int index)Returns true if the current index is the last index.voidmouseDragged(java.awt.event.MouseEvent e)Processes the given event.voidmousePressed(java.awt.event.MouseEvent e)Processes the given event.voidmouseReleased(java.awt.event.MouseEvent e)Processes the given event.voidpaint(java.awt.Graphics g)Paints the visible handles of this handler.voidreset()Extends the implementation to reset the current error and marker.voidsetCloneEnabled(boolean cloneEnabled)java.lang.StringvalidateConnection(java.lang.Object source, java.lang.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
getBounds, getGraphComponent, getIndex, getState, getToolTipText, isActive, isHandlesVisible, isLabel, isLabelMovable, mouseMoved, refresh, setHandlesVisible, start
-
-
-
-
Constructor Detail
-
mxEdgeHandler
public mxEdgeHandler(mxGraphComponent graphComponent, mxCellState state)
- Parameters:
graphComponent-state-
-
-
Method Detail
-
setCloneEnabled
public void setCloneEnabled(boolean cloneEnabled)
-
isCloneEnabled
public boolean isCloneEnabled()
-
validateConnection
public java.lang.String validateConnection(java.lang.Object source, java.lang.Object target)Returns the error message or an empty string if the connection for the given source target pair is not valid. Otherwise it returns null.
-
isSource
public boolean isSource(int index)
Returns true if the current index is 0.
-
isTarget
public boolean isTarget(int index)
Returns true if the current index is the last index.
-
getIndexAt
public int getIndexAt(int x, int y)Description copied from class:mxCellHandlerReturns the index of the handle at the given location.- Overrides:
getIndexAtin classmxCellHandler- Parameters:
x-y-- Returns:
- Returns the inde of the handle at the given location.
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
Description copied from class:mxCellHandlerProcesses the given event.- Overrides:
mousePressedin classmxCellHandler
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
Description copied from class:mxCellHandlerProcesses the given event.- Overrides:
mouseDraggedin classmxCellHandler
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
Description copied from class:mxCellHandlerProcesses the given event.- Overrides:
mouseReleasedin classmxCellHandler
-
reset
public void reset()
Extends the implementation to reset the current error and marker.- Overrides:
resetin classmxCellHandler
-
getSelectionColor
public java.awt.Color getSelectionColor()
Description copied from class:mxCellHandlerReturns the color used to draw the selection border. This implementation returns null.- Overrides:
getSelectionColorin classmxCellHandler
-
getSelectionStroke
public java.awt.Stroke getSelectionStroke()
Description copied from class:mxCellHandlerReturns the stroke used to draw the selection border. This implementation returns null.- Overrides:
getSelectionStrokein classmxCellHandler
-
paint
public void paint(java.awt.Graphics g)
Description copied from class:mxCellHandlerPaints the visible handles of this handler.- Overrides:
paintin classmxCellHandler
-
-
DataMelt 3.0 © DataMelt by jWork.ORG