org.wilmascope.view
Class EdgeView

java.lang.Object
  extended by org.wilmascope.patterns.Prototype
      extended by org.wilmascope.view.GraphElementView
          extended by org.wilmascope.view.EdgeView
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, EdgeAbility, EdgeView, Viewable, View2D
Direct Known Subclasses:
AggregationEdgeView, ArrowEdgeView, AttenuatedEdgeView, BendyEdgeView, DefaultEdgeView, DirectedEdgeView, DirectedEdgeView, InheritanceEdgeView, LineEdgeView, SimpleSplineEdgeView, SpikeEdgeView, SplineRectTubeEdgeView, SplineTubeEdgeView, TaperedEdgeView

public abstract class EdgeView
extends GraphElementView
implements EdgeView, View2D

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.wilmascope.view.GraphElementView
t3d
 
Constructor Summary
EdgeView()
           
 
Method Summary
 void draw()
          draw the edge correctly between the start and end nodes
 void draw2D(Renderer2D r, java.awt.Graphics2D g, float transparency)
           
 Edge getEdge()
          Get the Edge that this ability is registered with
 javax.swing.ImageIcon getIcon()
           
 javax.vecmath.AxisAngle4f getPositionAngle()
           
 javax.vecmath.Vector3f getPositionVector()
           
 java.util.Properties getProperties()
           
 float getRadius()
           
 void setEdge(Edge edge)
          Called by Edge when this ability is registered with that edge.
 void setHueByWeight(float minHue, float maxHue)
           
 void setMultiEdgeOffset(int edgeIndex, int edgeCount, int direction)
          applies an offset to separate multiple edges between a pair of nodes.
 void setProperties(java.util.Properties p)
           
 void setRadius(float radius)
           
protected  void showLabel(java.lang.String text)
           
 
Methods inherited from class org.wilmascope.view.GraphElementView
addLabel, addLiveBranch, addPickingClient, addShape, addTransformGroupChild, defaultColour, delete, getAppearance, getAxisAngle4f, getBranchGroup, getColor3f, getColour, getDefaultColour, getGraphCanvas, getLabel, getTransformGroup, getUserData, hide, highlightColour, init, initGraphElement, isDefaultColour, makePickable, picked, removeLabel, removePickingClient, setColour, setColour, setColour, setFullTransform, setFullTransform, setLabel, setLabel, setLabel, setPickable, setResizeTranslateTransform, setTransformGroupTransform, setTranslation, setTransparencyAttributes, setupDefaultAppearance, setupDefaultMaterial, setupHighlightAppearance, setupHighlightMaterial, setUserData, show, transform
 
Methods inherited from class org.wilmascope.patterns.Prototype
clone, getTypeName, setTypeName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.wilmascope.graph.Viewable
delete, hide, setPickable, show
 

Constructor Detail

EdgeView

public EdgeView()
Method Detail

draw

public void draw()
draw the edge correctly between the start and end nodes

Specified by:
draw in interface Viewable

getPositionAngle

public javax.vecmath.AxisAngle4f getPositionAngle()

getPositionVector

public javax.vecmath.Vector3f getPositionVector()

setMultiEdgeOffset

public void setMultiEdgeOffset(int edgeIndex,
                               int edgeCount,
                               int direction)
Description copied from interface: EdgeView
applies an offset to separate multiple edges between a pair of nodes. for an example see how it is used in Edge.recalculateMultiEdgeOffsets()

Specified by:
setMultiEdgeOffset in interface EdgeView
Parameters:
edgeIndex - indexes starting at zero should be arbitrarily assigned for each edge between the pair of nodes
edgeCount - the total number of edges between the pair of nodes
direction - for each edge between the pair of nodes its direction should be greater than zero if it runs from Start node to End node or less than zero otherwise (or visa versa, as long as there is consistancy for each edge between the node pair)

getEdge

public Edge getEdge()
Description copied from interface: EdgeAbility
Get the Edge that this ability is registered with

Specified by:
getEdge in interface EdgeAbility

setEdge

public void setEdge(Edge edge)
Description copied from interface: EdgeAbility
Called by Edge when this ability is registered with that edge.

Specified by:
setEdge in interface EdgeAbility

setHueByWeight

public void setHueByWeight(float minHue,
                           float maxHue)

getIcon

public javax.swing.ImageIcon getIcon()
Specified by:
getIcon in class GraphElementView

showLabel

protected void showLabel(java.lang.String text)
Specified by:
showLabel in class GraphElementView

setRadius

public void setRadius(float radius)

getRadius

public float getRadius()

setProperties

public void setProperties(java.util.Properties p)
Overrides:
setProperties in class GraphElementView

getProperties

public java.util.Properties getProperties()
Overrides:
getProperties in class GraphElementView

draw2D

public void draw2D(Renderer2D r,
                   java.awt.Graphics2D g,
                   float transparency)
Specified by:
draw2D in interface View2D