JGraph X 0.15.0.3


com.mxgraph.swing.handler
Class mxCellHandler

java.lang.Object
  extended by com.mxgraph.swing.handler.mxCellHandler
Direct Known Subclasses:
mxEdgeHandler, mxVertexHandler

public class mxCellHandler
extends Object


Field Summary
protected  mxGraphComponent graphComponent
           
protected  Rectangle[] handles
           
protected  boolean handlesVisible
           
protected  int index
           
protected  boolean labelMovable
           
protected  JComponent preview
           
protected  Point start
           
protected  mxCellState state
           
 
Constructor Summary
mxCellHandler(mxGraphComponent graphComponent, mxCellState state)
           
 
Method Summary
protected  Rectangle[] createHandles()
           
protected  JComponent createPreview()
           
protected  Cursor getCursor(MouseEvent e, int index)
           
protected  Color getHandleBorderColor(int index)
           
protected  int getHandleCount()
           
protected  Color getHandleFillColor(int index)
           
protected  int getIndexAt(int x, int y)
           
 mxCellState getState()
           
 String getToolTipText(MouseEvent e)
          Hook for subclassers to return tooltip texts for certain points on the handle.
 boolean isHandlesVisible()
           
protected  boolean isHandleVisible(int index)
           
protected  boolean isIgnoredEvent(MouseEvent e)
           
 boolean isLabel(int index)
          Returns true if the given index is the index of the last handle.
 boolean isLabelMovable()
           
 void mouseDragged(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void paint(Graphics g)
           
 void reset()
           
 void setHandlesVisible(boolean handlesVisible)
           
 void start(MouseEvent e, int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

graphComponent

protected mxGraphComponent graphComponent

state

protected mxCellState state

handles

protected Rectangle[] handles

labelMovable

protected boolean labelMovable

handlesVisible

protected boolean handlesVisible

preview

protected transient JComponent preview

start

protected transient Point start

index

protected transient int index
Constructor Detail

mxCellHandler

public mxCellHandler(mxGraphComponent graphComponent,
                     mxCellState state)
Parameters:
graphComponent - Enclosing graph component.
state - Cell state for which the handler is created.
Method Detail

isLabelMovable

public boolean isLabelMovable()

isHandlesVisible

public boolean isHandlesVisible()

setHandlesVisible

public void setHandlesVisible(boolean handlesVisible)

isLabel

public boolean isLabel(int index)
Returns true if the given index is the index of the last handle.


createHandles

protected Rectangle[] createHandles()

getHandleCount

protected int getHandleCount()

getState

public mxCellState getState()
Returns:
Returns the cell state that is associated with this handler.

getToolTipText

public String getToolTipText(MouseEvent e)
Hook for subclassers to return tooltip texts for certain points on the handle.


getIndexAt

protected int getIndexAt(int x,
                         int y)
Parameters:
x -
y -
Returns:
Returns the handle index for the given location.

mousePressed

public void mousePressed(MouseEvent e)
Parameters:
e -

start

public void start(MouseEvent e,
                  int index)

isIgnoredEvent

protected boolean isIgnoredEvent(MouseEvent e)

createPreview

protected JComponent createPreview()

mouseDragged

public void mouseDragged(MouseEvent e)
Parameters:
e -

mouseReleased

public void mouseReleased(MouseEvent e)
Parameters:
e -

reset

public void reset()

mouseMoved

public void mouseMoved(MouseEvent e)
Parameters:
e -

getCursor

protected Cursor getCursor(MouseEvent e,
                           int index)
Parameters:
e -
index -
Returns:
Returns the cursor for the given event and index.

paint

public void paint(Graphics g)
Parameters:
g -

isHandleVisible

protected boolean isHandleVisible(int index)

getHandleFillColor

protected Color getHandleFillColor(int index)

getHandleBorderColor

protected Color getHandleBorderColor(int index)

JGraph X 0.15.0.3


Copyright (c) 2008 Gaudenz Alder. All rights reserved.