gumbo.visualize.data.impl.swing
Class SwingListView

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

public class SwingListView
extends SwingSpaceNode
implements GraphicView

A default list view implemented using a JPanel with a BoxLayout, which arranges vertices as a single column of auto-sized equal width list entries. The default space tree delegate is an auto-node with a new relationship, wrapped as a root node. Note that JList is not used because it does not conform to the normal Swing containment pattern, which significantly complicates implementation of entry interaction feedback. TODO: Refactor based on JList. See SwingTreeView.

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

Field Summary
static javax.swing.border.Border VIEW_BORDER
          Default view space border.
static java.awt.Dimension VIEWPORT_SIZE
          Default viewport size, in pixels.
 
Constructor Summary
SwingListView(WholeView view)
           
 
Method Summary
 DataView getDataView()
          Gets the data view implemented by this graphic view.
 AxisBound3 getGraphicAxisBound3(AxisBound3 retVal)
          Default implementation: Returns the combination of all the space tree child bounds.
 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.
 void prepareGraphicPresence()
          Informs this graphic entity that, in anticipation of realization, it should update as needed those aspects of its graphic state (geometry, appearance) and that of any dependents (siblings, descendants) that can affect its presentation.
 void realizeGraphicPresence()
          Informs this graphic entity that external (sibling, ancestor) and internal (self, descendant) state changes that can affect its presentation are complete and assumed valid, and that it should update its presentation as needed to be consistent with its graphic state.
 
Methods inherited from class gumbo.graphic.impl.swing.SwingSpaceNode
canIntersectGraphic, getGraphic, getGraphicLocalSpace, getGraphicTransform, getGraphicTranslation, initSwingSpaceNode, intersectGraphic, isSpaceTransforming, 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.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 view space border.

Constructor Detail

SwingListView

public SwingListView(WholeView view)
Method Detail

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.

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

getGraphicAxisBound3

public AxisBound3 getGraphicAxisBound3(AxisBound3 retVal)
Default implementation: Returns the combination of all the space tree child bounds.

Specified by:
getGraphicAxisBound3 in interface AxisBound3Boundable
Overrides:
getGraphicAxisBound3 in class SwingSpaceNode
Parameters:
retVal - Return value object. The bound. Never null.
Returns:
Reference to retVal. Never null.

prepareGraphicPresence

public void prepareGraphicPresence()
Description copied from interface: GraphicPresence
Informs this graphic entity that, in anticipation of realization, it should update as needed those aspects of its graphic state (geometry, appearance) and that of any dependents (siblings, descendants) that can affect its presentation. Does not actually affect the presentation (see realizeGraphicDisplay()). Allows for efficient batching of graphic state changes.

Specified by:
prepareGraphicPresence in interface GraphicPresence
Overrides:
prepareGraphicPresence in class SwingSpaceNode

realizeGraphicPresence

public void realizeGraphicPresence()
Description copied from interface: GraphicPresence
Informs this graphic entity that external (sibling, ancestor) and internal (self, descendant) state changes that can affect its presentation are complete and assumed valid, and that it should update its presentation as needed to be consistent with its graphic state. Allows for efficient batching of graphic state realizations.

Specified by:
realizeGraphicPresence in interface GraphicPresence
Overrides:
realizeGraphicPresence in class SwingSpaceNode

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