com.softsynth.jmsl.score
Class ScoreControlPanel

java.lang.Object
  extended by com.softsynth.jmsl.view.PVPanelAdapter
      extended by com.softsynth.jmsl.score.ScoreControlPanel
All Implemented Interfaces:
PVComponent, PVPanel, PVScrollbarListener, Playable, MeasureMetronomeListener, java.awt.event.ActionListener, java.awt.event.ItemListener, java.util.EventListener

public class ScoreControlPanel
extends PVPanelAdapter
implements Playable, PVScrollbarListener, java.awt.event.ActionListener, java.awt.event.ItemListener, MeasureMetronomeListener

ScoreControlPanel
Control zoom and measure #
JMSL Notation Project

Author:
Nick Didkovsky , copyright 2000 Nick Didkovsky

Field Summary
static java.lang.String copyright
           
 
Constructor Summary
ScoreControlPanel(Score score)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addZoomListener(ZoomListener zl)
           
 void clearSectionChoice()
           
 void finish()
          calls finishAll() on scorecollection, sets gui buttons
 ScoreSection getCurrentSection()
           
 boolean getLoopState()
           
 void handleMeasure()
           
 void handleZoom()
           
 void itemStateChanged(java.awt.event.ItemEvent e)
           
 void launch(double time, int startMeasure, int endMeasure, boolean useButton)
          Launch the score at specified time, starting and ending at specified measures
 void launchSection(double playTime, boolean useButton)
          launch current section.
static void main(java.lang.String[] args)
           
 void notifyLayout(int numMeasuresInLayout)
           
 void notifyMeasureBeat(int measure, int beat, int beatsInMeasure)
          Display measure and beat in Label, notified by Score's Measure's MeasureMetronome
 void notifyScrollbarValueChanged(PVScrollbar jsb)
           
 void notifySectionUpdate(ScoreSection section)
           
 double play(double time, Composable parent)
          Result of collection finishing
 void setLoop(boolean flag)
          Set internal flag to loop playback or not.
 void setMax(int max)
           
 void setMeasureBar(int measureNumber)
           
 void setSectionName(int sectionIndex, java.lang.String sectionName)
           
 void setZoom(double z)
           
 
Methods inherited from class com.softsynth.jmsl.view.PVPanelAdapter
add, add, addKeyListener, equals, getBackground, getBounds, getComponent, getFont, getParent, hashCode, isEnabled, remove, removeAll, removeKeyListener, setBackground, setEnabled, setFont, setLayout, setLocation, setVisible, toString, validate
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

copyright

public static final java.lang.String copyright
See Also:
Constant Field Values
Constructor Detail

ScoreControlPanel

public ScoreControlPanel(Score score)
Method Detail

setMax

public void setMax(int max)

addZoomListener

public void addZoomListener(ZoomListener zl)

handleZoom

public void handleZoom()

setZoom

public void setZoom(double z)

notifyLayout

public void notifyLayout(int numMeasuresInLayout)

handleMeasure

public void handleMeasure()

setMeasureBar

public void setMeasureBar(int measureNumber)

notifyScrollbarValueChanged

public void notifyScrollbarValueChanged(PVScrollbar jsb)
Specified by:
notifyScrollbarValueChanged in interface PVScrollbarListener

notifySectionUpdate

public void notifySectionUpdate(ScoreSection section)

getCurrentSection

public ScoreSection getCurrentSection()

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

getLoopState

public boolean getLoopState()

launch

public void launch(double time,
                   int startMeasure,
                   int endMeasure,
                   boolean useButton)
Launch the score at specified time, starting and ending at specified measures


launchSection

public void launchSection(double playTime,
                          boolean useButton)
launch current section. Convenience call to launch(playTime, getCurrentSection().getStart(),getCurrentSection().getEnd(), useButton )


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

setLoop

public void setLoop(boolean flag)
Set internal flag to loop playback or not. Does not update checkbox


finish

public void finish()
calls finishAll() on scorecollection, sets gui buttons


play

public double play(double time,
                   Composable parent)
Result of collection finishing

Specified by:
play in interface Playable
Returns:
stopTime

notifyMeasureBeat

public void notifyMeasureBeat(int measure,
                              int beat,
                              int beatsInMeasure)
Display measure and beat in Label, notified by Score's Measure's MeasureMetronome

Specified by:
notifyMeasureBeat in interface MeasureMetronomeListener

clearSectionChoice

public void clearSectionChoice()

setSectionName

public void setSectionName(int sectionIndex,
                           java.lang.String sectionName)

main

public static void main(java.lang.String[] args)