|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hdcookbook.grin.commands.Command
com.hdcookbook.grin.GrinXHelper
com.hdcookbook.grin.SEGrinXHelper
com.hdcookbook.grin.commands.SESyncDisplayCommand
public class SESyncDisplayCommand
This command causes command processing to wait until the display is synchronized with the state of the show.
Field Summary |
---|
Fields inherited from class com.hdcookbook.grin.GrinXHelper |
---|
COMMAND_LIST, commandNumber, MOUSE_CLICK, MOUSE_MOVE, SEGMENT_DONE, subCommands, SYNC_DISPLAY |
Fields inherited from class com.hdcookbook.grin.commands.Command |
---|
show |
Constructor Summary | |
---|---|
SESyncDisplayCommand(SEShow show)
|
Method Summary | |
---|---|
void |
accept(SEShowVisitor visitor)
Calls the visit method corresponding to this node type. |
void |
changeFeatureReference(Feature from,
Feature to)
Change a feature reference from one feature to a new one. |
void |
postProcess(ShowBuilder builder)
Do any needed post-processing in this show. |
java.lang.String |
toString()
Return a user-friendly string for this command for debugging purposes. |
Methods inherited from class com.hdcookbook.grin.SEGrinXHelper |
---|
equals, getRuntimeClassName, hashCode, writeInstanceData |
Methods inherited from class com.hdcookbook.grin.GrinXHelper |
---|
execute, execute, getInstanceOf, readInstanceData, runSubCommand, setCommandNumber, setCommandObject, setSubCommands |
Methods inherited from class com.hdcookbook.grin.commands.Command |
---|
cloneIfNeeded, deferNextCommands |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SESyncDisplayCommand(SEShow show)
Method Detail |
---|
public void accept(SEShowVisitor visitor)
SENode
If you are defining a user-defined feature, there are some
restrictions that you'll want to follow. If your extension is
a feature that has children, then you should make it a subclass
of one of the built-in feature types, Assembly, Modifer or Group.
That's because the GRIN compiler defines visitors that need to
visit every node in the tree, but these built-in visitors don't
know about your extension types. By making your extension type
a subclass of one of the standard ones, and by making your
accept()
method call either
visitAssembly()
, visitGroup()
or
visitUserDefinedModifier()
, as appropriate,
you'll ensure that all the children get visited.
visitor
- SEShowVisitor object.SEShowVisitor
public void postProcess(ShowBuilder builder) throws java.io.IOException
During the post-process phase, a node can add new features to the
show, by calling ShowBuilder.addSyntheticFeature()
,
and it can insert a new feature as the parent of a given feature,
by calling ShowBuilder.injectParent()
. It can also
add segments and handlers by calling the appropriate builder methods.
When a parent is injected, the ShowBuilder calls postProcess() on all nodes automatically, including nodes that are created during the execution of postProcess() in another node.
postProcess
in interface SENode
postProcess
in class SEGrinXHelper
builder
- The builder that holds state for the show
java.io.IOException
- if an error is encounteredShowBuilder.addSyntheticFeature(Feature)
,
ShowBuilder.injectParent(Feature, Feature)
public void changeFeatureReference(Feature from, Feature to)
from
, it should be
changed to refer to to
. This is called for every node
in an SEShow when SENode.injectParent
is used.
The ShowBuilder calls changeFeatureReference() on all nodes automatically, including nodes that are created during the execution of postProcess().
changeFeatureReference
in interface SENode
changeFeatureReference
in class SEGrinXHelper
SENode.changeFeatureReference(Feature, Feature)
public java.lang.String toString()
toString
in class GrinXHelper
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |