|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfugue.Parser
public class Parser
You may notice that there is no parse() method in the Parser class! That's because the parse() method may take any type of parameter, as well as any number of parameters, so it isn't something that can declared ahead of time.
Field Summary | |
---|---|
protected javax.swing.event.EventListenerList |
listenerList
List of ParserListeners |
protected javax.swing.event.EventListenerList |
progressListenerList
List of ParserProgressListeners |
static int |
TRACING_OFF
Pass this value to setTracing( ) to turn tracing off. |
static int |
TRACING_ON
Pass this value to setTracing( ) to turn tracing on. |
Constructor Summary | |
---|---|
Parser()
|
Method Summary | |
---|---|
void |
addParserListener(ParserListener l)
Adds a ParserListener . |
void |
addParserProgressListener(ParserProgressListener l)
Adds a ParserListener . |
protected void |
clearParserListeners()
|
protected void |
clearParserProgressListeners()
|
protected void |
fireChannelPressureEvent(ChannelPressure event)
Tells all ParserListener interfaces that a controller event has been parsed. |
protected void |
fireControllerEvent(Controller event)
Tells all ParserListener interfaces that a controller event has been parsed. |
protected void |
fireInstrumentEvent(Instrument event)
Tells all ParserListener interfaces that an instrument event has been parsed. |
protected void |
fireKeySignatureEvent(KeySignature event)
Tells all ParserListener interfaces that a key signature event has been parsed. |
protected void |
fireLayerEvent(Layer event)
Tells all ParserListener interfaces that a layer event has been parsed. |
protected void |
fireMeasureEvent(Measure event)
Tells all ParserListener interfaces that a measure event has been parsed. |
protected void |
fireNoteEvent(Note event)
Tells all ParserListener interfaces that a note event has been parsed. |
protected void |
fireParallelNoteEvent(Note event)
Tells all ParserListener interfaces that a parallel note event has been parsed. |
protected void |
firePitchBendEvent(PitchBend event)
Tells all ParserListener interfaces that a controller event has been parsed. |
protected void |
firePolyphonicPressureEvent(PolyphonicPressure event)
Tells all ParserListener interfaces that a controller event has been parsed. |
protected void |
fireProgressReported(java.lang.String description,
long partComplete,
long whole)
Tells all ParserProgressListener interfaces that progress has occurred. |
protected void |
fireSequentialNoteEvent(Note event)
Tells all ParserListener interfaces that a sequential note event has been parsed. |
protected void |
fireTempoEvent(Tempo event)
Tells all ParserListener interfaces that a tempo event has been parsed. |
protected void |
fireTimeEvent(Time event)
Tells all ParserListener interfaces that a time event has been parsed. |
protected void |
fireVoiceEvent(Voice event)
Tells all ParserListener interfaces that a voice event has been parsed. |
static int |
getTracing()
Returns the current state of tracing. |
void |
removeParserListener(ParserListener l)
Removes a ParserListener . |
void |
removeParserProgressListener(ParserProgressListener l)
Removes a ParserListener . |
static void |
setTracing(int tracing)
Turns tracing on or off. |
protected void |
trace(java.lang.Object... sentenceFragments)
Displays the passed String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TRACING_OFF
public static final int TRACING_ON
protected javax.swing.event.EventListenerList progressListenerList
protected javax.swing.event.EventListenerList listenerList
Constructor Detail |
---|
public Parser()
Method Detail |
---|
public static void setTracing(int tracing)
tracing
- the state of tracing - on or offpublic static int getTracing()
protected void trace(java.lang.Object... sentenceFragments)
s
- the String to displaypublic void addParserProgressListener(ParserProgressListener l)
ParserListener
. The listener will receive events when the parser
interprets music string tokens.
listener
- the listener that is to be notified of parser eventspublic void removeParserProgressListener(ParserProgressListener l)
ParserListener
.
listener
- the listener to removeprotected void clearParserProgressListeners()
protected void fireProgressReported(java.lang.String description, long partComplete, long whole)
public void addParserListener(ParserListener l)
ParserListener
. The listener will receive events when the parser
interprets music string tokens.
listener
- the listener that is to be notified of parser eventspublic void removeParserListener(ParserListener l)
ParserListener
.
listener
- the listener to removeprotected void clearParserListeners()
protected void fireVoiceEvent(Voice event)
protected void fireTempoEvent(Tempo event)
protected void fireInstrumentEvent(Instrument event)
protected void fireLayerEvent(Layer event)
protected void fireTimeEvent(Time event)
protected void fireKeySignatureEvent(KeySignature event)
protected void fireMeasureEvent(Measure event)
protected void fireControllerEvent(Controller event)
protected void fireChannelPressureEvent(ChannelPressure event)
protected void firePolyphonicPressureEvent(PolyphonicPressure event)
protected void firePitchBendEvent(PitchBend event)
protected void fireNoteEvent(Note event)
protected void fireSequentialNoteEvent(Note event)
protected void fireParallelNoteEvent(Note event)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |