org.wilmascope.view
Class EdgeView
java.lang.Object
org.wilmascope.patterns.Prototype
org.wilmascope.view.GraphElementView
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
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 java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EdgeView
public EdgeView()
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 nodesedgeCount
- the total number of edges between the pair of nodesdirection
- 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