Previous Next Package
Class MIDICompose.MIDIObject
java.lang.Object
|
+----MIDICompose.MIDIObject
- public abstract class MIDIObject
- extends Object
The rootclass for all other MIDICompose classes. It doesn't know anything about
Lengthable or any other interface. If you want to add an element at a certain postition,
you have to set elements deltaTime to this position. If you turn round the Vector, this
will have no effect to the deltaTimes of the elements.
-
MIDIObject(int)
- Creates new MIDIObject with deltaTime.
-
add(MIDIObject)
- Adds a MIDIObject to a Vector.
-
copy()
- Returns a copy of itself.
-
deltaTime()
- Returns current deltaTime.
-
elementAt(int)
- Returns element at index from Vector.
-
lock()
- Locks this.
-
locked()
- Returns whether this is locked or not.
-
setDeltaTime(int)
- Sets deltaTime.
-
size()
- Returns number of added elements.
-
turnRound()
- Turns order in Vector around.
MIDIObject
protected MIDIObject(int deltaTime)
- Creates a new MIDIObject with a certain deltaTime.
- Parameters:
- deltaTime - any int (>= 0).
deltaTime
public int deltaTime()
- Returns the current deltaTime (relative to the MIDIObject it is added to).
- Returns:
- an int (>= 0).
setDeltaTime
public void setDeltaTime(int deltaTime)
- Sets the deltaTime (relative to the MIDIObject it is added to).
- Parameters:
- deltaTime - any int (>= 0).
lock
public void lock()
- After this method is called, all following add()s are ignored.
locked
public boolean locked()
- Returns whether lock() has been called or not.
- Returns:
- true if locked, false if not.
add
protected void add(MIDIObject object)
- Adds object (not a copy of object!) to the Vector.
- Parameters:
- object - any MIDIObject.
size
protected int size()
- Returns number of added MIDIObjects (= Vector-size).
- Returns:
- an int (>= 0).
elementAt
protected MIDIObject elementAt(int index)
- Returns element at Vector-position index.
- Parameters:
- index - any int between 0 and size()-1.
- Returns:
- a MIDIObject.
turnRound
protected void turnRound()
- Turnes order of Vector around.
copy
public abstract MIDIObject copy()
- Returns a copy of itself. Every subclass of MIDIObject must overwrite this method!
- Returns:
- an instance of its own class.
Previous Next Package