Package jmslexamples
Class ProportionalNotation
java.lang.Object
jmslexamples.ProportionalNotation
- All Implemented Interfaces:
ScoreCanvasListener
public class ProportionalNotation extends java.lang.Object implements ScoreCanvasListener
Use stemless notes to generate a demo of proportional notation. Use a series of 64th notes and
make some of them hidden rests. Make all notes stemless.
Draw on top of a score using callback to create a light gray grid
- Author:
- Nick Didkovsky, (c) 2009 Nick Didkovsky, nick@didkovsky.com
-
Field Summary
Fields inherited from interface com.softsynth.jmsl.score.ScoreCanvasListener
copyright
-
Constructor Summary
Constructors Constructor Description ProportionalNotation()
-
Method Summary
Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent arg0)
static void
main(java.lang.String[] args)
void
scoreCanvasClicked(ScoreCanvas canvas, java.awt.Point p, java.awt.event.MouseEvent e)
executes when mouse is clicked and releasedvoid
scoreCanvasDisplayedImageReady(Score score, ScoreCanvas canvas, java.awt.Image displayedImage)
Called immediately before ScoreCanvas draws the completed offscreen display image to the canvas's graphics context.void
scoreCanvasDragged(ScoreCanvas canvas, java.awt.Point p, java.awt.event.MouseEvent e)
executes when mouse is dragged (moved while mousedown)void
scoreCanvasKeyReleased(ScoreCanvas canvas, java.awt.event.KeyEvent keyEvent)
void
scoreCanvasKeyTyped(ScoreCanvas canvas, java.awt.event.KeyEvent keyEvent)
void
scoreCanvasPressed(ScoreCanvas canvas, java.awt.Point p, java.awt.event.MouseEvent e)
executes when mouse button is pressed downvoid
scoreCanvasReady(ScoreCanvas canvas)
void
scoreCanvasRectangleSelected(ScoreCanvas canvas, java.awt.Point p1, java.awt.Point p2)
executes when mouse is was dragged and released with no modifiers other than BUTTON1_MASK or SHIFT_MASKvoid
scoreCanvasReleased(ScoreCanvas canvas, java.awt.Point p, java.awt.event.MouseEvent e)
executes when mouse button is releasedvoid
start()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ProportionalNotation
public ProportionalNotation()
-
-
Method Details
-
main
public static void main(java.lang.String[] args) -
start
public void start() -
scoreCanvasClicked
Description copied from interface:ScoreCanvasListener
executes when mouse is clicked and released- Specified by:
scoreCanvasClicked
in interfaceScoreCanvasListener
-
scoreCanvasRectangleSelected
Description copied from interface:ScoreCanvasListener
executes when mouse is was dragged and released with no modifiers other than BUTTON1_MASK or SHIFT_MASK- Specified by:
scoreCanvasRectangleSelected
in interfaceScoreCanvasListener
-
scoreCanvasKeyTyped
- Specified by:
scoreCanvasKeyTyped
in interfaceScoreCanvasListener
-
scoreCanvasKeyReleased
- Specified by:
scoreCanvasKeyReleased
in interfaceScoreCanvasListener
-
scoreCanvasDisplayedImageReady
public void scoreCanvasDisplayedImageReady(Score score, ScoreCanvas canvas, java.awt.Image displayedImage)Called immediately before ScoreCanvas draws the completed offscreen display image to the canvas's graphics context. You may add drawing on top of the score by drawing in this method- Specified by:
scoreCanvasDisplayedImageReady
in interfaceScoreCanvasListener
-
scoreCanvasReady
- Specified by:
scoreCanvasReady
in interfaceScoreCanvasListener
-
scoreCanvasDragged
Description copied from interface:ScoreCanvasListener
executes when mouse is dragged (moved while mousedown)- Specified by:
scoreCanvasDragged
in interfaceScoreCanvasListener
-
scoreCanvasReleased
Description copied from interface:ScoreCanvasListener
executes when mouse button is released- Specified by:
scoreCanvasReleased
in interfaceScoreCanvasListener
-
scoreCanvasPressed
Description copied from interface:ScoreCanvasListener
executes when mouse button is pressed down- Specified by:
scoreCanvasPressed
in interfaceScoreCanvasListener
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent arg0)
-