org.wilmascope.viewplugin
Class SquareTubeNodeView
java.lang.Object
org.wilmascope.patterns.Prototype
org.wilmascope.view.GraphElementView
org.wilmascope.view.NodeView
org.wilmascope.viewplugin.SquareTubeNodeView
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, NodeAbility, NodeView, Viewable, SizeAdjustableNodeView, View2D
public class SquareTubeNodeView
- extends NodeView
- implements SizeAdjustableNodeView, View2D
A tube with square cross section and specified bottom and top dimensions
- Version:
- 1.0
- Author:
- Tim Dwyer
- See Also:
- Serialized Form
Method Summary |
void |
draw()
|
void |
draw2D(Renderer2D r,
java.awt.Graphics2D g,
float transparency)
|
float |
getBottomRadius()
|
float |
getDepth()
If shape is BOX the:
x dimension = the node's radius
y dimension = depth |
javax.swing.ImageIcon |
getIcon()
|
java.util.Properties |
getProperties()
|
int |
getShape()
|
float |
getTopRadius()
|
protected void |
init()
you must over-ride the following method to create the 3D Shapes which will
represent your graph elements |
void |
setEndRadii(float bottomRadius,
float topRadius)
adjust the radius of the top and bottom of the tube
each argument is a xScale factor, ie the resulting radius will be
the argument * node radius |
void |
setHeight(float height)
|
void |
setProperties(java.util.Properties p)
|
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.NodeView |
addGeometryObserver, getCanvasPosition, getNode, getRadius, getVWorldPosition, hideAnchor, moveToCanvasPos, setColour, setNode, setRadius, showAnchor, 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, setFullTransform, setFullTransform, setLabel, setLabel, setLabel, setPickable, setResizeTranslateTransform, setTransformGroupTransform, setTranslation, setTransparencyAttributes, setupDefaultAppearance, setupHighlightAppearance, setUserData, show, transform |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SquareTubeNodeView
public SquareTubeNodeView()
draw
public void draw()
- Specified by:
draw
in interface Viewable
- Overrides:
draw
in class NodeView
draw2D
public void draw2D(Renderer2D r,
java.awt.Graphics2D g,
float transparency)
- Specified by:
draw2D
in interface View2D
- Overrides:
draw2D
in class NodeView
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
protected 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
getIcon
public javax.swing.ImageIcon getIcon()
- Overrides:
getIcon
in class NodeView
setEndRadii
public void setEndRadii(float bottomRadius,
float topRadius)
- adjust the radius of the top and bottom of the tube
each argument is a xScale factor, ie the resulting radius will be
the argument * node radius
- Specified by:
setEndRadii
in interface SizeAdjustableNodeView
setHeight
public void setHeight(float height)
setProperties
public void setProperties(java.util.Properties p)
- Overrides:
setProperties
in class NodeView
getProperties
public java.util.Properties getProperties()
- Overrides:
getProperties
in class NodeView
getBottomRadius
public float getBottomRadius()
- Specified by:
getBottomRadius
in interface SizeAdjustableNodeView
getTopRadius
public float getTopRadius()
- Specified by:
getTopRadius
in interface SizeAdjustableNodeView
getDepth
public float getDepth()
- Description copied from interface:
SizeAdjustableNodeView
- If shape is BOX the:
x dimension = the node's radius
y dimension = depth
- Specified by:
getDepth
in interface SizeAdjustableNodeView
getShape
public int getShape()
- Specified by:
getShape
in interface SizeAdjustableNodeView