Package mgui.interfaces.shapes.trees
Class ShapeTreeNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
mgui.interfaces.trees.InterfaceTreeNode
mgui.interfaces.shapes.trees.ShapeTreeNode
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,javax.swing.tree.MutableTreeNode
,javax.swing.tree.TreeNode
,InterfaceObjectListener
,PopupMenuObject
,ShapeListener
- Direct Known Subclasses:
Shape2DTreeNode
,Shape3DTreeNode
public abstract class ShapeTreeNode extends InterfaceTreeNode implements ShapeListener
Provides a tree node for an instance of
InterfaceShape
. Provides an implementation of ShapeListener
in order to allow shape sets to respond to additions, removals, or changes to their members.
TODO: eliminate the subclasses {{Shape3DTreeNode}} and {{Shape2DTreeNode}} and make this non-abstract
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class mgui.interfaces.trees.InterfaceTreeNode
isDestroyed, isMouseOverSelect, isSelectable, listeners, parent_tree, popup_handler, popup_menu
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
-
Constructor Summary
Constructors Constructor Description ShapeTreeNode()
-
Method Summary
Modifier and Type Method Description ShapeTreeNode
getChildForShape(InterfaceShape shape)
InterfaceShape
getShape()
protected InterfaceTreeNode
getVertexDataColumnNode(VertexDataColumn column)
protected InterfaceTreeNode
getVertexDataNode()
abstract boolean
hasShapeNode(InterfaceShape shape)
abstract void
removeShapeNode(InterfaceShape shape)
void
shapeUpdated(ShapeEvent e)
Respond to a shape event on this node's ShapeInt.Methods inherited from class mgui.interfaces.trees.InterfaceTreeNode
addChild, addListener, clone, containsObject, destroy, destroy, destroyAllChildren, fireTreeListeners, getChildren, getParentTree, getPopupMenu, getPopupMenu, handleMouseEvent, handlePopupEvent, init, insertChild, isDestroyed, isSelectable, moveChild, objectChanged, objectChanged, removeChild, removeListener, setParentTree, setPopupMenu, setSelectable, setUserObject, showPopupMenu
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface mgui.interfaces.shapes.util.ShapeListener
destroy, isDestroyed
-
Constructor Details
-
ShapeTreeNode
public ShapeTreeNode()
-
-
Method Details
-
shapeUpdated
Respond to a shape event on this node's ShapeInt. The current implementation only responds to updates on aShapeSet
, but adding, removing, or moving child nodes depending on the nature of the event.- Specified by:
shapeUpdated
in interfaceShapeListener
- Parameters:
e
-
-
getVertexDataNode
-
getVertexDataColumnNode
-
getChildForShape
-
removeShapeNode
-
hasShapeNode
-
getShape
-