jsynoptic.plugins.syn3d
Class SynopticViewNode
java.lang.Object
syn3d.base.ActiveNode
jsynoptic.plugins.syn3d.SynopticViewNode
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- SynopticViewNodeXith3d
public abstract class SynopticViewNode
- extends ActiveNode
- See Also:
- Serialized Form
Method Summary |
abstract void |
attach(View3DShape shape)
|
void |
doAction(java.lang.Object action)
When the user has selected an action in the list return by getActions(), this method is called. |
java.util.List |
getActions()
Returns a list of possible actions on this node. |
javax.swing.Icon |
getIcon()
Utility method to specialize the swing tree renderer. |
abstract java.awt.image.BufferedImage |
getSnapShot()
|
abstract Transformator |
getTransformator()
|
boolean |
saveChildren()
The scene/swing tree is serialized from root to leaf, hierachically. |
Methods inherited from class syn3d.base.ActiveNode |
addChild, findDescendantOfType, findDescendantOfType, get3DObject, getChildren, getName, getParent, highlight, notifyInternalChange, notifyStructuralChange, propagateAddChildEvent, propagateChangeNameEvent, propagateHighlightEvent, propagateInternalChangeEvent, propagateRemoveChildEvent, propagateStructuralChangeEvent, remove, removeChild, removeNodeTree, removeNodeTreeFrom, restoreReferences, setName, setParent, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
anonymousViewNumber
protected static int anonymousViewNumber
icon
protected static javax.swing.Icon icon
actions
protected static java.util.List actions
SynopticViewNode
public SynopticViewNode(ActiveNode parent)
getIcon
public javax.swing.Icon getIcon()
- Description copied from class:
ActiveNode
- Utility method to specialize the swing tree renderer. Give a look to your node,
don't let it anonymous!
- Overrides:
getIcon
in class ActiveNode
- Returns:
- an Icon to display in the swing tree. May be shared along a node type class,
or may even change according the the state of this node.
getActions
public java.util.List getActions()
- Description copied from class:
ActiveNode
- Returns a list of possible actions on this node. Actions may be classified
by categories using the "|" separator.
Ex: a transform node may have the following actions: "Rotate|90° on X", "Rotate|180° on X", etc...
- Overrides:
getActions
in class ActiveNode
- Returns:
- an array of possible actions, or a null or empty array if this node doesn't handle any action
doAction
public void doAction(java.lang.Object action)
- Description copied from class:
ActiveNode
- When the user has selected an action in the list return by getActions(), this method is called.
The node should then do what it claims.
- Overrides:
doAction
in class ActiveNode
- Parameters:
action
- An action previously declared by the getActions method.
saveChildren
public boolean saveChildren()
- Description copied from class:
ActiveNode
- The scene/swing tree is serialized from root to leaf, hierachically.
A node can count on its parent beeing successfully serialized, and should not
try to save its parent. On the other hand, if it is able to re-create the children
upon reload it should return true and this branch is considered done. This is
especially useful for nodes loaded from external scene object files.
This method is called after the object was successfully serialized, to determine
wheter or not continue in this tree branch.
- Overrides:
saveChildren
in class ActiveNode
- Returns:
- true if this object handles its children, false if it does not. Default is false
attach
public abstract void attach(View3DShape shape)
getSnapShot
public abstract java.awt.image.BufferedImage getSnapShot()
getTransformator
public abstract Transformator getTransformator()