com.hdcookbook.grin.commands
Class ActivateSegmentCommand
java.lang.Object
com.hdcookbook.grin.commands.Command
com.hdcookbook.grin.commands.ActivateSegmentCommand
- All Implemented Interfaces:
- Node
- Direct Known Subclasses:
- SEActivateSegmentCommand
public class ActivateSegmentCommand
- extends Command
- implements Node
A command to make a new segment be the active one within a show.
- Author:
- Bill Foote (http://jovial.com)
Field Summary |
protected boolean |
pop
|
protected boolean |
push
|
protected Segment |
segment
The segment to activate. |
Fields inherited from class com.hdcookbook.grin.commands.Command |
show |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
segment
protected Segment segment
- The segment to activate. In the case of pop, this will be null.
push
protected boolean push
pop
protected boolean pop
ActivateSegmentCommand
public ActivateSegmentCommand(Show show,
boolean push,
boolean pop)
ActivateSegmentCommand
public ActivateSegmentCommand(Show show)
getPush
public boolean getPush()
getPop
public boolean getPop()
getSegment
public Segment getSegment()
setup
public void setup(Segment segment)
execute
public void execute()
- Description copied from class:
Command
- Execute the command. This causes the command to take
whatever action it was created to do.
- Specified by:
execute
in class Command
readInstanceData
public void readInstanceData(GrinDataInputStream in,
int length)
throws java.io.IOException
- Description copied from interface:
Node
- Reads in this node information from the binary file format.
An implementation of this method is recommended to call
in.readSuperClassData(this)
as the first line of the method to read in information
that is defined in the base class of this Node type.
This should only be called while initializing this object.
- Specified by:
readInstanceData
in interface Node
- Parameters:
in
- InputStream to read data from.length
- the number of bytes that this node's information occupies
in the InputStream. The implementation of this method is expected to
read exactly this number of bytes from the stream. This can be used
for a debugging purpose.
- Throws:
java.io.IOException
- if error occurs.- See Also:
GrinDataInputStream.readSuperClassData(Feature)
,
GrinDataInputStream.readSuperClassData(RCHandler)
,
GrinDataInputStream.readSuperClassData(Segment)
,
GrinDataInputStream.readSuperClassData(Command)