|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgraph.graph.AbstractCellView
org.jgraph.graph.PortView
public class PortView
The default implementation of a port view.
Field Summary | |
---|---|
protected CellView |
lastParent
Cache of the last valid parent. |
static PortRenderer |
renderer
Renderer for the class. |
protected static int |
size
Default size for all ports is 6. |
Fields inherited from class org.jgraph.graph.AbstractCellView |
---|
allAttributes, attributes, cell, cellEditor, childViews, graph, mapper, parent |
Constructor Summary | |
---|---|
PortView(java.lang.Object cell,
JGraph graph,
CellMapper mapper)
Constructs a view that holds a reference to the specified cell, anchor and parent vertex. |
Method Summary | |
---|---|
java.awt.geom.Rectangle2D |
getBounds()
Returns the bounds for the port view. |
protected java.awt.geom.Point2D |
getEdgePoint(EdgeView view,
int index)
Returns the point of edge at index
index . |
CellHandle |
getHandle(GraphContext context)
Returns null . |
java.awt.geom.Point2D |
getLocation(EdgeView edge)
Returns the point that the port represents with respect to edge . |
protected java.awt.geom.Point2D |
getNextPoint(EdgeView edge)
Returns the point that is closest to the port view on edge . |
CellView |
getParentView()
This method ensures a non-null value. |
CellViewRenderer |
getRenderer()
Returns a renderer for the class. |
Methods inherited from class org.jgraph.graph.AbstractCellView |
---|
childUpdated, getAllAttributes, getAttributes, getBounds, getCell, getChildViews, getDescendantViews, getEditor, getGraph, getMapper, getModel, getRendererComponent, intersects, isLeaf, refresh, removeFromParent, scale, setAttributes, setBounds, translate, update, updateAllAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static int size
public static PortRenderer renderer
protected transient CellView lastParent
Constructor Detail |
---|
public PortView(java.lang.Object cell, JGraph graph, CellMapper mapper)
cell
- reference to the cell in the modelanchor
- view of the parentanchor
- view of the anchor portMethod Detail |
---|
public CellView getParentView()
getParentView
in interface CellView
getParentView
in class AbstractCellView
public java.awt.geom.Rectangle2D getBounds()
getBounds
in interface CellView
getBounds
in class AbstractCellView
public CellViewRenderer getRenderer()
getRenderer
in class AbstractCellView
public CellHandle getHandle(GraphContext context)
null
.
getHandle
in interface CellView
getHandle
in class AbstractCellView
public java.awt.geom.Point2D getLocation(EdgeView edge)
edge
. edge
may be null
.
protected java.awt.geom.Point2D getNextPoint(EdgeView edge)
edge
. Returns null
if
edge
has less than 2 points.
protected java.awt.geom.Point2D getEdgePoint(EdgeView view, int index)
edge
at index
index
. Avoids calling getLocation
on the opposite port of edge
(possible
infinite recursion).
|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |