|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--harmonic.mz.manager.DataManager
This class maintains the model data state, application state, and module settings, in a large tree.
Organization of tree with no module loaded: Root |--Application stuff |--module |--module |--model file | |-----object list | |-----view list | |-----viewpoint list | |-----etc |--model file | |-----object list | |-----view list | |-----viewpoint list | |-----etc
| Field Summary | |
harmonic.mz.docnode.GeneralSettings |
settings
|
| Method Summary | |
void |
addPrototype(java.lang.String catagory,
Prototype pt)
Sometimes it is usefull (for example in the case of the template and network editors) to for a data type to be avalible in a list that enables the user to create an instance of a type. |
void |
addSavedValue(ModelNode field)
Add the node to the pool it preferes to be stored in according to field.getReferencePoolName(), assuming it is inserted into current file. |
void |
addSavedValue(ModelNode field,
FileNode fileRoot)
Add the node to the pool it preferes to be stored in according to field.getReferencePoolName(), in the given file. |
void |
addToGlobals(DataNode node)
Adds node to global objects group |
void |
addToTemps(DataNode node)
Adds node to temporaray objects group |
void |
addTreeListener(NodeListener listener)
To monitor the entire database tree, add a listener here. |
void |
assignFromDefaultPrototype(ModelNode node)
|
void |
beginBigAdd()
Call before a large group of additions. |
void |
bindBindables(ModelNode root)
Sync to bBound switch in ModelNode, usually after file read. |
void |
bindNode(ModelNode node,
java.lang.String listName)
Ask the specified node to "bind", which usually means take effect globaly. |
void |
checkSerialNo(DataNode node,
FileNode fileRoot)
This is called upon addition of nodes to make sure it and its children have valid serial numbers. |
void |
copyNodes(DataNode[] set,
ModelNode destination,
boolean bUnlink,
boolean bKeepUndo)
|
boolean |
doingBigAdd()
Returns whether we are between beginBigAdd() and endBigAdd() |
void |
endBigAdd()
Call after large group of additions if beginBigAdd() was called. |
void |
explodeCompositedObject(DataNode composite)
This is a sort of localized undo. |
FileNode |
fileRoot(DataNode dbnode)
Return the file that this node belongs too, or null. |
DataNode |
findNode_Full(java.lang.String s,
DataNode p)
For a string in the form "name.name.name" resolve the name to a ModelNode by searching through the file tree. |
DataNode |
findNode(java.lang.String s)
Find the node of the given name under the current file |
DataNode |
findNode(java.lang.String searchName,
DataNode subtree)
Find the first node of the given name in under the given subtree |
java.util.Vector |
findNodesOfType(java.lang.String searchType,
java.lang.String skipType,
DataNode subtree)
|
java.util.Vector |
findTagged(java.lang.String tag)
Returns a list of objects tagged with given name in database. |
ModelNode |
getCurrent(ModelNode in,
java.lang.String key)
Get the current value at the given key. |
ShapeGroup |
getCurrentGroup()
Returns the group objects are added to by addToCurrent(). |
java.util.Vector |
getCurrents(ModelNode node)
Return a list of current keys that indicates what this node is currently bound to. |
ModelNode |
getDefaultPrototype(java.lang.Class cls)
|
java.util.Vector |
getDefaultPrototypes()
|
harmonic.viewer3D.PaintStruct[] |
getPainterList(ShapeNode[] defs,
boolean bRecursive)
This is a utility to return all PaintStructs of group of ShapeDef's, and any children they have. |
java.util.Vector |
getPrototypes()
Return the avalible prototypes. |
ModelNode |
getReferencePool(java.lang.String name,
FileNode file)
Find the root node to store value, used to store and to put up list of stored values. |
ModelNode |
getRoot()
Returns the database root |
ShapeNode[] |
getShapeList()
Retrieve list of all ShapeDefs in database. |
ShapeNode[] |
getShapeList(ModelNode file)
|
ShapeNode[] |
getVisibleShapeList(ModelNode file,
harmonic.viewer3D.Viewport viewport)
Retrieve list of all ShapeDefs under given node, visible in given viewport |
boolean |
isInSubtree(DataNode root,
DataNode node)
Returns true if this is in the sub tree |
void |
makeDefaultPrototype(ModelNode node)
|
void |
nameUnique(ModelNode node,
java.lang.String preferredName)
Give a node a uniqe name within the current file. |
DataNode |
nodeFromNumber(int serialNo,
FileNode file)
Return the node in the file with the given serial number |
void |
notifyListeners(NodeEvent event)
Notifies listeners of the database tree |
long |
purge()
Calls purgeInvisibleGeometries(), purgeUndoStackGeometries(), purgeUndo(), purgePickTables(true), purgeDisplayLists(), purgeAuxVerts() in the database, then runs the garbage collector. |
void |
purgeTree(DataNode dbnode)
The idea here its to to make sure a sub tree that is to be irreversibly removed isn't still in memory because of the many pointers that are kept, especially by the listener system. |
void |
remove(DataNode[] nodes)
Remove array of nodes. |
void |
remove(DataNode[] nodes,
boolean bExplode)
|
void |
removeFromCurrents(ModelNode node)
Remove node from currents table. |
void |
removeTreeListener(NodeListener listener)
Remove database tree listener |
void |
replace(ModelNode replace,
ModelNode with)
Replace 'replace' with 'with' in the parent of 'replace' |
void |
scanPrototypeFiles()
|
void |
setCurrent(java.lang.String key,
ModelNode value)
Sets the value at the key in the current table of the current file |
void |
setCurrent(java.lang.String key,
ModelNode node,
FileNode file)
Sets the value at the key in the current table of the given file |
ShapeGroup |
setCurrentGroup(ShapeGroup group)
Sets the group objects are added to by addToCurrent(). |
void |
setCurrentTag(java.lang.String tagName)
Set the tag that will be applied to all newly created objects. |
void |
storePrototype(ModelNode node)
|
void |
updateBindables(ModelNode root)
Call updateBindable for currenly bound nodes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public harmonic.mz.docnode.GeneralSettings settings
| Method Detail |
public ModelNode getRoot()
public void addToGlobals(DataNode node)
public void addToTemps(DataNode node)
public void setCurrentTag(java.lang.String tagName)
public ModelNode getCurrent(ModelNode in,
java.lang.String key)
public java.util.Vector getCurrents(ModelNode node)
public void setCurrent(java.lang.String key,
ModelNode value)
key - Value's key
public void setCurrent(java.lang.String key,
ModelNode node,
FileNode file)
key - Values keynode - Value to setfile - File to get table frompublic void removeFromCurrents(ModelNode node)
public ShapeGroup getCurrentGroup()
public ShapeGroup setCurrentGroup(ShapeGroup group)
public void storePrototype(ModelNode node)
public void beginBigAdd()
public void endBigAdd()
public boolean doingBigAdd()
public ShapeNode[] getShapeList()
public ShapeNode[] getVisibleShapeList(ModelNode file,
harmonic.viewer3D.Viewport viewport)
public ShapeNode[] getShapeList(ModelNode file)
public harmonic.viewer3D.PaintStruct[] getPainterList(ShapeNode[] defs,
boolean bRecursive)
public void nameUnique(ModelNode node,
java.lang.String preferredName)
public DataNode nodeFromNumber(int serialNo,
FileNode file)
public boolean isInSubtree(DataNode root,
DataNode node)
public DataNode findNode_Full(java.lang.String s,
DataNode p)
public java.util.Vector findTagged(java.lang.String tag)
public DataNode findNode(java.lang.String searchName,
DataNode subtree)
public java.util.Vector findNodesOfType(java.lang.String searchType,
java.lang.String skipType,
DataNode subtree)
public DataNode findNode(java.lang.String s)
public ModelNode getReferencePool(java.lang.String name,
FileNode file)
name - Value group's namefile - Model file too look inpublic void addSavedValue(ModelNode field)
public void addSavedValue(ModelNode field,
FileNode fileRoot)
public void bindNode(ModelNode node,
java.lang.String listName)
public void bindBindables(ModelNode root)
public void updateBindables(ModelNode root)
public FileNode fileRoot(DataNode dbnode)
public void checkSerialNo(DataNode node,
FileNode fileRoot)
The serialNo for a node will never be reassigned. No two nodes from the same file will have the same number
public void copyNodes(DataNode[] set,
ModelNode destination,
boolean bUnlink,
boolean bKeepUndo)
public void explodeCompositedObject(DataNode composite)
public void remove(DataNode[] nodes)
public void remove(DataNode[] nodes,
boolean bExplode)
public void replace(ModelNode replace,
ModelNode with)
public long purge()
public void purgeTree(DataNode dbnode)
public void addTreeListener(NodeListener listener)
public void removeTreeListener(NodeListener listener)
public void notifyListeners(NodeEvent event)
public void addPrototype(java.lang.String catagory,
Prototype pt)
public java.util.Vector getPrototypes()
public void makeDefaultPrototype(ModelNode node)
public ModelNode getDefaultPrototype(java.lang.Class cls)
public void assignFromDefaultPrototype(ModelNode node)
public java.util.Vector getDefaultPrototypes()
public void scanPrototypeFiles()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||