Package org.jgraph.graph
Class VertexView.SizeHandle
- java.lang.Object
-
- org.jgraph.graph.VertexView.SizeHandle
-
- All Implemented Interfaces:
java.io.Serializable,CellHandle
- Enclosing class:
- VertexView
public static class VertexView.SizeHandle extends java.lang.Object implements CellHandle, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.geom.Rectangle2DcachedBoundsprotected GraphContextcontextprotected CellView[]contextViewsint[]cursorsArray that holds the cursors for the different control points.protected booleaneditingTrue if the cell is being edited.protected booleanfirstDragprotected booleanfirstOverlayInvocationprotected JGraphgraphprotected intindexprotected java.awt.geom.Rectangle2DinitialBoundsprotected java.awt.GraphicsoffgraphicsReference to graph off screen graphicsprotected CellView[]portViewsprotected java.awt.geom.Rectangle2D[]rprotected VertexViewvertex
-
Constructor Summary
Constructors Constructor Description SizeHandle(VertexView vertexview, GraphContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.geom.Rectangle2DcomputeBounds(java.awt.event.MouseEvent event)protected voidinitOffscreen()protected voidinvalidate()booleanisConstrainedSizeEvent(java.awt.event.MouseEvent e)voidmouseDragged(java.awt.event.MouseEvent event)Process mouse dragged event.voidmouseMoved(java.awt.event.MouseEvent event)Invoked when the mouse pointer has been moved on a component (with no buttons down).voidmousePressed(java.awt.event.MouseEvent event)Process mouse pressed event.voidmouseReleased(java.awt.event.MouseEvent e)Messaged when the drag operation has terminated with a drop.voidoverlay(java.awt.Graphics g)Paint the handle on the given graphics object during mouse operations.voidpaint(java.awt.Graphics g)Paint the handle on the given graphics object once.
-
-
-
Field Detail
-
offgraphics
protected transient java.awt.Graphics offgraphics
Reference to graph off screen graphics
-
firstDrag
protected transient boolean firstDrag
-
graph
protected transient JGraph graph
-
vertex
protected transient VertexView vertex
-
portViews
protected transient CellView[] portViews
-
cachedBounds
protected transient java.awt.geom.Rectangle2D cachedBounds
-
context
protected transient GraphContext context
-
initialBounds
protected transient java.awt.geom.Rectangle2D initialBounds
-
contextViews
protected transient CellView[] contextViews
-
index
protected transient int index
-
r
protected transient java.awt.geom.Rectangle2D[] r
-
firstOverlayInvocation
protected boolean firstOverlayInvocation
-
cursors
public transient int[] cursors
Array that holds the cursors for the different control points.
-
editing
protected boolean editing
True if the cell is being edited.
-
-
Constructor Detail
-
SizeHandle
public SizeHandle(VertexView vertexview, GraphContext ctx)
-
-
Method Detail
-
isConstrainedSizeEvent
public boolean isConstrainedSizeEvent(java.awt.event.MouseEvent e)
-
paint
public void paint(java.awt.Graphics g)
Description copied from interface:CellHandlePaint the handle on the given graphics object once.- Specified by:
paintin interfaceCellHandle- Parameters:
g- the graphics object to paint the handle on
-
initOffscreen
protected void initOffscreen()
-
overlay
public void overlay(java.awt.Graphics g)
Description copied from interface:CellHandlePaint the handle on the given graphics object during mouse operations.- Specified by:
overlayin interfaceCellHandle- Parameters:
g- the graphics object to paint the handle on
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent event)
Invoked when the mouse pointer has been moved on a component (with no buttons down).- Specified by:
mouseMovedin interfaceCellHandle- Parameters:
event- the mouse event to be processed
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent event)
Process mouse pressed event.- Specified by:
mousePressedin interfaceCellHandle- Parameters:
event- the mouse event to be processed
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent event)
Process mouse dragged event.- Specified by:
mouseDraggedin interfaceCellHandle- Parameters:
event- the drag event to be processed
-
computeBounds
protected java.awt.geom.Rectangle2D computeBounds(java.awt.event.MouseEvent event)
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
Description copied from interface:CellHandleMessaged when the drag operation has terminated with a drop.- Specified by:
mouseReleasedin interfaceCellHandle- Parameters:
e- the drop event to be processed
-
invalidate
protected void invalidate()
-
-