org.jgraph.graph

Class VertexView.SizeHandle

Enclosing Class:
VertexView
Implemented Interfaces:
CellHandle, Serializable

public static class VertexView.SizeHandle
extends java.lang.Object
implements CellHandle, Serializable

Field Summary

protected 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 Rectangle2D
initialBounds
protected Graphics
offgraphics
Reference to graph off screen graphics
protected CellView[]
portViews
protected Rectangle2D[]
r
protected VertexView
vertex

Constructor Summary

SizeHandle(VertexView vertexview, GraphContext ctx)

Method Summary

protected Rectangle2D
computeBounds(MouseEvent event)
protected void
initOffscreen()
protected void
invalidate()
boolean
isConstrainedSizeEvent(MouseEvent e)
void
mouseDragged(MouseEvent event)
Process mouse dragged event.
void
mouseMoved(MouseEvent event)
Invoked when the mouse pointer has been moved on a component (with no buttons down).
void
mousePressed(MouseEvent event)
Process mouse pressed event.
void
mouseReleased(MouseEvent e)
void
overlay(Graphics g)
void
paint(Graphics g)

Field Details

cachedBounds

protected Rectangle2D cachedBounds

context

protected GraphContext context

contextViews

protected CellView[] contextViews

cursors

public int[] cursors
Array that holds the cursors for the different control points.

editing

protected boolean editing
True if the cell is being edited.

firstDrag

protected boolean firstDrag

firstOverlayInvocation

protected boolean firstOverlayInvocation

graph

protected JGraph graph

index

protected int index

initialBounds

protected Rectangle2D initialBounds

offgraphics

protected Graphics offgraphics
Reference to graph off screen graphics

portViews

protected CellView[] portViews

r

protected Rectangle2D[] r

vertex

protected VertexView vertex

Constructor Details

SizeHandle

public SizeHandle(VertexView vertexview,
                  GraphContext ctx)

Method Details

computeBounds

protected Rectangle2D computeBounds(MouseEvent event)

initOffscreen

protected void initOffscreen()

invalidate

protected void invalidate()

isConstrainedSizeEvent

public boolean isConstrainedSizeEvent(MouseEvent e)

mouseDragged

public void mouseDragged(MouseEvent event)
Process mouse dragged event.
Specified by:
mouseDragged in interface CellHandle

mouseMoved

public void mouseMoved(MouseEvent event)
Invoked when the mouse pointer has been moved on a component (with no buttons down).
Specified by:
mouseMoved in interface CellHandle

mousePressed

public void mousePressed(MouseEvent event)
Process mouse pressed event.
Specified by:
mousePressed in interface CellHandle

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface CellHandle

overlay

public void overlay(Graphics g)
Specified by:
overlay in interface CellHandle

paint

public void paint(Graphics g)
Specified by:
paint in interface CellHandle

Copyright (C) 2001-2006 Gaudenz Alder. All rights reserved.