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.Rectangle2D
cachedBounds
protected GraphContext
context
protected CellView[]
contextViews
int[]
cursors
Array that holds the cursors for the different control points.protected boolean
editing
True if the cell is being edited.protected boolean
firstDrag
protected boolean
firstOverlayInvocation
protected JGraph
graph
protected int
index
protected java.awt.geom.Rectangle2D
initialBounds
protected java.awt.Graphics
offgraphics
Reference to graph off screen graphicsprotected CellView[]
portViews
protected java.awt.geom.Rectangle2D[]
r
protected VertexView
vertex
-
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.Rectangle2D
computeBounds(java.awt.event.MouseEvent event)
protected void
initOffscreen()
protected void
invalidate()
boolean
isConstrainedSizeEvent(java.awt.event.MouseEvent e)
void
mouseDragged(java.awt.event.MouseEvent event)
Process mouse dragged event.void
mouseMoved(java.awt.event.MouseEvent event)
Invoked when the mouse pointer has been moved on a component (with no buttons down).void
mousePressed(java.awt.event.MouseEvent event)
Process mouse pressed event.void
mouseReleased(java.awt.event.MouseEvent e)
Messaged when the drag operation has terminated with a drop.void
overlay(java.awt.Graphics g)
Paint the handle on the given graphics object during mouse operations.void
paint(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:CellHandle
Paint the handle on the given graphics object once.- Specified by:
paint
in 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:CellHandle
Paint the handle on the given graphics object during mouse operations.- Specified by:
overlay
in 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:
mouseMoved
in interfaceCellHandle
- Parameters:
event
- the mouse event to be processed
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent event)
Process mouse pressed event.- Specified by:
mousePressed
in interfaceCellHandle
- Parameters:
event
- the mouse event to be processed
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent event)
Process mouse dragged event.- Specified by:
mouseDragged
in 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:CellHandle
Messaged when the drag operation has terminated with a drop.- Specified by:
mouseReleased
in interfaceCellHandle
- Parameters:
e
- the drop event to be processed
-
invalidate
protected void invalidate()
-
-