org.jgraph.graph.PortView Class Reference

Inheritance diagram for org.jgraph.graph.PortView:

org.jgraph.graph.AbstractCellView org.jgraph.graph.CellView List of all members.

Public Member Functions

 PortView ()
 PortView (Object cell)
CellView getParentView ()
Rectangle2D getBounds ()
CellViewRenderer getRenderer ()
CellHandle getHandle (GraphContext context)
Point2D getLocation ()
Point2D getLocation (EdgeView edge)
Point2D getLocation (EdgeView edge, Point2D nearest)

Static Public Attributes

static transient int SIZE = 6
static transient PortRenderer renderer = new PortRenderer()
static boolean allowPortMagic = true

Protected Member Functions

boolean shouldInvokePortMagic (EdgeView edge)

Protected Attributes

transient CellView lastParent

Detailed Description

The default implementation of a port view.

Version:
1.0 1/1/02
Author:
Gaudenz Alder


Constructor & Destructor Documentation

org.jgraph.graph.PortView.PortView  ) 
 

Constructs an empty portview.

org.jgraph.graph.PortView.PortView Object  cell  ) 
 

Constructs a view that holds a reference to the specified cell, anchor and parent vertex.

Parameters:
cell reference to the cell in the model


Member Function Documentation

Rectangle2D org.jgraph.graph.PortView.getBounds  ) 
 

Returns the bounds for the port view.

Reimplemented from org.jgraph.graph.AbstractCellView.

CellHandle org.jgraph.graph.PortView.getHandle GraphContext  context  )  [virtual]
 

Returns null.

Implements org.jgraph.graph.AbstractCellView.

Point2D org.jgraph.graph.PortView.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. edge and point may be null.

Point2D org.jgraph.graph.PortView.getLocation EdgeView  edge  ) 
 

For backwards compatibility.

Deprecated:
Use getLocation() or getLocation(EdgeView, Point2D) instead.

Point2D org.jgraph.graph.PortView.getLocation  ) 
 

Shortcut method to getLocation(null, null)

CellView org.jgraph.graph.PortView.getParentView  ) 
 

This method ensures a non-null value. If the super method returns null then the last valid parent is returned. Note: If a vertex is removed, all ports will be replaced in connected edges. The ports are replaced by the center point of the last valid vertex view.

Reimplemented from org.jgraph.graph.AbstractCellView.

CellViewRenderer org.jgraph.graph.PortView.getRenderer  )  [virtual]
 

Returns a renderer for the class.

Implements org.jgraph.graph.AbstractCellView.

boolean org.jgraph.graph.PortView.shouldInvokePortMagic EdgeView  edge  )  [protected]
 

Subclassers can override this to decide whether or not "port magic" should appear on a given edge. (Port magic means the port tries to make the edge horizontal or vertical if the closest control point lies within the bounds of the parent vertex.)


Member Data Documentation

boolean org.jgraph.graph.PortView.allowPortMagic = true [static]
 

Controls if port magic should be allowed. Default is true. This is an easy switch to disable port magic for all instances of graphs.

transient CellView org.jgraph.graph.PortView.lastParent [protected]
 

Cache of the last valid parent. //FIX: Better solution?

transient PortRenderer org.jgraph.graph.PortView.renderer = new PortRenderer() [static]
 

Renderer for the class.

transient int org.jgraph.graph.PortView.SIZE = 6 [static]
 

Default size for all ports is 6.


The documentation for this class was generated from the following file:
Generated on Sun May 28 19:13:17 2006 for Digimod by  doxygen 1.4.6-NO