|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--harmonic.mz.manager.ValidationManager
This handles the validation the data state so that all DataNode's are valid with respect to their dependancies. The validation system is supported through some functions in ModelNode and ValidationManager. A node that becomes invalid (so that its external state no longer matches its internal state) is passed to the addInvalid() function, causesing an envent to be posted. When the event is processed, all invalid objects are validated at the same time by the ValidationManager. A nodes that are dependants of other nodes are validated first. Cyclical dependancies are checked.
| Constructor Summary | |
ValidationManager()
|
|
| Method Summary | |
void |
addInvalid(DataNode node)
Add object to invalid list. |
void |
addValidationListener(ValidationListener l)
Register listener of validations. |
void |
clearInvalidObjects()
Clear invalid list |
void |
clearValidated(DataNode node)
Unmark this node as validated. |
java.util.Vector |
getInvalidObjects()
Return invalid node list. |
boolean |
isValidated(DataNode node)
Use this in combination with markValidated() to prevent infinite recursion of node validation. |
void |
markValidated(DataNode node)
Mark this node as validated. |
void |
notifyListeners()
Notify listener's of validations. |
void |
removeValidationListener(ValidationListener l)
Un-Register listener of validations. |
void |
validateNode(ModelNode node)
Validate the node and any dependancies |
void |
validateNode(ModelNode node,
boolean bAnyParentVisible)
|
void |
validateScene()
validateScene(true) |
void |
validateScene(boolean bAlowSpawnThread)
Validate the invalid list. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ValidationManager()
| Method Detail |
public boolean isValidated(DataNode node)
public void markValidated(DataNode node)
public void clearValidated(DataNode node)
public void addValidationListener(ValidationListener l)
public void removeValidationListener(ValidationListener l)
public void notifyListeners()
public void addInvalid(DataNode node)
public void clearInvalidObjects()
public java.util.Vector getInvalidObjects()
public void validateNode(ModelNode node)
public void validateNode(ModelNode node,
boolean bAnyParentVisible)
public void validateScene()
public void validateScene(boolean bAlowSpawnThread)
For every invalid object, if any are known to require a lenghtly calculation, do it in another thread. Else just do it in this thread (to make the interactively created objects smoother) Note that this function is always run in the message loop thread.
If this is called from Viewport before it paints and a new thread is spawned, things will still be not be validated during the paint job. Assuming this is called every redraw, it should not be necessary to do validating form inside PaintStruct. Beware that this may be called again for the next redraw before the previous thread ends. This is why the invalid list is copied to a local and cleared before starting.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||