com.softsynth.jmsl.score
Class GoofyFace

java.lang.Object
  extended by 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, didkovn@mail.rockefeller.edu

Field Summary
static java.lang.String copyright
           
 
Constructor Summary
GoofyFace()
           
 
Method Summary
 void scoreCanvasClicked(ScoreCanvas canvas, java.awt.Point p, java.awt.event.MouseEvent ev)
          executes when mouse is clicked and released
 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 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 down
 void 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_MASK
 void scoreCanvasReleased(ScoreCanvas canvas, java.awt.Point p, java.awt.event.MouseEvent e)
          executes when mouse button is released
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

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

GoofyFace

public GoofyFace()
Method Detail

scoreCanvasClicked

public void scoreCanvasClicked(ScoreCanvas canvas,
                               java.awt.Point p,
                               java.awt.event.MouseEvent ev)
Description copied from interface: ScoreCanvasListener
executes when mouse is clicked and released

Specified by:
scoreCanvasClicked in interface ScoreCanvasListener

scoreCanvasRectangleSelected

public void scoreCanvasRectangleSelected(ScoreCanvas canvas,
                                         java.awt.Point p1,
                                         java.awt.Point p2)
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 interface ScoreCanvasListener

scoreCanvasKeyTyped

public void scoreCanvasKeyTyped(ScoreCanvas canvas,
                                java.awt.event.KeyEvent keyEvent)
Specified by:
scoreCanvasKeyTyped in interface ScoreCanvasListener

scoreCanvasKeyReleased

public void scoreCanvasKeyReleased(ScoreCanvas canvas,
                                   java.awt.event.KeyEvent keyEvent)
Specified by:
scoreCanvasKeyReleased in interface ScoreCanvasListener

scoreCanvasReady

public void scoreCanvasReady(ScoreCanvas canvas)
Specified by:
scoreCanvasReady in interface ScoreCanvasListener

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 interface ScoreCanvasListener

scoreCanvasDragged

public void scoreCanvasDragged(ScoreCanvas canvas,
                               java.awt.Point p,
                               java.awt.event.MouseEvent e)
Description copied from interface: ScoreCanvasListener
executes when mouse is dragged (moved while mousedown)

Specified by:
scoreCanvasDragged in interface ScoreCanvasListener

scoreCanvasReleased

public void scoreCanvasReleased(ScoreCanvas canvas,
                                java.awt.Point p,
                                java.awt.event.MouseEvent e)
Description copied from interface: ScoreCanvasListener
executes when mouse button is released

Specified by:
scoreCanvasReleased in interface ScoreCanvasListener

scoreCanvasPressed

public void scoreCanvasPressed(ScoreCanvas canvas,
                               java.awt.Point p,
                               java.awt.event.MouseEvent e)
Description copied from interface: ScoreCanvasListener
executes when mouse button is pressed down

Specified by:
scoreCanvasPressed in interface ScoreCanvasListener