gpdraw
Interface SketchPadListener

All Known Implementing Classes:
DrawingTool

public interface SketchPadListener

The listener interface for receiving "interesting" events (mouse click, mouse drag, key pressed and key typed) on a component. The class that is interested in processing these events either implements this interface (and all the methods it contains) or extends the class implementing them (overriding only the methods of interest).

Since:
JDK1.4
Version:
1.11, 08/12/06
Author:
George Peck

Method Summary
 void keyPressed(int c)
          Invoked when a key has been pressed
 void keyTyped(char c)
          Invoked when a key has been typed
 void mouseClicked(double x, double y)
          Invoked when the mouse button has been clicked (pressed and released).
 void mouseDragged(double x, double y)
          Invoked when a mouse button is pressed on a component and then dragged.
 

Method Detail

mouseClicked

void mouseClicked(double x,
                  double y)
Invoked when the mouse button has been clicked (pressed and released).


mouseDragged

void mouseDragged(double x,
                  double y)
Invoked when a mouse button is pressed on a component and then dragged. mouseDragged events will continue to be delivered to the component where the drag originated until the mouse button is released


keyPressed

void keyPressed(int c)
Invoked when a key has been pressed


keyTyped

void keyTyped(char c)
Invoked when a key has been typed