-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDrawListener.java
More file actions
55 lines (48 loc) · 1.36 KB
/
DrawListener.java
File metadata and controls
55 lines (48 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/******************************************************************************
* Compilation: javac DrawListener.java
* Execution: none
* Dependencies: none
*
* Interface that accompanies Draw.java.
******************************************************************************/
public interface DrawListener {
/**
* Invoked when the mouse has been pressed.
*
* @param x the x-coordinate of the mouse
* @param y the y-coordinate of the mouse
*/
void mousePressed(double x, double y);
/**
* Invoked when the mouse has been dragged.
*
* @param x the x-coordinate of the mouse
* @param y the y-coordinate of the mouse
*/
void mouseDragged(double x, double y);
/**
* Invoked when the mouse has been released.
*
* @param x the x-coordinate of the mouse
* @param y the y-coordinate of the mouse
*/
void mouseReleased(double x, double y);
/**
* Invoked when a key has been typed.
*
* @param c the character typed
*/
void keyTyped(char c);
/**
* Invoked when a key has been pressed.
*
* @param keycode the key combination pressed
*/
void keyPressed(int keycode);
/**
* Invoked when a key has been released.
*
* @param keycode the key combination released
*/
void keyReleased(int keycode);
}