added debugger and timer

improved paint efficiency
debugged relative position
removed bug in parser for empty attribute methods
This commit is contained in:
rmaco
2020-03-23 18:00:45 +02:00
parent bce51befc2
commit 53265227f7
13 changed files with 253 additions and 129 deletions

View 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);
}
}
}

View File

@@ -0,0 +1,12 @@
package guiTree.Helper;
public enum Tag {
LISTENER(false),
PAINTING(false);
public boolean value;
Tag(boolean value) {
this.value = value;
}
}

View 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;
}
}