mxGraph 1.10.4.0


com.mxgraph.swing.handler
Class mxVertexHandler

java.lang.Object
  extended by com.mxgraph.swing.handler.mxCellHandler
      extended by com.mxgraph.swing.handler.mxVertexHandler

public class mxVertexHandler
extends mxCellHandler


Field Summary
protected  boolean constrainedEvent
          Workaround for shift-key-state not correct in mouseReleased.
static Cursor[] CURSORS
           
protected  boolean gridEnabledEvent
          Workaround 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
mxVertexHandler(mxGraphComponent graphComponent, mxCellState state)
           
 
Method Summary
protected  Rectangle[] createHandles()
          Creates the rectangles that define the handles.
protected  JComponent createPreview()
          Creates the preview for this handler.
protected  Cursor getCursor(MouseEvent e, int index)
          Returns the cursor for the given event and handle.
 Color getSelectionColor()
          Returns the color used to draw the selection border.
 Stroke getSelectionStroke()
          Returns the stroke used to draw the selection border.
 void mouseDragged(MouseEvent e)
          Processes the given event.
 void mouseReleased(MouseEvent e)
          Processes the given event.
protected  void moveLabel(MouseEvent e)
           
 void paint(Graphics g)
          Paints the visible handles of this handler.
protected  void resizeCell(MouseEvent e)
           
protected  mxRectangle union(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURSORS

public static 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 Rectangle[] createHandles()
Description copied from class: mxCellHandler
Creates the rectangles that define the handles.

Overrides:
createHandles in class mxCellHandler

createPreview

protected JComponent createPreview()
Description copied from class: mxCellHandler
Creates the preview for this handler.

Overrides:
createPreview in class mxCellHandler

mouseDragged

public void mouseDragged(MouseEvent e)
Description copied from class: mxCellHandler
Processes the given event.

Overrides:
mouseDragged in class mxCellHandler

mouseReleased

public void mouseReleased(MouseEvent e)
Description copied from class: mxCellHandler
Processes the given event.

Overrides:
mouseReleased in class mxCellHandler

moveLabel

protected void moveLabel(MouseEvent e)

resizeCell

protected void resizeCell(MouseEvent e)
Parameters:
e -

getCursor

protected Cursor getCursor(MouseEvent e,
                           int index)
Description copied from class: mxCellHandler
Returns the cursor for the given event and handle.

Overrides:
getCursor in class mxCellHandler

union

protected mxRectangle union(mxRectangle bounds,
                            double dx,
                            double dy,
                            int index)
Parameters:
bounds -
dx -
dy -
index -

getSelectionColor

public Color getSelectionColor()
Description copied from class: mxCellHandler
Returns the color used to draw the selection border. This implementation returns null.

Overrides:
getSelectionColor in class mxCellHandler

getSelectionStroke

public Stroke getSelectionStroke()
Description copied from class: mxCellHandler
Returns the stroke used to draw the selection border. This implementation returns null.

Overrides:
getSelectionStroke in class mxCellHandler

paint

public void paint(Graphics g)
Description copied from class: mxCellHandler
Paints the visible handles of this handler.

Overrides:
paint in class mxCellHandler

mxGraph 1.10.4.0


Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.