-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCanvasEvent.java
More file actions
33 lines (25 loc) · 943 Bytes
/
CanvasEvent.java
File metadata and controls
33 lines (25 loc) · 943 Bytes
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
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
public class CanvasEvent extends MouseAdapter {
GUI main_GUI;
public CanvasEvent(GUI m) {
this.main_GUI = m;
// TODO Auto-generated constructor stub
}
public void mouseClicked(MouseEvent e) {
System.out.println("CavasEvent Clicke X:"+e.getX()+" Y:"+e.getY());
main_GUI.current_clicked_button.CanvasClickEvent(e.getX(), e.getY());
}
public void mouseDragged(MouseEvent e) {
// main_GUI.current_clicked_button.CanvasDragEvent(e.)
System.out.println("Dragged");
}
public void mousePressed(MouseEvent e) {
main_GUI.current_clicked_button.CanvasPressEvent(e.getX(), e.getY());
System.out.println("CavasEvent Presse X:"+e.getX()+" Y:"+e.getY());
}
public void mouseReleased(MouseEvent e) {
main_GUI.current_clicked_button.CanvasReleaseEvent(e.getX(), e.getY());
System.out.println("CavasEvent Released X:"+e.getX()+" Y:"+e.getY());
}
}