flatscape
Class FSceneGraph

java.lang.Object
  |
  +--javax.swing.tree.DefaultTreeModel
        |
        +--flatscape.FSceneGraph
All Implemented Interfaces:
DocumentListener, ElementListener, SceneGraph, java.io.Serializable, javax.swing.tree.TreeModel

public class FSceneGraph
extends javax.swing.tree.DefaultTreeModel
implements SceneGraph, DocumentListener, ElementListener

The class represents the scene graph of the view. It holds a lookup table for lookup of glyphs by uform id. It maintains the child/parent relations of the scenegraph tree.

Copyright (c) 2001 Rutgers, The State University of New Jersey

Since:
manifold %Version%
Version:
%Version%, %Time%
See Also:
MutableTreeNode, Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultTreeModel
asksAllowsChildren, listenerList, root
 
Constructor Summary
FSceneGraph()
          Constructor
 
Method Summary
 void documentAdded(java.lang.String name, org.w3c.dom.Document document)
          Called by the repository when a document is added.
 void documentRemoved(java.lang.String name, org.w3c.dom.Document document)
          Called by the repository when a document is removed
 Glyph getActiveTime()
           
 java.lang.String getDefaultRootType()
          Gets the default root uform type for automatic root detection
 Glyph getGlyph(org.w3c.dom.Element model)
          Gets the glyph corresponding to the id
 Glyph getRootGlyph()
          Gets the root glyph of the scenegraph
 void nodeAdded(org.w3c.dom.Node node)
          Called by the repository when a subtree is added
 void nodeRemoved(org.w3c.dom.Node node)
          Called by the repository when a subtree is delete
 void nodeValueSet(org.w3c.dom.Node node, java.lang.String value, java.lang.String oldValue)
          Called by the repository when a node value is set (added or changed)
 void putGlyph(org.w3c.dom.Element model, Glyph glyph)
          Sets the glyph corresponding to the id - updates child/parent relations
 Glyph removeGlyph(org.w3c.dom.Element model)
          Removes the glyph corresponding to the id - updates child/parent relations
 void setActiveTime(Glyph overlay)
          Sets the active time overlay.
 void setDefaultRootType(java.lang.String rootType)
          Sets the default root uform type for automatic root detection
 void setRootGlyph(Glyph root)
          Sets the root glyph of the scenegraph
 
Methods inherited from class javax.swing.tree.DefaultTreeModel
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSceneGraph

public FSceneGraph()
Constructor

Method Detail

setRootGlyph

public void setRootGlyph(Glyph root)
Sets the root glyph of the scenegraph

Specified by:
setRootGlyph in interface SceneGraph

getRootGlyph

public Glyph getRootGlyph()
Gets the root glyph of the scenegraph

Specified by:
getRootGlyph in interface SceneGraph

setDefaultRootType

public void setDefaultRootType(java.lang.String rootType)
Sets the default root uform type for automatic root detection


getDefaultRootType

public java.lang.String getDefaultRootType()
Gets the default root uform type for automatic root detection


setActiveTime

public void setActiveTime(Glyph overlay)
Sets the active time overlay.

Parameters:
overlay - the active time overlay

getActiveTime

public Glyph getActiveTime()
Returns:
the active time overlay

getGlyph

public Glyph getGlyph(org.w3c.dom.Element model)
Gets the glyph corresponding to the id

Specified by:
getGlyph in interface SceneGraph

putGlyph

public void putGlyph(org.w3c.dom.Element model,
                     Glyph glyph)
Sets the glyph corresponding to the id - updates child/parent relations

Specified by:
putGlyph in interface SceneGraph

removeGlyph

public Glyph removeGlyph(org.w3c.dom.Element model)
Removes the glyph corresponding to the id - updates child/parent relations

Specified by:
removeGlyph in interface SceneGraph

nodeAdded

public void nodeAdded(org.w3c.dom.Node node)
Called by the repository when a subtree is added

Specified by:
nodeAdded in interface ElementListener
Parameters:
node -

nodeRemoved

public void nodeRemoved(org.w3c.dom.Node node)
Called by the repository when a subtree is delete

Specified by:
nodeRemoved in interface ElementListener

nodeValueSet

public void nodeValueSet(org.w3c.dom.Node node,
                         java.lang.String value,
                         java.lang.String oldValue)
Called by the repository when a node value is set (added or changed)

Specified by:
nodeValueSet in interface ElementListener

documentAdded

public void documentAdded(java.lang.String name,
                          org.w3c.dom.Document document)
Called by the repository when a document is added.

Specified by:
documentAdded in interface DocumentListener

documentRemoved

public void documentRemoved(java.lang.String name,
                            org.w3c.dom.Document document)
Called by the repository when a document is removed

Specified by:
documentRemoved in interface DocumentListener


Copyright (c) 2003 Rutgers, The State University of New Jersey