mirror of
https://github.com/macocianradu/javaGUItoolkit.git
synced 2026-03-19 06:00:04 +00:00
added debugger and timer
improved paint efficiency debugged relative position removed bug in parser for empty attribute methods
This commit is contained in:
11
src/guiTree/Helper/Debugger.java
Normal file
11
src/guiTree/Helper/Debugger.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package guiTree.Helper;
|
||||
|
||||
public class Debugger {
|
||||
private static Timer timer = new Timer();
|
||||
|
||||
public static void log(String message, Tag tag) {
|
||||
if(tag.value) {
|
||||
System.out.println("[" + tag.toString() + "] " + message);
|
||||
}
|
||||
}
|
||||
}
|
||||
12
src/guiTree/Helper/Tag.java
Normal file
12
src/guiTree/Helper/Tag.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package guiTree.Helper;
|
||||
|
||||
public enum Tag {
|
||||
LISTENER(false),
|
||||
PAINTING(false);
|
||||
|
||||
public boolean value;
|
||||
|
||||
Tag(boolean value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
15
src/guiTree/Helper/Timer.java
Normal file
15
src/guiTree/Helper/Timer.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package guiTree.Helper;
|
||||
|
||||
public class Timer {
|
||||
private long now;
|
||||
private long prev;
|
||||
|
||||
public void startTiming() {
|
||||
prev = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public long stopTiming() {
|
||||
now = System.currentTimeMillis();
|
||||
return now - prev;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user