com.mxgraph.swing.handler
Class mxCellHandler
java.lang.Object
com.mxgraph.swing.handler.mxCellHandler
- Direct Known Subclasses:
- mxEdgeHandler, mxVertexHandler
public class mxCellHandler
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
mxCellHandler
public mxCellHandler(mxGraphComponent graphComponent,
mxCellState state)
- Parameters:
graphComponent
- Enclosing graph component.state
- Cell state for which the handler is created.
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)
Copyright (c) 2008 Gaudenz Alder. All rights reserved.