|
||||||||||
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(Object cell,
JGraph graph,
CellMapper mapper)
Constructs a view that holds a reference to the specified cell, anchor and parent vertex. |
Method Summary | |
---|---|
Rectangle |
getBounds()
Returns the bounds for the port view. |
protected Point |
getEdgePoint(EdgeView view,
int index)
Returns the point of edge at index
index . |
CellHandle |
getHandle(GraphContext context)
Returns null . |
Point |
getLocation(EdgeView edge)
Returns the point that the port represents with respect to edge . |
protected Point |
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 modelgraph
- mapper
- Method Detail |
---|
public CellView getParentView()
getParentView
in interface CellView
getParentView
in class AbstractCellView
public Rectangle 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 Point getLocation(EdgeView edge)
edge
. edge
may be null
.
protected Point getNextPoint(EdgeView edge)
edge
. Returns null
if
edge
has less than 2 points.
protected Point getEdgePoint(EdgeView view, int index)
edge
at index
index
. Avoids calling getLocation
on the opposite port of edge
(possible
infinite recursion).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |