gumbo.visualize.data.impl.swing
Class SwingTreeView

java.lang.Object
  |
  +--gumbo.util.AbstractDisposable
        |
        +--gumbo.util.relation.AbstractTreeNodeDelegator
              |
              +--gumbo.graphic.space.AbstractSpaceNode
                    |
                    +--gumbo.graphic.impl.swing.SwingSpaceNode
                          |
                          +--gumbo.visualize.data.impl.swing.SwingTreeView
All Implemented Interfaces:
AxisBound3Boundable, BoundableGraphic, Disposable, Graphic, GraphicGeometry, GraphicPresence, GraphicResource, GraphicView, IntersectableGraphic, java.io.Serializable, SpaceNode, TransformNode, TranslationNode

public class SwingTreeView
extends SwingSpaceNode
implements GraphicView

A default tree view implemented using a JTree. The default space tree delegate is an auto-node with a new relationship, wrapped as a root node.

Version:
$Revision: 1.1 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.
See Also:
Serialized Form

Nested Class Summary
static class SwingTreeView.SwingPickEngine
          Pick engine needed to pick nodes in this view.
 
Field Summary
static javax.swing.Icon ICON_BRANCH_CLOSED
          Default icon for a closed branch node.
static javax.swing.Icon ICON_BRANCH_OPEN
          Default icon for an open branch node.
static javax.swing.Icon ICON_LEAF
          Default icon for a leaf node.
static javax.swing.border.Border VIEW_BORDER
          Default world space border.
static java.awt.Dimension VIEWPORT_SIZE
          Default viewport size, in pixels.
 
Constructor Summary
SwingTreeView(WholeView view)
           
 
Method Summary
 DataView getDataView()
          Gets the data view implemented by this graphic view.
 javax.swing.tree.DefaultTreeModel getTreeModel()
          Returns the Swing tree model.
 void implDispose()
          Disposes the super, then disposes self.
protected  TreeNode newTreeNodeDelegate()
          Default implementation: Returns a new AbstractTreeNode.Auto() subclass with a new TreeNodes.Tree relationship, and wrapped as a root node.
 
Methods inherited from class gumbo.graphic.impl.swing.SwingSpaceNode
canIntersectGraphic, getGraphic, getGraphicAxisBound3, getGraphicLocalSpace, getGraphicTransform, getGraphicTranslation, initSwingSpaceNode, intersectGraphic, isSpaceTransforming, prepareGraphicPresence, realizeGraphicPresence, setGraphicTranslation
 
Methods inherited from class gumbo.graphic.space.AbstractSpaceNode
getGraphicSpaceTree
 
Methods inherited from class gumbo.util.relation.AbstractTreeNodeDelegator
getTreeNodeDelegate
 
Methods inherited from class gumbo.util.AbstractDisposable
dispose, isDisposed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gumbo.graphic.GraphicPresence
prepareGraphicPresence, realizeGraphicPresence
 
Methods inherited from interface gumbo.graphic.Graphic
getGraphic
 
Methods inherited from interface gumbo.util.Disposable
dispose, isDisposed
 
Methods inherited from interface gumbo.graphic.space.SpaceNode
getGraphicSpaceTree
 

Field Detail

VIEWPORT_SIZE

public static final java.awt.Dimension VIEWPORT_SIZE
Default viewport size, in pixels.


VIEW_BORDER

public static final javax.swing.border.Border VIEW_BORDER
Default world space border.


ICON_LEAF

public static final javax.swing.Icon ICON_LEAF
Default icon for a leaf node.


ICON_BRANCH_OPEN

public static final javax.swing.Icon ICON_BRANCH_OPEN
Default icon for an open branch node.


ICON_BRANCH_CLOSED

public static final javax.swing.Icon ICON_BRANCH_CLOSED
Default icon for a closed branch node.

Constructor Detail

SwingTreeView

public SwingTreeView(WholeView view)
Method Detail

getTreeModel

public javax.swing.tree.DefaultTreeModel getTreeModel()
Returns the Swing tree model. By default the root is null. View factories should create/replace the root and modify the model as need.


newTreeNodeDelegate

protected TreeNode newTreeNodeDelegate()
Default implementation: Returns a new AbstractTreeNode.Auto() subclass with a new TreeNodes.Tree relationship, and wrapped as a root node. Space tree child graphics are added to this graphic's pane. Child delegators must have a Component graphic. TODO: Should be made common code to all swing shapes.

Specified by:
newTreeNodeDelegate in class AbstractTreeNodeDelegator
Returns:
Reference to the delegate. Never null.

getDataView

public DataView getDataView()
Description copied from interface: GraphicView
Gets the data view implemented by this graphic view.

Specified by:
getDataView in interface GraphicView
Returns:
Reference to the data view. Never null.

implDispose

public void implDispose()
Disposes the super, then disposes self.

Overrides:
implDispose in class SwingSpaceNode