|
JGraph |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.jgraph.graph.AbstractCellView
|
+--org.jgraph.graph.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(Object cell,
JGraph graph,
CellMapper mapper)
Constructs a view that holds a reference to the specified cell, anchor and parent vertex. |
|
| Method Summary | |
Rectangle2D |
getBounds()
Returns the bounds for the port view. |
protected Point2D |
getEdgePoint(EdgeView view,
int index)
Returns the point of edge at index
index. |
CellHandle |
getHandle(GraphContext context)
Returns null. |
Point2D |
getLocation(EdgeView edge)
Returns the point that the port represents with respect to edge. |
protected 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(Object cell,
JGraph graph,
CellMapper mapper)
cell - reference to the cell in the model| Method Detail |
public CellView getParentView()
getParentView in interface CellViewgetParentView in class AbstractCellViewpublic Rectangle2D getBounds()
getBounds in interface CellViewgetBounds in class AbstractCellViewpublic CellViewRenderer getRenderer()
getRenderer in class AbstractCellViewpublic CellHandle getHandle(GraphContext context)
null.
getHandle in interface CellViewgetHandle in class AbstractCellViewpublic Point2D getLocation(EdgeView edge)
edge. edge may be null.
protected Point2D getNextPoint(EdgeView edge)
edge. Returns null if
edge has less than 2 points.
protected 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 | ||||||||||