Skip to content

Instantly share code, notes, and snippets.

@monkstone
Last active January 28, 2019 06:00
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save monkstone/1330065 to your computer and use it in GitHub Desktop.
Save monkstone/1330065 to your computer and use it in GitHub Desktop.
Template Files For Processing Applications in NetBeans
<#assign licenseFirst = "/*">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "../Licenses/license-${project.license}.txt">
<#if package?? && package != "">
package ${package};
</#if>
/**
*
* @author ${user}
* @modified ${date}
* @version ${version}
*/
import processing.core.PApplet;
public class ${name} {
private static PApplet parent;
public final String VERSION = "0.01";
/**
* ${name} constructor
* @param parent PApplet
*/
public ${name}(PApplet parent) {
this.parent = parent;
this.parent.registerMethod("dispose", this);
}
public void dispose() {
//this is a required method
}
}
<#assign licenseFirst = "/*">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "../Licenses/license-${project.license}.txt">
import processing.core.*;
/**
*
* @author ${user}
*/
@SuppressWarnings("serial")
public class ${name} extends PApplet{
@Override
public void setup(){
size(300, 300, P3D);
}
@Override
public void draw(){
}
/**
* @param passedArgs the command line arguments
*/
static public void main(String[] passedArgs) {
String[] appletArgs = new String[] {${name}.class.getName()};
if (passedArgs != null) {
PApplet.main(concat(appletArgs, passedArgs));
} else {
PApplet.main(appletArgs);
}
}
}
<#assign licenseFirst = "/*">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "../Licenses/license-${project.license}.txt">
<#if package?? && package != "">
package ${package};
</#if>
/**
*
* @author ${user}
*/
import processing.core.PApplet;
public class ${name} {
private static PApplet parent;
/**
* ${name} constructor
* @param parent PApplet
*/
public ${name}(PApplet parent) {
this.parent = parent;
}
}
@IiroNiemi
Copy link

I used your template files in this tutorial, i hope its ok
https://www.youtube.com/watch?v=MLiCJ64I8gs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment