|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.web3d.vrml.util.KeySequence
public class KeySequence
A sequence, much like the collections List interface, specifically designed for queueing up sequences of Xj3DKeyEvents between rendering frames.
The methods involved with loading a sequence or manipulating it's underlying array of events are synchronized.
| Field Summary | |
|---|---|
protected Xj3DKeyEvent[] |
eventArray
The array storing key events |
protected int |
index
The number of key events currently stored |
| Constructor Summary | |
|---|---|
KeySequence()
Construct an instance with the default capacity. |
|
KeySequence(int initialCapacity)
Construct an instance with the specified initial capacity. |
|
| Method Summary | |
|---|---|
void |
add(Xj3DKeyEvent evt)
Add the event to the end of the sequence |
void |
clear()
Clear the sequence |
void |
ensureCapacity(int minCapacity)
Ensure that the capacity of this sequence is sufficient to contain the specified number of events. |
Xj3DKeyEvent |
get(int i)
Return the key event at the specified index. |
int |
size()
Return the number of events in the sequence |
void |
transfer(KeySequence seq)
Move the current contents of this object into the argument sequence object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int index
protected Xj3DKeyEvent[] eventArray
| Constructor Detail |
|---|
public KeySequence()
public KeySequence(int initialCapacity)
initialCapacity - - The initial holding capacity for events.| Method Detail |
|---|
public Xj3DKeyEvent get(int i)
i - - The index of the event to return
java.lang.IndexOutOfBoundsException - - if i is out of range
( i < 0 || i >= size( ) ).public int size()
public void add(Xj3DKeyEvent evt)
evt - - The eventpublic void clear()
public void transfer(KeySequence seq)
seq - - The KeySequence object to initializepublic void ensureCapacity(int minCapacity)
minCapacity - the minimum number of events that this
sequence must be able to hold.
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||