|
|||||||||
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.Rest
A Rest has a shape, staff step, and duration.
Nested Class Summary | |
static class |
Rest.Shape
A Rest.Shape has constants for the legal shapes. |
Field Summary |
Fields inherited from class org.niffty.MusicSymbol |
_tags |
Constructor Summary | |
Rest(Rest.Shape shape,
int staffStep,
Rational duration,
Tags tags)
Creates a new Rest with the given parameters. |
Method Summary | |
void |
draw(java.awt.Graphics graphics)
It is expected that the subclass will override this. |
Rational |
getDuration()
Returns the duration RATIONAL |
int |
getRightEdge()
Return the right edge of the shape which is the offset from the screenHotspot(). |
FinalPoint |
getScreenHotspot()
Override the y position to use the value from staffStepOffsetY from the parent time slice's position at the top of the staff. |
Rest.Shape |
getShape()
Returns the shape. |
int |
getStaffStep()
Returns the staff step for the notehead. |
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. |
int |
lgetLeftEdge()
Return the left edge of the shape which is the offset from the screenHotspot(). |
java.lang.String |
toString()
|
Methods inherited from class org.niffty.MusicSymbol |
findDefaultAnchor, findLeftPositionedX, findMultiNodes, getIndex, getParentTimeSlice, getTags, isLeftPositionedSymbol, 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 Rest(Rest.Shape shape, int staffStep, Rational duration, Tags tags)
shape
- the Shape constant. This must not be null.staffStep
- see getStaffStep()duration
- see getDuration()tags
- the tags for this music symbol. If this is null,
then this uses an empty Tags object.Method Detail |
public Rest.Shape getShape()
public int getStaffStep()
public Rational getDuration()
public void invalidate()
invalidate
in class MusicSymbol
public FinalPoint getScreenHotspot()
getScreenHotspot
in interface Anchored
getScreenHotspot
in class MusicSymbol
FinalPoint.newPoint()
public int getRightEdge()
public int lgetLeftEdge()
public void draw(java.awt.Graphics graphics)
MusicSymbol
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 |