JGraphpad Pro
v6.0.5.0


com.jgraph.pad.graph
Class JGraphpadEdgeView

java.lang.Object
  extended byorg.jgraph.graph.AbstractCellView
      extended byorg.jgraph.graph.EdgeView
          extended bycom.jgraph.pad.graph.JGraphpadEdgeView
All Implemented Interfaces:
org.jgraph.graph.CellView, Serializable

public class JGraphpadEdgeView
extends org.jgraph.graph.EdgeView

Edge view that supports moveable ports. Note: The offset for the port depends on the edge, and is therefore stored in the edge's attributes. It is not required to provide a custom port view, as the port offset is returned from within the overridden getNearestPoint(boolean).

See Also:
Serialized Form

Nested Class Summary
static class JGraphpadEdgeView.JGraphpadEdgeHandle
          Custom handle that implements moveable ports.
 
Nested classes inherited from class org.jgraph.graph.EdgeView
org.jgraph.graph.EdgeView.EdgeHandle
 
Field Summary
static JGraphpadRichTextEditor editor
          Holds the static editor for views of this kind.
static JGraphpadRedirectingEditor redirector
          Holds the static editor for views of this kind.
static org.jgraph.graph.EdgeRenderer renderer
          Holds the static renderer for views of this kind.
 
Fields inherited from class org.jgraph.graph.EdgeView
beginShape, cachedBounds, endShape, extraLabelPositions, labelPosition, labelVector, lineShape, points, sharedPath, source, sourceParentView, target, targetParentView
 
Fields inherited from class org.jgraph.graph.AbstractCellView
allAttributes, attributes, cell, cellEditor, childViews, groupBounds, parent
 
Constructor Summary
JGraphpadEdgeView()
          Empty constructor for persistence.
JGraphpadEdgeView(Object cell)
          Constructs a new edge view for the specified cell.
 
Method Summary
 org.jgraph.graph.GraphCellEditor getEditor()
          Returns editor if the user object of the cell is a rich text value or redirector if the user object is a component.
 org.jgraph.graph.CellHandle getHandle(org.jgraph.graph.GraphContext ctx)
          Overrides the parent's implementation to return a custom handle.
protected  Point2D getNearestPoint(boolean isSource)
          Overrides the parent's implementation to return the moveable port position for this edge.
 org.jgraph.graph.CellViewRenderer getRenderer()
          Returns the renderer.
 
Methods inherited from class org.jgraph.graph.EdgeView
addExtraLabel, addPoint, checkDefaultLabelPosition, convertRelativeLabelPositionToAbsolute, getAbsoluteExtraLabelPosition, getAbsoluteLabelPosition, getAbsoluteLabelPositionFromRelative, getBounds, getExtraLabelPosition, getLabelPosition, getLabelVector, getLength, getPerimeterPoint, getPoint, getPointCount, getPointLocation, getPoints, getShape, getSource, getSourceParentView, getTarget, getTargetParentView, getVisibleParent, intersects, invalidate, isLoop, refresh, removeExtraLabel, removePoint, setExtraLabelPosition, setLabelPosition, setPoint, setSource, setTarget, update
 
Methods inherited from class org.jgraph.graph.AbstractCellView
changeAttributes, childUpdated, createAttributeMap, getAllAttributes, getAttributes, getBounds, getCell, getCellAttributes, getCenterPoint, getChildViews, getDescendantViews, getParentView, getRendererComponent, includeInGroupBounds, isLeaf, mergeAttributes, removeFromParent, scale, setAttributes, setBounds, setCell, translate, updateGroupBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

editor

public static JGraphpadRichTextEditor editor
Holds the static editor for views of this kind.


redirector

public static JGraphpadRedirectingEditor redirector
Holds the static editor for views of this kind.


renderer

public static org.jgraph.graph.EdgeRenderer renderer
Holds the static renderer for views of this kind.

Constructor Detail

JGraphpadEdgeView

public JGraphpadEdgeView()
Empty constructor for persistence.


JGraphpadEdgeView

public JGraphpadEdgeView(Object cell)
Constructs a new edge view for the specified cell.

Parameters:
cell - The cell to constructs the edge view for.
Method Detail

getHandle

public org.jgraph.graph.CellHandle getHandle(org.jgraph.graph.GraphContext ctx)
Overrides the parent's implementation to return a custom handle.

Parameters:
ctx - The context to use for the handle.
Returns:
Returns a custom handle.

getNearestPoint

protected Point2D getNearestPoint(boolean isSource)
Overrides the parent's implementation to return the moveable port position for this edge.

Parameters:
isSource - Whether to return the nearest point for the source or target.
Returns:
Returns the moveable port position for this edge.

getEditor

public org.jgraph.graph.GraphCellEditor getEditor()
Returns editor if the user object of the cell is a rich text value or redirector if the user object is a component.

Returns:
Returns the editor for the cell view.

getRenderer

public org.jgraph.graph.CellViewRenderer getRenderer()
Returns the renderer.

Returns:
Returns the renderer for the cell view.

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.