abc.notation
Class NoteAbstract

java.lang.Object
  extended byabc.notation.NoteAbstract
All Implemented Interfaces:
ScoreElementInterface
Direct Known Subclasses:
MultiNote, Note

public class NoteAbstract
extends java.lang.Object
implements ScoreElementInterface

This is the abstract class to define notes or multi notes.


Field Summary
static byte DOWN
          The down bow type.
static byte NONE
          The none bow type.
static byte UP
          The up bow type.
 
Constructor Summary
NoteAbstract()
           
 
Method Summary
 byte getBow()
          Returns the bow to be used when playing this note.
 java.lang.String getChordName()
          Returns the name of the chord.
 byte getDotted()
          Returns the dotted value of this note.
 Note[] getGracingNotes()
          Returns the gracing notes to be played with this note.
 int getGracingNotesLength(short defaultNoteLength)
           
 Tuplet getTuplet()
          Returns the tupelt this note is part of.
 boolean hasGeneralGracing()
          Returns true if this note has a general gracing, false otherwise.
 boolean hasGracingNotes()
          Returns true if this note has gracings, false otherwise.
 boolean hasStaccato()
           
 boolean isPartOfSlur()
          Returns true if this Note is part of a slur.
 boolean isPartOfTuplet()
          Return true if this note is part of a tuplet.
 void setBow(byte bowValue)
          Sets the bow to be used when playing this note.
 void setChordName(java.lang.String chordName)
          Sets the name of the chord.
 void setDotted(byte dotted)
           
 void setGeneralGracing(boolean hasGeneralGracing)
          Specifies if this note should be played with a general gracing or not.
 void setGracingNotes(Note[] notes)
           
 void setPartOfSlur(boolean isPartOfSlur)
           
 void setStaccato(boolean staccatoValue)
           
 java.lang.String toString()
          Returns a String representation of this Object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final byte NONE
The none bow type.

See Also:
Constant Field Values

DOWN

public static final byte DOWN
The down bow type.

See Also:
Constant Field Values

UP

public static final byte UP
The up bow type.

See Also:
Constant Field Values
Constructor Detail

NoteAbstract

public NoteAbstract()
Method Detail

setChordName

public void setChordName(java.lang.String chordName)
Sets the name of the chord.

Parameters:
chordName - The name of the chord, ex: Gm6.

getChordName

public java.lang.String getChordName()
Returns the name of the chord.

Returns:
The name of the chord, null if no chord has been set.

getBow

public byte getBow()
Returns the bow to be used when playing this note.

Returns:
The bow to be used when playing this note.
See Also:
setBow(byte)

setBow

public void setBow(byte bowValue)
Sets the bow to be used when playing this note.

Parameters:
bowValue - The bow to be used when playing this note. Possible values are NONE (the default value when not specified), UP or DOWN.

getGracingNotes

public Note[] getGracingNotes()
Returns the gracing notes to be played with this note.

Returns:
The gracing notes to be played with this note. null if this note has no gracing notes.
See Also:
hasGracingNotes()

setGracingNotes

public void setGracingNotes(Note[] notes)

hasGracingNotes

public boolean hasGracingNotes()
Returns true if this note has gracings, false otherwise.

Returns:
true if this note has gracings, false otherwise.

setDotted

public void setDotted(byte dotted)

getDotted

public byte getDotted()
Returns the dotted value of this note.

Returns:
The dotted value of this note. Default is 0.

hasGeneralGracing

public boolean hasGeneralGracing()
Returns true if this note has a general gracing, false otherwise.

Returns:
true if this note has a general gracing, false otherwise.

setGeneralGracing

public void setGeneralGracing(boolean hasGeneralGracing)
Specifies if this note should be played with a general gracing or not.

Parameters:
hasGeneralGracing - true if this note should be played with a general gracing, false otherwise.

hasStaccato

public boolean hasStaccato()

setStaccato

public void setStaccato(boolean staccatoValue)

isPartOfSlur

public boolean isPartOfSlur()
Returns true if this Note is part of a slur.

Returns:
true if this Note is part of a slur, false otherwise.

isPartOfTuplet

public boolean isPartOfTuplet()
Return true if this note is part of a tuplet.

Returns:
true if this note is part of a tuplet, false otherwise.

getTuplet

public Tuplet getTuplet()
Returns the tupelt this note is part of.

Returns:
The tupelt this note is part of. null is returned if this note isn't part of a tuplet.
See Also:
isPartOfTuplet()

setPartOfSlur

public void setPartOfSlur(boolean isPartOfSlur)

getGracingNotesLength

public int getGracingNotesLength(short defaultNoteLength)

toString

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

Returns:
a String representation of this Object.