package com.haxademic.core.system;

import processing.core.PApplet;

import com.haxademic.core.app.P;

public class SystemUtil {
	
	public static String getJavaVersion() {
		return System.getProperty("java.version");
	}

	public static String getTimestamp( PApplet p ) {
		// use P.nf to pad date components to 2 digits for more consistent ordering across systems
		return  String.valueOf( P.year() ) + "-" + 
				P.nf( P.month(), 2 ) + "-" + 
				P.nf( P.day(), 2 ) + "-" + 
				P.nf( P.hour(), 2 ) + "-" + 
				P.nf( P.minute(), 2 ) + "-" + 
				P.nf( P.second(), 2 );
	}

	public static String getTimestampFine( PApplet p ) {
		return SystemUtil.getTimestamp(p) + "-" + P.nf( p.frameCount, 8 ); 
	}
}

@@ -60,16 +60,46 @@
 PApplet;
+%0Aimport processing.opengl.PGL;
 %0A%0Aimport
@@ -725,10 +725,225 @@
  ); %0A%09%7D%0A
+%09%0A%09// monkey-patch TAB capture ability - Processing 2.0 broke this in 3D rendering contexts%0A%09public static void p2TabKeyInputPatch() %7B%0A%09%09if(PGL.canvas != null) %7B PGL.canvas.setFocusTraversalKeysEnabled(false); %7D%0A%09%7D%0A
 %7D%0A

Add patch for Processing 2.0-2.0.1 TAB keyboard input