Package com.mxgraph.swing.handler
Class mxVertexHandler
- java.lang.Object
-
- com.mxgraph.swing.handler.mxCellHandler
-
- com.mxgraph.swing.handler.mxVertexHandler
-
public class mxVertexHandler extends mxCellHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanconstrainedEventWorkaround for shift-key-state not correct in mouseReleased.static java.awt.Cursor[]CURSORSprotected booleangridEnabledEventWorkaround for alt-key-state not correct in mouseReleased.-
Fields inherited from class com.mxgraph.swing.handler.mxCellHandler
bounds, first, graphComponent, handles, handlesVisible, index, preview, state
-
-
Constructor Summary
Constructors Constructor Description mxVertexHandler(mxGraphComponent graphComponent, mxCellState state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.Rectangle[]createHandles()Creates the rectangles that define the handles.protected javax.swing.JComponentcreatePreview()Creates the preview for this handler.protected java.awt.CursorgetCursor(java.awt.event.MouseEvent e, int index)Returns the cursor for the given event and handle.java.awt.ColorgetSelectionColor()Returns the color used to draw the selection border.java.awt.StrokegetSelectionStroke()Returns the stroke used to draw the selection border.voidmouseDragged(java.awt.event.MouseEvent e)Processes the given event.voidmouseReleased(java.awt.event.MouseEvent e)Processes the given event.protected voidmoveLabel(java.awt.event.MouseEvent e)voidpaint(java.awt.Graphics g)Paints the visible handles of this handler.protected voidresizeCell(java.awt.event.MouseEvent e)protected mxRectangleunion(mxRectangle bounds, double dx, double dy, int index)-
Methods inherited from class com.mxgraph.swing.handler.mxCellHandler
destroy, getBounds, getGraphComponent, getHandleBorderColor, getHandleCount, getHandleFillColor, getIndex, getIndexAt, getState, getToolTipText, isActive, isHandleEnabled, isHandlesVisible, isHandleVisible, isIgnoredEvent, isLabel, isLabelMovable, mouseMoved, mousePressed, refresh, reset, setHandlesVisible, start
-
-
-
-
Field Detail
-
CURSORS
public static java.awt.Cursor[] CURSORS
-
gridEnabledEvent
protected transient boolean gridEnabledEvent
Workaround for alt-key-state not correct in mouseReleased.
-
constrainedEvent
protected transient boolean constrainedEvent
Workaround for shift-key-state not correct in mouseReleased.
-
-
Constructor Detail
-
mxVertexHandler
public mxVertexHandler(mxGraphComponent graphComponent, mxCellState state)
- Parameters:
graphComponent-state-
-
-
Method Detail
-
createHandles
protected java.awt.Rectangle[] createHandles()
Description copied from class:mxCellHandlerCreates the rectangles that define the handles.- Overrides:
createHandlesin classmxCellHandler
-
createPreview
protected javax.swing.JComponent createPreview()
Description copied from class:mxCellHandlerCreates the preview for this handler.- Overrides:
createPreviewin 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
-
moveLabel
protected void moveLabel(java.awt.event.MouseEvent e)
-
resizeCell
protected void resizeCell(java.awt.event.MouseEvent e)
- Parameters:
e-
-
getCursor
protected java.awt.Cursor getCursor(java.awt.event.MouseEvent e, int index)Description copied from class:mxCellHandlerReturns the cursor for the given event and handle.- Overrides:
getCursorin classmxCellHandler
-
union
protected mxRectangle union(mxRectangle bounds, double dx, double dy, int index)
- Parameters:
bounds-dx-dy-index-
-
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
-
-