org.jgraph.graph
public class PortView extends AbstractCellView
| Field Summary | |
|---|---|
| static boolean | allowPortMagic
Controls if port magic should be allowed. |
| protected CellView | lastParent Cache of the last valid parent. |
| static PortRenderer | renderer Renderer for the class. |
| static int | SIZE Default size for all ports is 6. |
| Constructor Summary | |
|---|---|
| PortView()
Constructs an empty portview. | |
| PortView(Object cell)
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. |
| CellHandle | getHandle(GraphContext context)
Returns null. |
| Point2D | getLocation()
Shortcut method to getLocation(null, null) |
| Point2D | getLocation(EdgeView edge)
For backwards compatibility. |
| Point2D | getLocation(EdgeView edge, Point2D nearest)
Returns the point that the port represents with respect to
edge and point, which is the nearest point
to this port view on the edge. |
| CellView | getParentView()
This method ensures a non-null value. |
| int | getPortSize() |
| CellViewRenderer | getRenderer()
Returns a renderer for the class. |
| void | setPortSize(int size) |
| protected boolean | shouldInvokePortMagic(EdgeView edge)
Subclassers can override this to decide whether or not "port magic"
should appear on a given edge. |
Parameters: cell reference to the cell in the model
null.edge and point, which is the nearest point
to this port view on the edge. edge and point
may be null.Returns: the port size
Parameters: size the port size to set