|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hdcookbook.grin.Segment
public class Segment
A segment within a show. A show is composed of segments, and at all times exactly one segment is active. When a segment is active, its features are showing, and its remote control handlers receive events. When a new feature is activated, any features that are active in both segments are not re-initialized, so that animations will just continue, for example.
Field Summary | |
---|---|
protected Feature[] |
activeFeatures
|
protected int |
keyTypedInterest
This bitmask is formed by or-ing the set of key typed events this segment has handlers for. |
protected java.lang.String |
name
|
protected Command[] |
nextCommands
|
protected boolean |
nextOnSetupDone
|
protected Command[] |
onEntryCommands
|
protected RCHandler[] |
rcHandlers
|
protected int |
rcPressedInterest
The bitmask is formed by or-ing the set of remote control key presses this segment has handlers for. |
protected int |
rcReleasedInterest
The bitmask is formed by or-ing the set of remote control key releases this segment has handlers for. |
protected Feature[] |
settingUpFeatures
|
protected Show |
show
|
Constructor Summary | |
---|---|
Segment()
|
Method Summary | |
---|---|
Feature[] |
getActiveFeatures()
Get the list of active features of this segment. |
java.lang.String |
getName()
Get the name of this segment. |
Command[] |
getNextCommands()
Give the commands in our next clause. |
boolean |
getNextOnSetupDone()
Do we trigger the commands in our next clause when all of the features in our setup clause have finished loading? |
Command[] |
getOnEntryCommands()
Get the list of commands that are called when this segment is activated. |
RCHandler[] |
getRCHandlers()
Give the set of remote control handlers for this segment. |
Feature[] |
getSetupFeatures()
Get the list of features in the setup clause of this segment. |
Show |
getShow()
|
void |
initialize()
Initialize up this segment. |
void |
readInstanceData(GrinDataInputStream in,
int length)
Reads in this node information from the binary file format. |
void |
setName(java.lang.String name)
Set this segment's name. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected Show show
protected Feature[] activeFeatures
protected Feature[] settingUpFeatures
protected Command[] onEntryCommands
protected boolean nextOnSetupDone
protected Command[] nextCommands
protected RCHandler[] rcHandlers
protected int rcPressedInterest
protected int rcReleasedInterest
protected int keyTypedInterest
Constructor Detail |
---|
public Segment()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The segment's name (possibly null)public Show getShow()
public void initialize()
public void readInstanceData(GrinDataInputStream in, int length) throws java.io.IOException
Node
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.
readInstanceData
in interface Node
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.
java.io.IOException
- if error occurs.GrinDataInputStream.readSuperClassData(Feature)
,
GrinDataInputStream.readSuperClassData(RCHandler)
,
GrinDataInputStream.readSuperClassData(Segment)
,
GrinDataInputStream.readSuperClassData(Command)
public Feature[] getActiveFeatures()
public Feature[] getSetupFeatures()
public Command[] getOnEntryCommands()
public boolean getNextOnSetupDone()
public Command[] getNextCommands()
getNextOnSetupDone()
,
Show.segmentDone()
public RCHandler[] getRCHandlers()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |