|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jmsl.MusicJob com.softsynth.jmsl.ParallelCollection com.softsynth.jmsl.score.Staff
public class Staff
Staff
A Staff is a ParallelCollection of up to any number of Tracks, which get drawn on the same staff,
played by the same instrument.
JMSL Notation Project
Field Summary | |
---|---|
static java.lang.String |
copyright
|
static int |
DEFAULT_STAFF_SPACE_ABOVE
|
static int |
DEFAULT_STAFF_SPACE_BELOW
|
static int |
LEVEL_OF_BOTTOM_LINE
|
static int |
LEVEL_OF_MIDDLE_LINE
|
static int |
LEVEL_OF_TOP_LINE
|
static int |
SPACE_INTERVAL
|
Fields inherited from class com.softsynth.jmsl.MusicJob |
---|
repeatCount |
Constructor Summary | |
---|---|
Staff(Measure measure)
|
|
Staff(Measure measure,
Instrument ins)
|
Method Summary | |
---|---|
void |
addToSpaceAbove(double delta)
|
void |
addToSpaceBelow(double delta)
|
Track |
addTrack()
add a new Track to this staff. |
Track |
addTrack(Instrument ins)
add a new Track to this staff, handing it indicated instrument. |
Track |
getActiveTrack()
|
static int |
getActiveTrackIndex()
|
Clef |
getClef()
|
boolean |
getClefSetByHand()
Used to signal the end of a run of clef changes. |
boolean |
getDisplayClef()
|
boolean |
getDisplayKeySignature()
|
boolean |
getDisplayTimeSig()
|
java.awt.Point |
getDrawingAnchor()
drawingAnchor is the (x,y) point at top left of drawable object, set by layout manager, changes as measures stretch, compress, realign, etc |
java.lang.String |
getHierarchy()
|
int |
getInsertionIndex(java.awt.Point p)
return the index at which a Note is to be inserted, based on location p. |
boolean |
getInsIndexSetByHand()
|
int |
getInstrumentIndex()
|
KeySignature |
getKeySignature()
|
boolean |
getKeySignatureSetByHand()
Used to signal the end of a run of clef changes. |
double |
getMaxDuration()
|
Measure |
getMeasure()
|
int |
getNearestLevel(java.awt.Point p)
|
int |
getNonEmptyTrackCount()
|
Score |
getScore()
|
double |
getSpaceAbove()
for layout; unscaled space above staff |
double |
getSpaceBelow()
for layout; unscaled space below staff |
static double |
getStaffHeight()
for layout; unscaled distance between top and bottom line of staff |
int |
getStaffIndex()
|
double |
getTotalHeight()
|
Track |
getTrack(int n)
|
boolean |
isMultiTrack()
|
void |
layoutChildren()
Set the drawingAnchor for each Track equal to the left of the top line of the staff itelf |
int |
levelOfTopLine()
|
void |
render(java.awt.Graphics g,
double zoom)
|
static void |
setActiveTrackIndex(int trackIndex)
|
void |
setClef(Clef clef)
|
void |
setClefSetByHand(boolean flag)
Used to signal the end of a run of clef changes. |
void |
setDisplayClef(boolean flag)
/** used by layout manager to indicate whether or not this should render and make room for a clef |
void |
setDisplayKeySignature(boolean flag)
used by layout manager to indicate whether or not this should render and make room for a key sig |
void |
setDisplayTimeSig(boolean flag)
used by layout manager to indicate whether or not this should render and make room for a time sig |
void |
setDrawingAnchor(java.awt.Point p)
drawingAnchor is the (x,y) point at top left of drawable object, set by layout manager, changes as measures stretch, compress, realign, etc |
void |
setInsIndexSetByHand(boolean f)
|
void |
setInstrument()
|
void |
setInstrumentIndex(int index)
|
void |
setKeySignature(KeySignature ks)
|
void |
setKeySignatureSetByHand(boolean flag)
Used to signal the end of a run of key changes. |
void |
setSpaceAbove(double d)
for layout; set unscaled distance above staff |
void |
setSpaceBelow(double d)
for layout; set unscaled distance below staff |
java.lang.String |
toString()
|
boolean |
within(java.awt.Point p)
|
void |
writeXML(java.io.PrintWriter out)
|
Methods inherited from class com.softsynth.jmsl.ParallelCollection |
---|
get, halt, internalRepeat, main, print, printHierarchy, set |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SPACE_INTERVAL
public static final int DEFAULT_STAFF_SPACE_ABOVE
public static final int DEFAULT_STAFF_SPACE_BELOW
public static final int LEVEL_OF_MIDDLE_LINE
public static final int LEVEL_OF_TOP_LINE
public static final int LEVEL_OF_BOTTOM_LINE
public static final java.lang.String copyright
Constructor Detail |
---|
public Staff(Measure measure)
public Staff(Measure measure, Instrument ins)
Method Detail |
---|
public int getStaffIndex()
public void setInstrumentIndex(int index)
public int getInstrumentIndex()
public void setInstrument()
public void setClefSetByHand(boolean flag)
public Track addTrack()
public Track addTrack(Instrument ins)
public boolean getClefSetByHand()
public void setKeySignatureSetByHand(boolean flag)
public boolean getKeySignatureSetByHand()
public boolean getInsIndexSetByHand()
public void setInsIndexSetByHand(boolean f)
public KeySignature getKeySignature()
public void setKeySignature(KeySignature ks)
public void setDisplayClef(boolean flag)
public boolean getDisplayClef()
public void setDisplayTimeSig(boolean flag)
public boolean getDisplayTimeSig()
public void setDisplayKeySignature(boolean flag)
public boolean getDisplayKeySignature()
public boolean isMultiTrack()
public int getNonEmptyTrackCount()
public Measure getMeasure()
public Track getTrack(int n)
public Track getActiveTrack()
public static void setActiveTrackIndex(int trackIndex)
public static int getActiveTrackIndex()
public Score getScore()
public double getMaxDuration()
public void setClef(Clef clef)
public Clef getClef()
public double getSpaceAbove()
public double getSpaceBelow()
public static double getStaffHeight()
public double getTotalHeight()
public void setSpaceAbove(double d)
public void setSpaceBelow(double d)
public void addToSpaceAbove(double delta)
public void addToSpaceBelow(double delta)
public void setDrawingAnchor(java.awt.Point p)
public java.awt.Point getDrawingAnchor()
public void layoutChildren()
public int levelOfTopLine()
public boolean within(java.awt.Point p)
public int getInsertionIndex(java.awt.Point p)
public int getNearestLevel(java.awt.Point p)
public void render(java.awt.Graphics g, double zoom)
public java.lang.String getHierarchy()
public java.lang.String toString()
toString
in class java.lang.Object
public void writeXML(java.io.PrintWriter out) throws java.io.IOException
writeXML
in interface XMLWritable
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |