org.wilmascope.viewplugin
Class AttenuatedEdgeView

java.lang.Object
  extended by org.wilmascope.patterns.Prototype
      extended by org.wilmascope.view.GraphElementView
          extended by org.wilmascope.view.EdgeView
              extended by org.wilmascope.viewplugin.AttenuatedEdgeView
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, EdgeAbility, EdgeView, Viewable, NodeGeometryObserver, View2D

public class AttenuatedEdgeView
extends EdgeView
implements NodeGeometryObserver

An attenuated edge is tube that's fat at the ends and thin in the middle. If my sloppy calculations are correct then the radius should match the radius of spherical nodes at either end. Colour should also be graded from the start node colour to end node colour.

Version:
1.0
Author:
Tim Dwyer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.wilmascope.view.GraphElementView
t3d
 
Constructor Summary
AttenuatedEdgeView()
           
 
Method Summary
 void draw()
          draw the edge correctly between the start and end nodes
 void draw2D(Renderer2D r, java.awt.Graphics2D g, float transparency)
          2D version of attenuated edge is just a two colour solid line.
 javax.swing.ImageIcon getIcon()
           
 void init()
          you must over-ride the following method to create the 3D Shapes which will represent your graph elements
 void nodeGeometryChanged(NodeView nv)
          The node being observed will notify the observer with this method
 void setEndRadii()
           
protected  void setupDefaultMaterial()
          Sets the default material for graph elements You must over-ride this abstract method stub with: setupDefaultAppearance(myDefaultMaterial);
protected  void setupHighlightMaterial()
          You must over-ride this method with: setupHighlightAppearance(myHighLightedMaterial)
 
Methods inherited from class org.wilmascope.view.EdgeView
getEdge, getPositionAngle, getPositionVector, getProperties, getRadius, setEdge, setHueByWeight, setMultiEdgeOffset, setProperties, setRadius, showLabel
 
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, initGraphElement, isDefaultColour, makePickable, picked, removeLabel, removePickingClient, setColour, setColour, setColour, setFullTransform, setFullTransform, setLabel, setLabel, setLabel, setPickable, setResizeTranslateTransform, setTransformGroupTransform, setTranslation, setTransparencyAttributes, setupDefaultAppearance, setupHighlightAppearance, 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

AttenuatedEdgeView

public AttenuatedEdgeView()
Method Detail

setupDefaultMaterial

protected void setupDefaultMaterial()
Description copied from class: GraphElementView
Sets the default material for graph elements You must over-ride this abstract method stub with: setupDefaultAppearance(myDefaultMaterial);

Specified by:
setupDefaultMaterial in class GraphElementView

setupHighlightMaterial

protected void setupHighlightMaterial()
Description copied from class: GraphElementView
You must over-ride this method with: setupHighlightAppearance(myHighLightedMaterial)

Specified by:
setupHighlightMaterial in class GraphElementView

init

public void init()
Description copied from class: GraphElementView
you must over-ride the following method to create the 3D Shapes which will represent your graph elements

Specified by:
init in class GraphElementView

draw

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

Specified by:
draw in interface Viewable
Overrides:
draw in class EdgeView

setEndRadii

public void setEndRadii()

draw2D

public void draw2D(Renderer2D r,
                   java.awt.Graphics2D g,
                   float transparency)
2D version of attenuated edge is just a two colour solid line. First half line is coloured same as start node Second half is coloured as for end node

Specified by:
draw2D in interface View2D
Overrides:
draw2D in class EdgeView

getIcon

public javax.swing.ImageIcon getIcon()
Overrides:
getIcon in class EdgeView

nodeGeometryChanged

public void nodeGeometryChanged(NodeView nv)
Description copied from interface: NodeGeometryObserver
The node being observed will notify the observer with this method

Specified by:
nodeGeometryChanged in interface NodeGeometryObserver
Parameters:
nv - the node being observed