Package com.softsynth.jmsl.score
Class GoofyFace
java.lang.Object
com.softsynth.jmsl.score.GoofyFace
- All Implemented Interfaces:
ScoreCanvasListener
public class GoofyFace extends java.lang.Object implements ScoreCanvasListener
Testable implementation of a ScoreCanvasListener. Draws a face, prints event messages
- Author:
- Nick Didkovsky, nick@didkovsky.com
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
copyright
-
Constructor Summary
Constructors Constructor Description GoofyFace()
-
Method Summary
Modifier and Type Method Description void
scoreCanvasClicked(ScoreCanvas canvas, java.awt.Point p, java.awt.event.MouseEvent ev)
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 in paint() (awt) or paintComponent() (Swing).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 releasedMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
copyright
public static final java.lang.String copyright- See Also:
- Constant Field Values
-
-
Constructor Details
-
GoofyFace
public GoofyFace()
-
-
Method Details
-
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
-
scoreCanvasReady
- Specified by:
scoreCanvasReady
in interfaceScoreCanvasListener
-
scoreCanvasDisplayedImageReady
public void scoreCanvasDisplayedImageReady(Score score, ScoreCanvas canvas, java.awt.Image displayedImage)Description copied from interface:ScoreCanvasListener
Called immediately before ScoreCanvas draws the completed offscreen display image to the canvas's graphics context in paint() (awt) or paintComponent() (Swing). You may do additional drawing on top of the rendered score by retrieving displayedImage.getGraphics() and drawing with it.- Specified by:
scoreCanvasDisplayedImageReady
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
-