comparison anielskiepuzzle/src/trefle/MouseMotion.java @ 0:2787f5e749ae

INIT
author prymula <prymula76@outlook.com>
date Thu, 21 Sep 2023 22:33:57 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:2787f5e749ae
1
2 package trefle;
3
4 import java.awt.event.MouseMotionListener;
5 import java.awt.event.MouseEvent;
6
7
8 public class MouseMotion implements MouseMotionListener {
9 public boolean move = false;
10 int x,y;
11 // wywoloywana w czasie przeciagania kursora myszy
12 public void mouseDragged (MouseEvent e){
13 move = true;
14 x=e.getX();
15 y=e.getY();
16 System.out.println("mouse drag");
17 }
18 // wywolywana w czasie 'normlanego' przesuwania
19 public void mouseMoved (MouseEvent e){
20 move = false;
21 }
22 public Coordinate get (){
23 return new Coordinate(x,y,true);
24 }
25 }