-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMouseClickData.java
More file actions
64 lines (51 loc) · 1.43 KB
/
MouseClickData.java
File metadata and controls
64 lines (51 loc) · 1.43 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
56
57
58
59
60
61
62
63
64
package testpluginproject.model;
/**
* This class is authored by Saminur Islam and is owned by Dr. Collin Lynch.
* It is licensed under the terms of the GNU Affero General Public License (AGPL) version 3.0 or later.
*/
import java.text.SimpleDateFormat;
import java.util.Date;
import testpluginproject.utils.Utils;
public class MouseClickData {
private int X;
private int Y;
private int Line;
private int CharOffset;
private String fileName;
private String time;
private String username;
public static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
public MouseClickData(int X,int Y,String fileName,int Line, int charOffset) {
this.X = X;
this.Y= Y;
this.fileName = fileName;
this.time = dateFormat.format(new Date());
this.Line = Line;
// Variable name was causing issue of offset not registering
this.CharOffset = charOffset;
this.username = Utils.getUsernameFromPref();
}
@Override
public String toString() {
return "MouseClickData [X=" + X + ", Y=" + Y + ", Line=" + Line + ", CharOffset=" + CharOffset + ", fileName="
+ fileName + ", time=" + time + ", username=" + username + "]";
}
public int getX() {
return X;
}
public void setX(int x) {
X = x;
}
public int getY() {
return Y;
}
public void setY(int y) {
Y = y;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
}