|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.niffty.HeirarchyNode | +--org.niffty.MusicSymbol | +--org.niffty.Clef
A Clef has a shape, staff step, and octave number and optional tags: logical or absolute placement, voice ID
Nested Class Summary | |
static class |
Clef.OctaveNumber
A Clef.OctaveNumber has constants for the legal octave number indicatiors. |
static class |
Clef.Shape
A Clef.Shape has constants for the legal shapes. |
Field Summary |
Fields inherited from class org.niffty.MusicSymbol |
_tags |
Constructor Summary | |
Clef(Clef.Shape shape,
int staffStep,
Clef.OctaveNumber octaveNumber,
Tags tags)
Creates a new Clef with the given parameters. |
Method Summary | |
void |
draw(java.awt.Graphics graphics)
Draw this object |
Clef.OctaveNumber |
getOctaveNumber()
Returns the octave number. |
FinalPoint |
getScreenHotspot()
Get the hotspot for this object in screen coordinates. |
Clef.Shape |
getShape()
Returns the shape. |
int |
getStaffStep()
Returns the staff step for the clef, which is 2 for a G_CLEF, etc. |
void |
invalidate()
This is automatically called after the object is modified to force this to recompute all its values when the "get" method is called for the value. |
boolean |
isLeftPositionedSymbol()
Return true if this is a symbol, like a cleff change, which appears to the left of the main symbol in the time slice, like the stem. |
java.lang.String |
toString()
|
Methods inherited from class org.niffty.MusicSymbol |
findDefaultAnchor, findLeftPositionedX, findMultiNodes, getIndex, getParentTimeSlice, getTags, nextInstanceOfInScore, previousInstanceOf, previousInstanceOfInScore, previousInstanceOfInStaff |
Methods inherited from class org.niffty.HeirarchyNode |
addChild, getChild, getChildCount, getParentNode, nextInHeirarchy, previousInHeirarchy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Clef(Clef.Shape shape, int staffStep, Clef.OctaveNumber octaveNumber, Tags tags)
shape
- the Shape constant. This must not be null.staffStep
- see getStaffStep()tags
- the tags for this music symbol. If this is null,
then this uses an empty Tags object.Method Detail |
public Clef.Shape getShape()
public int getStaffStep()
public Clef.OctaveNumber getOctaveNumber()
public boolean isLeftPositionedSymbol()
MusicSymbol
isLeftPositionedSymbol
in class MusicSymbol
public void invalidate()
invalidate
in class MusicSymbol
public FinalPoint getScreenHotspot()
getScreenHotspot
in interface Anchored
getScreenHotspot
in class MusicSymbol
FinalPoint.newPoint()
public void draw(java.awt.Graphics graphics)
draw
in class MusicSymbol
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |