org.niffty
Class Score

java.lang.Object
  |
  +--org.niffty.Score

public class Score
extends java.lang.Object

A Score object encapsulates the information in a NIFF file. A Score object has a ScoreSetup and a ScoreData object

See Also:
ScoreSetup, ScoreData

Constructor Summary
Score(ScoreSetup setup, ScoreData data)
          Creates a new Score with the given setup and data.
 
Method Summary
 ScoreData getData()
           
 ScoreSetup getSetup()
           
 int getStavesHeight()
          Return the total height of the working area for all the staves on the page in screen pixels.
 FinalPoint getStavesScreenHotspot()
          Return the origin in screen coordinates of the top staff.
 int getStavesWidth()
          Return the width of the working area for the staves on the page in screen pixels.
 void invalidate()
          This is automatically called after the object is modified to force this and all child objects to recompute their values when the "get" method is called for the value.
 void print(java.io.PrintStream output)
          This prints the score info including setup and data sections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Score

public Score(ScoreSetup setup,
             ScoreData data)
Creates a new Score with the given setup and data.

Parameters:
setup - the ScoreSetup for this score.
data - the ScoreData for this score. It is an error if this already belongs to a Score object.
Throws:
HeirarchyException - if the data argument has already been added to a Score
Method Detail

getSetup

public ScoreSetup getSetup()

getData

public ScoreData getData()

invalidate

public void invalidate()
This is automatically called after the object is modified to force this and all child objects to recompute their values when the "get" method is called for the value.


getStavesScreenHotspot

public FinalPoint getStavesScreenHotspot()
Return the origin in screen coordinates of the top staff.


getStavesHeight

public int getStavesHeight()
Return the total height of the working area for all the staves on the page in screen pixels.


getStavesWidth

public int getStavesWidth()
Return the width of the working area for the staves on the page in screen pixels. This is the same as the width of one staff.


print

public void print(java.io.PrintStream output)
This prints the score info including setup and data sections.

Parameters:
output - the PrintStream to print to, such as System.out