abc.parser
Class TuneChangeEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byabc.parser.TuneChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class TuneChangeEvent
extends java.util.EventObject

Event used when a state changed occured on a tune.

See Also:
Serialized Form

Field Summary
static int TUNE_ADDED
          The tune added event type.
static int TUNE_REMOVED
          The tune removed event type.
static int TUNE_UPDATED
          The tune updated event type.
 
Constructor Summary
TuneChangeEvent(java.lang.Object source, int eventType, Tune newTune, java.lang.String newTuneNotation)
          Creates a new event describing a tune change.
 
Method Summary
 Tune getTune()
          Returns the tune that has changed.
 java.lang.String getTuneNotation()
          Returns the tune notation in ABC format.
 int getType()
          Returns the type of this event.
 java.lang.String toString()
          Returns a string representation of this event.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TUNE_UPDATED

public static final int TUNE_UPDATED
The tune updated event type.

See Also:
Constant Field Values

TUNE_REMOVED

public static final int TUNE_REMOVED
The tune removed event type.

See Also:
Constant Field Values

TUNE_ADDED

public static final int TUNE_ADDED
The tune added event type.

See Also:
Constant Field Values
Constructor Detail

TuneChangeEvent

public TuneChangeEvent(java.lang.Object source,
                       int eventType,
                       Tune newTune,
                       java.lang.String newTuneNotation)
Creates a new event describing a tune change.

Parameters:
source - The source that generated this event.
eventType - The type of this event.
newTune - The tune that has changed (new, been removed or updated)
newTuneNotation - The notation of the tune that has been changed, removed or added.
Method Detail

getTuneNotation

public java.lang.String getTuneNotation()
Returns the tune notation in ABC format.

Returns:
the tune notation in ABC format.

getType

public int getType()
Returns the type of this event.

Returns:
The type of this event.

getTune

public Tune getTune()
Returns the tune that has changed.

Returns:
The tune that has changed.

toString

public java.lang.String toString()
Returns a string representation of this event.

Returns:
A string representation of this event.