Package org.jgraph.graph
Class VertexView
java.lang.Object
org.jgraph.graph.AbstractCellView
org.jgraph.graph.VertexView
- All Implemented Interfaces:
Serializable
,CellView
The default implementation of a vertex view.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Rectangle2D
Reference to the bounds attributestatic final Rectangle2D
static int[]
Array that holds the cursors for the different control points.static VertexRenderer
Renderer for the class.static int[]
Array that holds the cursors for the different control points.static int[]
Array that holds the cursors for the different control points.Fields inherited from class org.jgraph.graph.AbstractCellView
allAttributes, attributes, cell, cellEditor, childViews, groupBounds, parent
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty vertex view.VertexView
(Object cell) Constructs a vertex view for the specified model object and the specified child views. -
Method Summary
Modifier and TypeMethodDescriptionReturns the cached bounds for the vertex.Deprecated.getHandle
(GraphContext context) Returns a cell handle for the view, if the graph and the view are sizeable.getPerimeterPoint
(Point2D source, Point2D p) Deprecated.getPerimeterPoint
(EdgeView edge, Point2D source, Point2D p) Returns the intersection of the bounding rectangle and the straight line between the source and the specified point p.Returns a renderer for the class.void
setCachedBounds
(Rectangle2D bounds) void
update
(GraphLayoutCache cache) Overrides the parent method to udpate the cached points.Methods inherited from class org.jgraph.graph.AbstractCellView
changeAttributes, childUpdated, createAttributeMap, getAllAttributes, getAttributes, getBounds, getCell, getCellAttributes, getCenterPoint, getChildViews, getDescendantViews, getEditor, getParentView, getRendererComponent, includeInGroupBounds, intersects, isLeaf, mergeAttributes, refresh, removeFromParent, scale, setAttributes, setBounds, setCell, translate, updateGroupBounds
-
Field Details
-
renderer
Renderer for the class. -
defaultBounds
-
bounds
Reference to the bounds attribute -
defaultCursors
public static transient int[] defaultCursorsArray that holds the cursors for the different control points. -
xCursors
public static transient int[] xCursorsArray that holds the cursors for the different control points. -
yCursors
public static transient int[] yCursorsArray that holds the cursors for the different control points.
-
-
Constructor Details
-
VertexView
public VertexView()Constructs an empty vertex view. -
VertexView
Constructs a vertex view for the specified model object and the specified child views.- Parameters:
cell
- reference to the model object
-
-
Method Details
-
update
Overrides the parent method to udpate the cached points.- Specified by:
update
in interfaceCellView
- Overrides:
update
in classAbstractCellView
- Parameters:
cache
- TODO
-
getCachedBounds
-
setCachedBounds
-
getRenderer
Returns a renderer for the class.- Specified by:
getRenderer
in classAbstractCellView
- Returns:
- the renderer instance for this view
-
getHandle
Returns a cell handle for the view, if the graph and the view are sizeable.- Specified by:
getHandle
in interfaceCellView
- Specified by:
getHandle
in classAbstractCellView
- Parameters:
context
- the context of this cell view (cells indirectly affected by it)- Returns:
- the cell handle for this view
-
getBounds
Returns the cached bounds for the vertex.- Specified by:
getBounds
in interfaceCellView
- Overrides:
getBounds
in classAbstractCellView
-
getCenterPoint
Deprecated.replaced byAbstractCellView.getCenterPoint(CellView vertex)
- Returns:
- the center point of this vertex
-
getPerimeterPoint
Deprecated. -
getPerimeterPoint
Returns the intersection of the bounding rectangle and the straight line between the source and the specified point p. The specified point is expected not to intersect the bounds. Note: You must override this method if you use a different renderer. This is because this method relies on the VertexRenderer interface, which can not be safely assumed for subclassers.- Specified by:
getPerimeterPoint
in interfaceCellView
- Overrides:
getPerimeterPoint
in classAbstractCellView
-
AbstractCellView.getCenterPoint(CellView vertex)