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.

Constructor Index

 o MIDIObject(int)
Creates new MIDIObject with deltaTime.

Method Index

 o add(MIDIObject)
Adds a MIDIObject to a Vector.
 o copy()
Returns a copy of itself.
 o deltaTime()
Returns current deltaTime.
 o elementAt(int)
Returns element at index from Vector.
 o lock()
Locks this.
 o locked()
Returns whether this is locked or not.
 o setDeltaTime(int)
Sets deltaTime.
 o size()
Returns number of added elements.
 o turnRound()
Turns order in Vector around.

Constructors

 o MIDIObject
 protected MIDIObject(int deltaTime)
Creates a new MIDIObject with a certain deltaTime.

Parameters:
deltaTime - any int (>= 0).

Methods

 o deltaTime
 public int deltaTime()
Returns the current deltaTime (relative to the MIDIObject it is added to).

Returns:
an int (>= 0).
 o setDeltaTime
 public void setDeltaTime(int deltaTime)
Sets the deltaTime (relative to the MIDIObject it is added to).

Parameters:
deltaTime - any int (>= 0).
 o lock
 public void lock()
After this method is called, all following add()s are ignored.
 o locked
 public boolean locked()
Returns whether lock() has been called or not.

Returns:
true if locked, false if not.
 o add
 protected void add(MIDIObject object)
Adds object (not a copy of object!) to the Vector.

Parameters:
object - any MIDIObject.
 o size
 protected int size()
Returns number of added MIDIObjects (= Vector-size).

Returns:
an int (>= 0).
 o elementAt
 protected MIDIObject elementAt(int index)
Returns element at Vector-position index.

Parameters:
index - any int between 0 and size()-1.
Returns:
a MIDIObject.
 o turnRound
 protected void turnRound()
Turnes order of Vector around.
 o 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