diff --git a/.DS_Store b/.DS_Store
index c4707ce..57c8768 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/.idea/libraries/processing.xml b/.idea/libraries/processing.xml
new file mode 100644
index 0000000..cbeb255
--- /dev/null
+++ b/.idea/libraries/processing.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index be50d7a..2d61aea 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -3,6 +3,7 @@
+
diff --git a/controlP5/Accordion.java b/controlP5/Accordion.java
new file mode 100755
index 0000000..d5489df
--- /dev/null
+++ b/controlP5/Accordion.java
@@ -0,0 +1,287 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+/**
+ *
+ * An Accordion here is a list of ControlGroups which can be expanded and collapsed.
+ *
+ * @see ControllerGroup
+ * @see ControlGroup
+ * @example controllers/ControlP5accordion
+ */
+@SuppressWarnings( "rawtypes" ) public class Accordion extends ControlGroup< Accordion > {
+
+
+ protected int spacing = 1;
+ protected int minHeight = 100;
+ protected int itemheight;
+ protected int _myMode = SINGLE;
+
+ public Accordion( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 200 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ Accordion( ControlP5 theControlP5 , Tab theTab , String theName , int theX , int theY , int theW ) {
+ super( theControlP5 , theTab , theName , theX , theY , theW , 9 );
+ hideBar( );
+ }
+
+ /**
+ * Adds items of type ControlGroup to the Accordion, only ControlGroups can be added.
+ *
+ * @exclude
+ * @param theGroup
+ * @return Accordion
+ */
+ public Accordion addItem( ControlGroup< ? > theGroup ) {
+ theGroup.close( );
+ theGroup.moveTo( this );
+ theGroup.activateEvent( true );
+ theGroup.addListener( this );
+ theGroup.setMoveable( false );
+ if ( theGroup.getBackgroundHeight( ) < minHeight ) {
+ theGroup.setBackgroundHeight( minHeight );
+ }
+ controllers.add( theGroup );
+ updateItems( );
+ return this;
+ }
+
+ /**
+ * Removes a ControlGroup from the accordion AND from controlP5 remove(ControllerInterface
+ * theGroup) overwrites it's super method. if you want to remove a ControlGroup only from the
+ * accordion, use removeItem(ControlGroup).
+ *
+ * @see controlP5.Accordion#removeItem(ControlGroup)
+ * @return ControllerInterface
+ */
+ @Override public Accordion remove( ControllerInterface< ? > theGroup ) {
+ if ( theGroup instanceof ControlGroup< ? > ) {
+ controllers.remove( theGroup );
+ ( ( ControlGroup< ? > ) theGroup ).removeListener( this );
+ updateItems( );
+ }
+ super.remove( theGroup );
+ return this;
+ }
+
+ /**
+ * Removes a ControlGroup from the accordion and puts it back into the default tab of controlP5.
+ * if you dont have access to a ControlGroup via a variable, use
+ * controlP5.group("theNameOfTheGroup") which will return a
+ *
+ * @return Accordion
+ */
+ public Accordion removeItem( ControlGroup< ? > theGroup ) {
+ if ( theGroup == null ) {
+ return this;
+ }
+ controllers.remove( theGroup );
+ theGroup.removeListener( this );
+ theGroup.moveTo( cp5.controlWindow );
+ updateItems( );
+ return this;
+ }
+
+ /**
+ * UpdateItems is called when changes such as remove, change of height is performed on an
+ * accordion. updateItems() is called automatically for such cases, but by calling updateItems
+ * manually an update will be forced.
+ *
+ * @return Accordion
+ */
+ public Accordion updateItems( ) {
+ int n = 0;
+ setWidth( _myWidth );
+
+ for ( ControllerInterface< ? > cg : controllers.get( ) ) {
+ if ( cg instanceof ControlGroup ) {
+ n += ( ( ControlGroup ) cg ).getBarHeight( ) + spacing;
+ cg.setPosition( 0 , n );
+ if ( ( ( ControlGroup ) cg ).isOpen( ) ) {
+ n += ( ( ControlGroup ) cg ).getBackgroundHeight( );
+ }
+ }
+ }
+ return this;
+ }
+
+ /**
+ * Sets the minimum height of a collapsed item, default value is 100.
+ *
+ * @param theHeight
+ * @return Accordion
+ */
+ public Accordion setMinItemHeight( int theHeight ) {
+ minHeight = theHeight;
+ for ( ControllerInterface< ? > cg : controllers.get( ) ) {
+ if ( cg instanceof ControlGroup ) {
+ if ( ( ( ControlGroup ) cg ).getBackgroundHeight( ) < minHeight ) {
+ ( ( ControlGroup ) cg ).setBackgroundHeight( minHeight );
+ }
+ }
+ }
+ updateItems( );
+ return this;
+ }
+
+ public int getMinItemHeight( ) {
+ return minHeight;
+ }
+
+ public Accordion setItemHeight( int theHeight ) {
+ itemheight = theHeight;
+ for ( ControllerInterface< ? > cg : controllers.get( ) ) {
+ if ( cg instanceof ControlGroup ) {
+ ( ( ControlGroup ) cg ).setBackgroundHeight( itemheight );
+ }
+ }
+ updateItems( );
+ return this;
+ }
+
+ public int getItemHeight( ) {
+ return itemheight;
+ }
+
+ @Override public Accordion setWidth( int theWidth ) {
+ super.setWidth( theWidth );
+ for ( ControllerInterface< ? > cg : controllers.get( ) ) {
+ if ( cg instanceof ControlGroup ) {
+ ( ( ControlGroup ) cg ).setWidth( theWidth );
+ }
+ }
+ return this;
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override @ControlP5.Invisible public void controlEvent( ControlEvent theEvent ) {
+ if ( theEvent.isGroup( ) ) {
+ int n = 0;
+ for ( ControllerInterface< ? > cg : controllers.get( ) ) {
+ if ( cg instanceof ControlGroup ) {
+ n += ( ( ControlGroup ) cg ).getBarHeight( ) + spacing;
+ cg.setPosition( 0 , n );
+ if ( _myMode == SINGLE ) {
+ if ( cg == theEvent.getGroup( ) && ( ( ControlGroup ) cg ).isOpen( ) ) {
+ n += ( ( ControlGroup ) cg ).getBackgroundHeight( );
+ } else {
+ ( ( ControlGroup ) cg ).close( );
+ }
+ } else {
+ if ( ( ( ControlGroup ) cg ).isOpen( ) ) {
+ n += ( ( ControlGroup ) cg ).getBackgroundHeight( );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public Accordion open( ) {
+ int[] n = new int[ controllers.size( ) ];
+ for ( int i = 0 ; i < controllers.size( ) ; i++ ) {
+ n[ i ] = i;
+ }
+ return open( n );
+ }
+
+ public Accordion close( ) {
+ int[] n = new int[ controllers.size( ) ];
+ for ( int i = 0 ; i < controllers.size( ) ; i++ ) {
+ n[ i ] = i;
+ }
+ return close( n );
+ }
+
+ public Accordion open( int ... theId ) {
+ if ( theId[ 0 ] == -1 ) {
+ return open( );
+ }
+ int n = 0 , i = 0;
+ for ( ControllerInterface< ? > cg : controllers.get( ) ) {
+ if ( cg instanceof ControlGroup ) {
+ boolean a = false;
+ for ( int j = 0 ; j < theId.length ; j++ ) {
+ if (theId[j] == i) {
+ a = true;
+ break;
+ }
+ }
+ boolean b = ((ControlGroup) cg).isOpen() || a;
+ i++;
+ n += ( ( ControlGroup ) cg ).getBarHeight( ) + spacing;
+ cg.setPosition( 0 , n );
+ if ( b ) {
+ n += ( ( ControlGroup ) cg ).getBackgroundHeight( );
+ ( ( ControlGroup ) cg ).open( );
+ }
+ }
+ }
+ return this;
+ }
+
+ public Accordion close( int ... theId ) {
+ if ( theId[ 0 ] == -1 ) {
+ return close( );
+ }
+ int n = 0 , i = 0;
+ for ( ControllerInterface< ? > cg : controllers.get( ) ) {
+ if ( cg instanceof ControlGroup ) {
+ boolean a = false;
+ for ( int j = 0 ; j < theId.length ; j++ ) {
+ if (theId[j] == i) {
+ a = true;
+ break;
+ }
+ }
+ boolean b = !((ControlGroup) cg).isOpen() || a;
+ i++;
+ n += ( ( ControlGroup ) cg ).getBarHeight( ) + spacing;
+ ( ( ControlGroup ) cg ).setPosition( 0 , n );
+ if ( b ) {
+ ( ( ControlGroup ) cg ).close( );
+ } else {
+ n += ( ( ControlGroup ) cg ).getBackgroundHeight( );
+ }
+ }
+ }
+ return this;
+ }
+
+ public Accordion setCollapseMode( int theMode ) {
+ if ( theMode == 0 ) {
+ _myMode = SINGLE;
+ } else {
+ _myMode = MULTI;
+ }
+ return this;
+ }
+}
diff --git a/controlP5/Background.java b/controlP5/Background.java
new file mode 100644
index 0000000..19a45f3
--- /dev/null
+++ b/controlP5/Background.java
@@ -0,0 +1,37 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+public class Background extends ControlGroup< Background > {
+
+ public Background( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , int theX , int theY , int theW , int theH ) {
+ super( theControlP5 , theParent , theName , theX , theY , theW , theH );
+ hideBar( );
+ setBackgroundColor( 0x55000000 );
+ setSize(theW, theH);
+ }
+
+}
diff --git a/controlP5/Bang.java b/controlP5/Bang.java
new file mode 100755
index 0000000..2db5893
--- /dev/null
+++ b/controlP5/Bang.java
@@ -0,0 +1,205 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PGraphics;
+
+/**
+ *
+ * The Bang controller triggers an event when pressed. A bang can only be assigned to a function in
+ * your program but not to a field like other controllers. Bang extends superclass Controller, for a
+ * full documentation see the {@link Controller} reference.
+ *
+ * @example controllers/ControlP5bang
+ */
+@ControlP5.Layout public class Bang extends Controller< Bang > {
+
+ protected int cnt;
+
+ protected int triggerId = PRESSED;
+
+ /**
+ * Convenience constructor to extend Bang.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Bang( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 20 , 20 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected Bang( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , float theX , float theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ _myCaptionLabel.setPadding( 0 , Label.paddingY ).align( LEFT , BOTTOM_OUTSIDE );
+ _myValue = 1;
+ }
+
+ @Override protected void onEnter( ) {
+ cnt = 0;
+ isActive = true;
+ }
+
+ @Override protected void onLeave( ) {
+ isActive = false;
+ }
+
+ @Override protected void mousePressed( ) {
+ if ( triggerId == PRESSED ) {
+ cnt = -3;
+ isActive = true;
+ update( );
+ }
+ }
+
+ @Override protected void mouseReleased( ) {
+ if ( triggerId == RELEASE ) {
+ cnt = -3;
+ isActive = true;
+ update( );
+ }
+ }
+
+ @Override protected void mouseReleasedOutside( ) {
+ onLeave( );
+ }
+
+ /**
+ * By default a bang is triggered when the mouse is pressed. use setTriggerEvent(Bang.PRESSED)
+ * or setTriggerEvent(Bang.RELEASE) to define the action for triggering a bang. currently only
+ * Bang.PRESSED and Bang.RELEASE are supported.
+ *
+ * @param theEventID
+ * @return Bang
+ */
+ @ControlP5.Layout public Bang setTriggerEvent( int theEventID ) {
+ triggerId = theEventID;
+ return this;
+ }
+
+ @ControlP5.Layout public int getTriggerEvent( ) {
+ return triggerId;
+ }
+
+ /**
+ * Sets the value of the bang controller. since bang can be true or false, false=0 and true=1
+ *
+ * @param theValue float
+ * @return Bang
+ */
+ @Override public Bang setValue( float theValue ) {
+ _myValue = theValue;
+ broadcast( FLOAT );
+ return this;
+ }
+
+ /**
+ * @exclude
+ */
+ @Override public Bang update( ) {
+ return setValue( _myValue );
+ }
+
+ /**
+ * @exclude
+ */
+ @Override @ControlP5.Invisible public Bang updateDisplayMode( int theMode ) {
+ updateViewMode( theMode );
+ return this;
+ }
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible public Bang updateViewMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = new BangView( );
+ break;
+ case ( IMAGE ):
+ _myControllerView = new BangImageView( );
+ break;
+ case ( CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ private class BangView implements ControllerView< Bang > {
+
+ public void display( PGraphics theGraphics , Bang theController ) {
+ if ( isActive ) {
+ theGraphics.fill( color.getActive( ) );
+ } else {
+ theGraphics.fill( color.getForeground( ) );
+ }
+
+ if ( cnt < 0 ) {
+ theGraphics.fill( color.getForeground( ) );
+ cnt++;
+ }
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+ if ( isLabelVisible ) {
+ _myCaptionLabel.draw( theGraphics , 0 , 0 , theController );
+ }
+ }
+ }
+
+ private class BangImageView implements ControllerView< Bang > {
+
+ public void display( PGraphics theGraphics , Bang theController ) {
+ if ( isActive ) {
+ theGraphics.image( (availableImages[ACTIVE]) ? images[ ACTIVE ] : images[ DEFAULT ] , 0 , 0 );
+ } else {
+ theGraphics.image( (availableImages[OVER]) ? images[ OVER ] : images[ DEFAULT ] , 0 , 0 );
+ }
+ if ( cnt < 0 ) {
+ theGraphics.image( (availableImages[OVER]) ? images[ OVER ] : images[ DEFAULT ] , 0 , 0 );
+ cnt++;
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @exclude
+ */
+ @Override public String getInfo( ) {
+ return "type:\tBang\n" + super.getInfo( );
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override public String toString( ) {
+ return super.toString( ) + " [ " + getValue( ) + " ] " + "Bang" + " (" + this.getClass( ).getSuperclass( ) + ")";
+ }
+
+}
diff --git a/controlP5/BitFont.java b/controlP5/BitFont.java
new file mode 100755
index 0000000..94ceb6e
--- /dev/null
+++ b/controlP5/BitFont.java
@@ -0,0 +1,203 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.lang.reflect.Constructor;
+import java.util.Arrays;
+
+import processing.core.PApplet;
+import processing.core.PFont;
+import processing.core.PImage;
+
+public class BitFont extends PFont {
+
+ static public final String standard58base64 = "AakACQBgACAEAgQGBggGAgMDBAYDBAIGBQMFBQUFBQUFBQICBAUEBQgFBQUFBQUFBQIFBQQGBQUFBQUFBAUGCAUGBQMFAwYGAwQEBAQEBAQEAgQEAgYEBAQEAwQEBAQGBAQEBAIEBQKgUgghIaUAAIiRMeiZZwwAAANgjjnvmRRKESVzzDGXoqQUvYURQCCAQCCSCAAAAAgAAABEqECleCVFkRAAiLSUWEgoJQAAiSOllEJIKVRiSymllCRFSSlCEVIAQQBBQAARAAAAEAAAACQpgeALJASiIwAQSQipE1BKRS+QSEohhRBSqES1UkopSIqSkkIiFAGwEZOwSaplZGx2VVXVSQIAgeIgSETy4RCSCEnoEONAgJCkd0I6p73QiKilk46RpCQZQoQIAFBVVVOVVFVVVUKqqiqKCACCDyKpiIoAICQJ9FAiCUE8ElUphRRCSqESUUohJSRJSUpECBEAoCrqoiqZqqqqiFRVUiIJAADKI5UQASEgSAoJpSRSCgECUlJKKYSUSiWilEJKSRKRlIgQJABAVVVEVVJVVVUhqaqqQhIACBQixEIBQFBg9AwyRhhDBEIIpGPOCyZl0kXJBJOMGMImEW9owAcbMQmrpKpKxjJiopQdFQAAAAAAAABAAAAAAAAAAIAAAOAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAQIAAAEAQAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgAAAgCAAAAAgAA";
+ static public final String standard56base64 = "AeYACQBgACAEAgQGBggHAgMDBgYDBQIFBgMGBgYGBgYGBgIDBAYEBggGBgYGBgYGBgIGBgUIBgYGBgYGBgYGCAYGBgMFAwYHAwUFBQUFAwUFAgMFAggFBQUFBAQEBQUIBQUFBAMEBQKgUgghRwoBAIAcOQ7yOZ/jAADAAXAe5/k+JwqKQlDkPM7jfFGUFEXfwghAQAAICIQUAgAAAAABAAAAQAkVqBSvJFJUEQCQaFHEBBEURQAAiDiiKIqCIIqCkjAWRVEURUQUJUURFCEFIBAAAgEBhAAAAABAAAAAAEikBIIvkFAQOQQAJBIEKU8ARVGiLyCRKAqiIAiioCJUTVEURQERRUmKgkQoAsAd40zcSambY447u5SSUnoSAYBAcRBMRNWHh4iEMAn0II4HBBAk6XuC6HmyL2gISVX0RI9DREoSQRAhAgBIKaW0lFIpKaWUIiSlpJRQhAAg+CCSFBFBACAiEdAHRUgEgfiIqIqiIAqCKAoqQlAWBVEBEZGSpBBCiAAAUgrpJaU0SkoppRBJKckkIxEAAJRHKkIEEACESEKERBERRUEAAVKiKIqCIIqKkhAURUGUREREJEVEECQAgJRSCkkplZJSSilIUkpKKUgEAAKFCHGhAIBAwdHnII5DOA4iIAiB6HGeL3CinOgFRU7gRA7hEDYR8QUJ+MEd40xcSqmkZI6LEWdsknsSAQAAAAAAAAAgAAAAAAAAAACAAACAAwAAAAAAAAAAAAAAQAAAAAAAAAADAwAAAAAABBAAAICAAAAAAIAAJQAAAAAAAAAABAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAACAAAgIAAAAAAYAAA=";
+ static public final String grixelbase64 = "AnoADABgACAFAgQICAoIAgQEBgYDBQIKCQMICAgICAcICAIDBQYFBwkICAgIBwcICAYHCAcJCAgICAgICAgICggICAQKBAQHBAcHBwcHBQcHAgUHBAoHBwcHBgcGBwcKBwcHBQIFCAJAJeIjkENBAAAAQHzk4wPz5/Pz8QEAAB4ePj8+Pz6fX9AHCgoECvL58fnx+QsKiigo6C8CIAEIIAAAARwgEAoEAAAAAAAABAAAAAAAICIAAZVIUiERBQEAAIAIWlAQSkAQKCgIICCEhAQFBQUFAgFBBCgoMGwoKCgoKAghKCiioCCgEIAKQIAAAAQIgAAgEAAAAAAAABAAAAAAAICIsAUEfwlCRBCkEAAAIUhAQCQBAaCgIEAAAcoUFBQQFAgEBBGgoECpoqCgoKAAhKCgiEREQIIAAgAAAgAQIAACgEAAAAAAAABAAAAAAAAAIrIBEIgkgBBBEEEAAIIgAQGJ/ARAgoKS+AioVFBQQFAgEBBEgEICmZKCgoKCAhCCgiKioIAIBAgA4Pl4fJ7n+YRC8c7H8/F5ni8UiigU+okIAEAg4gOBA0HfhwcEguTDEwL0g/DxAwFAoFJ/PwFBv1/eHwH6CASKCgoKCvJBCAqKCAEBISAgAAAoFAqFQigUikREoVAoFISEUCgiSQgSQgAAgQgSAlEEEQQACAhSANAfUBAhCAiIj2BKBQUFBAUCQUEEKCQQKCzoJ+gHCCEoKCIKBIIAgQAAvlAg9AuhUOgREYVCoVBgEEKhiBghhIgAAAB/SITEEKQQABAgSAFAIEBBhCAgQABByBMUFBAUCAQFEaGgQKCgoICgECCEIJGIRBAEAggCAIRCgVAghEKhSEQUCoVCAUYIhSJihAgiAgAAiCQJFUMQAAgggCAFBIEEBRGCghACAkBAUFBQUCAQFESEggKBgoICkoKCEIIoIgpCCAhACAAQCoVCoRAKhUIRUSgUCgUhISSJSBISiAgAQCDiE4gTQQAgUAB89OcD4uND8PFJAAAEfkE/Pj++gF/Q5wn6BQryCfAJ8kHwQXAnCOEvACIAgM/j8XiCLxQKWUQhz8cXeDgPw52Q7yciAAAAAAIAANgAQAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAgAPg4AcAAAAAACAACAAAAAABEAAAAAAAACAAawAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4ABgAAAAABEAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
+ protected int characters;
+ protected int[] charWidth = new int[ 255 ];
+ protected int charHeight;
+ protected int[][] chars;
+ protected int lineHeight = 10;
+ protected int kerning = 0;
+ protected int wh;
+ protected PImage texture;
+ public static int defaultChar = 32;
+
+ public BitFont( byte[] theBytes ) {
+ super( );
+
+ texture = decodeBitFont( theBytes );
+ make( );
+
+ size = lineHeight;
+ glyphs = new Glyph[ 256 ];
+ ascii = new int[ 128 ];
+ Arrays.fill( ascii , -1 );
+ lazy = false;
+ ascent = 4;
+ descent = 4;
+ glyphCount = 128;
+ for ( int i = 0 ; i < 128 ; i++ ) {
+
+ // unfortunately the PFont.Glyph constructor in
+ // the android source code is for whatever
+ // reason protected and not public like in the
+ // java application source, therefore the
+ // bitfont will only be used in the java
+ // application mode until changes to the
+ // processing core code have been made. see
+ // issue
+ // http://code.google.com/p/processing/issues/detail?id=1293
+
+ try {
+ Constructor< PFont.Glyph >[] constructors = ( Constructor< PFont.Glyph >[] ) PFont.Glyph.class.getDeclaredConstructors( );
+ Constructor< PFont.Glyph > constructor = ( Constructor< PFont.Glyph > ) PFont.Glyph.class.getDeclaredConstructors( )[ 0 ];
+ constructor.setAccessible( true );
+ for ( Constructor< PFont.Glyph > c : constructors ) {
+ c.setAccessible( true );
+ if ( c.getParameterTypes( ).length == 1 ) {
+ glyphs[ i ] = c.newInstance( this );
+ break;
+ }
+ }
+ } catch ( Exception e ) {
+ System.out.println( e );
+ }
+
+ // as soon as the constructor is public, the
+ // line below will replace the hack above
+ // glyphs[i] = new Glyph();
+
+ glyphs[ i ].value = i;
+
+ if ( glyphs[ i ].value < 128 ) {
+ ascii[ glyphs[ i ].value ] = i;
+ }
+
+ glyphs[ i ].index = i;
+ int id = i - 32;
+ if ( id >= 0 ) {
+ glyphs[ i ].image = new PImage( charWidth[ id ] , 9 , PConstants.ALPHA );
+ for ( int n = 0 ; n < chars[ id ].length ; n++ ) {
+ glyphs[ i ].image.pixels[ n ] = ( chars[ id ][ n ] == 1 ) ? 0xffffffff : 0x00000000;
+ }
+ glyphs[ i ].height = 9;
+ glyphs[ i ].width = charWidth[ id ];
+ glyphs[ i ].index = i;
+ glyphs[ i ].value = i;
+ glyphs[ i ].setWidth = charWidth[ id ];
+ glyphs[ i ].topExtent = 4;
+ glyphs[ i ].leftExtent = 0;
+ } else {
+ glyphs[ i ].image = new PImage( 1 , 1 );
+ }
+ }
+ }
+
+ public Glyph getGlyph( char c ) {
+ int n = c;
+ /* if c is out of the BitFont-glyph bounds, return
+ * the defaultChar glyph (the space char by
+ * default). */
+ n = ( n >= 128 ) ? defaultChar : n;
+ return glyphs[ n ];
+ }
+
+ PImage decodeBitFont( byte[] bytes ) {
+
+ PImage tex;
+
+ // read width
+ int w = CP.byteArrayToInt( new byte[] { bytes[ 0 ] , bytes[ 1 ] } );
+
+ // read height
+ int h = CP.byteArrayToInt( new byte[] { bytes[ 2 ] , bytes[ 3 ] } );
+
+ // read size of chars
+ int s = CP.byteArrayToInt( new byte[] { bytes[ 4 ] , bytes[ 5 ] } );
+
+ // read first ascii char
+ int c = CP.byteArrayToInt( new byte[] { bytes[ 6 ] , bytes[ 7 ] } );
+
+ tex = new PImage( w , h , PApplet.ALPHA );
+
+ // read bytes and write pixels into image
+ int off = 8 + s;
+ for ( int i = off ; i < bytes.length ; i++ ) {
+ for ( int j = 0 ; j < 8 ; j++ ) {
+ tex.pixels[ ( i - off ) * 8 + j ] = CP.getBit( bytes[ i ] , j ) == 1 ? 0xff000000 : 0xffffffff;
+ }
+ }
+
+ int cnt = 0 , n = 0 , i = 0;
+
+ // add character seperators on top of the texture
+ for ( i = 0 ; i < s ; i++ ) {
+ while ( ++cnt != bytes[ i + 8 ] ) {
+ }
+ n += cnt;
+ tex.pixels[ n ] = 0xffff0000;
+ cnt = 0;
+ }
+
+ return tex;
+ }
+
+ int getHeight( ) {
+ return texture.height;
+ }
+
+ BitFont make( ) {
+
+ charHeight = texture.height;
+
+ lineHeight = charHeight;
+
+ int currWidth = 0;
+
+ for ( int i = 0 ; i < texture.width ; i++ ) {
+ currWidth++;
+ if ( texture.pixels[ i ] == 0xffff0000 ) {
+ charWidth[ characters++ ] = currWidth;
+ currWidth = 0;
+ }
+ }
+
+ chars = new int[ characters ][];
+
+ int indent = 0;
+
+ for ( int i = 0 ; i < characters ; i++ ) {
+ chars[ i ] = new int[ charWidth[ i ] * charHeight ];
+ for ( int u = 0 ; u < charWidth[ i ] * charHeight ; u++ ) {
+ chars[ i ][ u ] = texture.pixels[ indent + ( u / charWidth[ i ] ) * texture.width + ( u % charWidth[ i ] ) ] == 0xff000000 ? 1 : 0;
+ }
+ indent += charWidth[ i ];
+ }
+ return this;
+ }
+}
diff --git a/controlP5/Button.java b/controlP5/Button.java
new file mode 100755
index 0000000..fb2f454
--- /dev/null
+++ b/controlP5/Button.java
@@ -0,0 +1,316 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser
+ * General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at
+ * your option) any later version. This library is
+ * distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PGraphics;
+
+/**
+ *
+ * A button triggers an event after it has been release.
+ * Events can be linked to functions and fields inside your
+ * program/sketch. for a full documentation of this
+ * controller see the {@link Controller} class.
+ *
+ * @example controllers/ControlP5button
+ */
+
+public class Button extends Controller< Button > {
+
+ protected boolean isPressed;
+ protected boolean isOn = false;
+ public static int autoWidth = 69;
+ public static int autoHeight = 19;
+ protected int activateBy = RELEASE;
+ protected boolean isSwitch = false;
+
+ /**
+ * Convenience constructor to extend Button.
+ *
+ * @example use/ControlP5extendController
+ */
+ public Button( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 0 , autoWidth , autoHeight );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected Button( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , float theDefaultValue , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ _myValue = theDefaultValue;
+ _myCaptionLabel.align( CENTER , CENTER );
+ }
+
+ /**
+ * @exclude
+ */
+ public Button( ) {
+ super( null , null , null , 0 , 0 , 1 , 1 );
+ }
+
+ @Override protected void onEnter( ) {
+ isActive = true;
+ }
+
+ @Override protected void onLeave( ) {
+ isActive = false;
+ setIsInside( false );
+ }
+
+ /**
+ * @exclude
+ */
+ @Override @ControlP5.Invisible public void mousePressed( ) {
+ isActive = getIsInside( );
+ isPressed = true;
+ if ( activateBy == PRESSED ) {
+ activate( );
+ }
+ }
+
+ /**
+ * @exclude
+ */
+ @Override @ControlP5.Invisible public void mouseReleased( ) {
+ isPressed = false;
+ if ( activateBy == RELEASE ) {
+ activate( );
+ }
+ isActive = false;
+ }
+
+ /**
+ * A button can be activated by a mouse PRESSED or mouse
+ * RELEASE. Default value is RELEASE.
+ *
+ * @param theValue use ControlP5.PRESSED or
+ * ControlP5.RELEASE as parameter
+ * @return Button
+ */
+ public Button activateBy( int theValue ) {
+ if ( theValue == PRESS ) {
+ activateBy = PRESS;
+ } else {
+ activateBy = RELEASE;
+ }
+ return this;
+ }
+
+ protected void activate( ) {
+ if ( isActive ) {
+ isActive = false;
+ isOn = !isOn;
+ setValue( _myValue );
+ }
+ }
+
+ /**
+ * @exclude
+ */
+ @Override @ControlP5.Invisible public void mouseReleasedOutside( ) {
+ mouseReleased( );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public Button setValue( float theValue ) {
+ _myValue = theValue;
+ broadcast( FLOAT );
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public Button update( ) {
+ return setValue( _myValue );
+ }
+
+ /**
+ * Turns a button into a switch, or use a Toggle
+ * instead.
+ *
+ */
+ public Button setSwitch( boolean theFlag ) {
+ isSwitch = theFlag;
+ if ( isSwitch ) {
+ _myBroadcastType = BOOLEAN;
+ } else {
+ _myBroadcastType = FLOAT;
+ }
+ return this;
+ }
+
+ /**
+ * If the button acts as a switch, setOn will turn on
+ * the switch. Use
+ * {@link Button#setSwitch(boolean) setSwitch}
+ * to turn a Button into a Switch.
+ *
+ * @return Button
+ */
+ public Button setOn( ) {
+ if ( isSwitch ) {
+ isOn = false;
+ isActive = true;
+ activate( );
+ }
+ return this;
+ }
+
+ /**
+ * If the button acts as a switch, setOff will turn off
+ * the switch. Use
+ * {@link Button#setSwitch(boolean) setSwitch}
+ * to turn a Button into a Switch.
+ *
+ * @return Button
+ */
+ public Button setOff( ) {
+ if ( isSwitch ) {
+ isOn = true;
+ isActive = true;
+ activate( );
+ }
+ return this;
+ }
+
+ /**
+ * @return boolean
+ */
+ public boolean isOn( ) {
+ return isOn;
+ }
+
+ public boolean isSwitch( ) {
+ return isSwitch;
+ }
+
+ /**
+ * @return boolean
+ */
+ public boolean isPressed( ) {
+ return isPressed;
+ }
+
+ /**
+ * Returns true or false and indicates the switch state
+ * of the button. {@link setSwitch(boolean) setSwitch}
+ * should have been set before.
+ *
+ * @see Button#setSwitch(boolean)
+ * @return boolean
+ */
+ public boolean getBooleanValue( ) {
+ return isOn;
+ }
+
+ /**
+ * @exclude
+ */
+ @Override @ControlP5.Invisible public Button updateDisplayMode( int theMode ) {
+ return updateViewMode( theMode );
+ }
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible public Button updateViewMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = new ButtonView( );
+ break;
+ case ( IMAGE ):
+ _myControllerView = new ButtonImageView( );
+ break;
+ case ( CUSTOM ):
+ default:
+ break;
+
+ }
+ return this;
+ }
+
+ private class ButtonView implements ControllerView< Button > {
+
+ public void display( PGraphics theGraphics , Button theController ) {
+ theGraphics.noStroke( );
+ if ( isOn && isSwitch ) {
+ theGraphics.fill( color.getActive( ) );
+ } else {
+ if ( getIsInside( ) ) {
+ if ( isPressed ) {
+ theGraphics.fill( color.getActive( ) );
+ } else {
+ theGraphics.fill( color.getForeground( ) );
+ }
+ } else {
+ theGraphics.fill( color.getBackground( ) );
+ }
+ }
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+ if ( isLabelVisible ) {
+ _myCaptionLabel.draw( theGraphics , 0 , 0 , theController );
+ }
+ }
+ }
+
+ private class ButtonImageView implements ControllerView< Button > {
+
+ public void display( PGraphics theGraphics , Button theController ) {
+ if ( isOn && isSwitch ) {
+ theGraphics.image( (availableImages[HIGHLIGHT]) ? images[ HIGHLIGHT ] : images[ DEFAULT ] , 0 , 0 );
+ return;
+ }
+ if ( getIsInside( ) ) {
+ if ( isPressed ) {
+ theGraphics.image( (availableImages[ACTIVE]) ? images[ ACTIVE ] : images[ DEFAULT ] , 0 , 0 );
+ } else {
+ theGraphics.image( (availableImages[OVER]) ? images[ OVER ] : images[ DEFAULT ] , 0 , 0 );
+ }
+ } else {
+ theGraphics.image( images[ DEFAULT ] , 0 , 0 );
+ }
+ }
+ }
+
+ /**
+ * @exclude
+ */
+ @Override public String getInfo( ) {
+ return "type:\tButton\n" + super.getInfo( );
+ }
+
+ /**
+ * @exclude
+ */
+ @Override public String toString( ) {
+ return super.toString( ) + " [ " + getValue( ) + " ] " + "Button" + " (" + this.getClass( ).getSuperclass( ) + ")";
+ }
+
+}
\ No newline at end of file
diff --git a/controlP5/ButtonBar.java b/controlP5/ButtonBar.java
new file mode 100644
index 0000000..bc7ae2a
--- /dev/null
+++ b/controlP5/ButtonBar.java
@@ -0,0 +1,244 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+
+import static main.java.src2.main.java.controlP5.controlP5.ControlP5.b;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import static main.java.src2.main.java.controlP5.controlP5.ControlP5.s;
+import processing.core.PGraphics;
+
+public class ButtonBar extends Controller< ButtonBar > {
+
+ public static int autoWidth = 69;
+ public static int autoHeight = 19;
+
+ private final List< Map< String , Object >> items = new ArrayList< Map< String , Object >>( );
+
+ /**
+ * Convenience constructor to extend ButtonBar.
+ */
+ public ButtonBar( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , autoWidth , autoHeight );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected ButtonBar( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , float theX , float theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ }
+
+ @Override
+ @ControlP5.Invisible
+ public ButtonBar updateDisplayMode( int theMode ) {
+ return updateViewMode( theMode );
+ }
+
+ public void changeItem( String theItem , String theKey , Object theValue ) {
+ Map m = modifiableItem( theItem );
+ if ( !m.equals( Collections.EMPTY_MAP ) ) {
+ m.put( theKey , theValue );
+ }
+ }
+
+ private Map modifiableItem( String theItem ) {
+ if ( theItem != null ) {
+ for ( Map< String , Object > o : items ) {
+ if ( theItem.equals( o.get( "name" ) ) ) {
+ return o;
+ }
+ }
+ }
+ return Collections.EMPTY_MAP;
+ }
+
+ public Map getItem( String theItem ) {
+ return Collections.unmodifiableMap( modifiableItem( theItem ) );
+ }
+
+ @ControlP5.Invisible
+ public ButtonBar updateViewMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = new ButtonBarView( );
+ break;
+ case ( IMAGE ):
+ break;
+ case ( CUSTOM ):
+ default:
+ break;
+
+ }
+ return this;
+ }
+
+ @Override
+ public void onClick( ) {
+ int index = hover( );
+ if ( index > -1 ) {
+ for ( Map m : items ) {
+ m.put( "selected" , false );
+ }
+ items.get( index ).put( "selected" , true );
+ setValue( hover( ) );
+ }
+ }
+
+ public int hover( ) {
+ int w = getWidth( ) / ( items.isEmpty( ) ? 1 : items.size( ) );
+ int h = getHeight( );
+ for ( int i = 0 ; i < items.size( ) ; i++ ) {
+ if ( getPointer( ).x( ) >= i * w && getPointer( ).x( ) < ( i + 1 ) * w ) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ private class ButtonBarView implements ControllerView< ButtonBar > {
+
+ public void display( PGraphics theGraphics , ButtonBar theController ) {
+ theGraphics.noStroke( );
+ theGraphics.fill( color.getBackground( ) );
+ theGraphics.rect( 0 , 0 , theController.getWidth( ) , theController.getHeight( ) );
+ int index = hover( );
+ int w = theController.getWidth( ) / ( items.isEmpty( ) ? 1 : items.size( ) );
+ int h = theController.getHeight( );
+ theGraphics.textFont( theController.getValueLabel( ).getFont( ).pfont );
+ theGraphics.pushMatrix( );
+ for ( int i = 0 ; i < items.size( ) ; i++ ) {
+ int c = ControlP5.b( items.get( i ).get( "selected" ) , false ) ? color.getActive( ) : ( isInside( ) && index == i ) ? isMousePressed ? color.getActive( ) : color.getForeground( ) : color.getBackground( );
+ theGraphics.fill( c );
+ theGraphics.rect( 0 , 0 , w , h );
+ theGraphics.fill( theController.getValueLabel( ).getColor( ) );
+ theController.getValueLabel( ).set( ControlP5.s( items.get( i ).get( "text" ) ) ).align( CENTER , CENTER ).draw( theGraphics , 0 , 0 , w , h );
+ theGraphics.translate( w , 0 );
+ }
+ theGraphics.popMatrix( );
+ }
+ }
+
+ private Map< String , Object > getDefaultItemMap( String theName , Object theValue ) {
+ Map< String , Object > item = new HashMap< String , Object >( );
+ item.put( "name" , theName );
+ item.put( "text" , theName );
+ item.put( "value" , theValue );
+ item.put( "color" , getColor( ) );
+ item.put( "view" , new CDrawable( ) {
+ @Override
+ public void draw( PGraphics theGraphics ) {
+ }
+
+ } );
+ item.put( "selected" , false );
+ return item;
+ }
+
+ public ButtonBar addItem( String theName , Object theValue ) {
+ Map< String , Object > item = getDefaultItemMap( theName , theValue );
+ items.add( item );
+ return this;
+ }
+
+ public ButtonBar addItems( String[] theItems ) {
+ addItems( Arrays.asList( theItems ) );
+ return this;
+ }
+
+ public ButtonBar addItems( List< String > theItems ) {
+ for ( int i = 0 ; i < theItems.size( ) ; i++ ) {
+ addItem(theItems.get( i ), i );
+ }
+ return this;
+ }
+
+ public ButtonBar addItems( Map< String , Object > theItems ) {
+ for ( Map.Entry< String , Object > item : theItems.entrySet( ) ) {
+ addItem( item.getKey( ) , item.getValue( ) );
+ }
+ return this;
+ }
+
+ public ButtonBar setItems( String[] theItems ) {
+ setItems( Arrays.asList( theItems ) );
+ return this;
+ }
+
+ public ButtonBar setItems( List< String > theItems ) {
+ items.clear( );
+ return addItems( theItems );
+ }
+
+ public ButtonBar setItems( Map< String , Object > theItems ) {
+ items.clear( );
+ return addItems( theItems );
+ }
+
+ public ButtonBar removeItems( List< String > theItems ) {
+ for ( String s : theItems ) {
+ removeItem( s );
+ }
+ return this;
+ }
+
+ public ButtonBar removeItem( String theName ) {
+ if ( theName != null ) {
+
+ List l = new ArrayList( );
+ for ( Map m : items ) {
+ if ( theName.equals( m.get( "name" ) ) ) {
+ l.add( m );
+ }
+ }
+ items.removeAll( l );
+ }
+ return this;
+ }
+
+ private Map< String , Object > getItem( int theIndex ) {
+ return items.get( theIndex );
+ }
+
+ public List getItems( ) {
+ return Collections.unmodifiableList( items );
+ }
+
+ public ButtonBar clear( ) {
+ for ( int i = items.size( ) - 1 ; i >= 0 ; i-- ) {
+ items.remove( i );
+ }
+ items.clear( );
+ return this;
+ }
+
+}
diff --git a/controlP5/CColor.java b/controlP5/CColor.java
new file mode 100755
index 0000000..b2e4ee7
--- /dev/null
+++ b/controlP5/CColor.java
@@ -0,0 +1,203 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version. This library is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.io.Serializable;
+
+/**
+ * A CColor instance contains the colors of a controller including the foreground-, background-,
+ * active-, captionlabel- and valuelabel-colors.
+ */
+
+@SuppressWarnings( "serial" )
+public class CColor implements Serializable {
+
+ private int colorBackground = 0xff003652;
+ private int colorForeground = 0xff00698c;
+ private int colorActive = 0xff08a2cf; // 0699C4;
+ private int colorCaptionLabel = 0xffffffff;
+ private int colorValueLabel = 0xffffffff;
+ private int colorBackgroundAlpha = 0xff;
+ private int colorForegroundAlpha = 0xff;
+ private int colorActiveAlpha = 0xff; // 0699C4;
+ private int colorCaptionLabelAlpha = 0xff;
+ private int colorValueLabelAlpha = 0xff;
+
+ private final int alpha = 0xff;
+ private final int maskA = 0x00ffffff;
+ int maskR = 0xff00ffff;
+ int maskG = 0xffff00ff;
+ int maskB = 0xffffff00;
+
+ protected CColor set( CColor theColor ) {
+ colorBackground = theColor.colorBackground;
+ colorForeground = theColor.colorForeground;
+ colorActive = theColor.colorActive;
+ colorCaptionLabel = theColor.colorCaptionLabel;
+ colorValueLabel = theColor.colorValueLabel;
+ colorBackgroundAlpha = theColor.colorBackgroundAlpha;
+ colorForegroundAlpha = theColor.colorForegroundAlpha;
+ colorActiveAlpha = theColor.colorActiveAlpha;
+ colorCaptionLabelAlpha = theColor.colorCaptionLabelAlpha;
+ colorValueLabelAlpha = theColor.colorValueLabelAlpha;
+ return this;
+ }
+
+ protected CColor copyTo( ControllerInterface< ? > theControl ) {
+ theControl.setColorBackground( colorBackground );
+ theControl.setColorForeground( colorForeground );
+ theControl.setColorActive( colorActive );
+ theControl.setColorLabel( colorCaptionLabel );
+ return this;
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ public String toString( ) {
+
+ return ( "bg (" + ( colorBackground >> 16 & 0xff ) + "," + ( colorBackground >> 8 & 0xff ) + "," + ( colorBackground >> 0 & 0xff ) + "), " + "fg (" + ( colorForeground >> 16 & 0xff ) + "," + ( colorForeground >> 8 & 0xff ) + ","
+ + ( colorForeground >> 0 & 0xff ) + "), " + "active (" + ( colorActive >> 16 & 0xff ) + "," + ( colorActive >> 8 & 0xff ) + "," + ( colorActive >> 0 & 0xff ) + "), " + "captionlabel (" + ( colorCaptionLabel >> 16 & 0xff ) + ","
+ + ( colorCaptionLabel >> 8 & 0xff ) + "," + ( colorCaptionLabel >> 0 & 0xff ) + "), " + "valuelabel (" + ( colorValueLabel >> 16 & 0xff ) + "," + ( colorValueLabel >> 8 & 0xff ) + "," + ( colorValueLabel >> 0 & 0xff ) + ")" );
+ }
+
+ public CColor( ) {
+ set( ControlP5.getColor( ) );
+ }
+
+ public CColor( int cfg , int cbg , int cactive , int ccl , int cvl ) {
+ setForeground( cfg );
+ setBackground( cbg );
+ setActive( cactive );
+ setCaptionLabel( ccl );
+ setValueLabel( cvl );
+ }
+
+ public CColor( CColor theColor ) {
+ set( theColor );
+ }
+
+ /**
+ * @exclude
+ * @param theAlpha
+ */
+ public CColor setAlpha( int theAlpha ) {
+ System.out.println( "main.java.src2.main.java.controlP5.controlp5.CColor.setAlpha: setting alpha values disabled for this version of controlP5." );
+ return this;
+ }
+
+ public CColor setForeground( int theColor ) {
+ if ( ( theColor & 0xff000000 ) == 0 ) {
+ colorForeground = 0xff000000;
+ } else {
+ colorForeground = theColor;
+ }
+ return this;
+ }
+
+ public CColor setBackground( int theColor ) {
+ if ( ( theColor & 0xff000000 ) == 0 ) {
+ colorBackground = 0xff000000;
+ } else {
+ colorBackground = theColor;
+ }
+ return this;
+ }
+
+ public CColor setActive( int theColor ) {
+ if ( ( theColor & 0xff000000 ) == 0 ) {
+ colorActive = 0xff000000;
+ } else {
+ colorActive = theColor;
+ }
+ return this;
+ }
+
+ public CColor setCaptionLabel( int theColor ) {
+ if ( ( theColor & 0xff000000 ) == 0 ) {
+ colorCaptionLabel = 0xff000000;
+ } else {
+ colorCaptionLabel = theColor;
+ }
+ return this;
+ }
+
+ public CColor setValueLabel( int theColor ) {
+ if ( ( theColor & 0xff000000 ) == 0 ) {
+ colorValueLabel = 0xff000000;
+ } else {
+ colorValueLabel = theColor;
+ }
+ return this;
+ }
+
+ public int getAlpha( ) {
+ return alpha;
+ }
+
+ public int getForeground( ) {
+ return colorForeground;
+ }
+
+ public int getBackground( ) {
+ return colorBackground;
+ }
+
+ public int getActive( ) {
+ return colorActive;
+ }
+
+ public int getCaptionLabel( ) {
+ return colorCaptionLabel;
+ }
+
+ public int getValueLabel( ) {
+ return colorValueLabel;
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ public int hashCode( ) {
+ int result = 23;
+ result = 37 * result + colorBackground;
+ result = 37 * result + colorForeground;
+ result = 37 * result + colorActive;
+ return result;
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ public boolean equals( Object o ) {
+ if ( this == o ) {
+ return true;
+ }
+ if ( o == null || getClass( ) != o.getClass( ) ) {
+ return false;
+ }
+ CColor cc = ( CColor ) o;
+ return colorBackground == cc.colorBackground && colorForeground == cc.colorForeground && colorActive == cc.colorActive && colorCaptionLabel == cc.colorCaptionLabel && colorValueLabel == cc.colorValueLabel;
+ }
+}
diff --git a/controlP5/CDrawable.java b/controlP5/CDrawable.java
new file mode 100755
index 0000000..c7900bb
--- /dev/null
+++ b/controlP5/CDrawable.java
@@ -0,0 +1,37 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PGraphics;
+
+/**
+ * The CDrawable interface is used to draw controllers, primarily for internal use.
+ */
+public interface CDrawable {
+
+ void draw( PGraphics theGraphics );
+
+}
diff --git a/controlP5/CP.java b/controlP5/CP.java
new file mode 100755
index 0000000..9525014
--- /dev/null
+++ b/controlP5/CP.java
@@ -0,0 +1,377 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Array;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.text.CharacterIterator;
+import java.text.StringCharacterIterator;
+import java.util.List;
+
+public class CP {
+
+ /**
+ * borrowed from http://www.javapractices.com/Topic96.cjp
+ *
+ *
+ * @param aURLFragment String
+ * @return String
+ */
+ static public String forURL( String aURLFragment ) {
+ String result = null;
+ try {
+ result = URLEncoder.encode( aURLFragment , "UTF-8" );
+ } catch ( UnsupportedEncodingException ex ) {
+ throw new RuntimeException( "UTF-8 not supported" , ex );
+ }
+ return result;
+ }
+
+ /**
+ * borrowed from http://www.javapractices.com/Topic96.cjp
+ *
+ * @param aTagFragment String
+ * @return String
+ */
+ static public String forHTMLTag( String aTagFragment ) {
+ final StringBuffer result = new StringBuffer( );
+
+ final StringCharacterIterator iterator = new StringCharacterIterator( aTagFragment );
+ char character = iterator.current( );
+ while ( character != CharacterIterator.DONE ) {
+ if ( character == '<' ) {
+ result.append( "<" );
+ } else if ( character == '>' ) {
+ result.append( ">" );
+ } else if ( character == '\"' ) {
+ result.append( """ );
+ } else if ( character == '\'' ) {
+ result.append( "'" );
+ } else if ( character == '\\' ) {
+ result.append( "\" );
+ } else if ( character == '&' ) {
+ result.append( "&" );
+ } else {
+ // the char is not a special one
+ // add it to the result as is
+ result.append( character );
+ }
+ character = iterator.next( );
+ }
+ return result.toString( );
+ }
+
+ /**
+ * http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Programs;action=
+ * display;num=1159828167;start=0#0
+ *
+ * @param string String
+ * @return String
+ */
+ String URLEncode( String string ) {
+ String output = "";
+ byte[] input = string.getBytes(StandardCharsets.UTF_8);
+ for ( int i = 0 ; i < input.length ; i++ ) {
+ if ( input[ i ] < 0 ) {
+ // output += ('%' + hex(input[i])); // see hex method in
+ // processing
+ } else if ( input[ i ] == 32 ) {
+ output += '+';
+ } else {
+ output += ( char ) ( input[ i ] );
+ }
+ }
+
+ return output;
+ }
+
+ static public String replace( String theSourceString , String theSearchForString , String theReplaceString ) {
+ if ( theSourceString.length( ) < 1 ) {
+ return "";
+ }
+ int p = 0;
+
+ while ( p < theSourceString.length( ) && ( p = theSourceString.indexOf( theSearchForString , p ) ) >= 0 ) {
+ theSourceString = theSourceString.substring( 0 , p ) + theReplaceString + theSourceString.substring( p + theSearchForString.length( ));
+ p += theReplaceString.length( );
+ }
+ return theSourceString;
+ }
+
+ /**
+ * convert a hex number into an int
+ *
+ * @param theHex
+ * @return
+ */
+ static public int parseHex( String theHex ) {
+ int myLen = theHex.length( );
+ int a , r , b , g;
+ switch ( myLen ) {
+ case ( 8 ):
+ break;
+ case ( 6 ):
+ theHex = "ff" + theHex;
+ break;
+ default:
+ theHex = "ff000000";
+ break;
+ }
+ a = (Integer.valueOf(Integer.parseInt(theHex.substring(0, 2), 16))).intValue( );
+ r = (Integer.valueOf(Integer.parseInt(theHex.substring(2, 4), 16))).intValue( );
+ g = (Integer.valueOf(Integer.parseInt(theHex.substring(4, 6), 16))).intValue( );
+ b = (Integer.valueOf(Integer.parseInt(theHex.substring(6, 8), 16))).intValue( );
+ return ( a << 24 | r << 16 | g << 8 | b );
+ }
+
+ static public String intToString( int theInt ) {
+ int a = ( ( theInt >> 24 ) & 0xff );
+ int r = ( ( theInt >> 16 ) & 0xff );
+ int g = ( ( theInt >> 8 ) & 0xff );
+ int b = ( ( theInt >> 0 ) & 0xff );
+ String sa = ( ( Integer.toHexString( a ) ).length( ) == 1 ) ? "0" + Integer.toHexString( a ) : Integer.toHexString( a );
+ String sr = ( ( Integer.toHexString( r ) ).length( ) == 1 ) ? "0" + Integer.toHexString( r ) : Integer.toHexString( r );
+ String sg = ( ( Integer.toHexString( g ) ).length( ) == 1 ) ? "0" + Integer.toHexString( g ) : Integer.toHexString( g );
+ String sb = ( ( Integer.toHexString( b ) ).length( ) == 1 ) ? "0" + Integer.toHexString( b ) : Integer.toHexString( b );
+ return sa + sr + sg + sb;
+ }
+
+ /**
+ * @deprecated
+ */
+ @Deprecated protected boolean save( ControlP5 theControlP5 , String theFilePath ) {
+ ControlP5.logger( ).info( "Saving ControlP5 settings in XML format has been removed, have a look at controlP5's properties instead." );
+ return false;
+ }
+
+ /**
+ * * Convenience method for producing a simple textual representation of an array.
+ *
+ *
+ * The format of the returned String
is the same as
+ * AbstractCollection.toString
:
+ *
+ * - non-empty array: [blah, blah]
+ *
- empty array: []
+ *
- null array: null
+ *
+ *
+ *
+ * aArray
is a possibly-null array whose elements are primitives or objects; arrays
+ * of arrays are also valid, in which case aArray
is rendered in a nested,
+ * recursive fashion.
+ *
+ * @author Jerome Lacoste
+ * @author www.javapractices.com
+ */
+ static public String arrayToString( Object aArray ) {
+ if ( aArray == null ) {
+ return fNULL;
+ }
+
+ checkObjectIsArray( aArray );
+
+ StringBuilder result = new StringBuilder( fSTART_CHAR );
+ int length = Array.getLength( aArray );
+ for ( int idx = 0 ; idx < length ; ++idx ) {
+ Object item = Array.get( aArray , idx );
+ if ( isNonNullArray( item ) ) {
+ // recursive call!
+ result.append( arrayToString( item ) );
+ } else {
+ result.append( item );
+ }
+ if ( !isLastItem( idx , length ) ) {
+ result.append( fSEPARATOR );
+ }
+ }
+ result.append( fEND_CHAR );
+ return result.toString( );
+ }
+
+ // PRIVATE //
+ private static final String fSTART_CHAR = "[";
+
+ private static final String fEND_CHAR = "]";
+
+ private static final String fSEPARATOR = ", ";
+
+ private static final String fNULL = "null";
+
+ private static void checkObjectIsArray( Object aArray ) {
+ if ( !aArray.getClass( ).isArray( ) ) {
+ throw new IllegalArgumentException( "Object is not an array." );
+ }
+ }
+
+ private static boolean isNonNullArray( Object aItem ) {
+ return aItem != null && aItem.getClass( ).isArray( );
+ }
+
+ private static boolean isLastItem( int aIdx , int aLength ) {
+ return ( aIdx == aLength - 1 );
+ }
+
+ protected static String formatGetClass( Class< ? > c ) {
+ if ( c == null )
+ return null;
+ final String pattern = "class ";
+ return c.toString( ).startsWith( pattern ) ? c.toString( ).substring( pattern.length( ) ) : c.toString( );
+ }
+
+
+ static public boolean inside( int[] theRect , float theX , float theY ) {
+ if ( theRect.length == 4 ) {
+ return ( theX > theRect[ 0 ] && theX < theRect[ 2 ] && theY > theRect[ 1 ] && theY < theRect[ 3 ] );
+ } else {
+ return false;
+ }
+ }
+
+ /* Base64 static methods to encode and decode
+ * bytes into a String and back
+ *
+ * from
+ * http://examples.oreilly.com/javacrypt/files/oreilly/jonathan/util/
+ * http://oreilly.com/catalog/javacrypt/chapter/ch06.html */
+
+ static public String encodeBase64( byte[] raw ) {
+ StringBuffer encoded = new StringBuffer( );
+ for ( int i = 0 ; i < raw.length ; i += 3 ) {
+ encoded.append( encodeBlock( raw , i ) );
+ }
+ return encoded.toString( );
+ }
+
+ protected static char[] encodeBlock( byte[] raw , int offset ) {
+ int block = 0;
+ int slack = raw.length - offset - 1;
+ int end = ( slack >= 2 ) ? 2 : slack;
+ for ( int i = 0 ; i <= end ; i++ ) {
+ byte b = raw[ offset + i ];
+ int neuter = ( b < 0 ) ? b + 256 : b;
+ block += neuter << ( 8 * ( 2 - i ) );
+ }
+ char[] base64 = new char[ 4 ];
+ for ( int i = 0 ; i < 4 ; i++ ) {
+ int sixbit = ( block >>> ( 6 * ( 3 - i ) ) ) & 0x3f;
+ base64[ i ] = getBase64Char( sixbit );
+ }
+ if ( slack < 1 )
+ base64[ 2 ] = '=';
+ if ( slack < 2 )
+ base64[ 3 ] = '=';
+ return base64;
+ }
+
+ static char getBase64Char( int sixBit ) {
+ if ( sixBit >= 0 && sixBit <= 25 )
+ return ( char ) ( 'A' + sixBit );
+ if ( sixBit >= 26 && sixBit <= 51 )
+ return ( char ) ( 'a' + ( sixBit - 26 ) );
+ if ( sixBit >= 52 && sixBit <= 61 )
+ return ( char ) ( '0' + ( sixBit - 52 ) );
+ if ( sixBit == 62 )
+ return '+';
+ if ( sixBit == 63 )
+ return '/';
+ return '?';
+ }
+
+ static public byte[] decodeBase64( String base64 ) {
+ int pad = 0;
+ for ( int i = base64.length( ) - 1 ; base64.charAt( i ) == '=' ; i-- )
+ pad++;
+ int length = base64.length( ) * 6 / 8 - pad;
+ byte[] raw = new byte[ length ];
+ int rawIndex = 0;
+ for ( int i = 0 ; i < base64.length( ) ; i += 4 ) {
+ int block = ( getBase64Value( base64.charAt( i ) ) << 18 ) + ( getBase64Value( base64.charAt( i + 1 ) ) << 12 ) + ( getBase64Value( base64.charAt( i + 2 ) ) << 6 ) + ( getBase64Value( base64.charAt( i + 3 ) ) );
+ for ( int j = 0 ; j < 3 && rawIndex + j < raw.length ; j++ )
+ raw[ rawIndex + j ] = ( byte ) ( ( block >> ( 8 * ( 2 - j ) ) ) & 0xff );
+ rawIndex += 3;
+ }
+ return raw;
+ }
+
+ static int getBase64Value( char c ) {
+ if ( c >= 'A' && c <= 'Z' )
+ return c - 'A';
+ if ( c >= 'a' && c <= 'z' )
+ return c - 'a' + 26;
+ if ( c >= '0' && c <= '9' )
+ return c - '0' + 52;
+ if ( c == '+' )
+ return 62;
+ if ( c == '/' )
+ return 63;
+ if ( c == '=' )
+ return 0;
+ return -1;
+ }
+
+ static public int getBit( int theByte , int theIndex ) {
+ int bitmask = 1 << theIndex;
+ return ( ( theByte & bitmask ) > 0 ) ? 1 : 0;
+ }
+
+ static public byte setHigh( byte theByte , int theIndex ) {
+ return ( byte ) ( theByte | ( 1 << theIndex ) );
+ }
+
+ static public byte setLow( byte theByte , int theIndex ) {
+ return ( byte ) ( theByte & ~ ( 1 << theIndex ) );
+ }
+
+ static public byte[] intToByteArray( int a ) {
+ byte[] ret = new byte[ 2 ];
+ ret[ 1 ] = ( byte ) ( a & 0xFF );
+ ret[ 0 ] = ( byte ) ( ( a >> 8 ) & 0xFF );
+ //ret[0] = (byte) ((a >> 16) & 0xFF);
+ //ret[0] = (byte) ((a >> 24) & 0xFF);
+ return ret;
+ }
+
+ static public int byteArrayToInt( byte[] b ) {
+ int value = 0;
+ for ( int i = 0 ; i < 2 ; i++ ) {
+ int shift = ( 2 - 1 - i ) * 8;
+ value += ( b[ i ] & 0x00FF ) << shift;
+ }
+ return value;
+ }
+
+ static String join( List< String > list , String delimiter ) {
+ StringBuilder b = new StringBuilder( );
+ for ( String item : list ) {
+ b.append( item ).append( delimiter );
+ }
+ return b.toString( );
+ }
+
+}
diff --git a/controlP5/CallbackEvent.java b/controlP5/CallbackEvent.java
new file mode 100755
index 0000000..ab087bc
--- /dev/null
+++ b/controlP5/CallbackEvent.java
@@ -0,0 +1,65 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+/**
+ *
+ * A CallbackEvent is send when a controller action such as enter, leave, press, etc has occurs.
+ *
+ * @example use/ControlP5callback
+ */
+public class CallbackEvent {
+
+ private final int _myAction;
+
+ private final Controller< ? > _myController;
+
+ CallbackEvent( Controller< ? > theController , int theAction ) {
+ _myController = theController;
+ _myAction = theAction;
+ }
+
+ /**
+ *
+ * @return int Returns an int value of either one of the following static variables
+ * ControlP5.ACTION_PRESS, ControlP5.ACTION_ENTER, ControlP5.ACTION_LEAVE,
+ * ControlP5.ACTION_RELEASE, ControlP5.ACTION_RELEASEDOUTSIDE,
+ * ControlP5.ACTION_BROADCAST
+ */
+ public int getAction( ) {
+ return _myAction;
+ }
+
+ /**
+ * Returns the Controller that triggered the Callback Event.
+ *
+ * @return Controller
+ */
+ public Controller< ? > getController( ) {
+ return _myController;
+ }
+
+}
diff --git a/controlP5/CallbackListener.java b/controlP5/CallbackListener.java
new file mode 100755
index 0000000..be2235a
--- /dev/null
+++ b/controlP5/CallbackListener.java
@@ -0,0 +1,41 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+/**
+ *
+ * Use a CallbackListener to listen for controller related actions such as pressed, released, etc.
+ * Callbacks cn be added via the ControlP5.addCallback() methods.
+ *
+ *
+ * @example use/ControlP5callback
+ * @see ControlP5#addCallback(CallbackListener)
+ */
+public interface CallbackListener {
+
+ void controlEvent( CallbackEvent theEvent );
+
+}
diff --git a/controlP5/Canvas.java b/controlP5/Canvas.java
new file mode 100755
index 0000000..c40d1f6
--- /dev/null
+++ b/controlP5/Canvas.java
@@ -0,0 +1,124 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+/**
+ * Use a Canvas to draw custom graphics into a control
+ * window or the default sketch window.
+ *
+ * The Canvas is an abstract class and must be extended by
+ * your custom Canvas class, see the ControlP5canvas example
+ * for details.
+ *
+ * @example controllers/ControlP5canvas
+ *
+ */
+
+public abstract class Canvas {
+
+ protected ControlWindow _myControlWindow;
+
+ public final static int PRE = 0;
+
+ public final static int POST = 1;
+
+ protected int _myMode = PRE;
+
+ public void setup( PGraphics theGraphics ) {
+ }
+
+ // TODO should be called from within ControlWindow when
+ // calling draw(PGraphics)
+ public void update( PApplet theApplet ) {
+ }
+
+ /**
+ * controlWindowCanvas is an abstract class and
+ * therefore needs to be extended by your class.
+ * draw(PApplet theApplet) is the only method that needs
+ * to be overwritten.
+ */
+ public abstract void draw( PGraphics theGraphics );
+
+ /**
+ * move a canvas to another controlWindow
+ *
+ * @param theControlWindow
+ */
+ public void moveTo( ControlWindow theControlWindow ) {
+ if ( _myControlWindow != null ) {
+ _myControlWindow.removeCanvas( this );
+ }
+ theControlWindow.addCanvas( this );
+ }
+
+ /**
+ * get the drawing mode of a Canvas. this can be PRE or
+ * POST.
+ *
+ * @return
+ */
+ public final int mode( ) {
+ return _myMode;
+ }
+
+ /**
+ * set the drawing mode to PRE. PRE is the default.
+ */
+ public final void pre( ) {
+ setMode( PRE );
+ }
+
+ /**
+ * set the drawing mode to POST.
+ */
+ public final void post( ) {
+ setMode( POST );
+ }
+
+ /**
+ *
+ * @param theMode
+ */
+ public final void setMode( int theMode ) {
+ if ( theMode == PRE ) {
+ _myMode = PRE;
+ } else {
+ _myMode = POST;
+ }
+ }
+
+ protected final void setControlWindow( ControlWindow theControlWindow ) {
+ _myControlWindow = theControlWindow;
+ }
+
+ public final ControlWindow window( ) {
+ return _myControlWindow;
+ }
+}
diff --git a/controlP5/Chart.java b/controlP5/Chart.java
new file mode 100755
index 0000000..c303d08
--- /dev/null
+++ b/controlP5/Chart.java
@@ -0,0 +1,561 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+/**
+ * Use charts to display float array data as line chart, yet experimental, but see the
+ * ControlP5chart example for more details.
+ *
+ * @example controllers/ControlP5chart
+ */
+public class Chart extends Controller< Chart > {
+
+ public final static int LINE = 0;
+ public final static int BAR = 1;
+ public final static int BAR_CENTERED = 2;
+ public final static int HISTOGRAM = 3;
+ public final static int PIE = 4;
+ public final static int AREA = 5;
+
+ protected final LinkedHashMap< String , ChartDataSet > _myDataSet;
+ protected float resolution = 1;
+ protected float strokeWeight = 1;
+ protected float _myMin = 0;
+ protected float _myMax = 1;
+
+ /**
+ * Convenience constructor to extend Chart.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Chart( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 200 , 100 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected Chart( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , float theX , float theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ setRange( 0 , theHeight );
+ _myDataSet = new LinkedHashMap< String , ChartDataSet >( );
+ getCaptionLabel( ).align( LEFT, BOTTOM_OUTSIDE ).paddingX = 0;
+
+ }
+
+ public Chart setRange( float theMin , float theMax ) {
+ _myMin = theMin;
+ _myMax = theMax;
+ return this;
+ }
+
+ public Chart setColors( String theSetIndex , int ... theColors ) {
+ getDataSet( ).get( theSetIndex ).setColors( theColors );
+ return this;
+ }
+
+ public Chart addData( ChartData theItem ) {
+ return addData( getFirstDataSetIndex( ) , theItem );
+ }
+
+ private String getFirstDataSetIndex( ) {
+ return getDataSet( ).keySet( ).iterator( ).next( );
+ }
+
+ private String getLastDataSetIndex( ) {
+ Iterator< String > it = getDataSet( ).keySet( ).iterator( );
+ String last = null;
+ while ( it.hasNext( ) ) {
+ last = it.next( );
+ }
+ return last;
+ }
+
+ public Chart addData( String theSetIndex , ChartData theItem ) {
+ getDataSet( theSetIndex ).add( theItem );
+ return this;
+ }
+
+ public Chart addData( float theValue ) {
+ ChartData cdi = new ChartData( theValue );
+ getDataSet( getFirstDataSetIndex( ) ).add( cdi );
+ return this;
+ }
+
+ public Chart addData( String theSetIndex , float theValue ) {
+ ChartData cdi = new ChartData( theValue );
+ getDataSet( theSetIndex ).add( cdi );
+ return this;
+ }
+
+ public Chart addData( ChartDataSet theChartData , float theValue ) {
+ ChartData cdi = new ChartData( theValue );
+ theChartData.add( cdi );
+ return this;
+ }
+
+ // array operations see syntax
+ // http://www.w3schools.com/jsref/jsref_obj_array.asp
+
+ /**
+ * adds a new float at the beginning of the data set.
+ */
+ public Chart unshift( float theValue ) {
+ return unshift( getFirstDataSetIndex( ) , theValue );
+ }
+
+ public Chart unshift( String theSetIndex , float theValue ) {
+ if ( getDataSet( theSetIndex ).size( ) > ( getWidth() / resolution ) ) {
+ removeLast( theSetIndex );
+ }
+ return addFirst( theSetIndex , theValue );
+ }
+
+ public Chart push( float theValue ) {
+ return push( getFirstDataSetIndex( ) , theValue );
+ }
+
+ public Chart push( String theSetIndex , float theValue ) {
+ if ( getDataSet( theSetIndex ).size( ) > ( getWidth() / resolution ) ) {
+ removeFirst( theSetIndex );
+ }
+ return addLast( theSetIndex , theValue );
+ }
+
+ public Chart addFirst( float theValue ) {
+ return addFirst( getFirstDataSetIndex( ) , theValue );
+ }
+
+ public Chart addFirst( String theSetIndex , float theValue ) {
+ ChartData cdi = new ChartData( theValue );
+ getDataSet( theSetIndex ).add( 0 , cdi );
+ return this;
+ }
+
+ public Chart addLast( float theValue ) {
+ return addLast( getFirstDataSetIndex( ) , theValue );
+ }
+
+ public Chart addLast( String theSetIndex , float theValue ) {
+ ChartData cdi = new ChartData( theValue );
+ getDataSet( theSetIndex ).add( cdi );
+ return this;
+ }
+
+ public Chart removeLast( ) {
+ return removeLast( getFirstDataSetIndex( ) );
+ }
+
+ public Chart removeLast( String theSetIndex ) {
+ return removeData( theSetIndex , getDataSet( theSetIndex ).size( ) - 1 );
+ }
+
+ public Chart removeFirst( ) {
+ return removeFirst( getFirstDataSetIndex( ) );
+ }
+
+ public Chart removeFirst( String theSetIndex ) {
+ return removeData( theSetIndex , 0 );
+ }
+
+ public Chart removeData( ChartData theItem ) {
+ removeData( getFirstDataSetIndex( ) , theItem );
+ return this;
+ }
+
+ public Chart removeData( String theSetIndex , ChartData theItem ) {
+ getDataSet( theSetIndex ).remove( theItem );
+ return this;
+ }
+
+ public Chart removeData( int theItemIndex ) {
+ removeData( getFirstDataSetIndex( ) , theItemIndex );
+ return this;
+ }
+
+ public Chart removeData( String theSetIndex , int theItemIndex ) {
+ if ( getDataSet( theSetIndex ).size( ) < 1 ) {
+ return this;
+ }
+ getDataSet( theSetIndex ).remove( theItemIndex );
+ return this;
+ }
+
+ public Chart setData( int theItemIndex , ChartData theItem ) {
+ getDataSet( getFirstDataSetIndex( ) ).set( theItemIndex , theItem );
+ return this;
+ }
+
+ public Chart setData( String theSetItem , int theItemIndex , ChartData theItem ) {
+ getDataSet( theSetItem ).set( theItemIndex , theItem );
+ return this;
+ }
+
+ public Chart addDataSet( String theName ) {
+ getDataSet( ).put( theName , new ChartDataSet( theName ) );
+ return this;
+ }
+
+ public Chart setDataSet( ChartDataSet theItems ) {
+ setDataSet( getFirstDataSetIndex( ) , theItems );
+ return this;
+ }
+
+ public Chart setDataSet( String theSetIndex , ChartDataSet theChartData ) {
+ getDataSet( ).put( theSetIndex , theChartData );
+ return this;
+ }
+
+ public Chart removeDataSet( String theIndex ) {
+ getDataSet( ).remove( theIndex );
+ return this;
+ }
+
+ public Chart setData( float ... theValues ) {
+ setData( getFirstDataSetIndex( ) , theValues );
+ return this;
+ }
+
+ public Chart setData( String theSetIndex , float ... theValues ) {
+ if ( getDataSet( ).get( theSetIndex ).size( ) != theValues.length ) {
+ getDataSet( ).get( theSetIndex ).clear( );
+ for ( int i = 0 ; i < theValues.length ; i++ ) {
+ getDataSet( ).get( theSetIndex ).add( new ChartData( 0 ) );
+ }
+ }
+ int n = 0;
+ resolution = ( float ) getWidth() / ( getDataSet( ).get( theSetIndex ).size( ) - 1 );
+ for ( float f : theValues ) {
+ getDataSet( ).get( theSetIndex ).get( n++ ).setValue( f );
+ }
+ return this;
+ }
+
+ public Chart updateData( float ... theValues ) {
+ return setData( theValues );
+ }
+
+ public Chart updateData( String theSetIndex , float ... theValues ) {
+ return setData( theSetIndex , theValues );
+ }
+
+ public LinkedHashMap< String , ChartDataSet > getDataSet( ) {
+ return _myDataSet;
+ }
+
+ public ChartDataSet getDataSet( String theIndex ) {
+ return getDataSet( ).get( theIndex );
+ }
+
+ public float[] getValuesFrom( String theIndex ) {
+ return getDataSet( theIndex ).getValues( );
+ }
+
+ public ChartData getData( String theIndex , int theItemIndex ) {
+ return getDataSet( theIndex ).get( theItemIndex );
+ }
+
+ public int size( ) {
+ return getDataSet( ).size( );
+ }
+
+ @Override
+ public void onEnter( ) {
+ }
+
+ @Override
+ public void onLeave( ) {
+ }
+
+ @Override
+ public Chart setValue( float theValue ) {
+ // TODO Auto-generated method stub
+ return this;
+ }
+
+ public Chart setStrokeWeight( float theWeight ) {
+ strokeWeight = theWeight;
+ for ( ChartDataSet c : getDataSet( ).values( ) ) {
+ c.setStrokeWeight( theWeight );
+ }
+ return this;
+ }
+
+ public float getStrokeWeight( ) {
+ return strokeWeight;
+ }
+
+ /**
+ * ?
+ *
+ * @param theValue
+ * @return
+ */
+ public Chart setResolution( int theValue ) {
+ resolution = theValue;
+ return this;
+ }
+
+ public int getResolution( ) {
+ return ( int ) resolution;
+ }
+
+ /**
+ * @exclude
+ */
+ @Override
+ @ControlP5.Invisible
+ public Chart updateDisplayMode( int theMode ) {
+ return updateViewMode( theMode );
+ }
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible
+ public Chart updateViewMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = new ChartViewPie( );
+ break;
+ case ( IMAGE ):
+ // _myDisplay = new ChartImageDisplay();
+ break;
+ case ( SPRITE ):
+ // _myDisplay = new ChartSpriteDisplay();
+ break;
+ case ( CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ public class ChartViewBar implements ControllerView< Chart > {
+
+ public void display( PGraphics theGraphics , Chart theController ) {
+ theGraphics.pushStyle( );
+ theGraphics.fill( getColor( ).getBackground( ) );
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+ theGraphics.noStroke( );
+
+ Iterator< String > it = getDataSet( ).keySet( ).iterator( );
+ String index = null;
+ float o = 0;
+ while ( it.hasNext( ) ) {
+ index = it.next( );
+ float s = getDataSet( index ).size( );
+ for ( int i = 0 ; i < s ; i++ ) {
+ theGraphics.fill( getDataSet( index ).getColor( i ) );
+ float ww = ( ( getWidth() / s ) );
+ float hh = PApplet.map( getDataSet( index ).get( i ).getValue( ) , _myMin , _myMax , 0 , getHeight( ) );
+ theGraphics.rect( o + i * ww , getHeight( ) , ( ww / getDataSet( ).size( ) ) , -PApplet.min( getHeight( ) , PApplet.max( 0 , hh ) ) );
+ }
+ o += ( ( getWidth() / s ) ) / getDataSet( ).size( );
+ }
+ theGraphics.popStyle( );
+ }
+ }
+
+ public class ChartViewBarCentered implements ControllerView< Chart > {
+
+ public void display( PGraphics theGraphics , Chart theController ) {
+ theGraphics.pushStyle( );
+ theGraphics.fill( getColor( ).getBackground( ) );
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+ theGraphics.noStroke( );
+
+ Iterator< String > it = getDataSet( ).keySet( ).iterator( );
+ String index = null;
+ float o = 0;
+ int n = 4;
+ int off = ( getDataSet( ).size( ) - 1 ) * n;
+ while ( it.hasNext( ) ) {
+ index = it.next( );
+ int s = getDataSet( index ).size( );
+ float step = ( float ) getWidth() / ( float ) ( s );
+ float ww = step - ( getWidth() % step );
+ ww -= 1;
+ ww = PApplet.max( 1 , ww );
+
+ for ( int i = 0 ; i < s ; i++ ) {
+ theGraphics.fill( getDataSet( index ).getColor( i ) );
+ ww = ( ( getWidth() / s ) * 0.5f );
+ float hh = PApplet.map( getDataSet( index ).get( i ).getValue( ) , _myMin , _myMax , 0 , getHeight( ) );
+ theGraphics.rect( -off / 2 + o + i * ( ( getWidth() / s ) ) + ww / 2 , getHeight( ) , ww , -PApplet.min( getHeight( ) , PApplet.max( 0 , hh ) ) );
+ }
+ o += n;
+ }
+ theGraphics.popStyle( );
+ }
+ }
+
+ public class ChartViewLine implements ControllerView< Chart > {
+
+ public void display( PGraphics theGraphics , Chart theController ) {
+
+ theGraphics.pushStyle( );
+ theGraphics.fill( getColor( ).getBackground( ) );
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+ theGraphics.noFill( );
+ Iterator< String > it = getDataSet( ).keySet( ).iterator( );
+ String index = null;
+ while ( it.hasNext( ) ) {
+ index = it.next( );
+ theGraphics.stroke( getDataSet( index ).getColor( 0 ) );
+ theGraphics.strokeWeight( getDataSet( index ).getStrokeWeight( ) );
+
+ theGraphics.beginShape( );
+ float res = ( ( float ) getWidth( ) ) / ( getDataSet( index ).size( ) - 1 );
+ for ( int i = 0 ; i < getDataSet( index ).size( ) ; i++ ) {
+ float hh = PApplet.map( getDataSet( index ).get( i ).getValue( ) , _myMin , _myMax , getHeight( ) , 0 );
+ theGraphics.vertex( i * res , PApplet.min( getHeight( ) , PApplet.max( 0 , hh ) ) );
+ }
+ theGraphics.endShape( );
+ }
+ theGraphics.noStroke( );
+ theGraphics.popStyle( );
+ getCaptionLabel( ).draw( theGraphics , 0 , 0 , theController );
+ }
+ }
+
+ public class ChartViewArea implements ControllerView< Chart > {
+
+ public void display( PGraphics theGraphics , Chart theController ) {
+
+ theGraphics.pushStyle( );
+ theGraphics.fill( getColor( ).getBackground( ) );
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+ theGraphics.noStroke( );
+
+ Iterator< String > it = getDataSet( ).keySet( ).iterator( );
+ String index = null;
+ while ( it.hasNext( ) ) {
+ index = it.next( );
+ float res = ( ( float ) getWidth( ) ) / ( getDataSet( index ).size( ) - 1 );
+
+ theGraphics.fill( getDataSet( index ).getColor( 0 ) );
+ theGraphics.beginShape( );
+ theGraphics.vertex( 0 , getHeight( ) );
+
+ for ( int i = 0 ; i < getDataSet( index ).size( ) ; i++ ) {
+ float hh = PApplet.map( getDataSet( index ).get( i ).getValue( ) , _myMin , _myMax , getHeight( ) , 0 );
+ theGraphics.vertex( i * res , PApplet.min( getHeight( ) , PApplet.max( 0 , hh ) ) );
+ }
+ theGraphics.vertex( getWidth( ) , getHeight( ) );
+ theGraphics.endShape( PApplet.CLOSE );
+ }
+ theGraphics.noStroke( );
+ theGraphics.popStyle( );
+ }
+ }
+
+ public class ChartViewPie implements ControllerView< Chart > {
+
+ public void display( PGraphics theGraphics , Chart theController ) {
+ theGraphics.pushStyle( );
+ theGraphics.pushMatrix( );
+
+ Iterator< String > it = getDataSet( ).keySet( ).iterator( );
+ String index = null;
+ while ( it.hasNext( ) ) {
+ index = it.next( );
+ float total = 0;
+ for ( int i = 0 ; i < getDataSet( index ).size( ) ; i++ ) {
+ total += getDataSet( index ).get( i ).getValue( );
+ }
+
+ float segment = TWO_PI / total;
+ float angle = -HALF_PI;
+
+ theGraphics.noStroke( );
+ for ( int i = 0 ; i < getDataSet( index ).size( ) ; i++ ) {
+ theGraphics.fill( getDataSet( index ).getColor( i ) );
+ float nextAngle = angle + getDataSet( index ).get( i ).getValue( ) * segment;
+
+ // a tiny offset to even out render artifacts when in smooth() mode.
+ float a = PApplet.max( 0 , PApplet.map( getWidth( ) , 0 , 200 , 0.05f , 0.01f ) );
+
+ theGraphics.arc( 0 , 0 , getWidth( ) , getHeight( ) , angle - a , nextAngle );
+ angle = nextAngle;
+ }
+ theGraphics.translate( 0 , ( getHeight( ) + 10 ) );
+ }
+ theGraphics.popMatrix( );
+ theGraphics.popStyle( );
+ }
+ }
+
+ public Chart setView( int theType ) {
+ switch ( theType ) {
+ case ( PIE ):
+ setView( new ChartViewPie( ) );
+ break;
+ case ( LINE ):
+ setView( new ChartViewLine( ) );
+ break;
+ case ( BAR ):
+ setView( new ChartViewBar( ) );
+ break;
+ case ( BAR_CENTERED ):
+ setView( new ChartViewBarCentered( ) );
+ break;
+ case ( AREA ):
+ setView( new ChartViewArea( ) );
+ break;
+ default:
+ System.out.println( "Sorry, this ChartView does not exist" );
+ break;
+ }
+ return this;
+ }
+
+ @Override
+ public String getInfo( ) {
+ return "type:\tChart\n" + super.toString( );
+ }
+
+ @Override
+ public String toString( ) {
+ return super.toString( ) + " [ " + getValue( ) + " ]" + " Chart " + "(" + this.getClass( ).getSuperclass( ) + ")";
+ }
+
+}
+
+/* NOTES what is the difference in meaning between chart and graph
+ * http://answers.yahoo.com/question/index?qid=20090101193325AA3mgMl
+ *
+ * more charts to implement: from https://vimeo.com/groups/oaod/videos/60013194 (44:40) scatter
+ * plot, star plot, histogram, dendrogram, box plot, physical map, tree, 2d 3d isosurfaces table,
+ * half matrix, graph, hierarchical pie, line graph, numeric matrix, heat map, permutation matrix
+ * bar graph, radial graph, */
diff --git a/controlP5/ChartData.java b/controlP5/ChartData.java
new file mode 100755
index 0000000..0b40feb
--- /dev/null
+++ b/controlP5/ChartData.java
@@ -0,0 +1,72 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+/**
+ * Used by Chart, single chart data is stored here including value, (label) text, and color.
+ */
+public class ChartData {
+
+ protected float _myValue;
+
+ protected String _myText;
+
+ protected int _myColor;
+
+ public ChartData( float theValue ) {
+ this( theValue , "" );
+ }
+
+ public ChartData( float theValue , String theText ) {
+ _myValue = theValue;
+ _myText = theText;
+ }
+
+ public void setValue( float theValue ) {
+ _myValue = theValue;
+ }
+
+ public void setText( String theText ) {
+ _myText = theText;
+ }
+
+ public float getValue( ) {
+ return _myValue;
+ }
+
+ public String getText( ) {
+ return _myText;
+ }
+
+ public void setColor( int theColor ) {
+ _myColor = theColor;
+ }
+
+ public int getColor( ) {
+ return _myColor;
+ }
+
+}
diff --git a/controlP5/ChartDataSet.java b/controlP5/ChartDataSet.java
new file mode 100755
index 0000000..6705454
--- /dev/null
+++ b/controlP5/ChartDataSet.java
@@ -0,0 +1,95 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.ArrayList;
+import java.util.ListIterator;
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+/**
+ * Used by Chart, a chart data set is a container to store chart data.
+ */
+@SuppressWarnings( "serial" )
+public class ChartDataSet extends ArrayList< ChartData > {
+
+ protected CColor _myColor;
+ protected float _myStrokeWeight = 1;
+ protected int[] colors = new int[ 0 ];
+ protected final String _myName;
+
+ public ChartDataSet( String theName ) {
+ _myName = theName;
+ _myColor = new CColor( );
+ }
+
+ public CColor getColor( ) {
+ return _myColor;
+ }
+
+ public ChartDataSet setColors( int ... theColors ) {
+ colors = theColors;
+ return this;
+ }
+
+ public int[] getColors( ) {
+ return colors;
+ }
+
+ public int getColor( int theIndex ) {
+ if ( colors.length == 0 ) {
+ return getColor( ).getForeground( );
+ }
+ if ( colors.length == 2 ) {
+ return PGraphics.lerpColor( colors[ 0 ] , colors[ 1 ] , theIndex / ( float ) size( ) , PApplet.RGB );
+ }
+ if ( theIndex >= 0 && theIndex < colors.length ) {
+ return colors[ theIndex ];
+ }
+ return getColor( 0 );
+ }
+
+ public ChartDataSet setStrokeWeight( float theStrokeWeight ) {
+ _myStrokeWeight = theStrokeWeight;
+ return this;
+ }
+
+ public float getStrokeWeight( ) {
+ return _myStrokeWeight;
+ }
+
+ public float[] getValues( ) {
+ float[] v = new float[ size( ) ];
+ int n = 0;
+ ListIterator< ChartData > litr = listIterator( );
+ while ( litr.hasNext( ) ) {
+ v[ n++ ] = litr.next( ).getValue( );
+ }
+ return v;
+ }
+
+}
diff --git a/controlP5/CheckBox.java b/controlP5/CheckBox.java
new file mode 100755
index 0000000..80f1211
--- /dev/null
+++ b/controlP5/CheckBox.java
@@ -0,0 +1,615 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import processing.core.PImage;
+
+
+/**
+ * A multiple-choice radioButton. items are added to a checkBox and can be organized in rows and
+ * columns. items of a checkBox are of type Toggle.
+ *
+ * @example controllers/ControlP5checkBox
+ *
+ * @see Toggle
+ *
+ */
+public class CheckBox extends ControlGroup< CheckBox > {
+
+ private Object _myPlug;
+
+ private String _myPlugName;
+
+ /**
+ * Convenience constructor to extend CheckBox.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public CheckBox( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ /**
+ * A CheckBox should only be added to controlP5 by using controlP5.addCheckBox()
+ *
+ * @exclude
+ * @param theControlP5
+ * @param theParent
+ * @param theName
+ * @param theX
+ * @param theY
+ */
+ public CheckBox( final ControlP5 theControlP5 , final ControllerGroup< ? > theParent , final String theName , final int theX , final int theY ) {
+ super( theControlP5 , theParent , theName , theX , theY , 99 , 9 );
+ isBarVisible = false;
+ isCollapse = false;
+ _myRadioToggles = new ArrayList< Toggle >( );
+ setItemsPerRow( 1 );
+ isMultipleChoice = true;
+ _myPlug = cp5.papplet;
+ _myPlugName = getName( );
+ if ( !ControllerPlug.checkPlug( _myPlug , _myPlugName , new Class[] { float[].class } ) ) {
+ _myPlug = null;
+ }
+ }
+
+ public final CheckBox activateAll( ) {
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ _myRadioToggles.get( i ).activate( );
+ }
+ updateValues( );
+ return this;
+ }
+
+ /**
+ * Activates a single checkbox item by index
+ */
+ public final CheckBox activate( int theIndex ) {
+ if ( theIndex < _myRadioToggles.size( ) ) {
+ _myRadioToggles.get( theIndex ).activate( );
+ updateValues( );
+ }
+ return this;
+ }
+
+ /**
+ * deactivate a single checkbox item by index
+ */
+ public final CheckBox deactivate( int theIndex ) {
+ if ( theIndex < _myRadioToggles.size( ) ) {
+ _myRadioToggles.get( theIndex ).deactivate( );
+ updateValues( );
+ }
+ return this;
+ }
+
+ /**
+ * toggle a single checkbox item by index
+ */
+ public final CheckBox toggle( int theIndex ) {
+ if ( theIndex < _myRadioToggles.size( ) ) {
+ Toggle t = _myRadioToggles.get( theIndex );
+ if (t.getState()) {
+ t.deactivate( );
+ } else {
+ t.activate( );
+ }
+ updateValues( );
+ }
+ return this;
+ }
+
+ /**
+ * deactivate a single checkbox item by name
+ */
+ public final void toggle( String theName ) {
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ if ( theName.equals( t.getName( ) ) ) {
+ if (t.getState()) {
+ t.deactivate( );
+ } else {
+ t.activate( );
+ }
+ updateValues( );
+ return;
+ }
+ }
+ }
+
+ /**
+ * Activates a single checkbox item by name
+ */
+ public final CheckBox activate( String theName ) {
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ if ( theName.equals( t.getName( ) ) ) {
+ t.activate( );
+ updateValues( );
+ return this;
+ }
+ }
+ return this;
+ }
+
+ /**
+ * Deactivates a single checkbox item by name
+ */
+ public final CheckBox deactivate( String theName ) {
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ if ( theName.equals( t.getName( ) ) ) {
+ t.deactivate( );
+ updateValues( );
+ return this;
+ }
+ }
+ return this;
+ }
+
+ private final void updateValues( ) {
+ _myValue = -1;
+ updateValues( true );
+ }
+
+ /**
+ * Sets the value for all CheckBox items according to the values of the array passed on. 0 will
+ * turn off an item, any other value will turn it on.
+ */
+ @Override public CheckBox setArrayValue( float[] theArray ) {
+ for ( int i = 0 ; i < theArray.length ; i++ ) {
+ if ( _myArrayValue[ i ] != theArray[ i ] ) {
+ if ( theArray[ i ] == 0 ) {
+ _myRadioToggles.get( i ).deactivate( );
+ } else {
+ _myRadioToggles.get( i ).activate( );
+ }
+ }
+ }
+ super.setArrayValue( theArray );
+ return this;
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override public String getInfo( ) {
+ return "type:\tCheckBox\n" + super.getInfo( );
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override public String toString( ) {
+ return super.toString( );
+ }
+
+ protected List< Toggle > _myRadioToggles;
+
+ protected int spacingRow = 1;
+
+ protected int spacingColumn = 1;
+
+ protected int itemsPerRow = -1;
+
+ protected boolean isMultipleChoice;
+
+ protected int itemHeight = 9;
+
+ protected int itemWidth = 9;
+
+ protected boolean[] availableImages = new boolean[ 3 ];
+
+ protected PImage[] images = new PImage[ 3 ];
+
+ protected boolean noneSelectedAllowed = true;
+
+ /**
+ * @param theName
+ * @param theValue
+ * @return
+ */
+ public CheckBox addItem( final String theName , final float theValue ) {
+ Toggle t = cp5.addToggle( theName , 0 , 0 , itemWidth , itemHeight );
+ t.getCaptionLabel( ).align( RIGHT_OUTSIDE , CENTER ).setPadding( Label.paddingX , 0 );
+ t.setMode(DEFAULT);
+ t.setImages( images[ 0 ] , images[ 1 ] , images[ 2 ] );
+ t.setSize( images[ 0 ] );
+ addItem( t , theValue );
+ return this;
+ }
+
+ /**
+ * @param theToggle
+ * @param theValue
+ * @return
+ */
+ public CheckBox addItem( final Toggle theToggle , final float theValue ) {
+ theToggle.setGroup( this );
+ theToggle.isMoveable = false;
+ theToggle.setInternalValue( theValue );
+ theToggle.isBroadcast = false;
+ _myRadioToggles.add( theToggle );
+ updateLayout( );
+ getColor( ).copyTo( theToggle );
+ theToggle.addListener( this );
+ updateValues( false );
+ cp5.removeProperty( theToggle );
+ return this;
+ }
+
+ /**
+ * @param theName
+ */
+ public CheckBox removeItem( final String theName ) {
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ if ( ( _myRadioToggles.get( i ) ).getName( ).equals( theName ) ) {
+ ( _myRadioToggles.get( i ) ).removeListener( this );
+ _myRadioToggles.remove( i );
+ }
+ }
+ updateValues( false );
+ return this;
+ }
+
+ /**
+ *
+ * @param theDefaultImage
+ * @param theOverImage
+ * @param theActiveImage
+ * @return CheckBox
+ */
+ public CheckBox setImages( PImage theDefaultImage , PImage theOverImage , PImage theActiveImage ) {
+ setImage( theDefaultImage , DEFAULT );
+ setImage( theOverImage , OVER );
+ setImage( theActiveImage , ACTIVE );
+ return this;
+ }
+
+ /**
+ * @param theImage
+ */
+ public CheckBox setImage( PImage theImage ) {
+ return setImage( theImage , DEFAULT );
+ }
+
+ /**
+ * @param theImage
+ * @param theState
+ * use Controller.DEFAULT (background), or Controller.OVER (foreground), or
+ * Controller.ACTIVE (active)
+ * @return
+ */
+ public CheckBox setImage( PImage theImage , int theState ) {
+ if ( theImage != null ) {
+ images[ theState ] = theImage;
+ availableImages[ theState ] = true;
+ for ( int i = 0 ; i < _myRadioToggles.size( ) ; i++ ) {
+ _myRadioToggles.get( i ).setImage( theImage , theState );
+ }
+ }
+ return this;
+ }
+
+ public CheckBox setSize( PImage theImage ) {
+ return setSize( theImage.width , theImage.height );
+ }
+
+ public CheckBox setSize( int theWidth , int theHeight ) {
+ setItemWidth( theWidth );
+ setItemHeight( theHeight );
+ return this;
+ }
+
+ /**
+ * set the height of a radioButton/checkBox item. by default the height is 11px. in order to
+ * recognize a custom height, the itemHeight has to be set before adding items to a
+ * radioButton/checkBox.
+ *
+ * @param theItemHeight
+ */
+ public CheckBox setItemHeight( int theItemHeight ) {
+ itemHeight = theItemHeight;
+ for ( Toggle t : _myRadioToggles ) {
+ t.setHeight( theItemHeight );
+ }
+ updateLayout( );
+ return this;
+ }
+
+ /**
+ * set the width of a radioButton/checkBox item. by default the width is 11px. in order to
+ * recognize a custom width, the itemWidth has to be set before adding items to a
+ * radioButton/checkBox.
+ *
+ * @param theItemWidth
+ */
+ public CheckBox setItemWidth( int theItemWidth ) {
+ itemWidth = theItemWidth;
+ for ( Toggle t : _myRadioToggles ) {
+ t.setWidth( theItemWidth );
+ }
+ updateLayout( );
+ return this;
+ }
+
+ /**
+ * Gets a radio button item by index.
+ *
+ * @param theIndex
+ * @return Toggle
+ */
+ public Toggle getItem( int theIndex ) {
+ return _myRadioToggles.get( theIndex );
+ }
+
+ public List< Toggle > getItems( ) {
+ return _myRadioToggles;
+ }
+
+ /**
+ * Gets the state of an item - this can be true (for on) or false (for off) - by index.
+ *
+ * @param theIndex
+ * @return boolean
+ */
+ public boolean getState( int theIndex ) {
+ if ( theIndex < _myRadioToggles.size( ) && theIndex >= 0 ) {
+ return _myRadioToggles.get( theIndex ).getState( );
+ }
+ return false;
+ }
+
+ /**
+ * Gets the state of an item - this can be true (for on) or false (for off) - by name.
+ *
+ * @param theName
+ * @return
+ */
+ public boolean getState( String theName ) {
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ if ( theName.equals( t.getName( ) ) ) {
+ return t.getState( );
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @exclude
+ */
+ public void updateLayout( ) {
+ int nn = 0;
+ int xx = 0;
+ int yy = 0;
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ set( t.position , xx , yy );
+
+ xx += t.getWidth( ) + spacingColumn;
+ nn++;
+ if ( nn == itemsPerRow ) {
+ nn = 0;
+ _myWidth = xx;
+ yy += t.getHeight( ) + spacingRow;
+ xx = 0;
+ } else {
+ _myWidth = xx;
+ }
+ }
+ }
+
+ /**
+ * Items of a radioButton or a checkBox are organized in columns and rows. SetItemsPerRow sets
+ * the limit of items per row. items exceeding the limit will be pushed to the next row.
+ *
+ * @param theValue
+ */
+ public CheckBox setItemsPerRow( final int theValue ) {
+ itemsPerRow = theValue;
+ updateLayout( );
+ return this;
+ }
+
+ /**
+ * Sets the spacing in pixels between columns.
+ *
+ * @param theSpacing
+ */
+ public CheckBox setSpacingColumn( final int theSpacing ) {
+ spacingColumn = theSpacing;
+ updateLayout( );
+ return this;
+ }
+
+ /**
+ * Sets the spacing in pixels between rows.
+ *
+ * @param theSpacing
+ */
+ public CheckBox setSpacingRow( final int theSpacing ) {
+ spacingRow = theSpacing;
+ updateLayout( );
+ return this;
+ }
+
+ public CheckBox deactivateAll( ) {
+ if ( !isMultipleChoice && !noneSelectedAllowed ) {
+ return this;
+ }
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ _myRadioToggles.get( i ).deactivate( );
+ }
+ _myValue = -1;
+ updateValues( true );
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @exclude
+ */
+ @ControlP5.Invisible @Override public void controlEvent( ControlEvent theEvent ) {
+
+ if ( !isMultipleChoice ) {
+ if ( !noneSelectedAllowed && theEvent.getController( ).getValue( ) < 1 ) {
+ if ( theEvent.getController( ) instanceof Toggle ) {
+ Toggle t = ( ( Toggle ) theEvent.getController( ) );
+ boolean b = t.isBroadcast( );
+ t.setBroadcast( false );
+ t.setState( true );
+ t.setBroadcast( b );
+ return;
+ }
+ }
+ _myValue = -1;
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ if ( !t.equals( theEvent.getController( ) ) ) {
+ t.deactivate( );
+ } else {
+ if ( t.isOn ) {
+ _myValue = t.internalValue( );
+ }
+ }
+ }
+ }
+ updateValues( true );
+ if ( _myPlug != null ) {
+ try {
+ Method method = _myPlug.getClass( ).getMethod( _myPlugName , float[].class );
+ method.invoke( _myPlug , getArrayValue( ));
+ } catch ( SecurityException ex ) {
+ ex.printStackTrace( );
+ } catch ( NoSuchMethodException ex ) {
+ ex.printStackTrace( );
+ } catch ( IllegalArgumentException ex ) {
+ ex.printStackTrace( );
+ } catch ( IllegalAccessException ex ) {
+ ex.printStackTrace( );
+ } catch ( InvocationTargetException ex ) {
+ ex.printStackTrace( );
+ }
+ }
+
+ }
+
+ public CheckBox plugTo( Object theObject ) {
+ _myPlug = theObject;
+ if ( !ControllerPlug.checkPlug( _myPlug , _myPlugName , new Class[] { float[].class } ) ) {
+ _myPlug = null;
+ }
+ return this;
+ }
+
+ public CheckBox plugTo( Object theObject , String thePlugName ) {
+ _myPlug = theObject;
+ _myPlugName = thePlugName;
+ if ( !ControllerPlug.checkPlug( _myPlug , _myPlugName , new Class[] { float[].class } ) ) {
+ _myPlug = null;
+ }
+ return this;
+ }
+
+ protected void updateValues( boolean theBroadcastFlag ) {
+ int n = _myRadioToggles.size( );
+ _myArrayValue = new float[ n ];
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ _myArrayValue[ i ] = t.getValue( );
+ }
+ if ( theBroadcastFlag ) {
+ ControlEvent myEvent = new ControlEvent( this );
+ cp5.getControlBroadcaster( ).broadcast( myEvent , FLOAT);
+ }
+ }
+
+ /**
+ * In order to always have 1 item selected, use setNoneSelectedAllowed(false), by default this
+ * is true. setNoneSelectedAllowed does not apply when in multipleChoice mode.
+ *
+ * @param theValue
+ */
+ public CheckBox setNoneSelectedAllowed( boolean theValue ) {
+ noneSelectedAllowed = theValue;
+ return this;
+ }
+
+ public CheckBox setColorLabels( int theColor ) {
+ for ( Toggle t : _myRadioToggles ) {
+ t.getCaptionLabel( ).setColor( theColor );
+ }
+ return this;
+ }
+
+ public CheckBox hideLabels( ) {
+ for ( Toggle t : _myRadioToggles ) {
+ t.getCaptionLabel( ).setVisible( false );
+ }
+ return this;
+ }
+
+ public CheckBox showLabels( ) {
+ for ( Toggle t : _myRadioToggles ) {
+ t.getCaptionLabel( ).setVisible( true );
+ }
+ return this;
+ }
+
+ public CheckBox toUpperCase( boolean theValue ) {
+ for ( Toggle t : _myRadioToggles ) {
+ t.getCaptionLabel( ).toUpperCase( theValue );
+ }
+ return this;
+ }
+
+ /**
+ * @deprecated
+ * @exclude
+ */
+ @Deprecated public CheckBox add( final String theName , final float theValue ) {
+ return addItem( theName , theValue );
+ }
+
+}
diff --git a/controlP5/ColorPalette.java b/controlP5/ColorPalette.java
new file mode 100644
index 0000000..21b5b04
--- /dev/null
+++ b/controlP5/ColorPalette.java
@@ -0,0 +1,33 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+class ColorPalette extends ControlGroup< ColorPalette > {
+
+ protected ColorPalette( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ }
+}
diff --git a/controlP5/ColorPicker.java b/controlP5/ColorPicker.java
new file mode 100755
index 0000000..3f87274
--- /dev/null
+++ b/controlP5/ColorPicker.java
@@ -0,0 +1,259 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import processing.core.PGraphics;
+
+/**
+ * A simple color picker using sliders to adjust RGBA values.
+ *
+ * @example controllers/ControlP5colorPicker
+ */
+public class ColorPicker extends ControlGroup< ColorPicker > {
+
+ protected Slider sliderRed;
+
+ protected Slider sliderGreen;
+
+ protected Slider sliderBlue;
+
+ protected Slider sliderAlpha;
+
+ protected Canvas currentColor;
+
+ private Object _myPlug;
+
+ private String _myPlugName;
+
+ private boolean broadcast;
+
+ /**
+ * Convenience constructor to extend ColorPicker.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public ColorPicker( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 255 , 10 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected ColorPicker( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ isBarVisible = false;
+ isCollapse = false;
+ _myArrayValue = new float[] { 255 , 255 , 255 , 255 };
+
+ currentColor = addCanvas( new ColorField( ) );
+ sliderRed = cp5.addSlider( theName + "-red" , 0 , 255 , 0 , 0 , theWidth , theHeight );
+ cp5.removeProperty( sliderRed );
+ sliderRed.setId( 0 );
+ sliderRed.setBroadcast( false );
+ sliderRed.addListener( this );
+ sliderRed.moveTo( this );
+ sliderRed.setMoveable( false );
+ sliderRed.setColorBackground( 0xff660000 );
+ sliderRed.setColorForeground( 0xffaa0000 );
+ sliderRed.setColorActive( 0xffff0000 );
+ sliderRed.getCaptionLabel( ).setVisible( false );
+ sliderRed.setDecimalPrecision( 0 );
+ sliderRed.setValue( 255 );
+
+ sliderGreen = cp5.addSlider( theName + "-green" , 0 , 255 , 0 , theHeight + 1 , theWidth , theHeight );
+ cp5.removeProperty( sliderGreen );
+ sliderGreen.setId( 1 );
+ sliderGreen.setBroadcast( false );
+ sliderGreen.addListener( this );
+ sliderGreen.moveTo( this );
+ sliderGreen.setMoveable( false );
+ sliderGreen.setColorBackground( 0xff006600 );
+ sliderGreen.setColorForeground( 0xff00aa00 );
+ sliderGreen.setColorActive( 0xff00ff00 );
+ sliderGreen.getCaptionLabel( ).setVisible( false );
+ sliderGreen.setDecimalPrecision( 0 );
+ sliderGreen.setValue( 255 );
+
+ sliderBlue = cp5.addSlider( theName + "-blue" , 0 , 255 , 0 , ( theHeight + 1 ) * 2 , theWidth , theHeight );
+ cp5.removeProperty( sliderBlue );
+ sliderBlue.setId( 2 );
+ sliderBlue.setBroadcast( false );
+ sliderBlue.addListener( this );
+ sliderBlue.moveTo( this );
+ sliderBlue.setMoveable( false );
+ sliderBlue.setColorBackground( 0xff000066 );
+ sliderBlue.setColorForeground( 0xff0000aa );
+ sliderBlue.setColorActive( 0xff0000ff );
+ sliderBlue.getCaptionLabel( ).setVisible( false );
+ sliderBlue.setDecimalPrecision( 0 );
+ sliderBlue.setValue( 255 );
+
+ sliderAlpha = cp5.addSlider( theName + "-alpha" , 0 , 255 , 0 , ( theHeight + 1 ) * 3 , theWidth , theHeight );
+ cp5.removeProperty( sliderAlpha );
+ sliderAlpha.setId( 3 );
+ sliderAlpha.setBroadcast( false );
+ sliderAlpha.addListener( this );
+
+ sliderAlpha.moveTo( this );
+ sliderAlpha.setMoveable( false );
+ sliderAlpha.setColorBackground( 0xff666666 );
+ sliderAlpha.setColorForeground( 0xffaaaaaa );
+ sliderAlpha.setColorActive( 0xffffffff );
+ sliderAlpha.getCaptionLabel( ).setVisible( false );
+ sliderAlpha.setDecimalPrecision( 0 );
+ sliderAlpha.getValueLabel( ).setColor( 0xff000000 );
+ sliderAlpha.setValue( 255 );
+
+ _myPlug = cp5.papplet;
+ _myPlugName = getName( );
+ if ( !ControllerPlug.checkPlug( _myPlug , _myPlugName , new Class[] { int.class } ) ) {
+ _myPlug = null;
+ }
+ broadcast = true;
+ }
+
+ public ColorPicker plugTo( Object theObject ) {
+ _myPlug = theObject;
+ if ( !ControllerPlug.checkPlug( _myPlug , _myPlugName , new Class[] { int.class } ) ) {
+ _myPlug = null;
+ }
+ return this;
+ }
+
+ public ColorPicker plugTo( Object theObject , String thePlugName ) {
+ _myPlug = theObject;
+ _myPlugName = thePlugName;
+ if ( !ControllerPlug.checkPlug( _myPlug , _myPlugName , new Class[] { int.class } ) ) {
+ _myPlug = null;
+ }
+ return this;
+ }
+
+ @Override
+ @ControlP5.Invisible
+ public void controlEvent( ControlEvent theEvent ) {
+ if ( broadcast ) {
+ _myArrayValue[ theEvent.getId( ) ] = theEvent.getValue( );
+ broadcast( );
+ }
+ }
+
+ private ColorPicker broadcast( ) {
+ ControlEvent ev = new ControlEvent( this );
+ setValue( getColorValue( ) );
+ cp5.getControlBroadcaster( ).broadcast( ev , ControlP5Constants.EVENT);
+ if ( _myPlug != null ) {
+ try {
+ Method method = _myPlug.getClass( ).getMethod( _myPlugName , int.class );
+ method.invoke( _myPlug , getColorValue( ));
+ } catch ( SecurityException ex ) {
+ ex.printStackTrace( );
+ } catch ( NoSuchMethodException ex ) {
+ ex.printStackTrace( );
+ } catch ( IllegalArgumentException ex ) {
+ ex.printStackTrace( );
+ } catch ( IllegalAccessException ex ) {
+ ex.printStackTrace( );
+ } catch ( InvocationTargetException ex ) {
+ ex.printStackTrace( );
+ }
+ }
+ return this;
+ }
+
+ /**
+ * Requires an array of size 4 for RGBA
+ *
+ * @return ColorPicker
+ */
+ @Override
+ public ColorPicker setArrayValue( float[] theArray ) {
+ broadcast = false;
+ sliderRed.setValue( theArray[ 0 ] );
+ sliderGreen.setValue( theArray[ 1 ] );
+ sliderBlue.setValue( theArray[ 2 ] );
+ sliderAlpha.setValue( theArray[ 3 ] );
+ broadcast = true;
+ _myArrayValue = theArray;
+ return broadcast( );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ColorPicker setColorValue( int theColor ) {
+ setArrayValue( new float[] { theColor >> 16 & 0xff , theColor >> 8 & 0xff , theColor >> 0 & 0xff , theColor >> 24 & 0xff } );
+ return this;
+ }
+
+ public int getColorValue( ) {
+ return 0xffffffff & ( int ) ( _myArrayValue[ 3 ] ) << 24 | ( int ) ( _myArrayValue[ 0 ] ) << 16 | ( int ) ( _myArrayValue[ 1 ] ) << 8 | ( int ) ( _myArrayValue[ 2 ] ) << 0;
+ }
+
+ private class ColorField extends Canvas {
+
+ public void draw( PGraphics theGraphics ) {
+ theGraphics.fill( _myArrayValue[ 0 ] , _myArrayValue[ 1 ] , _myArrayValue[ 2 ] , _myArrayValue[ 3 ] );
+ theGraphics.rect( 0 , 44 , getWidth( ) , 15 );
+ }
+ }
+
+ // public ColorPicker setColor(int... theArray) {
+ // switch (theArray.length) {
+ // case (1):
+ // setArrayValue(new float[] { theArray[0], theArray[0], theArray[0], getColorValue() >> 24 &
+ // 0xff });
+ // break;
+ // case (2):
+ // setArrayValue(new float[] { theArray[0], theArray[0], theArray[0], theArray[1] });
+ // break;
+ // case (3):
+ // setArrayValue(new float[] { theArray[0], theArray[1], theArray[2], getColorValue() >> 24 &
+ // 0xff });
+ // break;
+ // case (4):
+ // setArrayValue(new float[] { theArray[0], theArray[1], theArray[2], theArray[3] });
+ // break;
+ // }
+ // return this;
+ // }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override
+ public String getInfo( ) {
+ return "type:\tColorPicker\n" + super.toString( );
+ }
+}
+
+// some inspiration
+// http://www.nbdtech.com/blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx
+// http://alienryderflex.com/hsp.html
\ No newline at end of file
diff --git a/controlP5/ColorWheel.java b/controlP5/ColorWheel.java
new file mode 100644
index 0000000..49a4f5e
--- /dev/null
+++ b/controlP5/ColorWheel.java
@@ -0,0 +1,599 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.HashMap;
+import java.util.Map;
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+public class ColorWheel extends Controller< ColorWheel > {
+
+ /* TODO _myColorValue should only be used internally,
+ * when broadcasting, a composed value based on the hsl
+ * and alpha value should be distributed, same goes for
+ * getValue. */
+
+ private int _myColorValue = 0xffffffff;
+ private final Map< String , PGraphics > _myColorResources;
+ private final float[] _myCursor;
+ private final float scalar = 0.8f;
+ private int yoff = 10;
+ private final boolean isInfo = false;
+ private final Label _myInfoLabel;
+ private int drag = NONE;
+ private final static int NONE = -1;
+ private final static int SATURATION = 0;
+ private final static int COLOR = 1;
+ private final static int ALPHA = 2;
+ int _sideHandleHeight = 8;
+ private final double[] hsl = new double[] { 1.0 , 1.0 , 1.0 };
+
+ // argb = int ( 0-255 , 0-255 , 0-255 , 0-255 )
+ // hue = double ( 0.0-1.0 ) 0-360
+ // saturation = double ( 0.0-1.0 ) 0-100%
+ // lightness = double ( 0.0-1.0 ) 0-100%
+ // brightness = double ( 0.0-1.0 ) 0-100%
+
+ public ColorWheel( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , autoWidth , autoHeight );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ public ColorWheel( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+
+ _myColorResources = new HashMap< String , PGraphics >( );
+ _myColorResources.put( "default" , cp5.papplet.createGraphics( theWidth , theHeight ) );
+ _myCursor = new float[] { getWidth( ) / 2 , getHeight( ) / 2 };
+ _myCaptionLabel.align( LEFT , BOTTOM_OUTSIDE );
+ _myCaptionLabel.setPaddingX( 0 );
+ _myInfoLabel = new Label( cp5 , theName + "-info" );
+ _myInfoLabel.setPaddingX( 4 ).getStyle( ).marginTop = 4;
+ yoff = ( int ) ( getWidth( ) * 0.05 );
+
+ setColorResources( );
+ }
+
+ @Override public void onStartDrag( ) {
+ checkDrag( );
+ }
+
+ private void checkDrag( ) {
+ double x = getPointer( ).x( );
+ double y = getPointer( ).y( ) + yoff;
+ double xcenter = getWidth( ) / 2;
+ double ycenter = getHeight( ) / 2;
+ double d1 = ( ( getWidth( ) / 2 ) * scalar ) + 1;
+ double d = Math.sqrt( Math.pow( x - xcenter , 2 ) + Math.pow( y - ycenter , 2 ) );
+ double w = ( getWidth( ) - ( d1 * 2 ) ) / 2;
+ drag = NONE;
+ if ( d <= d1 ) {
+ drag = COLOR;
+ } else if ( x >= 0 && x <= w ) {
+ drag = SATURATION;
+ } else if ( x >= getWidth( ) - w && x <= getWidth( ) ) {
+ drag = ALPHA;
+ }
+ }
+
+ public void onEndDrag( ) {
+ drag = NONE;
+ }
+
+ @Override public void onDrag( ) {
+ switch ( drag ) {
+ case ( COLOR ):
+ double x = getPointer( ).x( );
+ double y = getPointer( ).y( ) + yoff;
+ double xcenter = getWidth( ) / 2;
+ double ycenter = getHeight( ) / 2;
+ double a = Math.atan2( y - ycenter , x - xcenter );
+ double d0 = getWidth( ) * 0.1;
+ double d1 = ( ( getWidth( ) / 2 ) * scalar ) + 1;
+ double d = Math.sqrt( Math.pow( x - xcenter , 2 ) + Math.pow( y - ycenter , 2 ) );
+ if ( d >= d1 - 1 ) {
+ x = ( xcenter + Math.cos( a ) * d1 );
+ y = ( ycenter + Math.sin( a ) * d1 );
+ } else if ( d <= d0 ) {
+ x = ( xcenter + Math.cos( a ) * d0 );
+ y = ( ycenter + Math.sin( a ) * d0 );
+ }
+ set( _myCursor , ( float ) x , ( float ) y );
+
+ int xx = ( int ) x;
+ int yy = ( int ) y;
+
+ double[] t = RGBtoHSL( _myColorResources.get( "default" ).get( xx , yy ) );
+ hsl[ 0 ] = t[ 0 ];
+ hsl[ 2 ] = t[ 2 ];
+ _myColorValue = HSLtoRGB( hsl );
+ setValue( _myColorValue );
+ break;
+ case ( SATURATION ):
+ float s1 = ( getHeight( ) - ( yoff * 2 ) - _sideHandleHeight );
+ setSaturation( map( getPointer( ).y( ) , 0 , s1 , 1.0 , 0.0 ) );
+ _myColorValue = HSLtoRGB( hsl );
+ setValue( _myColorValue );
+ break;
+ case ( ALPHA ):
+ float a1 = ( getHeight( ) - ( yoff * 2 ) - _sideHandleHeight );
+ setAlpha( ( int ) map( getPointer( ).y( ) , 0 , a1 , 255 , 0 ) );
+ _myColorValue = HSLtoRGB( hsl );
+ setValue( _myColorValue );
+ break;
+ }
+ }
+
+ @Override public void onPress( ) {
+ checkDrag( );
+ }
+
+ @Override public void onRelease( ) {
+ onDrag( );
+ }
+
+ public ColorWheel scrolled( int theRotationValue ) {
+ if ( isVisible ) {
+ double x = getPointer( ).x( );
+ double d1 = ( ( getWidth( ) / 2 ) * scalar ) + 1;
+ double w = ( getWidth( ) - ( d1 * 2 ) ) / 2;
+ if ( x >= 0 && x <= w ) {
+ setSaturation( hsl[ 1 ] + theRotationValue * 0.01 );
+ _myColorValue = HSLtoRGB( hsl );
+ setValue( _myColorValue );
+ } else if ( x >= getWidth( ) - w && x <= getWidth( ) ) {
+ setAlpha( a( ) + theRotationValue );
+ }
+ }
+ return this;
+ }
+
+ private void setColorResources( ) {
+ /* for now there is only a default resource but this
+ * can be extended to support other color models in
+ * the future. */
+
+ PGraphics buffer = _myColorResources.get( "default" );
+
+ buffer.beginDraw( );
+
+ buffer.background( 0 , 0 );
+
+ int w = buffer.width;
+
+ int h = buffer.height;
+
+ float[] center = new float[] { w / 2 , h / 2 };
+
+ int inner_radius = ( int ) ( buffer.width * 0.1 );
+
+ int outer_radius = ( int ) ( buffer.width * scalar / 2 );
+ buffer.fill( 0 );
+ buffer.ellipseMode( CENTER );
+ buffer.ellipse( buffer.width / 2 , buffer.height / 2 , buffer.width * scalar + 4 , buffer.width * scalar + 4 );
+ buffer.fill( 255 );
+ buffer.ellipse( buffer.width / 2 , buffer.height / 2 , ( inner_radius + 1 ) * 2 , ( inner_radius + 1 ) * 2 );
+
+ for ( int y = 0 ; y < h ; y++ ) {
+ int dy = ( int ) ( y( center ) - y );
+ for ( int x = 0 ; x < w ; x++ ) {
+ int dx = ( int ) ( x( center ) - x );
+ double dist = Math.sqrt( dx * dx + dy * dy );
+ if ( dist >= inner_radius && dist <= outer_radius ) {
+ double theta = Math.atan2( dy , dx );
+ // theta can go from -pi to pi
+ double hue = ( theta + PI ) / ( TWO_PI );
+ double sat , val;
+ if ( dist < ( inner_radius + ( outer_radius - inner_radius ) / 2 ) ) {
+ sat = map( dist , inner_radius , outer_radius , 0 , 2 );
+ val = 1;
+ } else {
+ sat = 1;
+ val = map( dist , inner_radius , outer_radius , 2 , 0 );
+ }
+ buffer.set( x , y , HSVtoRGB( hue , sat , val ) );
+ }
+ }
+ }
+ buffer.endDraw( );
+ }
+
+ public void setHue( double theH ) {
+ hsl[ 0 ] = Math.max( 0 , Math.min( 1 , theH ) );
+ }
+
+ public void setSaturation( double theS ) {
+ hsl[ 1 ] = Math.max( 0 , Math.min( 1 , theS ) );
+ }
+
+ public void setLightness( double theL ) {
+ hsl[ 2 ] = Math.max( 0 , Math.min( 1 , theL ) );
+ }
+
+ public ColorWheel setHSL( double theH , double theS , double theL ) {
+ setHue( theH );
+ setSaturation( theS );
+ setLightness( theL );
+ return this;
+ }
+
+ public int getRGB( ) {
+ return _myColorValue;
+ }
+
+ public ColorWheel setRGB( int theColor ) {
+ double[] t = RGBtoHSL( theColor );
+ hsl[ 0 ] = t[ 0 ];
+ hsl[ 2 ] = t[ 2 ];
+
+ float theta = ( float ) ( t[ 0 ] * TWO_PI ) - PI;
+ float d0 = getWidth( ) * 0.1f;
+ float d1 = ( ( getWidth( ) / 2 ) * scalar ) + 1f;
+ float s = ( float ) map( t[ 2 ] , 0f , 1f , d1 , d0 );
+ float x = _myColorResources.get( "default" ).width / 2 - ( float ) Math.cos( theta ) * s;
+ float y = _myColorResources.get( "default" ).height / 2 - ( float ) Math.sin( theta ) * s;
+ set( _myCursor , x , y );
+ setSaturation( t[ 1 ] );
+ // TODO resolve rounding error issue as reported here https://github.com/sojamo/controlp5/issues/21
+ _myColorValue = HSLtoRGB( hsl );
+ setValue( _myColorValue );
+ return this;
+ }
+
+ public ColorWheel setAlpha( int theAlpha ) {
+ /* TODO */
+ return this;
+ }
+
+ /**
+ * @exclude
+ */
+ @Override @ControlP5.Invisible public ColorWheel updateDisplayMode( int theMode ) {
+ return updateViewMode( theMode );
+ }
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible public ColorWheel updateViewMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ case ( IMAGE ):
+ case ( CUSTOM ):
+ _myControllerView = new ColorWheelView( );
+ default:
+ break;
+
+ }
+ return this;
+ }
+
+ public int a( ) {
+ int a = ( _myColorValue & 0xff000000 ) >> 24;
+ return ( a < 0 ) ? 255 : a;
+ }
+
+ public int r( ) {
+ return ( _myColorValue & 0x00ff0000 ) >> 16;
+ }
+
+ public int g( ) {
+ return ( _myColorValue & 0x0000ff00 ) >> 8;
+ }
+
+ public int b( ) {
+ return ( _myColorValue & 0x000000ff ) >> 0;
+ }
+
+ private class ColorWheelView implements ControllerView< ColorWheel > {
+
+ public void display( PGraphics theGraphics , ColorWheel theController ) {
+
+ PGraphics buffer = _myColorResources.get( "default" );
+
+ theGraphics.fill( 0 , 100 );
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+ theGraphics.ellipseMode( PApplet.CENTER );
+ theGraphics.pushMatrix( );
+ theGraphics.translate( 0 , -yoff );
+ theGraphics.image( buffer , 0 , 0 );
+ theGraphics.pushMatrix( );
+ theGraphics.translate( x( _myCursor ) , y( _myCursor ) );
+ theGraphics.strokeWeight( 2 );
+ theGraphics.noFill( );
+ theGraphics.stroke( 255 , 40 );
+ theGraphics.ellipse( 1 , 1 , 10 , 10 );
+ theGraphics.stroke( 250 );
+ theGraphics.fill( _myColorValue );
+ theGraphics.ellipse( 0 , 0 , 10 , 10 );
+
+ theGraphics.popMatrix( );
+ theGraphics.noStroke( );
+ theGraphics.translate( 0 , -yoff );
+ theGraphics.fill( HSLtoRGB( hsl[ 0 ] , hsl[ 1 ] , hsl[ 2 ] ) );
+ theGraphics.rect( 0 , getHeight( ) , getWidth( ) , yoff * 2 );
+ theGraphics.popMatrix( );
+ if ( isLabelVisible ) {
+ _myCaptionLabel.draw( theGraphics , 0 , 0 , theController );
+ }
+ if ( isInfo ) {
+ _myInfoLabel.setText( String.format( "RGB %d %d %d\nALPHA %d\nHSL %d %.2f %.2f " , r( ) , g( ) , b( ) , a( ) , ( int ) ( hsl[ 0 ] * 360 ) , hsl[ 1 ] , hsl[ 2 ] ) );
+ _myInfoLabel.draw( theGraphics , 0 , 0 , theController );
+ }
+ theGraphics.fill( 255 );
+ theGraphics.pushMatrix( );
+ int s = _sideHandleHeight / 2;
+ float v = ( getHeight( ) - ( yoff * 2 ) - _sideHandleHeight );
+ theGraphics.translate( 2 , ( int ) map( hsl[ 1 ] , 1 , 0 , 0 , v ) );
+ theGraphics.triangle( 0 , s , s , 0 , s , _sideHandleHeight );
+ theGraphics.popMatrix( );
+ /* TODO alpha handle theGraphics.pushMatrix( );
+ * theGraphics.translate( getWidth( ) - s - 2 ,
+ * ( int ) map( a( ) , 255 , 0 , 0 , v ) );
+ * theGraphics.triangle( s , s , 0 , 0 , 0 ,
+ * _sideHandleHeight ); theGraphics.popMatrix(
+ * ); */
+ }
+ }
+
+ public double[] RGBtoHSL( int theRGB ) {
+ return RGBtoHSL( theRGB >> 16 & 0xff , theRGB >> 8 & 0xff , theRGB >> 0 & 0xff );
+ }
+
+ /**
+ *
+ * @param theR value between 0 and 255
+ * @param theG value between 0 and 255
+ * @param theB value between 0 and 255
+ * @return double[] values h,s,l are between 0-1
+ */
+ public double[] RGBtoHSL( int theR , int theG , int theB ) {
+ double[] rgb = new double[ 3 ];
+ rgb[ 0 ] = theR / 255.0;
+ rgb[ 1 ] = theG / 255.0;
+ rgb[ 2 ] = theB / 255.0;
+ double max = Math.max( rgb[ 0 ] , Math.max( rgb[ 1 ] , rgb[ 2 ] ) );
+ double min = Math.min( rgb[ 0 ] , Math.min( rgb[ 1 ] , rgb[ 2 ] ) );
+ double h = ( max + min ) / 2;
+ double s = ( max + min ) / 2;
+ double l = ( max + min ) / 2;
+
+ if ( max == min ) {
+ h = s = 0; // achromatic
+ } else {
+ double d = max - min;
+ s = l > 0.5 ? ( d / ( 2 - max - min ) ) : ( d / ( max + min ) );
+ if ( max == rgb[ 0 ] ) {
+ h = ( rgb[ 1 ] - rgb[ 2 ] ) / d + ( rgb[ 1 ] < rgb[ 2 ] ? 6 : 0 );
+ } else if ( max == rgb[ 1 ] ) {
+ h = ( rgb[ 2 ] - rgb[ 0 ] ) / d + 2;
+ } else if ( max == rgb[ 2 ] ) {
+ h = ( rgb[ 0 ] - rgb[ 1 ] ) / d + 4;
+ }
+ h /= 6;
+ }
+
+ return new double[] { h , s , l };
+ }
+
+ public int HSVtoRGB( double[] hsv ) {
+ return HSVtoRGB( hsv[ 0 ] , hsv[ 1 ] , hsv[ 2 ] );
+ }
+
+ /**
+ *
+ * @param H value between 0-1
+ * @param S value between 0-1
+ * @param V value between 0-1
+ * @return int
+ */
+ public int HSVtoRGB( double H , double S , double V ) {
+
+ /* http://viziblr.com/news/2011/12/1/drawing-a-color-
+ * hue-wheel-with-c.html */
+
+ double[] rgb = new double[ 3 ];
+
+ if ( H == 1.0 ) {
+ H = 0.0;
+ }
+
+ double step = 1.0 / 6.0;
+ double vh = H / step;
+
+ int i = ( int ) Math.floor( vh );
+
+ double f = vh - i;
+ double p = V * ( 1.0 - S );
+ double q = V * ( 1.0 - ( S * f ) );
+ double t = V * ( 1.0 - ( S * ( 1.0 - f ) ) );
+
+ switch ( i ) {
+ case 0: {
+ rgb[ 0 ] = V;
+ rgb[ 1 ] = t;
+ rgb[ 2 ] = p;
+ break;
+ }
+ case 1: {
+ rgb[ 0 ] = q;
+ rgb[ 1 ] = V;
+ rgb[ 2 ] = p;
+ break;
+ }
+ case 2: {
+ rgb[ 0 ] = p;
+ rgb[ 1 ] = V;
+ rgb[ 2 ] = t;
+ break;
+ }
+ case 3: {
+ rgb[ 0 ] = p;
+ rgb[ 1 ] = q;
+ rgb[ 2 ] = V;
+ break;
+ }
+ case 4: {
+ rgb[ 0 ] = t;
+ rgb[ 1 ] = p;
+ rgb[ 2 ] = V;
+ break;
+ }
+ case 5: {
+ rgb[ 0 ] = V;
+ rgb[ 1 ] = p;
+ rgb[ 2 ] = q;
+ break;
+ }
+ default: {
+ // not possible - if we get here it is an
+ // internal error
+ // throw new ArgumentException();
+ System.out.println( "hsv to rgb not possible" );
+ }
+ }
+ return ( a( ) << 24 ) | ( ( int ) ( rgb[ 0 ] * 255 ) << 16 ) | ( ( int ) ( rgb[ 1 ] * 255 ) << 8 ) | ( int ) ( rgb[ 2 ] * 255 );
+ }
+
+ public final double[] RGBtoHSV( final int c ) {
+ return RGBtoHSV( ( c & 0xff0000 ) >> 16 , ( c & 0x00ff00 ) >> 8 , ( c & 0x0000ff ) >> 0 );
+ }
+
+ /**
+ *
+ * @param theR value between 0 and 255
+ * @param theG value between 0 and 255
+ * @param theB value between 0 and 255
+ * @return hsv [ hue (0-1) sat (0-1) val (0-1) ]
+ */
+ public final double[] RGBtoHSV( final int theR , final int theG , final double theB ) {
+
+ double hue = 0;
+
+ double sat = 0;
+
+ double val = 0;
+
+ final double r = theR / 255.0;
+ final double g = theG / 255.0;
+ final double b = theB / 255.0;
+
+ double minRGB = Math.min( r , Math.min( g , b ) );
+ double maxRGB = Math.max( r , Math.max( g , b ) );
+
+ // Black-gray-white
+ if ( minRGB == maxRGB ) {
+ return new double[] { 0 , 0 , minRGB };
+ }
+
+ // Colors other than black-gray-white:
+ double d = ( r == minRGB ) ? g - b : ( ( b == minRGB ) ? r - g : b - r );
+ double h = ( r == minRGB ) ? 3 : ( ( b == minRGB ) ? 1 : 5 );
+ hue = map( ( h - ( d / ( maxRGB - minRGB ) ) ) , 0 , 6.0 , 0 , 1.0 );
+ sat = ( maxRGB - minRGB ) / maxRGB;
+ val = maxRGB;
+ return new double[] { hue , sat , val };
+ }
+
+ public int HSLtoRGB( final double[] theHSL ) {
+ if ( theHSL.length == 3 ) {
+ return HSLtoRGB( theHSL[ 0 ] , theHSL[ 1 ] , theHSL[ 2 ] );
+ } else {
+ String message = "HSLtoRGB(double[]) a length of 3 is expected. ";
+ throw new IllegalArgumentException( message );
+ }
+
+ }
+
+ /**
+ *
+ * @param h value between 0 and 360
+ * @param s value between 0 and 100
+ * @param l) value between 0 and 100
+ * @param alpha value between 0 and 1
+ * @return
+ */
+ public int HSLtoRGB( final double h , double s , double l ) {
+ if ( h < 0.0 || h > 1.0 ) {
+ String message = "Color parameter outside of expected range - Hue ( 0.0 - 1.0 )";
+ throw new IllegalArgumentException( message );
+ }
+ if ( s < 0.0 || s > 1.0 ) {
+ String message = "Color parameter outside of expected range - Saturation ( 0.0 - 1.0 )";
+ throw new IllegalArgumentException( message );
+ }
+
+ if ( l < 0.0 || l > 1.0 ) {
+ String message = "Color parameter outside of expected range - Luminance ( 0.0 - 1.0 )";
+ throw new IllegalArgumentException( message );
+ }
+
+ double q = 0;
+
+ if ( l < 0.5 ) {
+ q = l * ( 1 + s );
+ } else {
+ q = ( l + s ) - ( s * l );
+ }
+
+ double p = 2 * l - q;
+
+ double r = Math.max( 0 , HueToRGB( p , q , h + ( 1.0f / 3.0f ) ) );
+ double g = Math.max( 0 , HueToRGB( p , q , h ) );
+ double b = Math.max( 0 , HueToRGB( p , q , h - ( 1.0f / 3.0f ) ) );
+
+ return ( 255 << 24 ) | ( ( int ) ( r * 255 ) << 16 ) | ( ( int ) ( g * 255 ) << 8 ) | ( int ) ( b * 255 );
+ }
+
+ private static double HueToRGB( double p , double q , double h ) {
+ if ( h < 0 )
+ h += 1;
+
+ if ( h > 1 )
+ h -= 1;
+
+ if ( 6 * h < 1 ) {
+ return p + ( ( q - p ) * 6 * h );
+ }
+
+ if ( 2 * h < 1 ) {
+ return q;
+ }
+
+ if ( 3 * h < 2 ) {
+ return p + ( ( q - p ) * 6 * ( ( 2.0f / 3.0f ) - h ) );
+ }
+
+ return p;
+ }
+
+ private final double map( double val , double a1 , double a2 , double b1 , double b2 ) {
+ return b1 + ( b2 - b1 ) * ( ( val - a1 ) / ( a2 - a1 ) );
+ }
+}
diff --git a/controlP5/ControlBehavior.java b/controlP5/ControlBehavior.java
new file mode 100755
index 0000000..c2fde7b
--- /dev/null
+++ b/controlP5/ControlBehavior.java
@@ -0,0 +1,106 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+/**
+ * The abstract class control behavior allows you to add custom behavior to controllers. Since it is
+ * an abstract class it must be extended and method update() must be implemented in your custom
+ * control behavior. how to use ControlBehavior please see the ControlP5behavior example in the
+ * examples folder.
+ *
+ * @example use/ControlP5behavior
+ */
+public abstract class ControlBehavior {
+
+ protected Controller< ? > _myController;
+
+ protected float value;
+
+ protected boolean isActive = true;
+
+ protected void init( Controller< ? > theController ) {
+ _myController = theController;
+ }
+
+ /**
+ * Returns the controller this behavior is connected to.
+ *
+ * @return Controller
+ */
+ public Controller< ? > getController( ) {
+ return _myController;
+ }
+
+ public float getValue( ) {
+ return value;
+ }
+
+ public void setValue( float theValue ) {
+ value = theValue;
+ _myController.setValue( value );
+ }
+
+ /**
+ * When extending ControlBehavior, update() has to be overridden.
+ */
+ public abstract void update( );
+
+ /**
+ * (de)activate the behavior.
+ *
+ * @param theFlag
+ * boolean
+ */
+ public void setActive( boolean theFlag ) {
+ isActive = theFlag;
+ }
+
+ /**
+ * check if the behavior is active or not.
+ *
+ * @return boolean
+ */
+ public boolean isActive( ) {
+ return isActive;
+ }
+
+ /**
+ * @exclude
+ * @return
+ */
+ @Deprecated
+ public float value( ) {
+ return value;
+ }
+
+ /**
+ * @exclude
+ */
+ @Deprecated
+ public Controller< ? > controller( ) {
+ return _myController;
+ }
+}
diff --git a/controlP5/ControlBroadcaster.java b/controlP5/ControlBroadcaster.java
new file mode 100755
index 0000000..3fc9115
--- /dev/null
+++ b/controlP5/ControlBroadcaster.java
@@ -0,0 +1,401 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.*;
+import java.util.AbstractMap.SimpleEntry;
+import java.util.Map.Entry;
+
+/**
+ * The ControlBroadcaster handles all controller value changes and distributes them accordingly to
+ * its listeners. The ControlBroadcaster is primarily for internal use only but can be accessed
+ * through an instance of the ControlP5 class. Instead of accessing the ControlBroadcaster directly,
+ * use the convenience methods available from the ControlP5 class.
+ *
+ * @see ControlP5#getControlBroadcaster()
+ */
+public class ControlBroadcaster {
+
+ private int _myControlEventType = ControlP5Constants.INVALID;
+ private ControllerPlug _myControlEventPlug = null;
+ private ControllerPlug _myControllerCallbackEventPlug = null;
+ private final ControlP5 cp5;
+ private final String _myEventMethod = "controlEvent";
+ private final String _myControllerCallbackEventMethod = "controlEvent";
+ private final ArrayList< ControlListener > _myControlListeners;
+ private final Set< Entry< CallbackListener , Controller< ? >>> _myControllerCallbackListeners;
+ private static boolean setPrintStackTrace = true;
+ private static boolean ignoreErrorMessage = false;
+ private static final Map< Class< ? > , Field[] > fieldcache = new HashMap< Class< ? > , Field[] >( );
+ private static final Map< Class< ? > , Method[] > methodcache = new HashMap< Class< ? > , Method[] >( );
+ boolean broadcast = true;
+
+ protected ControlBroadcaster( ControlP5 theControlP5 ) {
+ cp5 = theControlP5;
+ _myControlListeners = new ArrayList< ControlListener >( );
+ _myControllerCallbackListeners = new HashSet< Entry< CallbackListener , Controller< ? >>>( );
+ _myControlEventPlug = checkObject( cp5.papplet , getEventMethod( ) , new Class[] { ControlEvent.class } );
+ _myControllerCallbackEventPlug = checkObject( cp5.papplet , _myControllerCallbackEventMethod , new Class[] { CallbackEvent.class } );
+ if ( _myControlEventPlug != null ) {
+ _myControlEventType = ControlP5Constants.METHOD;
+ }
+ }
+
+ public ControlBroadcaster addListener( ControlListener ... theListeners ) {
+ Collections.addAll(_myControlListeners, theListeners);
+ return this;
+ }
+
+ public ControlBroadcaster removeListener( ControlListener ... theListeners ) {
+ for ( ControlListener l : theListeners ) {
+ _myControlListeners.remove( l );
+ }
+ return this;
+ }
+
+ /**
+ * Returns a ControlListener by index
+ *
+ * @param theIndex
+ * @return
+ */
+ public ControlListener getListener( int theIndex ) {
+ if ( theIndex < 0 || theIndex >= _myControlListeners.size( ) ) {
+ return null;
+ }
+ return _myControlListeners.get( theIndex );
+ }
+
+ /**
+ * Returns the size of the ControlListener list
+ *
+ * @return
+ */
+ public int listenerSize( ) {
+ return _myControlListeners.size( );
+ }
+
+ public ControlBroadcaster addCallback( CallbackListener ... theListeners ) {
+ for ( CallbackListener l : theListeners ) {
+ _myControllerCallbackListeners.add( new SimpleEntry< CallbackListener , Controller< ? >>( l , new EmptyController( ) ) );
+ }
+ return this;
+ }
+
+ public ControlBroadcaster addCallback( CallbackListener theListener ) {
+ _myControllerCallbackListeners.add( new SimpleEntry< CallbackListener , Controller< ? >>( theListener , new EmptyController( ) ) );
+ return this;
+ }
+
+ /**
+ * Adds a CallbackListener for a list of controllers.
+ *
+ * @param theListener
+ * @param theController
+ */
+ public void addCallback( CallbackListener theListener , Controller< ? > ... theController ) {
+ for ( Controller< ? > c : theController ) {
+ _myControllerCallbackListeners.add( new SimpleEntry< CallbackListener , Controller< ? >>( theListener , c ) );
+ }
+ }
+
+ public ControlBroadcaster removeCallback( CallbackListener ... theListeners ) {
+ for ( CallbackListener c : theListeners ) {
+ _myControllerCallbackListeners.remove( c );
+ }
+ return this;
+ }
+
+ public ControlBroadcaster removeCallback( CallbackListener theListener ) {
+ _myControllerCallbackListeners.remove( theListener );
+ return this;
+ }
+
+ /**
+ * Removes a CallbackListener for a particular controller
+ *
+ * @param theController
+ */
+ public ControlBroadcaster removeCallback( Controller< ? > ... theControllers ) {
+ for ( Controller< ? > c : theControllers ) {
+ for ( Entry< CallbackListener , Controller< ? >> entry : _myControllerCallbackListeners ) {
+ if (entry.getValue().equals(c)) {
+ _myControllerCallbackListeners.remove( entry );
+ }
+ }
+ }
+ return this;
+ }
+
+ public ControlBroadcaster plug( Object theObject , final String theControllerName , final String theTargetMethod ) {
+ plug( theObject , cp5.getController( theControllerName ) , theTargetMethod );
+ return this;
+ }
+
+ public ControlBroadcaster plug( Object theObject , final Controller< ? > theController , final String theTargetMethod ) {
+ if ( theController != null ) {
+ ControllerPlug myControllerPlug = checkObject( theObject , theTargetMethod , ControlP5Constants.acceptClassList );
+ if ( myControllerPlug == null ) {
+ return this;
+ } else {
+ if (!theController.checkControllerPlug(myControllerPlug)) {
+ theController.addControllerPlug( myControllerPlug );
+ }
+ return this;
+ }
+ }
+ return this;
+ }
+
+ static Field[] getFieldsFor( Class< ? > theClass ) {
+ if ( !fieldcache.containsKey( theClass ) ) {
+ fieldcache.put( theClass , theClass.getDeclaredFields( ) );
+ }
+ return fieldcache.get( theClass );
+ }
+
+ static Method[] getMethodFor( Class< ? > theClass ) {
+ if ( !methodcache.containsKey( theClass ) ) {
+ methodcache.put( theClass , theClass.getMethods( ) );
+ }
+ return methodcache.get( theClass );
+ }
+
+ protected static ControllerPlug checkObject( final Object theObject , final String theTargetName , final Class< ? >[] theAcceptClassList ) {
+
+ Class< ? > myClass = theObject.getClass( );
+
+ Method[] myMethods = getMethodFor( myClass );
+
+ for ( int i = 0 ; i < myMethods.length ; i++ ) {
+ if ( ( myMethods[ i ].getName( ) ).equals( theTargetName ) ) {
+
+ if ( myMethods[ i ].getParameterTypes( ).length == 1 ) {
+
+ // hack to detect controlEvent(CallbackEvent) which is otherwise
+ // overwritten by controlEvent(ControlEvent)
+ if ( theAcceptClassList.length == 1 ) {
+ if ( theAcceptClassList[ 0 ] == CallbackEvent.class ) {
+ ControllerPlug cp = new ControllerPlug( CallbackEvent.class , theObject , theTargetName , ControlP5Constants.EVENT , -1 );
+ if ( cp.getMethod( ) == null ) {
+ return null;
+ }
+ return cp;
+ }
+ }
+ if ( myMethods[ i ].getParameterTypes( )[ 0 ] == ControlP5Constants.controlEventClass ) {
+ return new ControllerPlug( ControlEvent.class , theObject , theTargetName , ControlP5Constants.EVENT , -1 );
+ }
+ for ( int j = 0 ; j < theAcceptClassList.length ; j++ ) {
+ if ( myMethods[ i ].getParameterTypes( )[ 0 ] == theAcceptClassList[ j ] ) {
+ return new ControllerPlug( theObject , theTargetName , ControlP5Constants.METHOD , j , theAcceptClassList );
+ }
+ }
+ } else if ( myMethods[ i ].getParameterTypes( ).length == 0 ) {
+ return new ControllerPlug( theObject , theTargetName , ControlP5Constants.METHOD , -1 , theAcceptClassList );
+ }
+ break;
+ }
+ }
+
+ Field[] myFields = getFieldsFor( myClass );
+
+ for ( int i = 0 ; i < myFields.length ; i++ ) {
+
+ if ( ( myFields[ i ].getName( ) ).equals( theTargetName ) ) {
+ for ( int j = 0 ; j < theAcceptClassList.length ; j++ ) {
+ if ( myFields[ i ].getType( ) == theAcceptClassList[ j ] ) {
+ return new ControllerPlug( theObject , theTargetName , ControlP5Constants.FIELD , j , theAcceptClassList );
+ }
+ }
+ break;
+ }
+ }
+ return null;
+ }
+
+ public ControlBroadcaster broadcast( final ControlEvent theControlEvent , final int theType ) {
+ if ( broadcast ) {
+ for ( ControlListener cl : _myControlListeners ) {
+ cl.controlEvent( theControlEvent );
+ }
+ if ( !theControlEvent.isTab( ) && !theControlEvent.isGroup( ) ) {
+
+ if ( theControlEvent.getController( ).getControllerPlugList( ).size( ) > 0 ) {
+
+ if ( theType == ControlP5Constants.STRING ) {
+ for ( ControllerPlug cp : theControlEvent.getController( ).getControllerPlugList( ) ) {
+ callTarget( cp , theControlEvent.getStringValue( ) );
+ }
+ } else if ( theType == ControlP5Constants.ARRAY ) {
+
+ } else if ( theType == ControlP5Constants.BOOLEAN ) {
+ for ( ControllerPlug cp : theControlEvent.getController( ).getControllerPlugList( ) ) {
+ Controller controller = theControlEvent.getController( );
+ if ( controller instanceof Icon ) {
+ callTarget( cp , ( ( Icon ) controller ).getBooleanValue( ) );
+ } else if ( controller instanceof Button ) {
+ callTarget( cp , ( ( Button ) controller ).getBooleanValue( ) );
+ } else if ( controller instanceof Toggle ) {
+ callTarget( cp , ( ( Toggle ) controller ).getBooleanValue( ) );
+ }
+ }
+ } else {
+
+ for ( ControllerPlug cp : theControlEvent.getController( ).getControllerPlugList( ) ) {
+ if ( cp.checkType( ControlP5Constants.EVENT ) ) {
+ invokeMethod( cp.getObject( ) , cp.getMethod( ) , new Object[] { theControlEvent } );
+ } else {
+ callTarget( cp , theControlEvent.getValue( ) );
+ }
+ }
+ }
+ }
+ }
+ if ( _myControlEventType == ControlP5Constants.METHOD ) {
+ invokeMethod( _myControlEventPlug.getObject( ) , _myControlEventPlug.getMethod( ) , new Object[] { theControlEvent } );
+ }
+ }
+ return this;
+ }
+
+ protected void callTarget( final ControllerPlug thePlug , final float theValue ) {
+ if ( thePlug.checkType( ControlP5Constants.METHOD ) ) {
+ invokeMethod( thePlug.getObject( ) , thePlug.getMethod( ) , thePlug.getMethodParameter( theValue ) );
+ } else if ( thePlug.checkType( ControlP5Constants.FIELD ) ) {
+ invokeField( thePlug.getObject( ) , thePlug.getField( ) , thePlug.getFieldParameter( theValue ) );
+ }
+ }
+
+ protected void callTarget( final ControllerPlug thePlug , final String theValue ) {
+ if ( thePlug.checkType( ControlP5Constants.METHOD ) ) {
+ invokeMethod( thePlug.getObject( ) , thePlug.getMethod( ) , new Object[] { theValue } );
+ } else if ( thePlug.checkType( ControlP5Constants.FIELD ) ) {
+ invokeField( thePlug.getObject( ) , thePlug.getField( ) , theValue );
+ }
+ }
+
+ protected void callTarget( final ControllerPlug thePlug , final boolean theValue ) {
+ if ( thePlug.checkType( ControlP5Constants.METHOD ) ) {
+ invokeMethod( thePlug.getObject( ) , thePlug.getMethod( ) , new Object[] { theValue } );
+ } else if ( thePlug.checkType( ControlP5Constants.FIELD ) ) {
+ invokeField( thePlug.getObject( ) , thePlug.getField( ) , theValue );
+ }
+ }
+
+ private void invokeField( final Object theObject , final Field theField , final Object theParam ) {
+ try {
+ theField.set( theObject , theParam );
+ } catch ( IllegalAccessException e ) {
+ ControlP5.logger( ).warning( e.toString( ) );
+ }
+ }
+
+ private void invokeMethod( final Object theObject , final Method theMethod , final Object[] theParam ) {
+ try {
+ if ( theParam[ 0 ] == null ) {
+ theMethod.invoke( theObject);
+ } else {
+ theMethod.invoke( theObject , theParam );
+ }
+ } catch ( IllegalArgumentException e ) {
+ ControlP5.logger( ).warning( e.toString( ) );
+ /**
+ * TODO thrown when plugging a String method/field.
+ */
+ } catch ( IllegalAccessException e ) {
+ printMethodError( theMethod , e );
+ } catch ( InvocationTargetException e ) {
+ printMethodError( theMethod , e );
+ } catch ( NullPointerException e ) {
+ printMethodError( theMethod , e );
+ }
+
+ }
+
+ protected String getEventMethod( ) {
+ return _myEventMethod;
+ }
+
+ protected void invokeAction( CallbackEvent theEvent ) {
+ boolean invoke;
+ for ( Entry< CallbackListener , Controller< ? >> entry : _myControllerCallbackListeners ) {
+ invoke = entry.getValue().getClass().equals(EmptyController.class) || entry.getValue().equals(theEvent.getController());
+ if ( invoke ) {
+ entry.getKey( ).controlEvent( theEvent );
+ }
+ }
+
+ if ( _myControllerCallbackEventPlug != null ) {
+ invokeMethod( cp5.papplet , _myControllerCallbackEventPlug.getMethod( ) , new Object[] { theEvent } );
+ }
+ }
+
+ private void printMethodError( Method theMethod , Exception theException ) {
+ if ( !ignoreErrorMessage ) {
+ ControlP5.logger( ).severe( "An error occured while forwarding a Controller event, please check your code at " + theMethod.getName( ) + ( !setPrintStackTrace ? " " + "exception: " + theException : "" ) );
+ if ( setPrintStackTrace ) {
+ theException.printStackTrace( );
+ }
+ }
+ }
+
+ public static void ignoreErrorMessage( boolean theFlag ) {
+ ignoreErrorMessage = theFlag;
+ }
+
+ public static void setPrintStackTrace( boolean theFlag ) {
+ setPrintStackTrace = theFlag;
+ }
+
+ private class EmptyController extends Controller< EmptyController > {
+
+ protected EmptyController( ) {
+ this( 0 , 0 );
+ }
+
+ protected EmptyController( int theX , int theY ) {
+ super( "empty" + ( ( int ) ( Math.random( ) * 1000000 ) ) , theX , theY );
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override public EmptyController setValue( float theValue ) {
+ // TODO Auto-generated method stub
+ return this;
+ }
+
+ }
+
+ /**
+ * @exclude
+ */
+ @Deprecated public void plug( final String theControllerName , final String theTargetMethod ) {
+ plug( cp5.papplet , theControllerName , theTargetMethod );
+ }
+}
diff --git a/controlP5/ControlElement.java b/controlP5/ControlElement.java
new file mode 100755
index 0000000..f5a82a8
--- /dev/null
+++ b/controlP5/ControlElement.java
@@ -0,0 +1,48 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Used for automated controller creation using annotations. Very much inspired by Karsten Schmidt's
+ * (toxi) cp5magic
+ *
+ * @example use/ControlP5annotation
+ */
+@Retention( RetentionPolicy.RUNTIME )
+public @interface ControlElement {
+
+ String[] properties() default { };
+
+ String label() default "";
+
+ int x() default -1;
+
+ int y() default -1;
+
+}
diff --git a/controlP5/ControlEvent.java b/controlP5/ControlEvent.java
new file mode 100755
index 0000000..cdd8f33
--- /dev/null
+++ b/controlP5/ControlEvent.java
@@ -0,0 +1,339 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+/**
+ * A controlEvent is sent to a PApplet or a ControlListener whenever a controller value has changed.
+ * Events can also be sent when a tab is activated, but by default tab events are disabled and have
+ * to be enabled with {@link Tab} Tab.activateEvent(). for detailed information see the tab
+ * documentation.
+ *
+ * @example use/ControlP5controlEvent
+ */
+public class ControlEvent {
+
+ public static int UNDEFINDED = -1;
+
+ public static int CONTROLLER = 0;
+
+ public static int TAB = 1;
+
+ public static int GROUP = 2;
+
+ protected final ControllerInterface< ? > _myController;
+
+ protected boolean isTab;
+
+ protected boolean isController;
+
+ protected boolean isGroup;
+
+ protected int myAction;
+
+ /**
+ *
+ * @param theController
+ * Controller
+ */
+ protected ControlEvent( Controller< ? > theController ) {
+ _myController = theController;
+ isTab = false;
+ isController = true;
+ isGroup = false;
+ }
+
+ /**
+ * @exclude
+ * @param theController
+ * Controller
+ */
+ public ControlEvent( Tab theController ) {
+ _myController = theController;
+ isTab = true;
+ isGroup = false;
+ isController = false;
+ }
+
+ /**
+ * @exclude
+ * @param theController
+ * Controller
+ */
+ public ControlEvent( ControllerGroup< ? > theController ) {
+ _myController = theController;
+ isTab = false;
+ isGroup = true;
+ isController = false;
+ }
+
+ public float getValue( ) {
+ return _myController.getValue( );
+ }
+
+ public String getStringValue( ) {
+ return _myController.getStringValue( );
+ }
+
+ /**
+ * Returns a float array, applies to e.g. Range.
+ *
+ * @return float[]
+ */
+ public float[] getArrayValue( ) {
+ return _myController.getArrayValue( );
+ }
+
+ /**
+ * Returns a float value at a particular index from a controller's array value. No error
+ * checking available here, will throw ArrayIndexOutOfBOundsException in case of unavailable
+ * index.
+ *
+ * @param theIndex
+ * @return
+ */
+ public float getArrayValue( int theIndex ) {
+ return _myController.getArrayValue( )[ theIndex ];
+ }
+
+ /**
+ * Returns the instance of the controller sending the ControlEvent.
+ *
+ * @return Controller
+ */
+ public Controller< ? > getController( ) {
+ return ( ( Controller< ? > ) _myController );
+ }
+
+ /**
+ * Returns the tab that triggered the ControlEvent
+ *
+ * @return Tab Tab
+ */
+ public Tab getTab( ) {
+ return ( Tab ) _myController;
+ }
+
+ /**
+ * Returns the group that evoked the ControlEvent
+ *
+ * @return ControlGroup
+ */
+ public ControlGroup< ? > getGroup( ) {
+ return ( ControlGroup< ? > ) _myController;
+ }
+
+ /**
+ * Gets the text of the controller's label that has evoked the event.
+ *
+ * @return String
+ */
+ public String getLabel( ) {
+ return ( ( Controller< ? > ) _myController ).getLabel( );
+ }
+
+ /**
+ * Checks if the ControlEvent was triggered by a tab
+ *
+ * @see Tab
+ * @return boolean
+ */
+ public boolean isTab( ) {
+ return isTab;
+ }
+
+ /**
+ * Checks if the ControlEvent was triggered by a controller
+ *
+ * @see Controller
+ * @return boolean
+ */
+ public boolean isController( ) {
+ return isController;
+ }
+
+ /**
+ * Checks if the ControlEvent was triggered by a ControlGroup
+ *
+ * @see ControllerGroup
+ * @return boolean
+ */
+ public boolean isGroup( ) {
+ return isGroup;
+ }
+
+ /**
+ * returns the controller's name
+ *
+ * @return String
+ */
+ public String getName( ) {
+ return _myController.getName( );
+ }
+
+ /**
+ * Returns the controller's id, if an id has not been set before the default value -1 will be
+ * returned.
+ *
+ * @return
+ */
+ public int getId( ) {
+ return _myController.getId( );
+ }
+
+ /**
+ * @return int returned is ControlP5.CONTROLLER, or ControlP5.TAB, or ControlP5.GROUP
+ */
+ public int getType( ) {
+ if ( isController ) {
+ return CONTROLLER;
+ } else if ( isTab ) {
+ return TAB;
+ } else if ( isGroup ) {
+ return GROUP;
+ }
+ return -1;
+ }
+
+ /**
+ * Checks if the ControlEvent originates from a specific Controller or ControllerGroup.
+ *
+ * @param theController
+ * @return boolean
+ */
+ public boolean isFrom( ControllerInterface< ? > theController ) {
+ return _myController.equals( theController );
+ }
+
+ /**
+ * checks if the ControlEvent originates from a specific Controller or ControllerGroup
+ * identifiable by name.
+ *
+ * @param theController
+ * @return boolean
+ */
+
+ public boolean isFrom( String theControllerName ) {
+ return _myController.getName( ).equals( theControllerName );
+ }
+
+ public boolean isAssignableFrom( Class< ? > c ) {
+ return _myController.getClass( ).isAssignableFrom( c );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated
+ public int type( ) {
+ return getType( );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated
+ public int id( ) {
+ return getId( );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated
+ public String name( ) {
+ return getName( );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated
+ public String label( ) {
+ return getLabel( );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated
+ public float value( ) {
+ return getValue( );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated
+ public String stringValue( ) {
+ return getStringValue( );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated
+ public float[] arrayValue( ) {
+ return getArrayValue( );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated
+ public Controller< ? > controller( ) {
+ return getController( );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated
+ public ControlGroup< ? > group( ) {
+ return getGroup( );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated
+ public Tab tab( ) {
+ return getTab( );
+ }
+
+ public String toString( ) {
+ return "[ ControlEvent from:" + _myController.getClass( ).getSimpleName( ) + " value:" + getValue( ) + " name:" + getName( ) + " ]";
+ }
+}
diff --git a/controlP5/ControlFont.java b/controlP5/ControlFont.java
new file mode 100755
index 0000000..33c06d6
--- /dev/null
+++ b/controlP5/ControlFont.java
@@ -0,0 +1,292 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+
+import processing.core.PApplet;
+import processing.core.PFont;
+import processing.core.PGraphics;
+
+/**
+ * A ControlFont is a container for a PFont that can be used to customize the font of a label.
+ * (Designing the Font handling gave me a big headache, especially when it comes to calculating the
+ * dimensions of a font which are not available at all times but only at certain times. The current
+ * status I suppose is a good compromise and works for standard font handling cases. For any special
+ * cases it will be difficult to convince me to make any changes.)
+ *
+ * @example extra/ControlP5controlFont
+ */
+public class ControlFont {
+
+ public static boolean DEBUG = false;
+
+ /**
+ * set the RENDER_2X variable to true to double render text, this makes the font look bolder
+ * especially in OpenGL mode. use: ControlFont.RENDER_2X = true;
+ */
+ public static boolean RENDER_2X;
+
+ /**
+ * renders a PFont twice for better and sharper readability
+ */
+ public static void sharp( ) {
+ RENDER_2X = true;
+ }
+
+ /**
+ * sets the rendering of a PFont back to normal and single rendering.
+ */
+ public static void normal( ) {
+ RENDER_2X = false;
+ }
+
+ PFont pfont;
+ List< String > txt;
+ String s = "";
+ private int top;
+ private int bottom;
+ private int center;
+ private int height;
+ private int width;
+ private final int baseline = 0;
+ private int _myTextHeight = 1;
+ private final int[] offset = new int[ 2 ];
+ private int size;
+
+ public ControlFont( PFont theFont ) {
+ this( theFont , checkFontSize( theFont ) );
+ }
+
+ public ControlFont( PFont theFont , int theFontSize ) {
+ this( theFont , theFontSize , theFontSize + 2 );
+ }
+
+ public ControlFont( PFont theFont , int theFontSize , int theLineHeight ) {
+ pfont = theFont;
+ size = theFontSize;
+ txt = new ArrayList< String >( );
+ }
+
+ static private int checkFontSize( PFont theFont ) {
+ try {
+ // was: return theFont.getFont().getSize(); but disappeared with p5 2.0b1
+ return theFont.getSize( );
+ } catch ( NullPointerException e ) {
+ System.out.println( "ControlP5: could not find font-size details for font " + theFont.getName( ) + ", use constructor ControlFont(PFont theFont, int theFontSize) to specify the font size." );
+ return 10;
+ }
+ }
+
+ public void init( Label theLabel ) {
+ // when the font changes, init is called.
+ // width and height should be adjusted to the updated font here,
+ // but we need PApplet here to determine the width of the label.
+ // unfortunately we dont have access to PApplet here, so a change
+ // might result in a 1-frame-flickr but doesnt necessarily need
+ // to happen.
+ }
+
+ public void setSize( int theSize ) {
+ size = theSize;
+ }
+
+ public int getSize( ) {
+ /* quickfix http://code.google.com/p/controlp5/issues/detail?id=46 first check the pfont
+ * size then default back to size */
+ return size;
+ }
+
+ public int getOffset( int theIndex ) {
+ return offset[ theIndex ];
+ }
+
+ public int getTextHeight( ) {
+ return _myTextHeight;
+ }
+
+ public int getWidth( ) {
+ return width;
+ }
+
+ public int getHeight( ) {
+ return height;
+ }
+
+ public int getCenter( ) {
+ return center;
+ }
+
+ public int getTop( ) {
+ return top;
+ }
+
+ public int getBottom( ) {
+ return bottom;
+ }
+
+ public int getBaseline( ) {
+ return baseline;
+ }
+
+ public PFont getFont( ) {
+ return pfont;
+ }
+
+ public void adjust( PGraphics theGraphics , Label theLabel ) {
+ if ( theLabel.isChanged( ) ) {
+ theGraphics.textFont( pfont , size );
+ // the origin of a PFont Label is top left corner, therefore
+ // the following the following measures have to be calculated
+ // when a font is changed. we have to do that here since PApplet
+ // is required to calculate a font's ascent and descent value.
+ // values are calculated based on the baseline (which is 0),
+ // therefore center and top are negative values.
+ // to order to sync the line height with the height of the font,
+ // the value of lineHeightOffset carries this offset value.
+ // This becomes necessary when working with multiple lines.
+ top = -( int ) theGraphics.textAscent( );
+ bottom = ( int ) theGraphics.textDescent( );
+ center = -( int ) ( ( -top - bottom ) / 2 );
+ height = theLabel.isMultiline( ) ? theLabel.getHeight( ) : ( int ) ( theGraphics.textAscent( ) + theGraphics.textDescent( ) );
+ width = theLabel.isMultiline( ) ? theLabel.getWidth( ) : ( int ) theGraphics.textWidth( theLabel.getTextFormatted( ) );
+ if ( theLabel.isMultiline( ) ) {
+ calculateHeight( theGraphics , theLabel );
+ }
+ theLabel.setChanged( false );
+ }
+ }
+
+ private void calculateHeight( PGraphics theGraphics , Label theLabel ) {
+ txt.clear( );
+ String myString = theLabel.getTextFormatted( );
+ String[] paragraphs = myString.split( "\n" );
+ // does not recognize linebreaks at the end of theString.
+ myString = "";
+ for ( String p : paragraphs ) {
+ String[] words = p.split( "\\s" );
+ for ( String w : words ) {
+ if ( theGraphics.textWidth( myString + w ) < width ) {
+ myString += w + " ";
+ } else {
+ txt.add( myString.substring( 0 , PApplet.max( 0 , myString.length( ) - 1 ) ) );
+ myString = w + " ";
+ }
+ }
+ txt.add( myString.substring( 0 , myString.length( ) - 1 ) );
+ myString = "";
+ }
+ if ( theLabel.getHeight( ) % theLabel.getLineHeight( ) != 0 ) {
+ txt.add( "" );
+ }
+ _myTextHeight = ( PApplet.round( txt.size( ) * theLabel.getLineHeight( ) ) );
+ int maxLineNum = PApplet.round( theLabel.getHeight( ) / theLabel.getLineHeight( ) );
+ int offset = ( int ) ( PApplet.max( 0 , txt.size( ) - maxLineNum ) * ( PApplet.abs( theLabel.getOffsetYratio( ) ) ) );
+ int lim = PApplet.min( txt.size( ) , maxLineNum );
+ s = "";
+ for ( int i = 0 ; i < lim ; i++ ) {
+ s += txt.get( i + offset ) + "\n";
+ }
+ }
+
+ public int getOverflow( ) {
+ return ( _myTextHeight - height );
+ }
+
+ public void draw( ControlP5 c , Label theLabel ) {
+ draw( c.pg , theLabel );
+ }
+
+ public void draw( PGraphics theGraphics , Label theLabel ) {
+
+ PFont loadedFont = theGraphics.textFont;
+ float loadedSize = theGraphics.textSize;
+ if ( loadedFont == null ) {
+ theGraphics.textSize( loadedSize ); // forces default font
+ loadedFont = theGraphics.textFont;
+ }
+ int loadedAlign = theGraphics.textAlign;
+
+
+ theGraphics.textFont( pfont , size );
+ theGraphics.textAlign( theLabel.textAlign );
+ theGraphics.fill( theLabel.getColor( ) );
+
+ if ( theLabel.isMultiline( ) ) {
+ theGraphics.fill( theLabel.getColor( ) );
+ theGraphics.textLeading( theLabel.getLineHeight( ) );
+ theGraphics.text( s , 0 , 0 , theLabel.getWidth( ) , theLabel.getHeight( ) );
+ } else {
+
+ theGraphics.translate( 0 , -top + 1 );
+ debug( theGraphics , theLabel );
+ theGraphics.fill( theLabel.getColor( ) );
+ theGraphics.textLeading( theLabel.getLineHeight( ) );
+ theGraphics.text( theLabel.getTextFormatted( ) , 0 , 0 );
+ if ( RENDER_2X ) {
+ theGraphics.text( theLabel.getTextFormatted( ) , 0 , 0 );
+ }
+
+ }
+
+ theGraphics.textFont( loadedFont , loadedSize );
+ theGraphics.textAlign( loadedAlign );
+
+ }
+
+ private void debug( PGraphics theGraphics , Label theLabel ) {
+ if ( DEBUG ) {
+
+ theGraphics.stroke( 0 , 255 , 0 ); // BASELINE
+ theGraphics.line( 0 , getBaseline( ) , theGraphics.textWidth( theLabel.getText( ) ) , getBaseline( ) );
+
+ theGraphics.stroke( 0 , 0 , 255 ); // TOP
+ theGraphics.line( 0 , getTop( ) , theGraphics.textWidth( theLabel.getText( ) ) , getTop( ) );
+
+ theGraphics.stroke( 255 , 255 , 0 ); // BOTTOM
+ theGraphics.line( 0 , getBottom( ) , theGraphics.textWidth( theLabel.getText( ) ) , getBottom( ) );
+
+ theGraphics.stroke( 255 , 0 , 0 ); // CENTER
+ theGraphics.line( 0 , getCenter( ) , theGraphics.textWidth( theLabel.getText( ) ) , getCenter( ) );
+
+ theGraphics.stroke( 255 , 128 , 0 ); // CENTER_CAPS
+ theGraphics.line( 0 , getTop( ) / 2 , theGraphics.textWidth( theLabel.getText( ) ) , getTop( ) / 2 );
+
+ theGraphics.noStroke( );
+ }
+ }
+
+ public static int getWidthFor( String theText , Label theLabel , PGraphics theGraphics ) {
+ theGraphics.textFont( theLabel.getFont( ).pfont , theLabel.getFont( ).size );
+ return ( int ) theGraphics.textWidth( theText );
+ }
+
+}
+
+// textorize, a Ruby-based font rasterizer command line utility for Mac OS X
+// http://textorize.org/
+
diff --git a/controlP5/ControlGroup.java b/controlP5/ControlGroup.java
new file mode 100755
index 0000000..e58b8a0
--- /dev/null
+++ b/controlP5/ControlGroup.java
@@ -0,0 +1,199 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+/**
+ *
+ * In previous versions you would use the ControlGroup class
+ * to bundle controllers in a group. Now please use the
+ * Group class to do so.
+ *
+ *
+ * ControlGroup extends ControllerGroup, for a list and
+ * documentation of available methods see the
+ * {@link ControllerGroup} documentation.
+ *
+ *
+ * @see Group
+ * @example controllers/ControlP5group
+ */
+public class ControlGroup< T > extends ControllerGroup< T > implements ControlListener {
+
+ protected int _myBackgroundHeight = 0;
+
+ protected int _myBackgroundColor = 0x00ffffff;
+
+ protected boolean isEventActive = false;
+
+ protected List< ControlListener > _myControlListener;
+
+ /**
+ * Convenience constructor to extend ControlGroup.
+ */
+ public ControlGroup( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 100 , 9 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ public ControlGroup( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , int theX , int theY , int theW , int theH ) {
+ super( theControlP5 , theParent , theName , theX , theY );
+ _myControlListener = new ArrayList< ControlListener >( );
+ _myValueLabel = new Label( cp5 , "" );
+ _myWidth = theW;
+ _myHeight = theH;
+ }
+
+ @ControlP5.Invisible
+ public void mousePressed( ) {
+ if ( isBarVisible && isCollapse ) {
+ if ( !cp5.isAltDown( ) ) {
+ isOpen = !isOpen;
+ if ( isEventActive ) {
+ final ControlEvent myEvent = new ControlEvent( this );
+ cp5.getControlBroadcaster( ).broadcast( myEvent , METHOD);
+ for ( ControlListener cl : _myControlListener ) {
+ cl.controlEvent( myEvent );
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * activates or deactivates the Event status of a
+ * ControlGroup.
+ */
+ public T activateEvent( boolean theFlag ) {
+ isEventActive = theFlag;
+ return me;
+ }
+
+ public T setSize( int theWidth , int theHeight ) {
+ super.setSize( theWidth , theHeight );
+ setBackgroundHeight( theHeight );
+ return me;
+ }
+
+ public int getBackgroundHeight( ) {
+ return _myBackgroundHeight;
+ }
+
+ public T setBackgroundHeight( int theHeight ) {
+ _myBackgroundHeight = theHeight;
+ return me;
+ }
+
+ public T setBackgroundColor( int theColor ) {
+ _myBackgroundColor = theColor;
+ return me;
+ }
+
+ public T setBarHeight( int theHeight ) {
+ _myHeight = theHeight;
+ return me;
+ }
+
+ public int getBarHeight( ) {
+ return _myHeight;
+ }
+
+ @Override
+ public T updateInternalEvents( PApplet theApplet ) {
+ if ( isInside && isBarVisible ) {
+ cp5.getWindow( ).setMouseOverController( this );
+ }
+ return me;
+ }
+
+ protected void preDraw( PGraphics theGraphics ) {
+ if ( isOpen ) {
+ theGraphics.fill( _myBackgroundColor );
+ theGraphics.rect( 0 , 0 , _myWidth , _myBackgroundHeight - 1 );
+ }
+ }
+
+ protected void postDraw( PGraphics theGraphics ) {
+ if ( isBarVisible ) {
+ theGraphics.fill( isInside ? color.getForeground( ) : color.getBackground( ) );
+ theGraphics.rect( 0 , -1 , _myWidth , -_myHeight );
+ _myLabel.draw( theGraphics , 0 , -_myHeight - 1 , this );
+ if ( isCollapse && isArrowVisible ) {
+ theGraphics.fill( _myLabel.getColor( ) );
+ theGraphics.pushMatrix( );
+ theGraphics.translate( 2 , 0 );
+ if ( isOpen ) {
+ theGraphics.triangle( _myWidth - 10 , -_myHeight / 2 - 3 , _myWidth - 4 , -_myHeight / 2 - 3 , _myWidth - 7 , -_myHeight / 2 );
+ } else {
+ theGraphics.triangle( _myWidth - 10 , -_myHeight / 2 , _myWidth - 4 , -_myHeight / 2 , _myWidth - 7 , -_myHeight / 2 - 3 );
+ }
+ theGraphics.popMatrix( );
+ }
+ }
+ }
+
+ @ControlP5.Invisible
+ public void controlEvent( ControlEvent theEvent ) {
+ if ( theEvent.getController( ).getName( ).equals( getName( ) + "close" ) ) {
+ hide( );
+ }
+ }
+
+ @ControlP5.Invisible
+ public String stringValue( ) {
+ return Float.toString( _myValue );
+ }
+
+ @Override
+ public String toString( ) {
+ return super.toString( );
+ }
+
+ @Override
+ public String getInfo( ) {
+ return "type:\tControlGroup\n" + super.getInfo( );
+ }
+
+ public T addListener( final ControlListener theListener ) {
+ _myControlListener.add( theListener );
+ return me;
+ }
+
+ public T removeListener( final ControlListener theListener ) {
+ _myControlListener.remove( theListener );
+ return me;
+ }
+
+ public int listenerSize( ) {
+ return _myControlListener.size( );
+ }
+
+}
diff --git a/controlP5/ControlKey.java b/controlP5/ControlKey.java
new file mode 100755
index 0000000..34d0186
--- /dev/null
+++ b/controlP5/ControlKey.java
@@ -0,0 +1,31 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+public interface ControlKey {
+
+ void keyEvent();
+}
diff --git a/controlP5/ControlListener.java b/controlP5/ControlListener.java
new file mode 100755
index 0000000..7843430
--- /dev/null
+++ b/controlP5/ControlListener.java
@@ -0,0 +1,52 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+/**
+ * ControlListener is an interface that can be implemented by a custom class to be notified when
+ * controller values change. To add a ControlListener to a controller use Controller.addListner()
+ *
+ * @see Controller#addListener(ControlListener)
+ * @see CallbackListener
+ *
+ * @example use/ControlP5listenerForSingleController
+ */
+public interface ControlListener {
+
+ /**
+ * controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
+ * value changes. Use the CallbackListener to get informed when actions such as pressed,
+ * release, drag, etc are performed.
+ *
+ * @see CallbackListener
+ * @see CallbackEvent
+ * @param theEvent
+ * ControlEvent
+ * @example ControlP5listener
+ */
+ void controlEvent( ControlEvent theEvent );
+
+}
diff --git a/controlP5/ControlP5.java b/controlP5/ControlP5.java
new file mode 100755
index 0000000..8630a7a
--- /dev/null
+++ b/controlP5/ControlP5.java
@@ -0,0 +1,1455 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.io.File;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.logging.Logger;
+
+import processing.core.PApplet;
+import processing.core.PFont;
+import processing.core.PGraphics;
+import processing.event.KeyEvent;
+import processing.event.MouseEvent;
+import main.java.src2.main.java.controlP5.controlP5.ControlWindow.Pointer;
+
+/**
+ *
+ * controlP5 is a processing and java library for creating
+ * simple control GUIs. The ControlP5 class, the core of
+ * controlP5.
+ *
+ *
+ * All addController-Methods are located inside the
+ * ControlP5Base class.
+ *
+ *
+ * @see ControlP5Base
+ * @example use/ControlP5basics
+ */
+public class ControlP5 extends ControlP5Base {
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible public ControlWindow controlWindow;
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible static CColor color = new CColor( THEME_CP52014 );
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible public PApplet papplet;
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible PGraphics pg;
+ int pgx = 0 , pgy = 0 , pgw = 0 , pgh = 0;
+ int ox = 0;
+ int oy = 0;
+
+ boolean isGraphics = false;
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible public static final String VERSION = "2.2.6";// "##version##";
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible public static boolean isApplet = false;
+
+ static int renderer = J2D;
+
+ /**
+ * use this static variable to turn DEBUG on or off.
+ */
+ public static boolean DEBUG;
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible public static final Logger logger = Logger.getLogger( ControlP5.class.getName( ) );
+
+ private Map< String , ControllerInterface< ? >> _myControllerMap;
+ protected ControlBroadcaster _myControlBroadcaster;
+ protected ControlWindow window;
+ protected boolean isMoveable = false;
+
+ /* TODO does not work anymore, deprecate? */
+ protected boolean isAutoInitialization = false;
+ protected boolean isGlobalControllersAlwaysVisible = true;
+ protected boolean isTabEventsActive;
+ protected boolean isUpdate;
+ protected boolean isControlFont;
+ protected ControlFont controlFont;
+ static public final PFont BitFontStandard56 = new BitFont( CP.decodeBase64( BitFont.standard56base64 ) );
+ static public final PFont BitFontStandard58 = new BitFont( CP.decodeBase64( BitFont.standard58base64 ) );
+ protected ControlFont defaultFont = new ControlFont( BitFontStandard58 );
+ protected ControlFont defaultFontForText = new ControlFont( BitFontStandard56 );
+
+ /**
+ * from version 0.7.2 onwards shortcuts are disabled by
+ * default. shortcuts can be enabled using
+ * controlP5.enableShortcuts();
+ *
+ * @see #enableShortcuts()
+ */
+ protected boolean isShortcuts = false;
+
+ @Deprecated public boolean blockDraw;
+ protected Tooltip _myTooltip;
+ protected boolean isAnnotation;
+ boolean isAndroid = false;
+
+ /**
+ * Create a new instance of controlP5.
+ *
+ * @param theParent PApplet
+ */
+ public ControlP5( final PApplet theParent ) {
+ papplet = theParent;
+ init( );
+ }
+
+ public ControlP5( final PApplet theParent , PFont thePFont ) {
+ papplet = theParent;
+ init( );
+ setFont( thePFont );
+ }
+
+ public ControlP5( final PApplet theParent , ControlFont theControlFont ) {
+ papplet = theParent;
+ init( );
+ setFont( theControlFont );
+ }
+
+ protected void init( ) {
+ renderer = ( papplet.g.getClass( ).getCanonicalName( ).indexOf( "Java2D" ) > -1 ) ? J2D : P3D;
+ Class< ? > check = papplet.getClass( );
+ while ( check != null ) {
+ check = check.getSuperclass( );
+ if ( check != null ) {
+ if ( check.toString( ).toLowerCase( ).indexOf( "android.app." ) > -1 ) {
+ isAndroid = true;
+ break;
+ }
+ }
+ }
+
+ isTabEventsActive = false;
+
+ _myControlBroadcaster = new ControlBroadcaster( this );
+
+ // } else {
+ // defaultFont = new
+ // ControlFont(papplet.createFont("", 10));
+ //
+ // defaultFontForText = new
+ // ControlFont(papplet.createFont("", 10));
+ // }
+
+ controlFont = defaultFont;
+ controlWindow = new ControlWindow( this , papplet );
+ papplet.registerMethod( "pre" , this );
+ papplet.registerMethod( "dispose" , this );
+ setGraphics( papplet , 0 , 0 );
+ _myControllerMap = new TreeMap< String , ControllerInterface< ? >>( );
+ setFont( controlFont );
+ _myTooltip = new Tooltip( this );
+ super.init( this );
+
+ if ( welcome++ < 1 ) {
+ welcome( );
+ }
+
+ mapKeyFor( new ControlKey( ) {
+
+ public void keyEvent( ) {
+ saveProperties( );
+ }
+ } , PApplet.ALT , PApplet.SHIFT , 's' );
+
+ mapKeyFor( new ControlKey( ) {
+
+ public void keyEvent( ) {
+ loadProperties( );
+ }
+ } , PApplet.ALT , PApplet.SHIFT , 'l' );
+
+ mapKeyFor( new ControlKey( ) {
+
+ public void keyEvent( ) {
+ if ( controlWindow.isVisible ) {
+ hide( );
+ } else {
+ show( );
+ }
+ }
+ } , PApplet.ALT , PApplet.SHIFT , 'h' );
+
+ disableShortcuts( );
+
+ setFont( controlFont );
+
+ }
+
+ static int welcome = 0;
+
+ private void welcome( ) {
+ System.out.println( "ControlP5 " + VERSION + " " + "infos, comments, questions at http://www.sojamo.de/libraries/controlP5" );
+ }
+
+ public ControlP5 setGraphics( PApplet theApplet , int theX , int theY ) {
+ setGraphics( theApplet.g , theX , theY );
+ isGraphics = false;
+ return this;
+ }
+
+ public ControlP5 setGraphics( PGraphics theGraphics , int theX , int theY ) {
+ pg = theGraphics;
+ pgx = theX;
+ pgy = theY;
+ pgw = pg.width;
+ pgh = pg.height;
+ isGraphics = true;
+ return this;
+ }
+
+ public ControlP5 setPosition( int theX , int theY ) {
+ ox = theX;
+ oy = theY;
+ return this;
+ }
+
+ /**
+ * By default event originating from tabs are disabled,
+ * use setTabEventsActive(true) to receive controlEvents
+ * when tabs are clicked.
+ *
+ * @param theFlag
+ */
+ public void setTabEventsActive( boolean theFlag ) {
+ isTabEventsActive = theFlag;
+ }
+
+ /**
+ * autoInitialization can be very handy when it comes to
+ * initializing values, e.g. you load a set of
+ * controllers, then the values that are attached to the
+ * controllers will be reset to its saved state. to turn
+ * of auto intialization, call
+ * setAutoInitialization(false) right after initializing
+ * controlP5 and before creating any controller.
+ *
+ * @param theFlag boolean
+ */
+ public void setAutoInitialization( boolean theFlag ) {
+ isAutoInitialization = theFlag;
+ }
+
+ /**
+ * by default controlP5 draws any controller on top of
+ * any drawing done in the draw() function (this doesnt
+ * apply to P3D where controlP5.draw() has to be called
+ * manually in the sketch's draw() function ). to turn
+ * off the auto drawing of controlP5, use
+ * controlP5.setAutoDraw(false). now you can call
+ * controlP5.draw() any time whenever controllers should
+ * be drawn into the sketch.
+ *
+ * @param theFlag boolean
+ */
+ public void setAutoDraw( boolean theFlag ) {
+ if ( isAutoDraw( ) && !theFlag) {
+ controlWindow.papplet( ).unregisterMethod( "draw" , controlWindow );
+ }
+ if ( !isAutoDraw() && theFlag) {
+ controlWindow.papplet( ).registerMethod( "draw" , controlWindow );
+ }
+ controlWindow.isAutoDraw = theFlag;
+ }
+
+ /**
+ * check if the autoDraw function for the main window is
+ * enabled(true) or disabled(false).
+ *
+ * @return boolean
+ */
+ public boolean isAutoDraw( ) {
+ return controlWindow.isAutoDraw;
+ }
+
+ /**
+ *
+ * @see ControlBroadcaster
+ */
+ public ControlBroadcaster getControlBroadcaster( ) {
+ return _myControlBroadcaster;
+ }
+
+ /**
+ * @see ControlListener
+ */
+ public ControlP5 addListener( ControlListener ... theListeners ) {
+ getControlBroadcaster( ).addListener( theListeners );
+ return this;
+ }
+
+ /**
+ * @see ControlListener
+ */
+ public ControlP5 removeListener( ControlListener ... theListeners ) {
+ getControlBroadcaster( ).removeListener( theListeners );
+ return this;
+ }
+
+ /**
+ * @see ControlListener
+ */
+ public ControlP5 removeListener( ControlListener theListener ) {
+ getControlBroadcaster( ).removeListener( theListener );
+ return this;
+ }
+
+ /**
+ * @see ControlListener
+ */
+ public ControlListener getListener( int theIndex ) {
+ return getControlBroadcaster( ).getListener( theIndex );
+ }
+
+ /**
+ * @see CallbackEvent
+ * @see CallbackListener
+ */
+ public ControlP5 addCallback( CallbackListener ... theListeners ) {
+ getControlBroadcaster( ).addCallback( theListeners );
+ return this;
+ }
+
+ /**
+ * @see CallbackEvent
+ * @see CallbackListener
+ */
+ public ControlP5 addCallback( CallbackListener theListener ) {
+ getControlBroadcaster( ).addCallback( theListener );
+ return this;
+ }
+
+ /**
+ * @see CallbackEvent
+ * @see CallbackListener
+ */
+ public ControlP5 addCallback( CallbackListener theListener , Controller< ? > ... theControllers ) {
+ getControlBroadcaster( ).addCallback( theListener , theControllers );
+ return this;
+ }
+
+ /**
+ * @see CallbackEvent
+ * @see CallbackListener
+ */
+ public ControlP5 removeCallback( CallbackListener ... theListeners ) {
+ getControlBroadcaster( ).removeCallback( theListeners );
+ return this;
+ }
+
+ /**
+ * @see CallbackEvent
+ * @see CallbackListener
+ */
+ public ControlP5 removeCallback( Controller< ? > ... theControllers ) {
+ getControlBroadcaster( ).removeCallback( theControllers );
+ return this;
+ }
+
+ /**
+ * @see CallbackEvent
+ * @see CallbackListener
+ */
+ public ControlP5 removeCallback( Controller< ? > theController ) {
+ getControlBroadcaster( ).removeCallback( theController );
+ return this;
+ }
+
+ /**
+ * TODO
+ *
+ * @exclude
+ */
+ public void addControlsFor( Object theObject ) {
+
+ }
+
+ public Tab getTab( String theName ) {
+ for ( int i = 0 ; i < controlWindow.getTabs( ).size( ) ; i++ ) {
+ if ( controlWindow.getTabs( ).get( i ).getName( ).equals( theName ) ) {
+ return ( Tab ) controlWindow.getTabs( ).get( i );
+ }
+ }
+ Tab myTab = addTab( theName );
+ return myTab;
+ }
+
+ public Tab getTab( ControlWindow theWindow , String theName ) {
+ for ( int i = 0 ; i < theWindow.getTabs( ).size( ) ; i++ ) {
+ if ( theWindow.getTabs( ).get( i ).getName( ).equals( theName ) ) {
+ return ( Tab ) theWindow.getTabs( ).get( i );
+ }
+ }
+ Tab myTab = theWindow.add( new Tab( this , theWindow , theName ) );
+ return myTab;
+ }
+
+ /**
+ * registers a Controller with ControlP5, a Controller
+ * should/must be registered with a unique name. If not,
+ * accessing Controllers by name is not guaranteed. the
+ * rule here is last come last serve, existing
+ * Controllers with the same name will be overridden.
+ *
+ * @param theController ControllerInterface
+ * @return ControlP5
+ */
+ public ControlP5 register( Object theObject , String theIndex , ControllerInterface< ? > theController ) {
+ String address = "";
+ if ( theObject == papplet ) {
+ address = ( theController.getName( ).startsWith( "/" ) ) ? "" : "/";
+ address += theController.getName( );
+ } else {
+ address = ( ( ( theIndex.length( ) == 0 ) || theIndex.startsWith( "/" ) ) ? "" : "/" );
+ address += theIndex;
+ address += ( theController.getName( ).startsWith( "/" ) ? "" : "/" );
+ address += theController.getName( );
+ }
+
+ theController.setAddress( address );
+
+ if ( checkName( theController.getAddress( ) ) ) {
+ /* in case a controller with the same name
+ * already exists, will be deleted */
+ remove( theController.getAddress( ) );
+ }
+
+ /* add the controller to the controller map */
+ _myControllerMap.put( theController.getAddress( ) , theController );
+
+ /* update the properties' controller address */
+ List< ControllerProperty > ps = getProperties( ).get( theController );
+ if ( ps != null ) {
+ for ( ControllerProperty p : ps ) {
+ p.setAddress( theController.getAddress( ) );
+ }
+ }
+ /* initialize the controller */
+
+ theController.init( );
+
+ /* handle controller plugs and map controllers to
+ * its reference objects if applicable. */
+
+ if ( theObject == null ) {
+ theObject = papplet;
+ }
+
+ if ( theController instanceof Controller< ? > ) {
+
+ if ( !theObject.equals( papplet ) ) {
+ ( ( Controller< ? > ) ( ( Controller< ? > ) theController ).unplugFrom( papplet ) ).plugTo( theObject );
+ }
+
+ }
+
+ if ( !_myObjectToControllerMap.containsKey( theObject ) ) {
+ _myObjectToControllerMap.put( theObject , new ArrayList< ControllerInterface< ? >>( ) );
+ }
+
+ _myObjectToControllerMap.get( theObject ).add( theController );
+ return this;
+ }
+
+ public ControlP5 register( ControllerInterface< ? > theController ) {
+ return register( papplet , "" , theController );
+ }
+
+ /**
+ * Returns a List of all controllers currently
+ * registered.
+ *
+ * @return List>
+ */
+ public List< ControllerInterface< ? >> getAll( ) {
+ return new ArrayList< ControllerInterface< ? >>( _myControllerMap.values( ) );
+ }
+
+ /**
+ * Returns a list of controllers or groups of a
+ * particular type. The following example will return a
+ * list of registered Bangs only:
+ *
+ * List list = controlP5.getAll(Bang.class);
+ * println(list);
+ * for(Bang b:list) {
+ * b.setColorForeground(color(255,255,0));
+ * }
+ *
Here the foreground color of all Bangs
+ * is changed to yellow.
+ *
+ * @param
+ * @param theClass A class that extends
+ * ControllerInterface, which applies to all
+ * Controllers and ControllerGroups
+ * @return List
+ */
+ @SuppressWarnings( "unchecked" ) public < T > List< T > getAll( Class< T > theClass ) {
+ ArrayList< T > l = new ArrayList< T >( );
+ for ( ControllerInterface ci : _myControllerMap.values( ) ) {
+ if ( ci.getClass( ) == theClass || ci.getClass( ).getSuperclass( ) == theClass ) {
+ l.add( ( T ) ci );
+ }
+ }
+ return l;
+ }
+
+ protected void deactivateControllers( ) {
+ for ( Textfield t : getAll( Textfield.class ) ) {
+ t.setFocus( false );
+ }
+ }
+
+ private String checkAddress( String theName ) {
+ if ( !theName.startsWith( "/" ) ) {
+ return "/" + theName;
+ }
+ return theName;
+ }
+
+ /**
+ * @excude
+ */
+ public void printControllerMap( ) {
+ List< String > strs = new ArrayList< String >( );
+ System.out.println( "============================================" );
+ for ( Iterator it = _myControllerMap.entrySet( ).iterator( ) ; it.hasNext( ) ; ) {
+ Map.Entry entry = ( Map.Entry ) it.next( );
+ Object key = entry.getKey( );
+ Object value = entry.getValue( );
+ strs.add( key + " = " + value );
+ }
+ Collections.sort( strs );
+ for ( String s : strs ) {
+ System.out.println( s );
+ }
+ System.out.println( "============================================" );
+ }
+
+ /**
+ * removes a controller by instance.
+ *
+ * TODO Fix this. this only removes the reference to a
+ * controller from the controller map but not its
+ * children, fatal for controller groups!
+ *
+ * @param theController ControllerInterface
+ */
+ protected void remove( ControllerInterface< ? > theController ) {
+ _myControllerMap.remove( theController.getAddress( ) );
+ }
+
+ /**
+ * removes a controlP5 element such as a controller,
+ * group, or tab by name.
+ *
+ * @param theString String
+ */
+ public void remove( String theName ) {
+ String address = checkAddress( theName );
+
+ if ( getController( address ) != null ) {
+ getController( address ).remove( );
+ }
+
+ if ( getGroup( address ) != null ) {
+ getGroup( address ).remove( );
+ }
+
+ for ( int i = 0 ; i < controlWindow.getTabs( ).size( ) ; i++ ) {
+ if ( controlWindow.getTabs( ).get( i ).getAddress( ).equals( address ) ) {
+ controlWindow.getTabs( ).get( i ).remove( );
+ }
+ }
+ _myControllerMap.remove( address );
+ }
+
+ public ControllerInterface< ? > get( String theName ) {
+ String address = checkAddress( theName );
+ if ( _myControllerMap.containsKey( address ) ) {
+ return _myControllerMap.get( address );
+ }
+ return null;
+ }
+
+ public ControllerInterface< ? > get( Object theObject , String theName ) {
+ return getController( theName , theObject );
+ }
+
+ public < C > C get( Class< C > theClass , String theName ) {
+ for ( ControllerInterface< ? > ci : _myControllerMap.values( ) ) {
+ if ( ci.getClass( ) == theClass || ci.getClass( ).getSuperclass( ) == theClass ) {
+ return ( C ) get( theName );
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @exclude
+ * @see ControlP5#getAll(Class)
+ * @return List
+ */
+ @ControlP5.Invisible public List< ControllerInterface< ? >> getList( ) {
+ LinkedList< ControllerInterface< ? >> l = new LinkedList< ControllerInterface< ? >>( );
+ l.addAll( controlWindow.getTabs( ).get( ) );
+ l.addAll( getAll( ) );
+ return l;
+ }
+
+ public float getValue( String theIndex ) {
+ Controller c = getController( theIndex );
+ if ( c != null ) {
+ return c.getValue( );
+ }
+ return Float.NaN;
+ }
+
+ public Controller< ? > getController( String theName ) {
+ String address = checkAddress( theName );
+ if ( _myControllerMap.containsKey( address ) ) {
+ if ( _myControllerMap.get( address ) instanceof Controller< ? > ) {
+ return ( Controller< ? > ) _myControllerMap.get( address );
+ }
+ }
+ return null;
+ }
+
+ public ControllerGroup< ? > getGroup( String theGroupName ) {
+ String address = checkAddress( theGroupName );
+ if ( _myControllerMap.containsKey( address ) ) {
+ if ( _myControllerMap.get( address ) instanceof ControllerGroup< ? > ) {
+ return ( ControllerGroup< ? > ) _myControllerMap.get( address );
+ }
+ }
+ return null;
+ }
+
+ private boolean checkName( String theName ) {
+ if ( _myControllerMap.containsKey( checkAddress( theName ) ) ) {
+ ControlP5.logger( ).warning( "Controller with name \"" + theName + "\" already exists. overwriting reference of existing controller." );
+ return true;
+ }
+ return false;
+ }
+
+ public void moveControllersForObject( Object theObject , ControllerGroup< ? > theGroup ) {
+ if ( _myObjectToControllerMap.containsKey( theObject ) ) {
+ ArrayList< ControllerInterface< ? >> cs = _myObjectToControllerMap.get( theObject );
+ for ( ControllerInterface< ? > c : cs ) {
+ ( ( Controller< ? > ) c ).moveTo( theGroup );
+ }
+ }
+ }
+
+ public void move( Object theObject , ControllerGroup< ? > theGroup ) {
+ moveControllersForObject( theObject , theGroup );
+ }
+
+ protected void clear( ) {
+ controlWindow.clear( );
+ _myControllerMap.clear( );
+ }
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible public void pre( ) {
+ Iterator< FieldChangedListener > itr = _myFieldChangedListenerMap.values( ).iterator( );
+ while ( itr.hasNext( ) ) {
+ itr.next( ).update( );
+ }
+ }
+
+ /**
+ * call draw() from your program when autoDraw is
+ * disabled.
+ *
+ * @exclude
+ */
+ @ControlP5.Invisible public void draw( ) {
+ if ( !isAutoDraw( ) ) {
+ controlWindow.draw( );
+ }
+ }
+
+ /**
+ * convenience method to access the main window
+ * (ControlWindow class).
+ */
+ public ControlWindow getWindow( ) {
+ return getWindow( papplet );
+ }
+
+ public void mouseEvent( MouseEvent theMouseEvent ) {
+ getWindow( ).mouseEvent( theMouseEvent );
+ }
+
+ public void keyEvent( KeyEvent theKeyEvent ) {
+ getWindow( ).keyEvent( theKeyEvent );
+ }
+
+ /**
+ * convenience method to access the pointer of the main
+ * control window.
+ */
+ public Pointer getPointer( ) {
+ return getWindow( papplet ).getPointer( );
+ }
+
+ /**
+ * convenience method to check if the mouse (or pointer)
+ * is hovering over any controller. only applies to the
+ * main window. To receive the mouseover information for
+ * a ControlWindow use
+ * getWindow(nameOfWindow).isMouseOver();
+ */
+ public boolean isMouseOver( ) {
+ return getWindow( papplet ).isMouseOver( );
+ }
+
+ /**
+ * convenience method to check if the mouse (or pointer)
+ * is hovering over a specific controller. only applies
+ * to the main window. To receive the mouseover
+ * information for a ControlWindow use
+ * getWindow(nameOfWindow
+ * ).isMouseOver(ControllerInterface>);
+ */
+ public boolean isMouseOver( ControllerInterface< ? > theController ) {
+ return getWindow( papplet ).isMouseOver( theController );
+ }
+
+ /**
+ * convenience method to check if the mouse (or pointer)
+ * is hovering over a specific controller. only applies
+ * to the main window. To receive the mouseover
+ * information for a ControlWindow use
+ * getWindow(nameOfWindow).getMouseOverList();
+ */
+ public List< ControllerInterface< ? >> getMouseOverList( ) {
+ return getWindow( papplet ).getMouseOverList( );
+ }
+
+ public ControlWindow getWindow( PApplet theApplet ) {
+ if ( theApplet.equals( papplet ) ) {
+ return controlWindow;
+ }
+ // TODO !!! check for another window in case
+ // theApplet is of type
+ // PAppletWindow.
+ return controlWindow;
+ }
+
+ /**
+ * adds a Canvas to the default sketch window.
+ *
+ * @see Canvas
+ */
+ public ControlP5 addCanvas( Canvas theCanvas ) {
+ getWindow( ).addCanvas( theCanvas );
+ return this;
+ }
+
+ public ControlP5 removeCanvas( Canvas theCanvas ) {
+ getWindow( ).removeCanvas( theCanvas );
+ return this;
+ }
+
+ public ControlP5 setColor( CColor theColor ) {
+ setColorBackground( theColor.getBackground( ) );
+ setColorForeground( theColor.getForeground( ) );
+ setColorActive( theColor.getActive( ) );
+ setColorCaptionLabel( theColor.getCaptionLabel( ) );
+ setColorValueLabel( theColor.getValueLabel( ) );
+ return this;
+ }
+
+ public static CColor getColor( ) {
+ return color;
+ }
+
+ /**
+ * sets the active state color of tabs and controllers,
+ * this cascades down to all known controllers.
+ */
+ public ControlP5 setColorActive( int theColor ) {
+ color.setActive( theColor );
+ controlWindow.setColorActive( theColor );
+ return this;
+ }
+
+ /**
+ * sets the foreground color of tabs and controllers,
+ * this cascades down to all known controllers.
+ */
+ public ControlP5 setColorForeground( int theColor ) {
+ color.setForeground( theColor );
+ controlWindow.setColorForeground( theColor );
+ return this;
+ }
+
+ /**
+ * sets the background color of tabs and controllers,
+ * this cascades down to all known controllers.
+ */
+ public ControlP5 setColorBackground( int theColor ) {
+ color.setBackground( theColor );
+ controlWindow.setColorBackground( theColor );
+ return this;
+ }
+
+ /**
+ * sets the label color of tabs and controllers, this
+ * cascades down to all known controllers.
+ */
+ public ControlP5 setColorCaptionLabel( int theColor ) {
+ color.setCaptionLabel( theColor );
+ controlWindow.setColorLabel( theColor );
+ return this;
+ }
+
+ /**
+ * sets the value color of controllers, this cascades
+ * down to all known controllers.
+ */
+ public ControlP5 setColorValueLabel( int theColor ) {
+ color.setValueLabel( theColor );
+ controlWindow.setColorValue( theColor );
+ return this;
+ }
+
+ public ControlP5 setBackground( int theColor ) {
+ controlWindow.setBackground( theColor );
+ return this;
+ }
+
+ /**
+ * Enables/disables Controllers to be moved around when
+ * ALT-key is down and mouse is dragged. Other key
+ * events are still available like ALT-h to hide and
+ * show the controllers To disable all key events, use
+ * disableKeys()
+ */
+ public ControlP5 setMoveable( boolean theFlag ) {
+ isMoveable = theFlag;
+ return this;
+ }
+
+ /**
+ * Checks if controllers are generally moveable
+ *
+ */
+ public boolean isMoveable( ) {
+ return isMoveable;
+ }
+
+ /**
+ * Saves the current values of controllers into a
+ * default properties file
+ *
+ * @see ControllerProperties
+ */
+ public boolean saveProperties( ) {
+ return _myProperties.save( );
+ }
+
+ /**
+ * Saves the current values of controllers into a file,
+ * the filepath is given by parameter theFilePath.
+ *
+ * @see ControllerProperties
+ */
+ public boolean saveProperties( String theFilePath ) {
+ return _myProperties.saveAs( theFilePath );
+ }
+
+ public boolean saveProperties( String theFilePath , String ... theSets ) {
+ return _myProperties.saveAs( theFilePath , theSets );
+ }
+
+ /**
+ * Loads properties from a default properties file and
+ * changes values of controllers accordingly.
+ *
+ * @see ControllerProperties
+ * @return
+ */
+ public boolean loadProperties( ) {
+ return _myProperties.load( );
+ }
+
+ /**
+ * Loads properties from a properties file and changes
+ * the values of controllers accordingly, the filepath
+ * is given by parameter theFilePath.
+ *
+ * @param theFilePath
+ * @return
+ */
+ public boolean loadProperties( final String theFilePath ) {
+ String path = theFilePath.endsWith( _myProperties.format.getExtension( ) ) ? theFilePath : theFilePath + "." + _myProperties.format.getExtension( );
+ path = checkPropertiesPath( path );
+ File f = new File( path);
+
+ if ( f.exists( ) ) {
+ return _myProperties.load( path );
+ }
+ logger.info( "Properties File " + path + " does not exist." );
+ return false;
+ }
+
+ String checkPropertiesPath( String theFilePath ) {
+ theFilePath = ( theFilePath.startsWith( "/" ) || theFilePath.startsWith( "." ) ) ? theFilePath : papplet.sketchPath( theFilePath );
+ return theFilePath;
+ }
+
+ /**
+ * @exclude
+ * @param theFilePath
+ * @return
+ */
+ @ControlP5.Invisible public boolean loadLayout( String theFilePath ) {
+ theFilePath = checkPropertiesPath( theFilePath );
+ File f = new File( theFilePath );
+ if ( f.exists( ) ) {
+ getLayout( ).load( theFilePath );
+ return true;
+ }
+ logger.info( "Layout File " + theFilePath + " does not exist." );
+ return false;
+ }
+
+ /**
+ * @exclude
+ * @param theFilePath
+ */
+ public void saveLayout( String theFilePath ) {
+ getLayout( ).save( theFilePath );
+ }
+
+ /**
+ * Returns the current version of controlP5
+ *
+ * @return String
+ */
+ public String version( ) {
+ return VERSION;
+ }
+
+ /**
+ * shows all controllers and tabs in your sketch.
+ *
+ * @see ControlP5#isVisible()
+ * @see ControlP5#hide()
+ */
+
+ public void show( ) {
+ controlWindow.show( );
+ }
+
+ public ControlP5 setBroadcast( boolean theValue ) {
+ _myControlBroadcaster.broadcast = theValue;
+ return this;
+ }
+
+ /**
+ * returns true or false according to the current
+ * visibility flag.
+ *
+ * @see ControlP5#show()
+ * @see ControlP5#hide()
+ */
+ public boolean isVisible( ) {
+ return controlWindow.isVisible( );
+ }
+
+ public ControlP5 setVisible( boolean b ) {
+ if ( b ) {
+ show( );
+ } else {
+ hide( );
+ }
+ return this;
+ }
+
+ /**
+ * hide all controllers and tabs inside your sketch
+ * window.
+ *
+ * @see ControlP5#show()
+ * @see ControlP5#isVisible()
+ */
+ public void hide( ) {
+ controlWindow.hide( );
+ }
+
+ /**
+ * forces all controllers to update.
+ *
+ * @see ControlP5#isUpdate()
+ * @see ControlP5#setUpdate()
+ */
+ public void update( ) {
+ controlWindow.update( );
+ }
+
+ /**
+ * checks if automatic updates are enabled. By default
+ * this is true.
+ *
+ * @see ControlP5#update()
+ * @see ControlP5#setUpdate(boolean)
+ * @return
+ */
+ public boolean isUpdate( ) {
+ return isUpdate;
+ }
+
+ /**
+ * changes the update behavior according to parameter
+ * theFlag
+ *
+ * @see ControlP5#update()
+ * @see ControlP5#isUpdate()
+ * @param theFlag
+ */
+ public void setUpdate( boolean theFlag ) {
+ isUpdate = theFlag;
+ controlWindow.setUpdate( theFlag );
+ }
+
+ public boolean setFont( ControlFont theControlFont ) {
+ controlFont = theControlFont;
+ isControlFont = true;
+ updateFont( controlFont );
+ return isControlFont;
+ }
+
+ public boolean setFont( PFont thePFont , int theFontSize ) {
+ controlFont = new ControlFont( thePFont , theFontSize );
+ isControlFont = true;
+ updateFont( controlFont );
+ return isControlFont;
+ }
+
+ public boolean setFont( PFont thePFont ) {
+ controlFont = new ControlFont( thePFont );
+ isControlFont = true;
+ updateFont( controlFont );
+ return isControlFont;
+ }
+
+ protected void updateFont( ControlFont theControlFont ) {
+ controlWindow.updateFont( theControlFont );
+ }
+
+ public ControlFont getFont( ) {
+ return controlFont;
+ }
+
+ /**
+ * disables shortcuts such as alt-h for hiding/showing
+ * controllers
+ *
+ */
+ public void disableShortcuts( ) {
+ isShortcuts = false;
+ }
+
+ public boolean isShortcuts( ) {
+ return isShortcuts;
+ }
+
+ /**
+ * enables shortcuts.
+ */
+ public void enableShortcuts( ) {
+ isShortcuts = true;
+ }
+
+ public Tooltip getTooltip( ) {
+ return _myTooltip;
+ }
+
+ public void setTooltip( Tooltip theTooltip ) {
+ _myTooltip = theTooltip;
+ }
+
+ public void setMouseWheelRotation( int theRotation ) {
+ getWindow( ).setMouseWheelRotation( theRotation );
+ }
+
+ /**
+ * cp5.begin() and cp5.end() are mechanisms to
+ * auto-layout controllers, see the ControlP5beginEnd
+ * example.
+ */
+ public ControllerGroup< ? > begin( ) {
+ // TODO replace controlWindow.tab("default") with
+ // controlWindow.tabs().get(1);
+ return begin( controlWindow.getTab( "default" ) );
+ }
+
+ public ControllerGroup< ? > begin( ControllerGroup< ? > theGroup ) {
+ setCurrentPointer( theGroup );
+ return theGroup;
+ }
+
+ public ControllerGroup< ? > begin( int theX , int theY ) {
+ // TODO replace controlWindow.tab("default") with
+ // controlWindow.tabs().get(1);
+ return begin( controlWindow.getTab( "default" ) , theX , theY );
+ }
+
+ public ControllerGroup< ? > begin( ControllerGroup< ? > theGroup , int theX , int theY ) {
+ setCurrentPointer( theGroup );
+ ControllerGroup.set( theGroup.autoPosition , theX , theY );
+ theGroup.autoPositionOffsetX = theX;
+ return theGroup;
+ }
+
+ public ControllerGroup< ? > begin( ControlWindow theWindow ) {
+ return begin( theWindow.getTab( "default" ) );
+ }
+
+ public ControllerGroup< ? > begin( ControlWindow theWindow , int theX , int theY ) {
+ return begin( theWindow.getTab( "default" ) , theX , theY );
+ }
+
+ public ControllerGroup< ? > end( ControllerGroup< ? > theGroup ) {
+ releaseCurrentPointer( theGroup );
+ return theGroup;
+ }
+
+ /**
+ * cp5.begin() and cp5.end() are mechanisms to
+ * auto-layout controllers, see the ControlP5beginEnd
+ * example.
+ */
+ public ControllerGroup< ? > end( ) {
+ return end( controlWindow.getTab( "default" ) );
+ }
+
+ public void addPositionTo( int theX , int theY , List< ControllerInterface< ? >> theControllers ) {
+ float[] v = new float[] { theX , theY };
+ for ( ControllerInterface< ? > c : theControllers ) {
+ float[] v1 = new float[ 2 ];
+ Controller.set( v1 , Controller.x( c.getPosition( ) ) , Controller.y( c.getPosition( ) ) );
+ c.setPosition( Controller.x( v ) + Controller.x( v1 ) , Controller.y( v ) + Controller.y( v1 ) );
+ }
+ }
+
+ public void addPositionTo( int theX , int theY , ControllerInterface< ? > ... theControllers ) {
+ addPositionTo( theX , theY , Arrays.asList( theControllers ) );
+ }
+
+ /**
+ * disposes and clears all controlP5 elements. When
+ * running in applet mode, opening new tabs or switching
+ * to another tab causes the applet to call dispose().
+ * therefore dispose() is disabled when running ing
+ * applet mode. TODO implement better dispose handling
+ * for applets.
+ *
+ * @exclude
+ */
+ public void dispose( ) {
+ if ( !isApplet ) {
+ clear( );
+ }
+ }
+
+ /* static helper functions including Object-to-Type
+ * conversions, invokes */
+
+ static public Object invoke( final Object theObject , final String theMember , final Object ... theParams ) {
+ return invoke( theObject , theObject.getClass( ) , theMember , theParams );
+ }
+
+ static public Object invoke( final Object theObject , final Class< ? > theClass , final String theMember , final Object ... theParams ) {
+ if ( theClass == null ) {
+ return null;
+ }
+ Class[] cs = new Class[ theParams.length ];
+
+ for ( int i = 0 ; i < theParams.length ; i++ ) {
+ Class c = theParams[ i ].getClass( );
+ cs[ i ] = classmap.containsKey( c ) ? classmap.get( c ) : c;
+ }
+ try {
+ final Field f = theClass.getDeclaredField( theMember );
+ /* TODO check super */
+ f.setAccessible( true );
+ Object o = theParams[ 0 ];
+ Class cf = o.getClass( );
+ if ( cf.equals( Integer.class ) ) {
+ f.setInt( theObject , i( o ) );
+ } else if ( cf.equals( Float.class ) ) {
+ f.setFloat( theObject , f( o ) );
+ } else if ( cf.equals( Long.class ) ) {
+ f.setLong( theObject , l( o ) );
+ } else if ( cf.equals( Double.class ) ) {
+ f.setDouble( theObject , d( o ) );
+ } else if ( cf.equals( Boolean.class ) ) {
+ f.setBoolean( theObject , b( o ) );
+ } else if ( cf.equals( Character.class ) ) {
+ f.setChar( theObject , ( char ) i( o ) );
+ } else {
+ f.set( theObject , o );
+ }
+ } catch ( NoSuchFieldException e1 ) {
+ try {
+ final Method m = theClass.getDeclaredMethod( theMember , cs );
+ m.setAccessible( true );
+ try {
+ return m.invoke( theObject , theParams );
+ } catch ( IllegalArgumentException e ) {
+ System.err.println( e );
+ } catch ( IllegalAccessException e ) {
+ System.err.println( e );
+ } catch ( InvocationTargetException e ) {
+ System.err.println( e );
+ }
+
+ } catch ( SecurityException e ) {
+ System.err.println( e );
+ } catch ( NoSuchMethodException e ) {
+ invoke( theObject , theClass.getSuperclass( ) , theMember , theParams );
+ }
+ } catch ( IllegalArgumentException e ) {
+ System.err.println( e );
+ } catch ( IllegalAccessException e ) {
+ System.err.println( e );
+ }
+ return null;
+ }
+
+ static public boolean b( Object o ) {
+ return b( o , false );
+ }
+
+ static public boolean b( Object o , boolean theDefault ) {
+ return ( o instanceof Boolean ) ? ( ( Boolean ) o ).booleanValue( ) : ( o instanceof Number ) ? ((Number) o).intValue() != 0 : theDefault;
+ }
+
+ static public boolean b( String o ) {
+ return b( o , false );
+ }
+
+ static public boolean b( String o , boolean theDefault ) {
+ return o.equalsIgnoreCase("true") || theDefault;
+ }
+
+ static public int i( Object o ) {
+ return i( o , Integer.MIN_VALUE );
+ }
+
+ static public int i( Object o , int theDefault ) {
+ return ( o instanceof Number ) ? ( ( Number ) o ).intValue( ) : ( o instanceof String ) ? i( s( o ) ) : theDefault;
+ }
+
+ static public int i( String o ) {
+ return i( o , Integer.MIN_VALUE );
+ }
+
+ static public int i( String o , int theDefault ) {
+ return isNumeric( o ) ? Integer.parseInt( o ) : theDefault;
+ }
+
+ static public float f( Object o ) {
+ return f( o , Float.MIN_VALUE );
+ }
+
+ static public float f( Object o , float theDefault ) {
+ return ( o instanceof Number ) ? ( ( Number ) o ).floatValue( ) : ( o instanceof String ) ? f( s( o ) ) : theDefault;
+ }
+
+ static public float f( String o ) {
+ return f( o , Float.MIN_VALUE );
+ }
+
+ static public float f( String o , float theDefault ) {
+ return isNumeric( o ) ? Float.parseFloat( o ) : theDefault;
+ }
+
+ static public double d( Object o ) {
+ return d( o , Double.MIN_VALUE );
+ }
+
+ static public double d( Object o , double theDefault ) {
+ return ( o instanceof Number ) ? ( ( Number ) o ).doubleValue( ) : ( o instanceof String ) ? d( s( o ) ) : theDefault;
+ }
+
+ static public double d( String o ) {
+ return d( o , Double.MIN_VALUE );
+ }
+
+ static public double d( String o , double theDefault ) {
+ return isNumeric( o ) ? Double.parseDouble( o ) : theDefault;
+ }
+
+ static public long l( Object o ) {
+ return l( o , Long.MIN_VALUE );
+ }
+
+ static public long l( Object o , long theDefault ) {
+ return ( o instanceof Number ) ? ( ( Number ) o ).longValue( ) : ( o instanceof String ) ? l( s( o ) ) : theDefault;
+ }
+
+ static public String s( Object o ) {
+ return ( o != null ) ? o.toString( ) : "";
+ }
+
+ static public String s( Object o , String theDefault ) {
+ return ( o != null ) ? o.toString( ) : theDefault;
+ }
+
+ static public boolean isNumeric( Object o ) {
+ return isNumeric( o.toString( ) );
+ }
+
+ static public boolean isNumeric( String str ) {
+ return str.matches( "(-|\\+)?\\d+(\\.\\d+)?" );
+ }
+
+ static public List toList( final Object ... args ) {
+ List l = new ArrayList( );
+ Collections.addAll( l , args );
+ return l;
+ }
+
+ static public List toList( Object o ) {
+ return o != null ? ( o instanceof List ) ? ( List ) o : ( o instanceof String ) ? toList( o.toString( ) ) : Collections.EMPTY_LIST : Collections.EMPTY_LIST;
+ }
+
+ static public Map toMap( final String s ) {
+ /* similar to mapFrom(Object ... args) but with type
+ * (Number,String) sensitivity */
+ String[] arr = s.trim( ).split( delimiter );
+ Map m = new LinkedHashMap( );
+ if ( arr.length % 2 == 0 ) {
+ for ( int i = 0 ; i < arr.length ; i += 2 ) {
+ String s1 = arr[ i + 1 ];
+ m.put( arr[ i ] , isNumeric( s1 ) ? s1.indexOf( "." ) == -1 ? i( s1 ) : f( s1 ) : s1 );
+ }
+ }
+ return m;
+ }
+
+ static public Map toMap( Object o ) {
+ return o != null ? ( o instanceof Map ) ? ( Map ) o : Collections.EMPTY_MAP : Collections.EMPTY_MAP;
+ }
+
+ static public Map toMap( final Object ... args ) {
+ Map m = new LinkedHashMap( );
+ if ( args.length % 2 == 0 ) {
+ for ( int i = 0 ; i < args.length ; i += 2 ) {
+ m.put( args[ i ] , args[ i + 1 ] );
+ }
+ }
+ return m;
+ }
+
+ static public String s( String o ) {
+ return ( o != null ) ? o : "";
+ }
+
+ static Map< Class< ? > , Class< ? > > classmap = new HashMap< Class< ? > , Class< ? > >( ) {
+ {
+ put( Integer.class , int.class );
+ put( Float.class , float.class );
+ put( Double.class , double.class );
+ put( Boolean.class , boolean.class );
+ put( Character.class , char.class );
+ put( Long.class , long.class );
+ }
+ };
+
+ static public void sleep( long theMillis ) {
+ try {
+ Thread.sleep( theMillis );
+ } catch ( Exception e ) {
+
+ }
+ }
+
+ static public String timestamp( ) {
+ return new SimpleDateFormat( "yyyyMMdd-HHmmss" ).format( new Date( ) );
+ }
+
+ /* add Objects with Annotation */
+
+ public static Logger logger( ) {
+ return logger;
+ }
+
+ @Retention( RetentionPolicy.RUNTIME ) @interface Invisible {
+ }
+
+ @Retention( RetentionPolicy.RUNTIME ) @interface Layout {
+ }
+
+}
\ No newline at end of file
diff --git a/controlP5/ControlP5Base.java b/controlP5/ControlP5Base.java
new file mode 100755
index 0000000..9c6b47e
--- /dev/null
+++ b/controlP5/ControlP5Base.java
@@ -0,0 +1,794 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import processing.core.PApplet;
+import processing.event.Event;
+
+import static main.java.src2.main.java.controlP5.controlP5.Controller.*;
+
+/**
+ * The ControlP5Base supports the ControlP5 class and
+ * implements all adder methods to add controllers to
+ * controlP5.
+ */
+@SuppressWarnings( { "unchecked" , "rawtypes" } ) public class ControlP5Base extends ControlP5Legacy implements ControlP5Constants {
+
+ protected ControlP5 cp5;
+ protected ControllerProperties _myProperties;
+ private ControllerAutomator _myAutomator;
+ protected Map< Object , ArrayList< ControllerInterface< ? >>> _myObjectToControllerMap = new HashMap< Object , ArrayList< ControllerInterface< ? >>>( );
+ protected Map< String , FieldChangedListener > _myFieldChangedListenerMap = new HashMap< String , FieldChangedListener >( );
+ protected Map< KeyCode , List< ControlKey >> keymap = new HashMap< KeyCode , List< ControlKey >>( );
+ protected ControllerGroup< ? > currentGroupPointer;
+ protected boolean isCurrentGroupPointerClosed = true;
+ protected int autoDirection = ControlP5Constants.HORIZONTAL;
+
+ public Tab getDefaultTab( ) {
+ return ( Tab ) cp5.controlWindow.getTabs( ).get( 1 );
+ }
+
+ protected void init( ControlP5 theControlP5 ) {
+ super.init( theControlP5 );
+ cp5 = theControlP5;
+ _myProperties = new ControllerProperties( cp5 );
+ _myAutomator = new ControllerAutomator( cp5 );
+ currentGroupPointer = cp5.controlWindow.getTab( "default" );
+ }
+
+ public ControllerLayout getLayout( ) {
+ return new ControllerLayout( cp5 );
+ }
+
+ public Tab addTab( String theName ) {
+ for ( int i = 0 ; i < cp5.getWindow( ).getTabs( ).size( ) ; i++ ) {
+ if ( cp5.getWindow( ).getTabs( ).get( i ).getName( ).equals( theName ) ) {
+ return ( Tab ) cp5.getWindow( ).getTabs( ).get( i );
+ }
+ }
+ Tab myTab = new Tab( cp5 , cp5.getWindow( ) , theName );
+ cp5.getWindow( ).getTabs( ).add( myTab );
+ return myTab;
+ }
+
+ /**
+ * A Bang triggers an event without passing a value.
+ */
+ public Bang addBang( final String theName ) {
+ return addBang( null , theName );
+ }
+
+ public Bang addBang( final Object theObject , final String theName ) {
+ return addBang( theObject , theObject != null ? theObject.toString( ) : "" , theName );
+ }
+
+ /**
+ * Triggers an event and passing a value.
+ */
+
+ public Button addButton( String theName ) {
+ return addButton( null , theName );
+ }
+
+ public Button addButton( final Object theObject , final String theName ) {
+ return addButton( theObject , theObject != null ? theObject.toString( ) : "" , theName , 1 );
+ }
+
+ public ButtonBar addButtonBar( String theName ) {
+ return addButtonBar( null , theName );
+ }
+
+ public ButtonBar addButtonBar( final Object theObject , final String theName ) {
+ return addButtonBar( theObject , theObject != null ? theObject.toString( ) : "" , theName , 1 );
+ }
+
+ /**
+ * Toggles a boolean field or passes a value when
+ * triggered.
+ */
+ public Toggle addToggle( final Object theObject , final String theName ) {
+ return addToggle( theObject , theObject != null ? theObject.toString( ) : "" , theName );
+ }
+
+ public Toggle addToggle( final String theName ) {
+ return addToggle( null , theName );
+ }
+
+ /**
+ * Adds a default slider with a default width of 100 and
+ * height of 10. the default value range is from 0-100.
+ *
+ * By default it will be added to the default tab of the
+ * main window. Sliders can be arranged vertically and
+ * horizontally depending on their width and height. The
+ * look of a sliders control can either be a bar or a
+ * handle. you can add tickmarks to a slider or use the
+ * default free-control setting. A slider can be
+ * controller by mouse click, drag or mouse-wheel.
+ */
+ public Slider addSlider( String theName ) {
+ return addSlider( null , theName );
+ }
+
+ public Slider addSlider( Object theObject , String theName ) {
+ return addSlider( theObject , theObject != null ? theObject.toString( ) : "" , theName );
+ }
+
+ /**
+ * A range controller, a slider that allows control on
+ * both ends of the slider.
+ */
+ public Range addRange( final String theName ) {
+ return addRange( theName , 0 , 100 , 0 , 100 , 0 , 0 , 100 , 10 );
+ }
+
+ public Range addRange( final Object theObject , final String theName ) {
+ return addRange( theObject , theObject != null ? theObject.toString( ) : "" , theName , 0 , 100 , 0 , 100 , 0 , 0 , 100 , 10 );
+ }
+
+ public Numberbox addNumberbox( String theName ) {
+ return addNumberbox( null , theName );
+ }
+
+ public Numberbox addNumberbox( Object theObject , String theName ) {
+ return addNumberbox( theObject , theObject != null ? theObject.toString( ) : "" , theName );
+ }
+
+ /**
+ * Knobs can use limited and endless revolutions, custom
+ * angles and starting points. There are 2 control areas
+ * for a knob, an area closer to the edge allows
+ * 'click-and-adjust' control, a click and drag action
+ * at the inside allows to gradually change the value of
+ * a know when dragged. A knob can be controller by
+ * mouse click, drag or mouse-wheel.
+ */
+ public Knob addKnob( String theName ) {
+ return addKnob( theName , 0 , 100 );
+ }
+
+ public Knob addKnob( Object theObject , String theName ) {
+ return addKnob( theObject , theObject != null ? theObject.toString( ) : "" , theName );
+ }
+
+ /**
+ * Matrix is a 2-D matrix controller using toggle
+ * controllers in a rows and a columns setup. useful for
+ * software drum machines.
+ */
+
+ public Matrix addMatrix( final String theName ) {
+ return addMatrix( theName , 10 , 10 , 0 , 0 , 100 , 100 );
+ }
+
+ public Matrix addMatrix( final Object theObject , final String theName ) {
+ return addMatrix( theObject , theObject != null ? theObject.toString( ) : "" , theName , 10 , 10 , 0 , 0 , 100 , 100 );
+ }
+
+ /**
+ * Adds a 2D slider to controlP5. A 2D slider is a 2D
+ * area with 1 cursor returning its xy coordinates.
+ */
+ public Slider2D addSlider2D( final String theName ) {
+ return addSlider2D( null , theName );
+ }
+
+ public Slider2D addSlider2D( final Object theObject , final String theName ) {
+ return addSlider2D( theObject , theObject != null ? theObject.toString( ) : "" , theName , 0 , 100 , 0 , 100 , 0 , 0 , 0 , 0 , 100 , 100 );
+ }
+
+ public Textlabel addTextlabel( final String theName ) {
+ return addTextlabel( theName , "" , 0 , 0 );
+ }
+
+ /**
+ * A Textarea is a label without any controller
+ * functionality and can be used to leave notes,
+ * headlines, etc when extending the dedicated area of
+ * the Textrea, a scrollbar is added on the right.
+ */
+ public Textarea addTextarea( final String theName ) {
+ return addTextarea( theName , "" , 0 , 0 , 200 , 100 );
+ }
+
+ // TODO
+ // addTextarea theObject
+
+ /**
+ * A Textfield allows single line text input. If text
+ * goes beyond the edges of a Textfield box, the text
+ * will automatically scroll. Use Arrow keys to navigate
+ * back and forth.
+ */
+
+ public Textfield addTextfield( final String theIndex ) {
+ return addTextfield( theIndex , 0 , 0 , 200 , 20 );
+ }
+
+ public Textfield addTextfield( final Object theObject , final String theIndex ) {
+ return addTextfield( theObject , theObject != null ? theObject.toString( ) : "" , theIndex , 0 , 0 , 200 , 20 );
+ }
+
+ /**
+ * Use radio buttons for multiple choice options.
+ */
+ public RadioButton addRadioButton( final String theName ) {
+ return addRadioButton( null , theName );
+ }
+
+ public RadioButton addRadioButton( final Object theObject , final String theName ) {
+ return addRadioButton( theObject , theObject != null ? theObject.toString( ) : "" , theName , 0 , 0 );
+ }
+
+ /**
+ * Use a checkbox for single choice options.
+ */
+ public CheckBox addCheckBox( final String theName ) {
+ return addCheckBox( theName , 0 , 0 );
+ }
+
+ public CheckBox addCheckBox( final Object theObject , final String theName ) {
+ return addCheckBox( theObject , theObject != null ? theObject.toString( ) : "" , theName , 0 , 0 );
+ }
+
+ /**
+ * the ScrollableList replaces the DropwdownList and
+ * ListBox, the type for a ScrollableList can be set
+ * with setType(ControlP5.DROPDOWN | ControlP5.LIST).
+ */
+ public ScrollableList addScrollableList( final String theName ) {
+ return addScrollableList( theName , 0 , 0 , 100 , 200 );
+ }
+
+ public ScrollableList addScrollableList( final Object theObject , String theName ) {
+ return addScrollableList( theObject , theObject != null ? theObject.toString( ) : "" , theName , 0 , 0 , 100 , 100 );
+ }
+
+ /**
+ * Multilist is a tree like menu.
+ */
+ public MultiList addMultiList( final String theName ) {
+ return addMultiList( null , theName );
+ }
+
+ public MultiList addMultiList( final Object theObject , final String theName ) {
+ return addMultiList( theObject , theObject != null ? theObject.toString( ) : "" , theName , 0 , 0 , 100 , 100 );
+ }
+
+ public ColorWheel addColorWheel( final String theName ) {
+ return addColorWheel( null , theName );
+ }
+
+ public ColorWheel addColorWheel( final Object theObject , final String theName ) {
+ return addColorWheel( theObject , theObject != null ? theObject.toString( ) : "" , theName , 0 , 0 , 200 );
+ }
+
+ /**
+ * adds a simple RGBA colorpicker.
+ */
+ public ColorPicker addColorPicker( final String theName ) {
+ return addColorPicker( null , theName );
+ }
+
+ public ColorPicker addColorPicker( final Object theObject , final String theName ) {
+ return addColorPicker( theObject , theObject != null ? theObject.toString( ) : "" , theName , 0 , 0 , 255 , 10 );
+ }
+
+ public Println addConsole( Textarea theTextarea ) {
+ return new Println( theTextarea );
+ }
+
+ /**
+ * returns the current framerate of the running sketch.
+ */
+ public FrameRate addFrameRate( ) {
+ FrameRate myController = new FrameRate( cp5 , ( Tab ) cp5.controlWindow.getTabs( ).get( 1 ) , "-" , 0 , 4 );
+ cp5.register( null , "" , myController );
+ return myController;
+ }
+
+ /**
+ * adds chart support to display float array based data.
+ */
+ public Chart addChart( String theName ) {
+ return addChart( theName , 0 , 0 , 200 , 100 );
+ }
+
+ /**
+ * A controller group can be used to group controllers
+ * for a better organization of single controllers.
+ */
+
+ public Group addGroup( String theName ) {
+ return addGroup( theName , 0 , 0 );
+ }
+
+ public Group addGroup( final Object theObject , final String theName ) {
+ return addGroup( theObject , theObject != null ? theObject.toString( ) : "" , theName );
+ }
+
+ public Accordion addAccordion( final String theName ) {
+ return addAccordion( null , "" , theName );
+ }
+
+ public Accordion addAccordion( final Object theObject , final String theName ) {
+ return addAccordion( theObject , theObject != null ? theObject.toString( ) : "" , theName );
+ }
+
+ protected void setCurrentPointer( ControllerGroup< ? > theGroup ) {
+ currentGroupPointer = theGroup;
+ isCurrentGroupPointerClosed = false;
+ }
+
+ protected void releaseCurrentPointer( ControllerGroup< ? > theGroup ) {
+ if (!isCurrentGroupPointerClosed) {
+ currentGroupPointer = theGroup;
+ isCurrentGroupPointerClosed = true;
+ } else {
+ ControlP5.logger( ).warning( "use .end() first before using .begin() again." );
+ }
+ }
+
+ public void setAutoAddDirection( int theDirection ) {
+ if ( theDirection == ControlP5Constants.HORIZONTAL ) {
+ autoDirection = ControlP5Constants.HORIZONTAL;
+ return;
+ }
+ autoDirection = ControlP5Constants.VERTICAL;
+ }
+
+ public void setAutoSpacing( ) {
+ set( Controller.autoSpacing , 10 , 10 );
+ }
+
+ public void setAutoSpacing( float theX , float theY ) {
+ set( Controller.autoSpacing , theX , theY );
+ }
+
+ public void setAutoSpacing( float theX , float theY , float theZ ) {
+ setAutoSpacing( theX , theY );
+ }
+
+ @SuppressWarnings( "static-access" ) protected void linebreak( Controller< ? > theController , boolean theFlag , int theW , int theH , float[] theSpacing ) {
+ if ( x( currentGroupPointer.autoPosition ) + x( theController.autoSpacing ) + theW > cp5.papplet.width ) {
+ float x = x( currentGroupPointer.autoPosition ) + currentGroupPointer.autoPositionOffsetX;
+ float y = y( currentGroupPointer.autoPosition ) + currentGroupPointer.tempAutoPositionHeight;
+ set( currentGroupPointer.autoPosition , x , y );
+ currentGroupPointer.tempAutoPositionHeight = 0;
+ Controller.set( theController.position , Controller.x( currentGroupPointer.autoPosition ) , Controller.y( currentGroupPointer.autoPosition ) );
+ theFlag = false;
+ }
+
+ if (theFlag) {
+ float y = y( currentGroupPointer.autoPosition ) + currentGroupPointer.tempAutoPositionHeight;
+ set( currentGroupPointer.autoPosition , currentGroupPointer.autoPositionOffsetX , y );
+ currentGroupPointer.tempAutoPositionHeight = 0;
+
+ } else {
+ if ( theController instanceof Slider ) {
+ float x = x( currentGroupPointer.autoPosition ) + theController.getCaptionLabel( ).getWidth( );
+ float y = y( currentGroupPointer.autoPosition );
+ set( currentGroupPointer.autoPosition , x , y );
+ }
+ float x = x( currentGroupPointer.autoPosition ) + x( theController.autoSpacing ) + theW;
+ float y = y( currentGroupPointer.autoPosition );
+ set( currentGroupPointer.autoPosition , x , y );
+ if ( ( theH + y( theSpacing ) ) > currentGroupPointer.tempAutoPositionHeight ) {
+ currentGroupPointer.tempAutoPositionHeight = theH + y( theSpacing );
+ }
+ }
+ }
+
+ public ControlP5Base addControllersFor( PApplet theApplet ) {
+ addControllersFor( "" , theApplet );
+ return cp5;
+ }
+
+ /**
+ * Adds controllers for a specific object using
+ * annotations.
+ *
+ * Uses a forward slash delimited address, for example:
+ *
+ *
+ * lets say the theAddressSpace parameter is set to
+ * "hello", and the Object (second parameter) contains
+ * an annotated field "x", addControllersFor("hello",
+ * o); will add a controller for field x with address
+ * /hello/x This address can be used with
+ * getController("/hello/x") to access the controller of
+ * that particular Object and field.
+ *
+ */
+ public ControlP5Base addControllersFor( final String theAddressSpace , Object t ) {
+ _myAutomator.addControllersFor( theAddressSpace , t );
+ return cp5;
+ }
+
+ public Object getObjectForController( ControllerInterface theController ) {
+ for ( Iterator it = _myObjectToControllerMap.entrySet( ).iterator( ) ; it.hasNext( ) ; ) {
+ Map.Entry entry = ( Map.Entry ) it.next( );
+ Object key = entry.getKey( );
+ ArrayList< ControllerInterface > value = ( ArrayList< ControllerInterface > ) entry.getValue( );
+ for ( ControllerInterface c : value ) {
+ if ( c.equals( theController ) ) {
+ return key;
+ }
+ }
+ }
+ return null;
+ }
+
+ public ControlP5Base setPosition( int theX , int theY , Object o ) {
+ if ( o != null && _myObjectToControllerMap.containsKey( o ) ) {
+ ArrayList< ControllerInterface< ? >> cs = _myObjectToControllerMap.get( o );
+ for ( ControllerInterface< ? > c : cs ) {
+ int x = ( int ) x( c.getPosition( ) ) + theX;
+ int y = ( int ) y( c.getPosition( ) ) + theY;
+ c.setPosition( x , y );
+ }
+ }
+ return cp5;
+ }
+
+ public ControlP5Base hide( Object theObject ) {
+ if ( theObject != null && _myObjectToControllerMap.containsKey( theObject ) ) {
+ ArrayList< ControllerInterface< ? >> cs = _myObjectToControllerMap.get( theObject );
+ for ( ControllerInterface< ? > c : cs ) {
+ c.hide( );
+ }
+ }
+ return cp5;
+ }
+
+ public ControlP5Base show( Object theObject ) {
+ if ( theObject != null && _myObjectToControllerMap.containsKey( theObject ) ) {
+ ArrayList< ControllerInterface< ? >> cs = _myObjectToControllerMap.get( theObject );
+ for ( ControllerInterface< ? > c : cs ) {
+ c.show( );
+ }
+ }
+ return cp5;
+ }
+
+ /**
+ * for internal use only. use Controller.remove()
+ * instead.
+ *
+ * @param theObject
+ * @return
+ */
+ public ControlP5Base remove( Object theObject ) {
+ if ( theObject != null && _myObjectToControllerMap.containsKey( theObject ) ) {
+ ArrayList< ControllerInterface< ? >> cs = _myObjectToControllerMap.get( theObject );
+ for ( ControllerInterface< ? > c : cs ) {
+ c.remove( );
+ }
+ }
+ return cp5;
+ }
+
+ public ControlP5Base setColor( CColor theColor , Object theObject ) {
+ if ( _myObjectToControllerMap.containsKey( theObject ) ) {
+ ArrayList< ControllerInterface< ? >> cs = _myObjectToControllerMap.get( theObject );
+ for ( ControllerInterface< ? > c : cs ) {
+ c.setColor( theColor );
+ }
+ }
+ return cp5;
+ }
+
+ public ControlP5Base listenTo( String theFieldName , Object theObject ) {
+ String key = theObject.hashCode( ) + String.valueOf(theFieldName.hashCode( ));
+ FieldChangedListener value = new FieldChangedListener( cp5 );
+ value.listenTo( theObject , theFieldName );
+ _myFieldChangedListenerMap.put( key , value );
+ return cp5;
+ }
+
+ public ControlP5Base stopListeningTo( String theFieldName , Object theObject ) {
+ String key = theObject.hashCode( ) + String.valueOf(theFieldName.hashCode( ));
+ _myFieldChangedListenerMap.remove( key );
+ return cp5;
+ }
+
+ public ControlP5Base moveTo( ControllerGroup< ? > theController , Object theObject ) {
+ if ( _myObjectToControllerMap.containsKey( theObject ) ) {
+ ArrayList< ControllerInterface< ? >> cs = _myObjectToControllerMap.get( theObject );
+ for ( ControllerInterface< ? > c : cs ) {
+ c.moveTo( theController );
+ }
+ }
+ return cp5;
+ }
+
+ /* Properties */
+
+ public ControllerProperties getProperties( ) {
+ return _myProperties;
+ }
+
+ public void removeProperty( ControllerInterface< ? > theController ) {
+ _myProperties.remove( theController );
+ }
+
+ /**
+ * prints a list of public methods of requested class
+ * into the console. You can specify patterns that will
+ * print methods found with only these particular
+ * patterns in their name.
+ *
+ * printed Format: returnType methodName(parameter type)
+ */
+ public static void printPublicMethodsFor( Class< ? > theClass , String ... thePattern ) {
+ Set< String > set = getPublicMethodsFor( theClass , true , thePattern );
+ String str = "";
+
+ str += "/**\n";
+ str += "* ControlP5 " + theClass.getSimpleName( ) + "\n";
+ str += "*\n";
+ str += "*\n";
+ str += "* find a list of public methods available for the " + theClass.getSimpleName( ) + " Controller\n";
+ str += "* at the bottom of this sketch.\n";
+ str += "*\n";
+ str += "* by Andreas Schlegel, 2012\n";
+ str += "* www.sojamo.de/libraries/controlp5\n";
+ str += "*\n";
+ str += "*/\n\n";
+ str += "/*\n";
+ str += "a list of all methods available for the " + theClass.getSimpleName( ) + " Controller\n";
+ str += "use ControlP5.printPublicMethodsFor(" + theClass.getSimpleName( ) + ".class);\n";
+ str += "to print the following list into the console.\n\n";
+ str += "You can find further details about class " + theClass.getSimpleName( ) + " in the javadoc.\n\n";
+ str += "Format:\n";
+ str += "ClassName : returnType methodName(parameter type)\n\n\n";
+ for ( String s : set ) {
+ str += s + "\n";
+ }
+ str += "\n\n*/\n\n";
+ ControlP5Legacy.println( str );
+ }
+
+ public static void printPublicMethodsFor( Class< ? > theClass ) {
+ printPublicMethodsFor( theClass , "" );
+ }
+
+ public static Set< String > getPublicMethodsFor( Class< ? > theClass ) {
+ return getPublicMethodsFor( theClass , true , "" );
+ }
+
+ public static Set< String > getPublicMethodsFor( Class< ? > theClass , String ... thePattern ) {
+ return getPublicMethodsFor( theClass , true , thePattern );
+ }
+
+ public static Set< String > getPublicMethodsFor( Class< ? > theClass , boolean theFlag ) {
+ return getPublicMethodsFor( theClass , true , "" );
+ }
+
+ public static Set< String > getPublicMethodsFor( Class< ? > theClass , boolean isSuperclass , String ... thePattern ) {
+ Set< String > s = new TreeSet< String >( );
+
+ Class< ? > c = theClass;
+ while ( c != null ) {
+ for ( Method method : c.getDeclaredMethods( ) ) {
+ if ( !method.isAnnotationPresent( Deprecated.class ) && !method.isAnnotationPresent( ControlP5.Invisible.class ) && method.getModifiers( ) == Modifier.PUBLIC ) {
+ for ( String p : thePattern ) {
+ if ( p.length( ) > 0 ) {
+ if ( !method.getName( ).toLowerCase( ).contains( p.toLowerCase( ) ) ) {
+ continue;
+ }
+ }
+ String params = "";
+ for ( Class< ? > t : method.getParameterTypes( ) ) {
+ params += t.getSimpleName( ) + ", ";
+ }
+ if ( params.length( ) > 0 ) {
+ params = params.substring( 0 , params.length( ) - 2 );
+ }
+ s.add( c.getCanonicalName( ) + " : " + method.getReturnType( ).getSimpleName( ).replace( "Object" , theClass.getSimpleName( ) ) + " " + method.getName( ) + "(" + params + ") " );
+ }
+ }
+ }
+
+ if ( isSuperclass ) {
+ c = c.getSuperclass( );
+ } else {
+ c = null;
+ }
+ }
+ return s;
+ }
+
+ public int getKeyCode( ) {
+ return cp5.getWindow( ).keyCode;
+ }
+
+ public char getKey( ) {
+ return cp5.getWindow( ).key;
+ }
+
+ private char[] fromIntToChar( int ... theChar ) {
+ char[] n = new char[ theChar.length ];
+ for ( int i = 0 ; i < n.length ; i++ ) {
+ if ( theChar[ i ] >= 'a' && theChar[ i ] <= 'z' ) {
+ theChar[ i ] -= 32;
+ }
+ n[ i ] = ( char ) theChar[ i ];
+ }
+ return n;
+ }
+
+ public ControlP5 removeKeyFor( ControlKey theKey , int ... theChar ) {
+ removeKeyFor( theKey , fromIntToChar( theChar ) );
+ return cp5;
+ }
+
+ public ControlP5 mapKeyFor( ControlKey theKey , Object ... os ) {
+ List< Integer > l = new ArrayList< Integer >( );
+ for ( Object o : os ) {
+ if ( o instanceof Integer ) {
+ l.add(( Integer ) o);
+ } else if ( o instanceof Character ) {
+ char c = ( ( Character ) o );
+ if ( c >= 'a' && c <= 'z' ) {
+ c -= 32;
+ }
+ l.add( ( int ) c );
+ }
+ }
+
+ char[] n = new char[ l.size( ) ];
+ for ( int i = 0 ; i < l.size( ) ; i++ ) {
+ n[ i ] = ( char ) ( ( int ) l.get( i ) );
+ }
+
+ KeyCode kc = new KeyCode( n );
+ if ( !keymap.containsKey( kc ) ) {
+ keymap.put( kc , new ArrayList< ControlKey >( ) );
+ }
+ keymap.get( kc ).add( theKey );
+ cp5.enableShortcuts( );
+ return cp5;
+ }
+
+ public ControlP5 removeKeyFor( ControlKey theKey , char ... theChar ) {
+ List< ControlKey > l = keymap.get( new KeyCode( theChar ) );
+ if ( l != null ) {
+ l.remove( theKey );
+ }
+ return cp5;
+ }
+
+ public ControlP5 removeKeysFor( char ... theChar ) {
+ keymap.remove( new KeyCode( theChar ) );
+ return cp5;
+ }
+
+ public ControlP5 removeKeysFor( int ... theChar ) {
+ removeKeysFor( fromIntToChar( theChar ) );
+ return cp5;
+ }
+
+ protected int modifiers;
+
+ public boolean isShiftDown( ) {
+ return ( modifiers & Event.SHIFT & ( cp5.isShortcuts( ) ? -1 : 1 ) ) != 0;
+ }
+
+ public boolean isControlDown( ) {
+ return ( modifiers & Event.CTRL & ( cp5.isShortcuts( ) ? -1 : 1 ) ) != 0;
+ }
+
+ public boolean isMetaDown( ) {
+ return ( modifiers & Event.META & ( cp5.isShortcuts( ) ? -1 : 1 ) ) != 0;
+ }
+
+ public boolean isAltDown( ) {
+ return ( modifiers & Event.ALT & ( cp5.isShortcuts( ) ? -1 : 1 ) ) != 0;
+ }
+
+ static class KeyCode {
+
+ final char[] chars;
+
+ KeyCode( char ... theChars ) {
+ chars = theChars;
+ Arrays.sort( chars );
+ }
+
+ public String toString( ) {
+ String s = "";
+ for ( char c : chars ) {
+ s += c + "(" + ( ( int ) c ) + ") ";
+ }
+ return s;
+ }
+
+ public int size( ) {
+ return chars.length;
+ }
+
+ public char[] getChars( ) {
+ return chars;
+ }
+
+ public char get( int theIndex ) {
+ if ( theIndex >= 0 && theIndex < size( ) ) {
+ return chars[ theIndex ];
+ }
+ return 0;
+ }
+
+ public boolean equals( Object obj ) {
+ if ( ! ( obj instanceof KeyCode ) ) {
+ return false;
+ }
+
+ KeyCode k = ( KeyCode ) obj;
+
+ if ( k.size( ) != size( ) ) {
+ return false;
+ }
+
+ for ( int i = 0 ; i < size( ) ; i++ ) {
+ if ( get( i ) != k.get( i ) ) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ boolean contains( char n ) {
+ for ( char c : chars ) {
+ if ( n == c ) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public int hashCode( ) {
+ int hashCode = 0;
+ int n = 1;
+ for ( char c : chars ) {
+ hashCode += c + Math.pow( c , n++ );
+ }
+ return hashCode;
+ }
+ }
+
+}
diff --git a/controlP5/ControlP5Constants.java b/controlP5/ControlP5Constants.java
new file mode 100755
index 0000000..3db4da1
--- /dev/null
+++ b/controlP5/ControlP5Constants.java
@@ -0,0 +1,191 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PApplet;
+
+/**
+ * Constant variables used with ControlP5 are stored here.
+ */
+public interface ControlP5Constants {
+
+ String eventMethod = "controlEvent";
+ boolean VERBOSE = false;
+ float PI = ( float ) Math.PI;
+ float TWO_PI = PI * 2;
+ float HALF_PI = PI / 2;
+ int INVALID = -1;
+ int METHOD = 0;
+ int FIELD = 1;
+ int EVENT = 2;
+ int INTEGER = 1;
+ int FLOAT = 2;
+ int BOOLEAN = 3;
+ int STRING = 4;
+ int ARRAY = 5;
+ int BITFONT = 100;
+ Class< ? >[] acceptClassList = { int.class , float.class , boolean.class , String.class };
+ Class< ? > controlEventClass = ControlEvent.class;
+ int UP = PApplet.UP; // KeyEvent.VK_UP;
+ int DOWN = PApplet.DOWN; // KeyEvent.VK_DOWN;
+ int LEFT = PApplet.LEFT; // KeyEvent.VK_LEFT;
+ int RIGHT = PApplet.RIGHT; // KeyEvent.VK_RIGHT;
+ int SHIFT = PApplet.SHIFT; // KeyEvent.VK_SHIFT;
+ int DELETE = PApplet.DELETE; // KeyEvent.VK_DELETE;
+ int BACKSPACE = PApplet.BACKSPACE; // KeyEvent.VK_BACK_SPACE;
+ int ENTER = PApplet.ENTER; // KeyEvent.VK_ENTER;
+ int ESCAPE = PApplet.ESC; // KeyEvent.VK_ESCAPE;
+ int ALT = PApplet.ALT; // KeyEvent.VK_ALT;
+ int CONTROL = PApplet.CONTROL;// KeyEvent.VK_CONTROL;
+ int COMMANDKEY = 157; // Event.VK_META;
+ int TAB = PApplet.TAB; // KeyEvent.VK_TAB;
+ char INCREASE = PApplet.UP;
+ char DECREASE = PApplet.DOWN;
+ char SWITCH_FORE = PApplet.LEFT;
+ char SWITCH_BACK = PApplet.RIGHT;
+ char SAVE = 'S';
+ char RESET = 'R';
+ char PRINT = ' ';
+ char HIDE = 'H';
+ char LOAD = 'L';
+ char MENU = 'M';
+ char KEYCONTROL = 'K';
+ int TOP = 101; // PApplet.TOP
+ int BOTTOM = 102; // PApplet.BOTTOM
+ int CENTER = 3; // PApplet.CENTER
+ int BASELINE = 0; // PApplet.BASELINE
+ int HORIZONTAL = 0;
+ int VERTICAL = 1;
+ int DEFAULT = 0;
+ int OVER = 1;
+ int ACTIVE = 2;
+ int HIGHLIGHT = 3;
+ int IMAGE = 1;
+ int SPRITE = 2;
+ int CUSTOM = 3;
+ int SWITCH = 100;
+ int MOVE = 0;
+ int RELEASE = 2;
+ int RELEASED = 2;
+ int PRESSED = 1;
+ int PRESS = 1;
+ int LINE = 1;
+ int ELLIPSE = 2;
+ int ARC = 3;
+ int INACTIVE = 0;
+ int WAIT = 1;
+ int TRANSITION_WAIT_FADEIN = 2;
+ int FADEIN = 3;
+ int IDLE = 4;
+ int FADEOUT = 5;
+ int DONE = 6;
+ int SINGLE_COLUMN = 0;
+ int SINGLE_ROW = 1;
+ int MULTIPLES = 2;
+ int LIST = 0;
+ int DROPDOWN = 1;
+ int CHECKBOX = 2; /* TODO */
+ int TREE = 3; /* TODO */
+
+ @Deprecated
+ int ACTION_PRESSED = 1; // MouseEvent.PRESS
+ int ACTION_PRESS = 1; // MouseEvent.PRESS
+
+ @Deprecated
+ int ACTION_RELEASED = 2; // MouseEvent.RELEASE
+ int ACTION_RELEASE = 2; // MouseEvent.RELEASE
+
+ int ACTION_CLICK = 3; // MouseEvent.CLICK
+ int ACTION_DRAG = 4; // MouseEvent.DRAG
+ int ACTION_MOVE = 5; // MouseEvent.MOVE
+ int ACTION_ENTER = 6; // MouseEvent.ENTER
+ int ACTION_LEAVE = 7; // MouseEvent.EXIT
+ int ACTION_EXIT = 7; // MouseEvent.EXIT
+ int ACTION_WHEEL = 8; // MouseEvent.WHEEL
+ @Deprecated
+ int ACTION_RELEASEDOUTSIDE = 9;
+ int ACTION_RELEASE_OUTSIDE = 9;
+ int ACTION_START_DRAG = 10;
+ int ACTION_END_DRAG = 11;
+ int ACTION_DOUBLE_PRESS = 12;
+ int ACTION_BROADCAST = 100;
+ int LEFT_OUTSIDE = 10;
+ int RIGHT_OUTSIDE = 11;
+ int TOP_OUTSIDE = 12;
+ int BOTTOM_OUTSIDE = 13;
+ int CAPTIONLABEL = 0;
+ int VALUELABEL = 1;
+ int SINGLE = 0;
+
+ @Deprecated
+ int ALL = 1;
+ int MULTI = 1;
+
+ /* http://clrs.cc/ */
+ int NAVY = 0xFF001F3F;
+ int BLUE = 0xFF0074D9;
+ int AQUA = 0xFF7FDBFF;
+ int TEAL = 0xFF39CCCC;
+ int OLIVE = 0xFF3D9970;
+ int GREEN = 0xFF2ECC40;
+ int LIME = 0xFF01FF70;
+ int YELLOW = 0xFFFFDC00;
+ int ORANGE = 0xFFFF851B;
+ int RED = 0xFFFF4136;
+ int MAROON = 0xFF85144B;
+ int FUCHSIA = 0xFFF012BE;
+ int PURPLE = 0xFFB10DC9;
+ int WHITE = 0xFFFFFFFF;
+ int SILVER = 0xFFDDDDDD;
+ int GRAY = 0xFFAAAAAA;
+ int BLACK = 0xFF111111;
+
+
+ /*fg, bg, active, caption, value ) */
+ CColor THEME_RETRO = new CColor( 0xff00698c , 0xff003652 , 0xff08a2cf , 0xffffffff , 0xffffffff );
+ CColor THEME_CP52014 = new CColor( 0xff0074D9 , 0xff002D5A, 0xff00aaff , 0xffffffff , 0xffffffff );
+ CColor THEME_CP5BLUE = new CColor( 0xff016c9e , 0xff02344d , 0xff00b4ea , 0xffffffff , 0xffffffff );
+ CColor THEME_RED = new CColor( 0xffaa0000 , 0xff660000 , 0xffff0000 , 0xffffffff , 0xffffffff );
+ CColor THEME_GREY = new CColor( 0xffeeeeee, 0xffbbbbbb , 0xffffffff , 0xff555555 , 0xff555555 );
+ CColor THEME_A = new CColor( 0xff00FFC8 , 0xff00D7FF , 0xffffff00 , 0xff00B0FF , 0xff00B0FF );
+
+ // other colors: #ff3838 red-salmon; #08ffb4 turquoise; #40afff light-blue; #f3eddb beige;
+
+ int standard58 = 0;
+ int standard56 = 1;
+ int synt24 = 2;
+ int grixel = 3;
+ int J2D = 1;
+ int P2D = 2;
+ int P3D = 3;
+
+ String JSON = "JSON";
+ String SERIALIZED = "SERIALIZED";
+
+ String delimiter = " ";
+ String pathdelimiter = "/";
+
+}
diff --git a/controlP5/ControlP5Legacy.java b/controlP5/ControlP5Legacy.java
new file mode 100644
index 0000000..afd6598
--- /dev/null
+++ b/controlP5/ControlP5Legacy.java
@@ -0,0 +1,705 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.ArrayList;
+
+import processing.core.PApplet;
+import static main.java.src2.main.java.controlP5.controlP5.Controller.*;
+
+public class ControlP5Legacy {
+
+ private ControlP5Base base;
+ public static boolean DEBUG = false;
+
+ void init( ControlP5Base theControlP5 ) {
+ base = theControlP5;
+ }
+
+ public Spacer addSpacer( final String theName ) {
+ return addSpacer( theName , 0 , 0 , 100 , 20 );
+ }
+
+ public Spacer addSpacer( final String theName , final int theX , final int theY , final int theW , final int theH ) {
+ ControllerGroup tab = ( ControllerGroup< ? > ) base.cp5.controlWindow.getTabs( ).get( 1 );
+ Spacer myController = new Spacer( base.cp5 , tab , theName , theX , theY , theW , theH );
+ base.cp5.register( null , "" , myController );
+ return myController;
+ }
+
+ public Background addBackground( final String theName ) {
+ return addBackground( null , "" , theName , 0 , 0 , 300 , base.cp5.papplet.height );
+ }
+
+ public Background addBackground( Object theObject , final String theIndex , String theName , int theX , int theY , int theW , int theHeight ) {
+ Background myController = new Background( base.cp5 , ( ControllerGroup< ? > ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theW , theHeight );
+ base.cp5.register( theObject , theIndex , myController );
+ return myController;
+ }
+
+ public Button addButton( final Object theObject , String theIndex , final String theName , final float theValue , final int theX , final int theY , final int theW , final int theH ) {
+ Button myController = new Button( base.cp5 , ( ControllerGroup< ? > ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theValue , theX , theY , theW , theH );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "value" );
+ myController.getProperty( "value" ).disable( );
+ return myController;
+ }
+
+ public Icon addIcon( final Object theObject , String theIndex , final String theName , final float theValue , final int theX , final int theY , final int theW , final int theH ) {
+ Icon myController = new Icon( base.cp5 , ( ControllerGroup< ? > ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theValue , theX , theY , theW , theH );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "value" );
+ myController.getProperty( "value" ).disable( );
+ return myController;
+ }
+
+ public ButtonBar addButtonBar( final Object theObject , String theIndex , final String theName , final float theValue , final int theX , final int theY , final int theW , final int theH ) {
+ ButtonBar myController = new ButtonBar( base.cp5 , ( ControllerGroup< ? > ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theW , theH );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "value" );
+ myController.getProperty( "value" ).disable( );
+ return myController;
+ }
+
+ public Bang addBang( final Object theObject , String theIndex , final String theName , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ Bang myController = new Bang( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theWidth , theHeight );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "value" );
+ myController.getProperty( "value" ).disable( );
+ return myController;
+ }
+
+ public Toggle addToggle( final Object theObject , String theIndex , final String theName , final boolean theDefaultValue , final float theX , final float theY , final int theWidth , final int theHeight ) {
+ Toggle myController = new Toggle( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , (theDefaultValue) ? 1f : 0f , theX , theY , theWidth , theHeight );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "value" );
+ return myController;
+ }
+
+ public Tooltip addTooltip( ) {
+ println( "Tooltip is not available with this Version (" , ControlP5.VERSION , ") of ControlP5" );
+ return null;
+ }
+
+ public Matrix addMatrix( final Object theObject , final String theIndex , final String theName , final int theCellX , final int theCellY , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ Matrix myController = new Matrix( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theCellX , theCellY , theX , theY , theWidth , theHeight );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "cells" ).registerProperty( "interval" );
+ return myController;
+ }
+
+ public Matrix addMatrix( final String theName , final int theCellX , final int theCellY , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ return addMatrix( null , "" , theName , theCellX , theCellY , theX , theY , theWidth , theHeight );
+ }
+
+ public Slider2D addSlider2D( Object theObject , final String theIndex , final String theName , float theMinX , float theMaxX , float theMinY , float theMaxY , float theDefaultValueX , float theDefaultValueY , int theX , int theY , int theW , int theH ) {
+ Slider2D myController = new Slider2D( base.cp5 , ( ControllerGroup< ? > ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theW , theH );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.setMinX( theMinX );
+ myController.setMaxX( theMaxX );
+ myController.setMinY( theMinY );
+ myController.setMaxY( theMaxY );
+ myController.setArrayValue( new float[] { theDefaultValueX , theDefaultValueY } );
+ myController.updateValue( );
+ myController.registerProperty( "arrayValue" ).registerProperty( "minX" ).registerProperty( "maxX" ).registerProperty( "minY" ).registerProperty( "maxY" );
+ return myController;
+ }
+
+ public Slider addSlider( Object theObject , final String theIndex , final String theName , float theMin , float theMax , float theDefaultValue , int theX , int theY , int theW , int theH ) {
+ Slider myController = new Slider( base.cp5 , ( ControllerGroup< ? > ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theMin , theMax , theDefaultValue , theX , theY , theW , theH );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "value" ).registerProperty( "min" ).registerProperty( "max" );
+ return myController;
+ }
+
+ public Slider addSlider( String theName , float theMin , float theMax , float theDefaultValue , int theX , int theY , int theW , int theH ) {
+ return addSlider( null , "" , theName , theMin , theMax , theDefaultValue , theX , theY , theW , theH );
+ }
+
+ public Slider addSlider( final String theName , final float theMin , final float theMax , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ return addSlider( null , "" , theName , theMin , theMax , theMin , theX , theY , theWidth , theHeight );
+ }
+
+ public Slider addSlider( Object theObject , final String theIndex , final String theName , float theMin , float theMax , int theX , int theY , int theW , int theH ) {
+ return addSlider( theObject , theIndex , theName , theMin , theMax , theMin , theX , theY , theW , theH );
+ }
+
+ public Range addRange( Object theObject , final String theIndex , String theName , float theMin , float theMax , float theDefaultMinValue , float theDefaultMaxValue , int theX , int theY , int theW , int theH ) {
+ Range myController = new Range( base.cp5 , ( ControllerGroup< ? > ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theMin , theMax , theDefaultMinValue , theDefaultMaxValue , theX , theY , theW , theH );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "lowValue" ).registerProperty( "highValue" );
+ return myController;
+ }
+
+ public Range addRange( String theName , float theMin , float theMax , float theDefaultMinValue , float theDefaultMaxValue , int theX , int theY , int theW , int theH ) {
+ return addRange( null , "" , theName , theMin , theMax , theDefaultMinValue , theDefaultMaxValue , theX , theY , theW , theH );
+ }
+
+ public Range addRange( final String theName , final float theMin , final float theMax , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ return addRange( null , "" , theName , theMin , theMax , theMin , theMax , theX , theY , theWidth , theHeight );
+ }
+
+ public Range addRange( final Object theObject , final String theIndex , final String theName , final float theMin , final float theMax , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ return addRange( theObject , theIndex , theName , theMin , theMax , theMin , theMax , theX , theY , theWidth , theHeight );
+ }
+
+ public Numberbox addNumberbox( final Object theObject , final String theIndex , final String theName , final float theDefaultValue , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ Numberbox myController = new Numberbox( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theDefaultValue , theX , theY , theWidth , theHeight );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "value" );
+ return myController;
+ }
+
+ public Numberbox addNumberbox( final String theName , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ return addNumberbox( null , "" , theName , Float.NaN , theX , theY , theWidth , theHeight );
+ }
+
+ public Numberbox addNumberbox( final Object theObject , final String theIndex , final String theName , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ return addNumberbox( theObject , theIndex , theName , Float.NaN , theX , theY , theWidth , theHeight );
+ }
+
+ public Numberbox addNumberbox( final String theName , final float theDefaultValue , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ return addNumberbox( null , "" , theName , theDefaultValue , theX , theY , theWidth , theHeight );
+ }
+
+ public Knob addKnob( final Object theObject , final String theIndex , final String theName , final float theMin , final float theMax , final float theDefaultValue , final int theX , final int theY , final int theDiameter ) {
+ Knob myController = new Knob( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theMin , theMax , theDefaultValue , theX , theY , theDiameter );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "value" );
+ return myController;
+ }
+
+ public Knob addKnob( final String theName , final float theMin , final float theMax , final int theX , final int theY , final int theDiameter ) {
+ return addKnob( null , "" , theName , theMin , theMax , theMin , theX , theY , theDiameter );
+ }
+
+ public Knob addKnob( final Object theObject , final String theIndex , final String theName , final float theMin , final float theMax , final int theX , final int theY , final int theDiameter ) {
+ return addKnob( theObject , theIndex , theName , theMin , theMax , theX , theY , theDiameter );
+ }
+
+ public Knob addKnob( final String theName , final float theMin , final float theMax , final float theDefaultValue , final int theX , final int theY , final int theDiameter ) {
+ return addKnob( null , "" , theName , theMin , theMax , theDefaultValue , theX , theY , theDiameter );
+ }
+
+ public MultiList addMultiList( final Object theObject , final String theIndex , final String theName , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ MultiList myController = new MultiList( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theWidth , theHeight );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "value" );
+ return myController;
+ }
+
+ public MultiList addMultiList( final String theName , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ return addMultiList( null , "" , theName , theX , theY , theWidth , theHeight );
+ }
+
+ public Textlabel addLabel( String theIndex ) {
+ return addTextlabel( theIndex , theIndex , 0 , 0 );
+ }
+
+ public Textlabel addLabel( String theIndex , int theX , int theY ) {
+ return addTextlabel( theIndex , theIndex , theX , theY );
+ }
+
+ public Textlabel addTextlabel( final Object theObject , final String theIndex , final String theName , final String theText , final int theX , final int theY ) {
+ Textlabel myController = new Textlabel( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theText , theX , theY );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "value" ).registerProperty( "stringValue" );
+ return myController;
+ }
+
+ public Textlabel addTextlabel( final String theName , final String theText , final int theX , final int theY ) {
+ return addTextlabel( null , "" , theName , theText , theX , theY );
+ }
+
+ public Textlabel addTextlabel( final Object theObject , final String theIndex , final String theName , final String theText ) {
+ return addTextlabel( theObject , theIndex , theName , theText , 0 , 0 );
+ }
+
+ public Textlabel addTextlabel( final String theName , final String theText ) {
+ return addTextlabel( null , "" , theName , theText , 0 , 0 );
+ }
+
+ public Textarea addTextarea( final String theName , final String theText , final int theX , final int theY , final int theW , final int theH ) {
+ Textarea myController = new Textarea( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theText , theX , theY , theW , theH );
+ base.cp5.register( null , "" , myController );
+ myController.registerProperty( "text" );
+ return myController;
+ }
+
+ public Textfield addTextfield( final Object theObject , final String theIndex , final String theName , final int theX , final int theY , final int theW , final int theH ) {
+ Textfield myController = new Textfield( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , "" , theX , theY , theW , theH );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "text" );
+ return myController;
+ }
+
+ public Textfield addTextfield( final String theName , final int theX , final int theY , final int theW , final int theH ) {
+ return addTextfield( null , "" , theName , theX , theY , theW , theH );
+ }
+
+ public Textfield addTextfield( final Object theObject , final String theIndex , final String theName ) {
+ return addTextfield( theObject , theIndex , theName , 0 , 0 , 99 , 19 );
+ }
+
+ public Accordion addAccordion( String theName , int theX , int theY , int theWidth ) {
+ Accordion myController = new Accordion( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theWidth );
+ base.cp5.register( null , "" , myController );
+ return myController;
+ }
+
+ public Accordion addAccordion( final Object theObject , final String theIndex , final String theName ) {
+ Accordion myController = new Accordion( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , 0 , 0 , 200 );
+ base.cp5.register( theObject , theIndex , myController );
+ return myController;
+ }
+
+ public RadioButton addRadioButton( final Object theObject , String theIndex , final String theName , final int theX , final int theY ) {
+ RadioButton myController = new RadioButton( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "arrayValue" );
+ return myController;
+ }
+
+ public RadioButton addRadioButton( final String theName , final int theX , final int theY ) {
+ return addRadioButton( null , "" , theName , theX , theY );
+ }
+
+ /**
+ * Use radio buttons for multiple choice options.
+ */
+ public RadioButton addRadio( final String theName ) {
+ return addRadioButton( theName , 0 , 0 );
+ }
+
+ public RadioButton addRadio( final String theName , final int theX , final int theY ) {
+ RadioButton myController = new RadioButton( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY );
+ base.cp5.register( null , "" , myController );
+ myController.registerProperty( "arrayValue" );
+ return myController;
+ }
+
+ public CheckBox addCheckBox( final Object theObject , final String theIndex , final String theName , final int theX , final int theY ) {
+ CheckBox myController = new CheckBox( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "arrayValue" );
+ return myController;
+ }
+
+ public CheckBox addCheckBox( final String theName , final int theX , final int theY ) {
+ return addCheckBox( null , "" , theName , theX , theY );
+ }
+
+ public ScrollableList addScrollableList( final Object theObject , String theIndex , final String theName ) {
+ return addScrollableList( theObject , theIndex , theName , 0 , 0 , 100 , 100 );
+ }
+
+ public ScrollableList addScrollableList( final Object theObject , String theIndex , final String theName , final int theX , final int theY , final int theW , final int theH ) {
+ ScrollableList myController = new ScrollableList( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theW , theH );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "value" );
+ return myController;
+ }
+
+ public ScrollableList addScrollableList( final String theName , final int theX , final int theY , final int theW , final int theH ) {
+ return addScrollableList( null , "" , theName , theX , theY , theW , theH );
+ }
+
+ /**
+ * A list box is a list of items a user can choose from.
+ * When items exceed the dedicated area of a list box, a
+ * scrollbar is added to the right of the box. the Box
+ * can be navigated using mouse click, drag and the
+ * mouse-wheel.
+ */
+ public ListBox addListBox( final String theName ) {
+ return addListBox( theName , 0 , 0 , 99 , 199 );
+ }
+
+ public ListBox addListBox( final Object theObject , String theIndex , final String theName , final int theX , final int theY , final int theW , final int theH ) {
+ ListBox myController = new ListBox( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theW , theH );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "listBoxItems" ).registerProperty( "value" );
+ return myController;
+ }
+
+ public ListBox addListBox( final String theName , final int theX , final int theY , final int theW , final int theH ) {
+ return addListBox( null , "" , theName , theX , theY , theW , theH );
+ }
+
+ public DropdownList addDropdownList( final String theName ) {
+ return addDropdownList( theName , 0 , 0 , 99 , 99 );
+ }
+
+ public DropdownList addDropdownList( final Object theObject , final String theIndex , final String theName , final int theX , final int theY , final int theW , final int theH ) {
+ DropdownList myController = new DropdownList( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theW , theH );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "listBoxItems" ).registerProperty( "value" );
+ return myController;
+ }
+
+ public DropdownList addDropdownList( final String theName , final int theX , final int theY , final int theW , final int theH ) {
+ return addDropdownList( null , "" , theName , theX , theY , theW , theH );
+ }
+
+ public ColorWheel addColorWheel( final Object theObject , final String theIndex , final String theName , final int theX , final int theY , final int theW ) {
+ ColorWheel myController = new ColorWheel( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theW , theW );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "arrayValue" );
+ return myController;
+ }
+
+ public ColorWheel addColorWheel( final String theName , final int theX , final int theY , final int theW ) {
+ return addColorWheel( null , "" , theName , theX , theY , theW );
+ }
+
+ public ColorPicker addColorPicker( final String theName , final int theX , final int theY , final int theW , final int theH ) {
+ return addColorPicker( null , "" , theName , theX , theY , theW , theH );
+ }
+
+ public ColorPicker addColorPicker( final Object theObject , final String theIndex , final String theName , final int theX , final int theY , final int theW , final int theH ) {
+ ColorPicker myController = new ColorPicker( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theW , theH );
+ base.cp5.register( theObject , theIndex , myController );
+ myController.registerProperty( "arrayValue" );
+ return myController;
+ }
+
+ public Chart addChart( String theName , int theX , int theY , int theW , int theH ) {
+ Chart myController = new Chart( base.cp5 , ( Tab ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theW , theH );
+ base.cp5.register( null , "" , myController );
+ return myController;
+ }
+
+ public Group addGroup( Object theObject , final String theIndex , String theName , int theX , int theY , int theW ) {
+ Group myController = new Group( base.cp5 , ( ControllerGroup< ? > ) base.cp5.controlWindow.getTabs( ).get( 1 ) , theName , theX , theY , theW , 9 );
+ base.cp5.register( theObject , theIndex , myController );
+ return myController;
+ }
+
+ public Group addGroup( Object theObject , String theIndex , String theName , int theX , int theY ) {
+ return addGroup( theObject , theIndex , theName , theX , theY , 99 );
+ }
+
+ public Group addGroup( String theName , int theX , int theY , int theW ) {
+ return addGroup( null , "" , theName , theX , theY , theW );
+ }
+
+ public Group addGroup( Object theObject , String theIndex , String theName ) {
+ return addGroup( theObject , theIndex , theName , 0 , 0 );
+ }
+
+ public Group addGroup( String theName , int theX , int theY ) {
+ return addGroup( null , "" , theName , theX , theY , 99 );
+ }
+
+ public Textlabel getTextlabel( String theText , int theX , int theY ) {
+ return new Textlabel( base.cp5 , theText , theX , theY );
+ }
+
+ public Textlabel getTextlabel( ) {
+ return getTextlabel( "" , 0 , 0 );
+ }
+
+ public Slider addSlider( Object theObject , final String theIndex , String theName ) {
+ return addSlider( theObject , theIndex , theName , 0 , 100 );
+ }
+
+ public Slider addSlider( String theName , float theMin , float theMax ) {
+ return addSlider( null , "" , theName , theMin , theMax );
+ }
+
+ public Slider addSlider( Object theObject , final String theIndex , String theName , float theMin , float theMax ) {
+ int x = ( int ) x( base.currentGroupPointer.autoPosition );
+ int y = ( int ) y( base.currentGroupPointer.autoPosition );
+ Slider s = addSlider( theObject , theIndex , theName , theMin , theMax , theMin , x , y , Slider.autoWidth , Slider.autoHeight );
+ base.linebreak( s , false , Slider.autoWidth , Slider.autoHeight , Slider.autoSpacing );
+ s.moveTo( base.currentGroupPointer );
+ if ( base.autoDirection == ControlP5Constants.VERTICAL ) {
+ s.linebreak( );
+ }
+ return s;
+ }
+
+ public Button addButton( Object theObject , final String theIndex , String theName ) {
+ return addButton( theObject , theIndex , theName , 1 );
+ }
+
+ public Button addButton( String theName , float theValue ) {
+ return addButton( null , "" , theName , theValue );
+ }
+
+ public Button addButton( Object theObject , final String theIndex , String theName , float theValue ) {
+ int x = ( int ) x( base.currentGroupPointer.autoPosition );
+ int y = ( int ) y( base.currentGroupPointer.autoPosition );
+ Button b = addButton( theObject , theIndex , theName , theValue , x , y , Button.autoWidth , Button.autoHeight );
+ base.linebreak( b , false , Button.autoWidth , Button.autoHeight , Button.autoSpacing );
+ b.moveTo( base.currentGroupPointer );
+ return b;
+ }
+
+ public ButtonBar addButtonBar( Object theObject , final String theIndex , String theName , float theValue ) {
+ int x = ( int ) x( base.currentGroupPointer.autoPosition );
+ int y = ( int ) y( base.currentGroupPointer.autoPosition );
+ ButtonBar b = addButtonBar( theObject , theIndex , theName , theValue , x , y , Button.autoWidth , Button.autoHeight );
+ base.linebreak( b , false , Button.autoWidth , Button.autoHeight , Button.autoSpacing );
+ b.moveTo( base.currentGroupPointer );
+ return b;
+ }
+
+ public Icon addIcon( Object theObject , final String theIndex , String theName ) {
+ return addIcon( theObject , theIndex , theName , 1 );
+ }
+
+ public Icon addIcon( String theName , float theValue ) {
+ return addIcon( null , "" , theName , theValue );
+ }
+
+ public Icon addIcon( Object theObject , final String theIndex , String theName , float theValue ) {
+ int x = ( int ) x( base.currentGroupPointer.autoPosition );
+ int y = ( int ) y( base.currentGroupPointer.autoPosition );
+ Icon icon = addIcon( theObject , theIndex , theName , theValue , x , y , Icon.autoWidth , Icon.autoHeight );
+ base.linebreak( icon , false , Icon.autoWidth , Icon.autoHeight , Icon.autoSpacing );
+ icon.moveTo( base.currentGroupPointer );
+ return icon;
+ }
+
+ public Bang addBang( Object theObject , final String theIndex , String theName ) {
+ int x = ( int ) x( base.currentGroupPointer.autoPosition );
+ int y = ( int ) y( base.currentGroupPointer.autoPosition );
+ Bang b = addBang( theObject , theIndex , theName , x , y , Bang.autoWidth , Bang.autoHeight );
+ base.linebreak( b , false , Bang.autoWidth , Bang.autoHeight , Bang.autoSpacing );
+ b.moveTo( base.currentGroupPointer );
+ return b;
+ }
+
+ public Toggle addToggle( Object theObject , final String theIndex , String theName ) {
+ return addToggle( theObject , theIndex , theName , false );
+ }
+
+ public Toggle addToggle( Object theObject , final String theIndex , String theName , boolean theValue ) {
+ Toggle t = addToggle( theObject , theIndex , theName , theValue , x( base.currentGroupPointer.autoPosition ) , y( base.currentGroupPointer.autoPosition ) , Toggle.autoWidth , Toggle.autoHeight );
+ base.linebreak( t , false , Toggle.autoWidth , Toggle.autoHeight , t.autoSpacing );
+ t.moveTo( base.currentGroupPointer );
+ return t;
+ }
+
+ public Numberbox addNumberbox( Object theObject , final String theIndex , String theName ) {
+ int x = ( int ) x( base.currentGroupPointer.autoPosition );
+ int y = ( int ) y( base.currentGroupPointer.autoPosition );
+ Numberbox n = addNumberbox( theObject , theIndex , theName , x , y , Numberbox.autoWidth , Numberbox.autoHeight );
+ base.linebreak( n , false , Numberbox.autoWidth , Numberbox.autoHeight , n.autoSpacing );
+ n.moveTo( base.currentGroupPointer );
+ return n;
+ }
+
+ public Toggle addToggle( String theName , boolean theValue ) {
+ return addToggle( null , "" , theName , theValue );
+ }
+
+ public Knob addKnob( Object theObject , final String theIndex , String theName , int theMin , int theMax ) {
+ Knob n = addKnob( theObject , theIndex , theName , theMin , theMax , theMin , ( int ) x( base.currentGroupPointer.autoPosition ) , ( int ) y( base.currentGroupPointer.autoPosition ) , Knob.autoWidth );
+ base.linebreak( n , false , Knob.autoWidth , Knob.autoHeight , n.autoSpacing );
+ n.moveTo( base.currentGroupPointer );
+ return n;
+ }
+
+ public Knob addKnob( Object theObject , final String theIndex , String theName ) {
+ return addKnob( theObject , theIndex , theName , 0 , 100 );
+ }
+
+ public Knob addKnob( String theName , int theMin , int theMax ) {
+ return addKnob( null , "" , theName , theMin , theMax );
+ }
+
+ public ControlWindow addControlWindow( String theName ) {
+ ControlP5.logger( ).warning( "ControlWindow has been disabled currently, please have a look at the changlog.txt file inside the src folder." );
+ return null;
+ }
+
+ /**
+ * Adds Controllers by Object reference, currently
+ * supports Slider, Bang, Button, Knob, Numberbox,
+ * Toggle, Textlabel, Textfield, Range, Slider2D. For
+ * internal use rather than on application level.
+ */
+ public < C > C addController( final Object theObject , final String theIndex , final String theName , final Class< C > theClass , int theX , int theY ) {
+ Controller< ? > c = null;
+ if ( theClass.equals( Slider.class ) ) {
+ c = addSlider( theObject , theIndex , theName , 0 , 100 , 0 , 0 , 0 , 99 , 9 );
+ } else if ( theClass.equals( Bang.class ) ) {
+ c = addBang( theObject , theIndex , theName , 0 , 0 , 19 , 19 );
+ } else if ( theClass.equals( Button.class ) ) {
+ c = addButton( theObject , theIndex , theName , 0 , 0 , 0 , 49 , 19 );
+ } else if ( theClass.equals( Knob.class ) ) {
+ c = addKnob( theObject , theIndex , theName , 0 , 100 , 0 , 0 , 0 , 49 );
+ } else if ( theClass.equals( Numberbox.class ) ) {
+ c = addNumberbox( theObject , theIndex , theName , 0 , 0 , 0 , 99 , 19 );
+ } else if ( theClass.equals( Toggle.class ) ) {
+ c = addToggle( theObject , theIndex , theName , false , 0 , 0 , 49 , 19 );
+ } else if ( theClass.equals( Textfield.class ) ) {
+ c = addTextfield( theObject , theIndex , theName , 0 , 0 , 99 , 19 );
+ } else if ( theClass.equals( Range.class ) ) {
+ c = addRange( theObject , theIndex , theName , 0 , 100 , 0 , 100 , 0 , 0 , 99 , 9 );
+ } else if ( theClass.equals( Slider2D.class ) ) {
+ c = addSlider2D( theObject , theIndex , theName , 0 , 100 , 0 , 100 , 0 , 0 , 0 , 0 , 99 , 99 );
+ } else if ( theClass.equals( DropdownList.class ) ) {
+ c = addDropdownList( theObject , theIndex , theName , theX , theY , 199 , 99 );
+ } else if ( theClass.equals( ListBox.class ) ) {
+ c = addListBox( theObject , theIndex , theName , theX , theY , 199 , 99 );
+ } else if ( theClass.equals( ScrollableList.class ) ) {
+ c = addScrollableList( theObject , theIndex , theName , theX , theY , 199 , 99 );
+ } else if ( theClass.equals( Textlabel.class ) ) {
+ c = addTextlabel( theName , "" );
+ }
+ // TODO MultiList, Matrix
+ c.setPosition( theX , theY );
+ return ( C ) c;
+ }
+
+ /**
+ * Use with caution, only for internal use.
+ *
+ * @exclude
+ */
+ @ControlP5.Invisible public < C > C addGroup( final Object theObject , final String theIndex , final String theName , final Class< C > theClass , int theX , int theY , int theW , int theH ) {
+ ControlGroup< ? > c = null;
+ if ( theClass.equals( RadioButton.class ) ) {
+ c = addRadioButton( theObject , theIndex , theName , theX , theY );
+ } else if ( theClass.equals( CheckBox.class ) ) {
+ c = addCheckBox( theObject , theIndex , theName , theX , theY );
+ } else if ( theClass.equals( ControlGroup.class ) ) {
+ c = addGroup( theObject , theIndex , theName , theX , theY );
+ } else if ( theClass.equals( Group.class ) ) {
+ c = addGroup( theObject , theIndex , theName , theX , theY );
+ }
+ c.setPosition( theX , theY );
+ c.setWidth( theW );
+ c.setHeight( theH );
+ return ( C ) c;
+ }
+
+ public < C > C addController( String theName , Class< C > theClass , int theX , int theY ) {
+ return addController( null , "" , theName , theClass , theX , theY );
+ }
+
+ static public void println( final Object ... strs ) {
+ for ( Object str : strs ) {
+ System.out.print( str + " " );
+ }
+ System.out.println( );
+ }
+
+ static public void debug( final Object ... strs ) {
+ if ( DEBUG ) {
+ println( strs );
+ }
+ }
+
+ static public void printerr( final Object ... strs ) {
+ for ( Object str : strs ) {
+ System.err.print( str + " " );
+ }
+ System.err.println( );
+ }
+
+ @Deprecated public Controller< ? > getController( String theName , Object theObject ) {
+ if ( base._myObjectToControllerMap.containsKey( theObject ) ) {
+ ArrayList< ControllerInterface< ? >> cs = base._myObjectToControllerMap.get( theObject );
+ for ( ControllerInterface< ? > c : cs ) {
+ if ( c.getName( ).equals( theName ) ) {
+ return ( Controller< ? > ) c;
+ }
+ }
+ }
+ return null;
+ }
+
+ @Deprecated public Tab addTab( PApplet theWindow , String theName ) {
+ return addTab( base.cp5.controlWindow , theName );
+ }
+
+ @Deprecated public Tab addTab( ControlWindow theWindow , String theName ) {
+ for ( int i = 0 ; i < theWindow.getTabs( ).size( ) ; i++ ) {
+ if ( theWindow.getTabs( ).get( i ).getName( ).equals( theName ) ) {
+ return ( Tab ) theWindow.getTabs( ).get( i );
+ }
+ }
+ Tab myTab = new Tab( base.cp5 , theWindow , theName );
+ theWindow.getTabs( ).add( myTab );
+ return myTab;
+ }
+
+ @Deprecated public ControlWindow addControlWindow( final String theName , final int theX , final int theY , final int theWidth , final int theHeight , String theRenderer , int theFrameRate ) {
+ return addControlWindow( theName );
+ }
+
+ @Deprecated public ControlWindow addControlWindow( final String theWindowName , final int theWidth , final int theHeight ) {
+ return addControlWindow( theWindowName , 100 , 100 , theWidth , theHeight , "" , 30 );
+ }
+
+ @Deprecated public ControlWindow addControlWindow( final String theWindowName , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ return addControlWindow( theWindowName , theX , theY , theWidth , theHeight , "" , 30 );
+ }
+
+ @Deprecated public ControlWindow addControlWindow( final String theWindowName , final int theX , final int theY , final int theWidth , final int theHeight , final int theFrameRate ) {
+ return addControlWindow( theWindowName , theX , theY , theWidth , theHeight , "" , theFrameRate );
+ }
+
+ @Deprecated public Slider2D addSlider2D( String theName , int theX , int theY , int theW , int theH ) {
+ return addSlider2D( null , "" , theName , 0 , theW , 0 , theH , 0 , 0 , theX , theY , theW , theH );
+ }
+
+ @Deprecated public Slider2D addSlider2D( Object theObject , final String theIndex , final String theName , int theX , int theY , int theW , int theH ) {
+ return addSlider2D( theObject , theIndex , theName , 0 , theW , 0 , theH , 0 , 0 , theX , theY , theW , theH );
+ }
+
+ @Deprecated public Slider2D addSlider2D( String theName , float theMinX , float theMaxX , float theMinY , float theMaxY , float theDefaultValueX , float theDefaultValueY , int theX , int theY , int theW , int theH ) {
+ return addSlider2D( null , "" , theName , theMinX , theMaxX , theMinY , theMaxY , theDefaultValueX , theDefaultValueY , theX , theY , theW , theH );
+ }
+
+ @Deprecated public Button addButton( final String theName , final float theValue , final int theX , final int theY , final int theW , final int theH ) {
+ return addButton( null , "" , theName , theValue , theX , theY , theW , theH );
+ }
+
+ @Deprecated public Bang addBang( final String theName , final int theX , final int theY ) {
+ return addBang( null , "" , theName , theX , theY , 20 , 20 );
+ }
+
+ @Deprecated public Bang addBang( final String theName , final int theX , final int theY , final int theWidth , final int theHeight ) {
+ return addBang( null , "" , theName , theX , theY , theWidth , theHeight );
+ }
+
+ @Deprecated public Toggle addToggle( final String theName , final boolean theDefaultValue , final float theX , final float theY , final int theWidth , final int theHeight ) {
+ return addToggle( null , "" , theName , theDefaultValue , theX , theY , theWidth , theHeight );
+ }
+
+ @Deprecated public Toggle addToggle( final String theName , final float theX , final float theY , final int theWidth , final int theHeight ) {
+ return addToggle( null , "" , theName , false , theX , theY , theWidth , theHeight );
+ }
+
+ @Deprecated public Toggle addToggle( final Object theObject , final String theIndex , final String theName , final float theX , final float theY , final int theWidth , final int theHeight ) {
+ return addToggle( theObject , theIndex , theName , false , theX , theY , theWidth , theHeight );
+ }
+}
diff --git a/controlP5/ControlTimer.java b/controlP5/ControlTimer.java
new file mode 100755
index 0000000..39406cb
--- /dev/null
+++ b/controlP5/ControlTimer.java
@@ -0,0 +1,150 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+/**
+ * control timer is a timer that can be used for example as a stop watch or a duration timer.
+ *
+ * @example controllers/ControlP5timer
+ */
+public class ControlTimer {
+
+ long millisOffset;
+
+ int ms, s, m, h, d;
+
+ float _mySpeed = 1;
+
+ int current, previous;
+
+ /**
+ * create a new control timer, a timer that counts up in time.
+ */
+ public ControlTimer() {
+ reset();
+ }
+
+ /**
+ * return a string representation of the current status of the timer.
+ *
+ * @return String
+ */
+ public String toString() {
+ update();
+ return (((h < 10) ? "0" + h : String.valueOf(h)) + " : " + ((m < 10) ? "0" + m : String.valueOf(m)) + " : " + ((s < 10) ? "0" + s : String.valueOf(s)) // +
+ // " : "
+ // +
+ // ((ms<100) ? "0" + ms: "" +ms)
+ );
+ }
+
+ /**
+ * called to update the timer.
+ */
+ public void update() {
+ current = (int) time();
+ if (current > previous + 10) {
+ ms = (int) (current * _mySpeed);
+ s = (int) (((current * _mySpeed) / 1000));
+ m = s / 60;
+ h = m / 60;
+ d = h / 24;
+ ms %= 1000;
+ s %= 60;
+ m %= 60;
+ h %= 24;
+ previous = current;
+ }
+
+ }
+
+ /**
+ * get the time in milliseconds since the timer was started.
+ *
+ * @return long
+ */
+ public long time() {
+ return (System.currentTimeMillis() - millisOffset);
+ }
+
+ /**
+ * reset the timer.
+ */
+ public void reset() {
+ millisOffset = System.currentTimeMillis();
+ current = previous = 0;
+ s = 0; // Values from 0 - 59
+ m = 0; // Values from 0 - 59
+ h = 0; // Values from 0 - 23
+ update();
+ }
+
+ /**
+ * set the speed of time, for slow motion or high speed.
+ *
+ * @param theSpeed int
+ */
+ public void setSpeedOfTime(float theSpeed) {
+ _mySpeed = theSpeed;
+ update();
+ }
+
+ /**
+ * Get the milliseconds of the timer.
+ */
+ public int millis() {
+ return ms;
+ }
+
+ /**
+ * Seconds position of the timer.
+ */
+ public int second() {
+ return s;
+ }
+
+ /**
+ * Minutes position of the timer.
+ */
+ public int minute() {
+ return m;
+ }
+
+ /**
+ * Hour position of the timer in international format (0-23).
+ */
+ public int hour() {
+ return h;
+ }
+
+ /**
+ * day position of the timer.
+ */
+ public int day() {
+ return d;
+ }
+
+}
diff --git a/controlP5/ControlWindow.java b/controlP5/ControlWindow.java
new file mode 100755
index 0000000..206d936
--- /dev/null
+++ b/controlP5/ControlWindow.java
@@ -0,0 +1,978 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser
+ * General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at
+ * your option) any later version. This library is
+ * distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import processing.core.PApplet;
+import processing.core.PConstants;
+import processing.core.PGraphics;
+import processing.event.KeyEvent;
+import processing.event.MouseEvent;
+import main.java.src2.main.java.controlP5.controlP5.ControlP5Base.KeyCode;
+
+// TODO ! add mouse-button mask for left, center, right; also see Controller #mouse-button ^1
+
+/**
+ * @example controllers/ControlP5window
+ */
+public final class ControlWindow {
+
+ private ControlP5 cp5;
+ private Controller< ? > isControllerActive;
+ public int background = 0x00000000;
+ private CColor color = new CColor( );
+ private final String _myName = "main";
+ private PApplet _myApplet;
+ private ControllerList _myTabs;
+ boolean isVisible = true;
+ private boolean isInit = false;
+ private boolean isRemove = false;
+ private CDrawable _myDrawable;
+ boolean isAutoDraw;
+ private boolean isUpdate;
+ private List< Canvas > _myCanvas;
+ private boolean isDrawBackground = true;
+ private boolean isUndecorated = false;
+ private float[] autoPosition = new float[]{ 10 , 30 , 0 };
+ private float tempAutoPositionHeight = 0;
+ private boolean rendererNotification = false;
+ private float[] positionOfTabs = new float[]{ 0 , 0 , 0 };
+ private int _myFrameCount = 0;
+ private boolean isMouse = true;
+ private Pointer _myPointer;
+ private int mouseWheelMoved = 0;
+ private final List< ControllerInterface< ? >> mouseoverlist;
+ private boolean isMouseOver;
+ int mouseX;
+ int mouseY;
+ int pmouseX;
+ int pmouseY;
+ private boolean mousePressed;
+ long mousePressedTime;
+ long pmousePressedTime;
+ boolean mouselock;
+ char key;
+ int keyCode;
+ private final int numKeys = 1024;
+ private boolean[] keys = new boolean[ numKeys ];
+ private int numOfActiveKeys = 0;
+ private boolean focused = true;
+
+ /**
+ * @exclude
+ */
+ public ControlWindow( final ControlP5 theControlP5 , final PApplet theApplet ) {
+ mouseoverlist = new ArrayList< ControllerInterface< ? >>( );
+ cp5 = theControlP5;
+ _myApplet = theApplet;
+ isAutoDraw = true;
+ init( );
+ }
+
+ private void init() {
+
+ _myPointer = new Pointer( );
+ _myCanvas = new ArrayList< Canvas >( );
+ _myTabs = new ControllerList( );
+ _myTabs.add( new Tab( cp5 , this , "global" ) );
+ _myTabs.add( new Tab( cp5 , this , "default" ) );
+ activateTab( ( Tab ) _myTabs.get( 1 ) );
+
+ /* register a post event that will be called by
+ * processing after the draw method has been
+ * finished. */
+
+ // processing pre 2.0 will not draw automatically if
+ // in P3D mode. in earlier versions of
+ // controlP5 this had been checked here and the user
+ // had been informed to draw controlP5
+ // manually by adding cp5.draw() to the sketch's
+ // draw function. with processing 2.0 and this
+ // version of controlP5 this notification does no
+ // longer exist.
+
+ if (!isInit) {
+ _myApplet.registerMethod( "pre" , this );
+ _myApplet.registerMethod( "draw" , this );
+ if ( !cp5.isAndroid ) {
+ _myApplet.registerMethod( "keyEvent" , this );
+ _myApplet.registerMethod( "mouseEvent" , this );
+ }
+ }
+
+ mousePressedTime = System.currentTimeMillis( );
+ pmousePressedTime = System.currentTimeMillis( );
+
+ isInit = true;
+ }
+
+ public Tab getCurrentTab( ) {
+ for ( int i = 1 ; i < _myTabs.size( ) ; i++ ) {
+ if ( ( ( Tab ) _myTabs.get( i ) ).isActive( ) ) {
+ return ( Tab ) _myTabs.get( i );
+ }
+ }
+ return null;
+ }
+
+ public ControlWindow activateTab( String theTab ) {
+
+ for ( int i = 1 ; i < _myTabs.size( ) ; i++ ) {
+ if ( _myTabs.get( i ).getName( ).equals( theTab ) ) {
+ if ( ! ( ( Tab ) _myTabs.get( i ) ).isActive ) {
+ resetMouseOver( );
+ }
+ activateTab( ( Tab ) _myTabs.get( i ) );
+ }
+ }
+ return this;
+ }
+
+ public ControlWindow removeTab( Tab theTab ) {
+ _myTabs.remove( theTab );
+ return this;
+ }
+
+ public Tab add( Tab theTab ) {
+ _myTabs.add( theTab );
+ return theTab;
+ }
+
+ public Tab addTab( String theTab ) {
+ return getTab( theTab );
+ }
+
+ ControlWindow activateTab(Tab theTab) {
+ for ( int i = 1 ; i < _myTabs.size( ) ; i++ ) {
+ if ( _myTabs.get( i ) == theTab ) {
+ if ( ! ( ( Tab ) _myTabs.get( i ) ).isActive ) {
+ resetMouseOver( );
+ }
+ ( ( Tab ) _myTabs.get( i ) ).setActive( true );
+ } else {
+ ( ( Tab ) _myTabs.get( i ) ).setActive( false );
+ }
+ }
+ return this;
+ }
+
+ public ControllerList getTabs( ) {
+ return _myTabs;
+ }
+
+ public Tab getTab( String theTabName ) {
+ return cp5.getTab( this , theTabName );
+ }
+
+ /**
+ * Sets the position of the tab bar which is set to 0,0
+ * by default. to move the tabs to y-position 100, use
+ * cp5.getWindow().setPositionOfTabs(0,100);
+ *
+ */
+
+ public ControlWindow setPositionOfTabs( int theX , int theY ) {
+ positionOfTabs[0] = theX;
+ positionOfTabs[1] = theY;
+ return this;
+ }
+
+
+ public float[] getPositionOfTabs( ) {
+ return positionOfTabs;
+ }
+
+ void setAllignmentOfTabs( int theValue , int theWidth ) {
+ // TODO
+ }
+
+ void setAllignmentOfTabs( int theValue , int theWidth , int theHeight ) {
+ // TODO
+ }
+
+ void setAllignmentOfTabs( int theValue ) {
+ // TODO
+ }
+
+ public void remove( ) {
+ for ( int i = _myTabs.size( ) - 1 ; i >= 0 ; i-- ) {
+ _myTabs.get( i ).remove( );
+ }
+ _myTabs.clear( );
+ _myTabs.clearDrawable( );
+ }
+
+ /**
+ * clear the control window, delete all controllers from
+ * a control window.
+ */
+ public ControlWindow clear( ) {
+ remove( );
+ return this;
+ }
+
+ void updateFont(ControlFont theControlFont) {
+ for ( int i = 0 ; i < _myTabs.size( ) ; i++ ) {
+ ( ( Tab ) _myTabs.get( i ) ).updateFont( theControlFont );
+ }
+ }
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible public void updateEvents( ) {
+ handleMouseOver( );
+ handleMouseWheelMoved( );
+ if ( _myTabs.size( ) <= 0 ) {
+ return;
+ }
+ _myTabs.get( 0 ).updateEvents( );
+ for ( int i = 1 ; i < _myTabs.size( ) ; i++ ) {
+ _myTabs.get( i ).continuousUpdateEvents( );
+ if ( ( ( Tab ) _myTabs.get( i ) ).isActive( ) && _myTabs.get( i ).isVisible( ) ) {
+ _myTabs.get( i ).updateEvents( );
+ }
+ }
+ }
+
+ /**
+ * returns true if the mouse is inside a controller. !!!
+ * doesnt work for groups yet.
+ */
+ public boolean isMouseOver( ) {
+ // TODO doesnt work for all groups yet, only ListBox
+ // and DropdownList.
+ if ( _myFrameCount + 1 < _myApplet.frameCount ) {
+ resetMouseOver( );
+ }
+ return isVisible && isMouseOver;
+ }
+
+ public boolean isMouseOver( ControllerInterface< ? > theController ) {
+ return mouseoverlist.contains( theController );
+ }
+
+ public void resetMouseOver( ) {
+ isMouseOver = false;
+ for ( int i = mouseoverlist.size( ) - 1 ; i >= 0 ; i-- ) {
+ mouseoverlist.get( i ).setMouseOver( false );
+ }
+ mouseoverlist.clear( );
+ }
+
+ public ControllerInterface< ? > getFirstFromMouseOverList( ) {
+ if ( getMouseOverList( ).isEmpty( ) ) {
+ return null;
+ } else {
+ return getMouseOverList( ).get( 0 );
+ }
+ }
+
+ /**
+ * A list of controllers that are registered with a
+ * mouseover.
+ */
+ public List< ControllerInterface< ? >> getMouseOverList( ) {
+ return mouseoverlist;
+ }
+
+ private ControlWindow handleMouseOver( ) {
+ for ( int i = mouseoverlist.size( ) - 1 ; i >= 0 ; i-- ) {
+ if ( !mouseoverlist.get( i ).isMouseOver( ) || !isVisible ) {
+ mouseoverlist.remove( i );
+ }
+ }
+ isMouseOver = mouseoverlist.size( ) > 0;
+ return this;
+ }
+
+ public ControlWindow removeMouseOverFor( ControllerInterface< ? > theController ) {
+ mouseoverlist.remove( theController );
+ return this;
+ }
+
+ ControlWindow setMouseOverController(ControllerInterface> theController) {
+ if ( !mouseoverlist.contains( theController ) && isVisible && theController.isVisible( ) ) {
+ mouseoverlist.add( theController );
+ }
+ isMouseOver = true;
+ return this;
+ }
+
+ /**
+ * updates all controllers inside the control window if
+ * update is enabled.
+ *
+ * @exclude
+ */
+ public void update( ) {
+ _myTabs.get( 0 ).update( );
+ for ( int i = 1 ; i < _myTabs.size( ) ; i++ ) {
+ ( ( Tab ) _myTabs.get( i ) ).update( );
+ }
+ }
+
+ /**
+ * enable or disable the update function of a control
+ * window.
+ */
+ public void setUpdate( boolean theFlag ) {
+ isUpdate = theFlag;
+ for ( int i = 0 ; i < _myTabs.size( ) ; i++ ) {
+ _myTabs.get( i ).setUpdate( theFlag );
+ }
+ }
+
+ /**
+ * check the update status of a control window.
+ */
+ public boolean isUpdate( ) {
+ return isUpdate;
+ }
+
+ public ControlWindow addCanvas( Canvas theCanvas ) {
+ _myCanvas.add( theCanvas );
+ theCanvas.setControlWindow( this );
+ theCanvas.setup( _myApplet.g );
+ return this;
+ }
+
+ public ControlWindow removeCanvas( Canvas theCanvas ) {
+ _myCanvas.remove( theCanvas );
+ return this;
+ }
+
+ private boolean isReset = false;
+
+ public ControlWindow pre( ) {
+
+ if ( _myFrameCount + 1 < _myApplet.frameCount ) {
+ if ( isReset ) {
+ resetMouseOver( );
+ isReset = false;
+ }
+ } else {
+ isReset = true;
+ }
+
+ if ( papplet( ).focused != focused ) {
+ clearKeys( );
+ mousePressed = false;
+ focused = papplet( ).focused;
+ }
+
+ return this;
+ }
+
+ boolean pmouseReleased; // Android
+
+ boolean pmousePressed; // Android
+
+ /**
+ * when in Android mode, call mouseEvent(int, int,
+ * boolean).
+ */
+ public void mouseEvent( int theX , int theY , boolean pressed ) {
+
+ mouseX = theX - cp5.pgx - cp5.ox;
+ mouseY = theY - cp5.pgy - cp5.oy;
+
+ if ( pressed && !pmousePressed ) {
+ updateEvents( );
+ mousePressedEvent( );
+ pmousePressedTime = mousePressedTime;
+ mousePressedTime = System.currentTimeMillis( );
+ pmousePressed = true;
+ pmouseReleased = false;
+ } else if ( !pressed && !pmouseReleased ) {
+ updateEvents( );
+ mouseReleasedEvent( );
+ for ( ControllerInterface c : mouseoverlist ) {
+ if ( c instanceof Controller ) {
+ final Controller c1 = ( ( Controller ) c );
+ c1.onLeave( );
+ c1.onRelease( );
+ cp5.getControlBroadcaster( ).invokeAction( new CallbackEvent( c1 , ControlP5.ACTION_LEAVE ) );
+ c1.callListener( ControlP5.ACTION_LEAVE );
+ cp5.getControlBroadcaster( ).invokeAction( new CallbackEvent( c1 , ControlP5.ACTION_RELEASE ) );
+ c1.callListener( ControlP5.ACTION_RELEASE );
+ } else if ( c instanceof ControllerGroup ) {
+ ( ( ControllerGroup ) c ).mouseReleased( );
+ }
+ }
+ resetMouseOver( );
+ pmousePressed = false;
+ pmouseReleased = true;
+
+ }
+ }
+
+ /**
+ * @exclude
+ */
+ public void mouseEvent( MouseEvent theMouseEvent ) {
+ if ( isMouse ) {
+ mouseX = theMouseEvent.getX( ) - cp5.pgx - cp5.ox;
+ mouseY = theMouseEvent.getY( ) - cp5.pgy - cp5.oy;
+ if ( theMouseEvent.getAction( ) == MouseEvent.PRESS ) {
+ mousePressedEvent( );
+ }
+ if ( theMouseEvent.getAction( ) == MouseEvent.RELEASE ) {
+ mouseReleasedEvent( );
+ }
+ if ( theMouseEvent.getAction( ) == MouseEvent.WHEEL ) {
+
+ setMouseWheelRotation( theMouseEvent.getCount( ) );
+
+ }
+ }
+ }
+
+ public void keyEvent( KeyEvent theKeyEvent ) {
+
+ if ( theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
+ keys[ theKeyEvent.getKeyCode( ) ] = true;
+ numOfActiveKeys++;
+ cp5.modifiers = theKeyEvent.getModifiers( );
+ key = theKeyEvent.getKey( );
+ keyCode = theKeyEvent.getKeyCode( );
+ }
+
+ if ( theKeyEvent.getAction( ) == KeyEvent.RELEASE ) {
+ keys[ theKeyEvent.getKeyCode( ) ] = false;
+ numOfActiveKeys--;
+ cp5.modifiers = theKeyEvent.getModifiers( );
+ }
+
+ if ( theKeyEvent.getAction( ) == KeyEvent.PRESS && cp5.isShortcuts( ) ) {
+ int n = 0;
+ for ( boolean b : keys ) {
+ n += b ? 1 : 0;
+ }
+ char[] c = new char[ n ];
+ n = 0;
+ for ( int i = 0 ; i < keys.length ; i++ ) {
+ if ( keys[ i ] ) {
+ c[ n++ ] = ( ( char ) i );
+ }
+ }
+ KeyCode code = new KeyCode( c );
+
+ if ( cp5.keymap.containsKey( code ) ) {
+ for ( ControlKey ck : cp5.keymap.get( code ) ) {
+ ck.keyEvent( );
+ }
+ }
+ }
+
+ handleKeyEvent( theKeyEvent );
+ }
+
+ public void clearKeys( ) {
+ keys = new boolean[ numKeys ];
+ numOfActiveKeys = 0;
+ }
+
+ // TODO
+ public void draw( PGraphics pg , int theX , int theY ) {
+
+ }
+
+ /**
+ * @exclude draw content.
+ */
+ public void draw( ) {
+ _myFrameCount = _myApplet.frameCount;
+ draw( cp5.pg );
+ }
+
+ public void draw( PGraphics pg ) {
+ pg.pushMatrix( );
+ pg.translate( cp5.ox , cp5.oy );
+ if (!cp5.blockDraw) {
+ if ( cp5.isAndroid ) {
+ mouseEvent( cp5.papplet.mouseX , cp5.papplet.mouseY , cp5.papplet.mousePressed );
+ } else {
+ updateEvents( );
+ }
+ if ( isVisible ) {
+ if ( cp5.isGraphics ) {
+ pg.beginDraw( );
+ if ( ( ( background >> 24 ) & 0xff ) != 0 ) {
+ pg.background( background );
+ }
+ }
+
+ // TODO save stroke, noStroke, fill, noFill, strokeWeight parameters and restore after drawing controlP5 elements.
+
+ int myRectMode = pg.rectMode;
+ int myEllipseMode = pg.ellipseMode;
+ int myImageMode = pg.imageMode;
+ pg.pushStyle( );
+ pg.rectMode( PConstants.CORNER );
+ pg.ellipseMode( PConstants.CORNER );
+ pg.imageMode( PConstants.CORNER );
+ pg.noStroke( );
+
+ if ( _myDrawable != null ) {
+ _myDrawable.draw( pg );
+ }
+
+ for ( int i = 0 ; i < _myCanvas.size( ) ; i++ ) {
+ if ( ( _myCanvas.get( i ) ).mode( ) == Canvas.PRE ) {
+ ( _myCanvas.get( i ) ).update( _myApplet );
+ ( _myCanvas.get( i ) ).draw( pg );
+ }
+ }
+
+ pg.noStroke( );
+ pg.noFill( );
+ int myOffsetX = ( int ) getPositionOfTabs( )[0];
+ int myOffsetY = ( int ) getPositionOfTabs( )[1];
+ int myHeight = 0;
+
+ if ( _myTabs.size( ) > 0 ) {
+ for ( int i = 1 ; i < _myTabs.size( ) ; i++ ) {
+ if ( _myTabs.get( i ).isVisible( ) ) {
+ if ( myHeight < ( ( Tab ) _myTabs.get( i ) ).height( ) ) {
+ myHeight = ( ( Tab ) _myTabs.get( i ) ).height( );
+ }
+
+ // conflicts with Android, getWidth not found TODO
+
+ // if (myOffsetX >
+ // (papplet().getWidth()) -
+ // ((Tab)
+ // _myTabs.get(i)).width()) {
+ // myOffsetY += myHeight + 1;
+ // myOffsetX = (int)
+ // getPositionOfTabs().x;
+ // myHeight = 0;
+ // }
+
+ ( ( Tab ) _myTabs.get( i ) ).setOffset( myOffsetX , myOffsetY );
+
+ if ( ( ( Tab ) _myTabs.get( i ) ).isActive( ) ) {
+ _myTabs.get( i ).draw( pg );
+ }
+
+ if ( ( ( Tab ) _myTabs.get( i ) ).updateLabel( ) ) {
+ ( ( Tab ) _myTabs.get( i ) ).drawLabel( pg );
+ }
+ myOffsetX += ( ( Tab ) _myTabs.get( i ) ).width( );
+ }
+ }
+ _myTabs.get( 0 ).draw( pg );
+ }
+ for ( int i = 0 ; i < _myCanvas.size( ) ; i++ ) {
+ if ( ( _myCanvas.get( i ) ).mode( ) == Canvas.POST ) {
+ ( _myCanvas.get( i ) ).draw( pg );
+ }
+ }
+
+ pmouseX = mouseX;
+ pmouseY = mouseY;
+
+ /* draw Tooltip here. */
+
+ cp5.getTooltip( ).draw( this );
+ pg.rectMode( myRectMode );
+ pg.ellipseMode( myEllipseMode );
+ pg.imageMode( myImageMode );
+ pg.popStyle( );
+
+ if ( cp5.isGraphics ) {
+ pg.endDraw( );
+ cp5.papplet.image( pg , cp5.pgx , cp5.pgy );
+ }
+ }
+ }
+ pg.popMatrix( );
+ }
+
+ /**
+ * Adds a custom context to a ControlWindow. Use a
+ * custom class which implements the CDrawable interface
+ *
+ * @see CDrawable
+ * @param theDrawable CDrawable
+ */
+ public ControlWindow setContext( CDrawable theDrawable ) {
+ _myDrawable = theDrawable;
+ return this;
+ }
+
+ /**
+ * returns the name of the control window.
+ */
+ public String name( ) {
+ return _myName;
+ }
+
+ private void mousePressedEvent( ) {
+ if ( isVisible ) {
+ mousePressed = true;
+ pmousePressedTime = mousePressedTime;
+ mousePressedTime = System.currentTimeMillis( );
+ for ( int i = 0 ; i < _myTabs.size( ) ; i++ ) {
+ if ( _myTabs.get( i ).setMousePressed( true ) ) {
+ mouselock = true;
+ return;
+ }
+ }
+ }
+ }
+
+ private void mouseReleasedEvent( ) {
+ if ( isVisible ) {
+ mousePressed = false;
+ mouselock = false;
+ for ( int i = 0 ; i < _myTabs.size( ) ; i++ ) {
+ _myTabs.get( i ).setMousePressed( false );
+ }
+ }
+ }
+
+ void setMouseWheelRotation( int theRotation ) {
+ if ( isMouseOver( ) ) {
+ mouseWheelMoved = theRotation;
+ }
+ }
+
+ @SuppressWarnings( "unchecked" ) private void handleMouseWheelMoved( ) {
+ if ( mouseWheelMoved != 0 ) {
+ List< ControllerInterface< ? >> mouselist = new CopyOnWriteArrayList< ControllerInterface< ? >>( mouseoverlist );
+ for ( ControllerInterface< ? > c : mouselist ) {
+ if ( c.isVisible( ) ) {
+ if ( c instanceof Controller ) {
+ ( ( Controller ) c ).onScroll( mouseWheelMoved );
+ cp5.getControlBroadcaster( ).invokeAction( new CallbackEvent( ( Controller ) c , ControlP5.ACTION_WHEEL ) );
+ ( ( Controller ) c ).callListener( ControlP5.ACTION_WHEEL );
+ }
+ if ( c instanceof ControllerGroup ) {
+ ( ( ControllerGroup ) c ).onScroll( mouseWheelMoved );
+ }
+ if ( c instanceof Slider ) {
+ ( ( Slider ) c ).scrolled( mouseWheelMoved );
+ } else if ( c instanceof Knob ) {
+ ( ( Knob ) c ).scrolled( mouseWheelMoved );
+ } else if ( c instanceof Numberbox ) {
+ ( ( Numberbox ) c ).scrolled( mouseWheelMoved );
+ } else if ( c instanceof Textarea ) {
+ ( ( Textarea ) c ).scrolled( mouseWheelMoved );
+ } else if ( c instanceof ColorWheel ) {
+ ( ( ColorWheel ) c ).scrolled( mouseWheelMoved );
+ }
+ break;
+ }
+ }
+ }
+ mouseWheelMoved = 0;
+ }
+
+ public boolean isMousePressed( ) {
+ return mousePressed;
+ }
+
+ /**
+ * @exclude
+ * @param theKeyEvent KeyEvent
+ */
+ public void handleKeyEvent( KeyEvent theKeyEvent ) {
+ for ( int i = 0 ; i < _myTabs.size( ) ; i++ ) {
+ _myTabs.get( i ).keyEvent( theKeyEvent );
+ }
+ }
+
+ /**
+ * set the color for the controller while active.
+ */
+ public ControlWindow setColorActive( int theColor ) {
+ color.setActive( theColor );
+ for ( int i = 0 ; i < getTabs( ).size( ) ; i++ ) {
+ ( ( Tab ) getTabs( ).get( i ) ).setColorActive( theColor );
+ }
+ return this;
+ }
+
+ /**
+ * set the foreground color of the controller.
+ */
+ public ControlWindow setColorForeground( int theColor ) {
+ color.setForeground( theColor );
+ for ( int i = 0 ; i < getTabs( ).size( ) ; i++ ) {
+ ( ( Tab ) getTabs( ).get( i ) ).setColorForeground( theColor );
+ }
+ return this;
+ }
+
+ /**
+ * set the background color of the controller.
+ */
+ public ControlWindow setColorBackground( int theColor ) {
+ color.setBackground( theColor );
+ for ( int i = 0 ; i < getTabs( ).size( ) ; i++ ) {
+ ( ( Tab ) getTabs( ).get( i ) ).setColorBackground( theColor );
+ }
+ return this;
+ }
+
+ /**
+ * set the color of the text label of the controller.
+ */
+ public ControlWindow setColorLabel( int theColor ) {
+ color.setCaptionLabel( theColor );
+ for ( int i = 0 ; i < getTabs( ).size( ) ; i++ ) {
+ ( ( Tab ) getTabs( ).get( i ) ).setColorLabel( theColor );
+ }
+ return this;
+ }
+
+ /**
+ * set the color of the values.
+ */
+ public ControlWindow setColorValue( int theColor ) {
+ color.setValueLabel( theColor );
+ for ( int i = 0 ; i < getTabs( ).size( ) ; i++ ) {
+ ( ( Tab ) getTabs( ).get( i ) ).setColorValue( theColor );
+ }
+ return this;
+ }
+
+ /**
+ * set the background color of the control window.
+ */
+ public ControlWindow setBackground( int theValue ) {
+ background = theValue;
+ return this;
+ }
+
+ /**
+ * get the papplet instance of the ControlWindow.
+ */
+ public PApplet papplet( ) {
+ return _myApplet;
+ }
+
+ /**
+ * sets the frame rate of the control window.
+ *
+ * @param theFrameRate
+ * @return ControlWindow
+ */
+ public ControlWindow frameRate( int theFrameRate ) {
+ _myApplet.frameRate( theFrameRate );
+ return this;
+ }
+
+ public ControlWindow show( ) {
+ isVisible = true;
+ return this;
+ }
+
+ /**
+ * by default the background of a controlWindow is
+ * filled with a background color every frame. to enable
+ * or disable the background from drawing, use
+ * setDrawBackgorund(true/false).
+ *
+ * @param theFlag
+ * @return ControlWindow
+ */
+ public ControlWindow setDrawBackground( boolean theFlag ) {
+ isDrawBackground = theFlag;
+ return this;
+ }
+
+ public boolean isDrawBackground( ) {
+ return isDrawBackground;
+ }
+
+ public boolean isVisible( ) {
+ return isVisible;
+ }
+
+ private boolean isControllerActive(Controller> theController) {
+ if ( isControllerActive == null ) {
+ return false;
+ }
+ return isControllerActive.equals( theController );
+ }
+
+ private ControlWindow setControllerActive(Controller> theController) {
+ isControllerActive = theController;
+ return this;
+ }
+
+ public ControlWindow toggleUndecorated( ) {
+ setUndecorated( !isUndecorated( ) );
+ return this;
+ }
+
+ public ControlWindow setUndecorated( boolean theFlag ) {
+ if ( theFlag != isUndecorated( ) ) {
+ isUndecorated = theFlag;
+ //_myApplet.frame.removeNotify( );
+ //_myApplet.frame.setUndecorated( isUndecorated );
+ _myApplet.setSize( _myApplet.width , _myApplet.height );
+ //_myApplet.setBounds( 0 , 0 , _myApplet.width , _myApplet.height );
+ //_myApplet.frame.setSize( _myApplet.width , _myApplet.height );
+ //_myApplet.frame.addNotify( );
+ }
+ return this;
+ }
+
+ public boolean isUndecorated( ) {
+ return isUndecorated;
+ }
+
+ public ControlWindow setPosition( int theX , int theY ) {
+ return setLocation( theX , theY );
+ }
+
+ public ControlWindow setLocation( int theX , int theY ) {
+ //_myApplet.frame.setLocation( theX , theY );
+ return this;
+ }
+
+ public Pointer getPointer( ) {
+ return _myPointer;
+ }
+
+ public ControlWindow disablePointer( ) {
+ _myPointer.disable( );
+ return this;
+ }
+
+ public ControlWindow enablePointer( ) {
+ _myPointer.enable( );
+ return this;
+ }
+
+ /**
+ * A pointer by default is linked to the mouse and
+ * stores the x and y position as well as the pressed
+ * and released state. The pointer can be accessed by
+ * its getter method {@link ControlWindow#getPointer()}.
+ * Then use
+ * {@link ControlWindow#set(int, int)} to
+ * alter its position or invoke {
+ * {@link ControlWindow#pressed()} or
+ * {@link ControlWindow#released()} to change
+ * its state. To disable the mouse and enable the
+ * Pointer use {@link ControlWindow#enable()}
+ * and {@link ControlWindow#disable()} to
+ * default back to the mouse as input parameter.
+ */
+ // TODO offset against pgx and pgy
+ public class Pointer {
+
+ public Pointer setX( int theX ) {
+ mouseX = theX;
+ return this;
+ }
+
+ public Pointer setY( int theY ) {
+ mouseY = theY;
+ return this;
+ }
+
+ public int getY( ) {
+ return mouseY;
+ }
+
+ public int getX( ) {
+ return mouseX;
+ }
+
+ public int getPreviousX( ) {
+ return pmouseX;
+ }
+
+ public int getPreviousY( ) {
+ return pmouseY;
+ }
+
+ public Pointer set( int theX , int theY ) {
+ setX( theX );
+ setY( theY );
+ return this;
+ }
+
+ // TODO mousePressed/mouseReleased are handled wrongly, released is called when moved, for now do not use, instead use set(x,y), pressed(), released()
+ public Pointer set( int theX , int theY , boolean pressed ) {
+ setX( theX );
+ setY( theY );
+ if ( pressed ) {
+ if ( !mousePressed ) {
+ pressed( );
+ }
+ } else {
+ if ( mousePressed ) {
+ released( );
+ }
+ }
+ return this;
+ }
+
+ public Pointer pressed( ) {
+ mousePressedEvent( );
+ return this;
+ }
+
+ public Pointer released( ) {
+ mouseReleasedEvent( );
+ return this;
+ }
+
+ public void enable( ) {
+ isMouse = false;
+ }
+
+ public void disable( ) {
+ isMouse = true;
+ }
+
+ public boolean isEnabled( ) {
+ return !isMouse;
+ }
+ }
+
+ /**
+ * hide the controllers and tabs of the ControlWindow.
+ */
+ public ControlWindow hide( ) {
+ isVisible = false;
+ isMouseOver = false;
+ return this;
+ }
+
+}
diff --git a/controlP5/ControlWindowCanvas.java b/controlP5/ControlWindowCanvas.java
new file mode 100755
index 0000000..c83bb62
--- /dev/null
+++ b/controlP5/ControlWindowCanvas.java
@@ -0,0 +1,34 @@
+
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+@Deprecated
+public abstract class ControlWindowCanvas extends Canvas {
+
+ // Wrapper class.
+
+}
diff --git a/controlP5/Controller.java b/controlP5/Controller.java
new file mode 100755
index 0000000..2bb9f92
--- /dev/null
+++ b/controlP5/Controller.java
@@ -0,0 +1,2232 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import main.java.src2.main.java.controlP5.controlP5.events.ReleasedOutsideListener;
+import processing.core.PApplet;
+import processing.core.PFont;
+import processing.core.PGraphics;
+import processing.core.PImage;
+import processing.event.KeyEvent;
+
+/**
+ *
+ * Controller is an abstract class that is extended by any available controller within controlP5. this is the full
+ * documentation list for all methods available for a controller. An event triggered by a controller will be forwarded
+ * to the main program. If a void controlEvent(ControlEvent theEvent) {} method is available, this method will be
+ * called.
+ *
+ *
+ * A Controller can notify the main program in 2 different ways:
+ *
+ *
+ * - (1) add method controlEvent(ControlEvent theEvent) to your sketch. ControlP5 will automatically detect this
+ * method and will used it to forward any controlEvent triggered by a controller - you can disable forwarding by using
+ * setBroadcast(false) {@link Controller#setBroadcast(boolean)}
+ * - (2) each controller requires a unique name when being create. In case an existing name is used for a newly
+ * created Controller, the existing one will be overwritten. each unique name can be used to automatically link a
+ * controller to either a method or a field within your program.
+ *
+ *
+ * @see Bang
+ * @see Button
+ * @see Knob
+ * @see Matrix
+ * @see MultiList
+ * @see Numberbox
+ * @see RadioButton
+ * @see ListBox
+ * @see Slider
+ * @see Textarea
+ * @see Textfield
+ * @see Textlabel
+ * @see Toggle
+ * @see ControlGroup
+ * @see ControlBehavior
+ * @see ControlEvent
+ *
+ * @example use/ControlP5basics
+ */
+public abstract class Controller< T > implements ControllerInterface< T > , CDrawable , ControlP5Constants {
+
+ protected float[] position = new float[ 2 ];
+ protected float[] positionBuffer = new float[ 2 ];
+ protected float[] absolutePosition = new float[ 2 ];
+ protected ControllerInterface< ? > _myParent;
+ protected final String _myName;
+ protected ControlWindow _myControlWindow;
+ protected boolean isMousePressed = false;
+ protected ControlP5 cp5;
+ private int width;
+ private int height;
+ protected int _myId = -1;
+ protected float _myValue = Float.NaN;
+ protected float _myDefaultValue = Float.NaN;
+ protected String _myStringValue = "";
+ protected float[] _myArrayValue;
+ protected Label _myCaptionLabel;
+ protected Label _myValueLabel;
+ protected boolean isLabelVisible = true;
+ protected boolean isMoveable = true;
+ protected boolean isBroadcast = true;
+ protected boolean isVisible = true;
+ protected boolean isActive = false;
+ protected boolean isLock = false;
+ protected boolean isUserInteraction = true;
+ protected boolean isInit = false;
+ protected List< ControlListener > _myControlListener;
+ protected Map< Integer , List< CallbackListener >> _myControlListenerLUT;
+ protected CColor color = new CColor( );
+ protected float _myMin;
+ protected float _myMax;
+ protected float _myUnit;
+ protected String target;
+ protected Object targetObject;
+ protected ControlBehavior _myBehavior;
+ protected boolean isBehavior;
+ protected List< Controller< ? >> subelements;
+ protected int _myBroadcastType = ControlP5Constants.FLOAT;
+ protected boolean isUpdate = false;
+ protected int _myDecimalPoints = 2;
+ public static int autoWidth = 49;
+ public static int autoHeight = 19;
+ public static float[] autoSpacing = new float[] { 10 , 10 };
+ protected boolean[] availableImages = new boolean[ 4 ];
+ protected PImage[] images = new PImage[ 4 ];
+ protected ControllerView< T > _myControllerView;
+ protected ControllerView< T > _myDebugView;
+ protected int _myDisplayMode = ControlP5Constants.DEFAULT;
+ protected int _myPickingColor = 0xffffff00;
+ protected boolean mouseover;
+ protected String _myAddress = "";
+ protected List< ControllerPlug > _myControllerPlugList;
+ protected boolean tooltipEnabled;
+ protected boolean listening;
+ protected boolean isInside = false;
+ private T me;
+ protected boolean isDragged;
+
+ /**
+ * TODO add distribution options for MOVE, RELEASE, and PRESSED. setDecimalPoints: setDcimalPoints(6) does only show
+ * 2 digits after the point
+ */
+
+ /**
+ * Convenience constructor to extend Controller.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Controller( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , autoWidth , autoHeight );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected Controller( final ControlP5 theControlP5 , final ControllerGroup< ? > theParent , final String theName , final float theX , final float theY , final int theWidth , final int theHeight ) {
+ cp5 = theControlP5;
+ me = ( T ) this;
+ if ( cp5 == null ) {
+ isBroadcast = false;
+ }
+ _myName = theName;
+
+ set( position , theX , theY );
+ set( positionBuffer , theX , theY );
+
+ setParent( theParent );
+ if ( theParent != null ) {
+ color.set( theParent.color );
+ } else {
+ color.set(ControlP5.color);
+ }
+ width = theWidth;
+ height = theHeight;
+
+ _myCaptionLabel = new Label( cp5 , theName );
+ _myCaptionLabel.setColor( color.getCaptionLabel( ) );
+ _myValueLabel = new Label( cp5 , "-" );
+ _myValueLabel.setColor( color.getCaptionLabel( ) );
+
+ _myControllerPlugList = new ArrayList< ControllerPlug >( );
+ _myControlListener = new ArrayList< ControlListener >( );
+ subelements = new ArrayList< Controller< ? >>( );
+ _myArrayValue = new float[ 0 ];
+ _myDebugView = new DebugView( );
+ setView( _myDebugView );
+ }
+
+ List< Controller< ? >> getSubelements( ) {
+ return subelements;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @ControlP5.Layout public String getAddress( ) {
+ return _myAddress;
+ }
+
+ @Override @ControlP5.Invisible @ControlP5.Layout public T setAddress( String theAddress ) {
+ if ( _myAddress.length( ) == 0 ) {
+ _myAddress = theAddress;
+ }
+ return me;
+ }
+
+ protected Controller( final ControlP5 theControlP5 , final String theName , final float theX , final float theY , final int theWidth , final int theHeight ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , theX , theY , theWidth , theHeight );
+ }
+
+ protected Controller( final String theName , final int theX , final int theY ) {
+ _myName = theName;
+ set( position , theX , theY );
+ }
+
+ @ControlP5.Invisible public void init( ) {
+
+ _myDefaultValue = _myValue;
+
+ // plug to a method or field inside the main
+ // papplet.
+ // forwarding a ControlEvent to the controlEvent()
+ // method inside
+ // the main papplet is done by the
+ // controlbroadcaster.
+ cp5.getControlBroadcaster( ).plug( cp5.papplet , this , _myName );
+ initControllerValue( );
+ isInit = cp5.isAutoInitialization;
+ setValue( _myDefaultValue );
+ isInit = true;
+ updateDisplayMode( ControlP5Constants.DEFAULT );
+ }
+
+ protected final void initControllerValue( ) {
+
+ // this is painful. deciding if the value has been
+ // set by parameter or by reading the
+ // current value of the corresponding field is
+ // very painful here due to too many ifs and thens.
+ // therefore this is done manually here -
+ // very ugly though.
+
+ boolean go = false;
+
+ if ( getClass( ).equals( Numberbox.class ) ) {
+ go = _myDefaultValue == 0;
+ } else {
+ go = _myDefaultValue == getMin( ) || Float.isNaN( getValue( ) );
+ }
+ if ( go ) {
+ if ( _myControllerPlugList.size( ) == 1 ) {
+ if ( getControllerPlugList( ).get( 0 ).getValue( ) == null ) {
+ setDefaultValue( getMin( ) );
+ } else {
+ float myInitValue = 0;
+ if ( getControllerPlugList( ).get( 0 ).getValue( ) instanceof Boolean ) {
+ final boolean myBoolean = Boolean.parseBoolean(getControllerPlugList().get(0).getValue().toString());
+ myInitValue = (myBoolean) ? 1f : 0f;
+
+ } else if ( getControllerPlugList( ).get( 0 ).getValue( ) instanceof Float ) {
+ myInitValue = ( new Float( getControllerPlugList( ).get( 0 ).getValue( ).toString( ) ) ).floatValue( );
+
+ } else if ( getControllerPlugList( ).get( 0 ).getValue( ) instanceof Integer ) {
+ myInitValue = (Integer.valueOf(getControllerPlugList().get(0).getValue().toString())).intValue( );
+
+ } else if ( getControllerPlugList( ).get( 0 ).getValue( ) instanceof String ) {
+ _myStringValue = getControllerPlugList( ).get( 0 ).getValue( ).toString( );
+ }
+ setDefaultValue( myInitValue );
+ }
+ } else {
+ if ( Float.isNaN( getDefaultValue( ) ) ) {
+ setDefaultValue( getMin( ) );
+ }
+ }
+ }
+ _myValue = _myDefaultValue;
+ }
+
+ protected void updateFont( ControlFont theControlFont ) {
+ setFont( theControlFont );
+ }
+
+ /**
+ * with setBehavior you can add a ControlBehavior to a controller. A ControlBehavior can be used to e.g.
+ * automatically change state, function, position, etc.
+ *
+ * @example ControlP5behavior
+ * @param theBehavior ControlBehavior
+ * @return Controller
+ */
+ public T setBehavior( final ControlBehavior theBehavior ) {
+ isBehavior = true;
+ _myBehavior = theBehavior;
+ _myBehavior.init( this );
+ return me;
+ }
+
+ /**
+ * @return Controller
+ */
+ public T removeBehavior( ) {
+ isBehavior = false;
+ _myBehavior = null;
+ return me;
+ }
+
+ /**
+ * @return ControlBehavior
+ */
+ public ControlBehavior getBehavior( ) {
+ return _myBehavior;
+ }
+
+ /**
+ * @return float
+ */
+ @ControlP5.Layout public float getDefaultValue( ) {
+ return _myDefaultValue;
+ }
+
+ /**
+ * set the default value.
+ *
+ * @param theValue float
+ * @return Controller
+ */
+ @ControlP5.Layout public T setDefaultValue( final float theValue ) {
+ _myDefaultValue = theValue;
+ return me;
+ }
+
+ /**
+ * enable or prevent the controller to be moveable. By default a controller is moveable.
+ *
+ * @param theValue boolean
+ * @return Controller
+ */
+ @ControlP5.Layout public T setMoveable( final boolean theValue ) {
+ isMoveable = theValue;
+ return me;
+ }
+
+ /**
+ * checks if a controller is moveable.
+ *
+ * @return boolean
+ */
+ @ControlP5.Layout public boolean isMoveable( ) {
+ return isMoveable;
+ }
+
+ /**
+ * show or hide the labels of a controller.
+ *
+ * @param theValue boolean
+ * @return Controller
+ */
+ @ControlP5.Layout public T setLabelVisible( final boolean theValue ) {
+ isLabelVisible = theValue;
+ return me;
+ }
+
+ /**
+ * @return boolean
+ */
+ @ControlP5.Layout public boolean isLabelVisible( ) {
+ return isLabelVisible;
+ }
+
+ /**
+ * Use setBroadcast to enable and disable the broadcasting of changes in a controller's value. By default any value
+ * changes are forwarded to function controlEvent inside your program. use setBroadcast(false) to disable
+ * forwarding.
+ *
+ * @param theFlag boolean
+ * @return Controller
+ */
+ @ControlP5.Layout public T setBroadcast( final boolean theFlag ) {
+ isBroadcast = theFlag;
+ return me;
+ }
+
+ /**
+ * check if broadcasting is enabled or disabled for a controller. Every event relevant for a value change will be
+ * broadcasted to any of the value-listeners. By default broadcasting for a controller is enabled.
+ *
+ * @return boolean
+ */
+ @ControlP5.Layout public boolean isBroadcast( ) {
+ return isBroadcast;
+ }
+
+ /**
+ * get the position of a controller. e.g. Controller.getPosition().x; {@inheritDoc}
+ */
+ @ControlP5.Layout public float[] getPosition( ) {
+ return position;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override @ControlP5.Layout public T setPosition( float[] thePos ) {
+ set( position , x( thePos ) , y( thePos ) );
+ set( positionBuffer , x( thePos ) , y( thePos ) );
+ return me;
+ }
+
+ /**
+ * set the position of a controller. The position of a controller is relative.
+ *
+ * @param theX float
+ * @param theY float
+ * @return Controller
+ */
+ @Override public T setPosition( final float theX , final float theY ) {
+ set( position , theX , theY );
+ set( positionBuffer , theX , theY );
+ return me;
+ }
+
+ public float[] getAbsolutePosition( ) {
+ return absolutePosition;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override @ControlP5.Invisible public T setAbsolutePosition( float[] thePos ) {
+ // TODO
+ // doesnt work properly yet.
+ // absolute position should not be changed from the
+ // outside anyway.
+ set( absolutePosition , x( thePos ) , y( thePos ) );
+ return me;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @ControlP5.Invisible public T updateAbsolutePosition( ) {
+ return me;
+ }
+
+ /**
+ * continuousUpdateEvents is used for internal updates of a controller. this method is final and can't be
+ * overridden.
+ *
+ * @exclude
+ */
+ @ControlP5.Invisible public final void continuousUpdateEvents( ) {
+ if ( isBehavior ) {
+ if ( _myBehavior.isActive( ) && !isMousePressed ) {
+ _myBehavior.update( );
+ }
+ }
+ }
+
+ /**
+ * updateEvents is used for internal updates of a controller. this method is final and can't be overwritten.
+ */
+ @ControlP5.Invisible public final T updateEvents( ) {
+ if ( isInside ) {
+ boolean moved = ( ( _myControlWindow.mouseX - _myControlWindow.pmouseX ) != 0 || ( _myControlWindow.mouseY - _myControlWindow.pmouseY ) != 0 );
+ if ( isMousePressed ) {
+ if ( moved ) {
+ if ( !isDragged ) {
+ onStartDrag( );
+ callListener( ControlP5Constants.ACTION_START_DRAG );
+ }
+ onDrag( );
+ isDragged = true;
+ callListener( ControlP5Constants.ACTION_DRAG );
+ }
+ } else {
+ if ( moved && this.equals( _myControlWindow.getFirstFromMouseOverList( ) ) ) {
+ onMove( );
+ cp5.getControlBroadcaster( ).invokeAction( new CallbackEvent( this , ControlP5Constants.ACTION_MOVE ) );
+ callListener( ControlP5Constants.ACTION_MOVE );
+ }
+ }
+ }
+
+ if ( isVisible && ( isMousePressed == _myControlWindow.mouselock ) ) {
+ if ( isMousePressed && cp5.isAltDown( ) && isMoveable ) {
+ if ( !cp5.isMoveable ) {
+ set( positionBuffer , x( positionBuffer ) + _myControlWindow.mouseX - _myControlWindow.pmouseX , y( positionBuffer ) + _myControlWindow.mouseY - _myControlWindow.pmouseY );
+ if ( cp5.isShiftDown( ) ) {
+ set( position , ( ( int ) ( x( positionBuffer ) ) / 10 ) * 10 , ( ( int ) ( y( positionBuffer ) ) / 10 ) * 10 );
+ } else {
+ set( position , positionBuffer );
+ }
+ }
+ } else {
+ if ( !isLock ) {
+ if ( isInside ) {
+ setMouseOver( true );
+ }
+
+ if ( inside( ) ) {
+ if ( cp5.getMouseOverList( ).isEmpty( ) ) {
+ if ( !isInside ) {
+ onEnter( );
+ setIsInside( true );
+ callListener( ControlP5Constants.ACTION_ENTER );
+ }
+ setIsInside( true );
+ }
+ } else {
+ if ( isInside && !isMousePressed ) {
+ onLeave( );
+ setMouseOver( false );
+ setIsInside( false );
+ callListener( ControlP5Constants.ACTION_LEAVE );
+ }
+ if ( !isInside && mouseover ) {
+
+ setMouseOver( false );
+
+ // here the mouseOver is set to false when the mouse
+ // is released outside a controller. the mouseoverlist is not
+ // updated when the mouse is still pressed but has left the
+ // controller - updating the list here currently conflicts
+ // with callbacks called from inside setMouseOver()
+ //
+ // Note: the mouseoverlist is only updated for ControllerGroups
+ // when the mouse is pressed but is hovering other controllers while
+ // mouse is dragged.
+ }
+ }
+ }
+ }
+ }
+ return me;
+ }
+
+ public Pointer getPointer( ) {
+ return new Pointer( ) {
+
+ public int x( ) {
+ return ( int ) ( _myControlWindow.mouseX - Controller.x( _myParent.getAbsolutePosition( ) ) - Controller.x( position ) );
+ }
+
+ public int y( ) {
+ return ( int ) ( _myControlWindow.mouseY - Controller.y( _myParent.getAbsolutePosition( ) ) - Controller.y( position ) );
+ }
+
+ public int px( ) {
+ return ( int ) ( _myControlWindow.pmouseX - Controller.x( _myParent.getAbsolutePosition( ) ) - Controller.x( position ) );
+ }
+
+ public int py( ) {
+ return ( int ) ( _myControlWindow.pmouseY - Controller.y( _myParent.getAbsolutePosition( ) ) - Controller.y( position ) );
+ }
+
+ public int dx( ) {
+ return x( ) - px( );
+ }
+
+ public int dy( ) {
+ return y( ) - py( );
+ }
+
+ public long pt( ) {
+ return _myControlWindow.pmousePressedTime;
+ }
+
+ public long dt( ) {
+ return _myControlWindow.mousePressedTime - _myControlWindow.pmousePressedTime;
+ }
+
+ public long t( ) {
+ return _myControlWindow.mousePressedTime;
+ }
+
+ public String toString( ) {
+ return String.format( "{ x: %d y: %d px: %d py: %d dx: %d dy: %d}" , x( ) , y( ) , px( ) , py( ) , dx( ) , dy( ) );
+ }
+ };
+ }
+
+ @ControlP5.Invisible public final boolean setMousePressed( final boolean theStatus ) {
+ if ( !isVisible && !isUserInteraction ) {
+ return false;
+ }
+ if (theStatus) {
+ if ( inside() ) {
+ isMousePressed = true;
+ if ( !cp5.isAltDown( ) ) {
+ mousePressed( );
+ onPress( );
+ cp5.getControlBroadcaster( ).invokeAction( new CallbackEvent( this , ControlP5Constants.ACTION_PRESS ) );
+ callListener( ControlP5Constants.ACTION_PRESS );
+ if ( getPointer( ).dt( ) < 500 ) {
+ onDoublePress( );
+ callListener( ControlP5Constants.ACTION_DOUBLE_PRESS );
+ }
+ }
+ return true;
+ }
+ } else {
+ if ( isMousePressed && inside( ) ) {
+ isMousePressed = false;
+ if ( !cp5.isAltDown( ) ) {
+
+ mouseReleased( );
+ onRelease( );
+ cp5.getControlBroadcaster( ).invokeAction( new CallbackEvent( this , ControlP5Constants.ACTION_RELEASE ) );
+ callListener( ControlP5Constants.ACTION_RELEASE );
+ if ( isDragged ) {
+ /* first release, then stopDrag */
+ onEndDrag( );
+ callListener( ControlP5Constants.ACTION_END_DRAG );
+ } else {
+ onClick( );
+ cp5.getControlBroadcaster( ).invokeAction( new CallbackEvent( this , ControlP5Constants.ACTION_CLICK ) );
+ callListener( ControlP5Constants.ACTION_CLICK );
+ }
+
+ isDragged = false;
+
+ }
+ }
+ if ( !inside( ) ) {
+ setIsInside( false );
+ if ( isMousePressed ) {
+ isMousePressed = false;
+ mouseReleasedOutside( );
+ onReleaseOutside( );
+ cp5.getControlBroadcaster( ).invokeAction( new CallbackEvent( this , ControlP5Constants.ACTION_RELEASE_OUTSIDE ) );
+ callListener( ControlP5Constants.ACTION_RELEASE_OUTSIDE );
+ }
+ if ( this instanceof ReleasedOutsideListener) {
+ mouseReleasedOutside( );
+ onReleaseOutside( );
+ callListener( ControlP5Constants.ACTION_RELEASE_OUTSIDE );
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * enables a controller to listen to changes made to the variable linked to the controller. Use true to enable and
+ * false to disable a controller from listening to changes.
+ *
+ * @param theFlag
+ * @return Controller
+ */
+ public T listen( boolean theValue ) {
+ if ( theValue == listening ) {
+ return me;
+ }
+ listening = theValue;
+ if ( listening ) {
+ cp5.listenTo( _myName , cp5.getObjectForController( this ) );
+ } else {
+ cp5.stopListeningTo( _myName , cp5.getObjectForController( this ) );
+ }
+ return me;
+ }
+
+ /**
+ * returns true or false for the current listening status. by default it is set to false
+ *
+ * @see Controller#listen(boolean)
+ *
+ * @return boolean
+ */
+ public boolean isListening( ) {
+ return listening;
+ }
+
+ /**
+ * check if the mouse is within this particular controller.
+ *
+ * @return boolean
+ */
+ public boolean isMouseOver( ) {
+ return mouseover;
+ }
+
+ public T setMouseOver( boolean theFlag ) {
+ if ( mouseover == theFlag ) {
+ return me;
+ }
+ mouseover = theFlag;
+ if ( mouseover ) {
+ _myControlWindow.setMouseOverController( this );
+ cp5.getControlBroadcaster( ).invokeAction( new CallbackEvent( this , ControlP5Constants.ACTION_ENTER ) );
+ cp5.getTooltip( ).activate( this );
+ } else {
+ cp5.getControlBroadcaster( ).invokeAction( new CallbackEvent( this , ControlP5Constants.ACTION_LEAVE ) );
+ _myControlWindow.removeMouseOverFor( this );
+ cp5.getTooltip( ).deactivate( );
+ setIsInside( false ); /* added after issue 6 has been reported */
+ }
+ return me;
+ }
+
+ /**
+ * @see ControllerInterface.updateInternalEvents
+ */
+ @ControlP5.Invisible public T updateInternalEvents( final PApplet theApplet ) {
+ return me;
+ }
+
+ /**
+ * the default draw function for each controller extending superclass Controller. This draw function will take care
+ * of default matrix operations and will call the display function of the current ControllerView object active for
+ * this particular controller.
+ *
+ * @exclude
+ * @see ControllerView
+ * @param theApplet PApplet
+ */
+ @ControlP5.Invisible @Override public void draw( final PGraphics theGraphics ) {
+
+ theGraphics.pushMatrix( );
+ theGraphics.translate( x( position ) , y( position ) );
+ _myControllerView.display( theGraphics , me );
+ // theGraphics.pushMatrix( );
+ // _myDebugView.display( theGraphics , me );
+ // theGraphics.popMatrix( );
+ theGraphics.popMatrix( );
+
+ }
+
+ /**
+ * @param theElement ControllerInterface
+ * @return Controller
+ */
+ @ControlP5.Invisible public T add( final ControllerInterface< ? > theElement ) {
+ ControlP5.logger( ).warning( " add() not supported." );
+ return me;
+ }
+
+ /**
+ * @param theElement ControllerInterface
+ * @return Controller
+ */
+ @ControlP5.Invisible public T remove( final ControllerInterface< ? > theElement ) {
+ ControlP5.logger( ).warning( "remove() not supported." );
+ return me;
+ }
+
+ /**
+ * removes a controller from controlP5.
+ */
+ public void remove( ) {
+ _myControlWindow.removeMouseOverFor( this );
+ if ( _myParent != null ) {
+ _myParent.remove( this );
+ }
+ if ( cp5 != null ) {
+ cp5.remove( this );
+ }
+ }
+
+ @Override public T bringToFront( ) {
+ return bringToFront( this );
+ }
+
+ @Override public T bringToFront( ControllerInterface< ? > theController ) {
+ if ( _myParent instanceof Tab ) {
+ moveTo( ( Tab ) _myParent );
+ } else {
+ _myParent.bringToFront( theController );
+ }
+ if ( theController != this ) {
+ if ( getSubelements( ).contains( theController ) ) {
+ if ( theController instanceof Controller< ? > ) {
+ getSubelements( ).remove( theController );
+ getSubelements( ).add( ( Controller< ? > ) theController );
+ }
+ }
+ }
+ return me;
+ }
+
+ /**
+ * returns the index name of the controller.
+ *
+ * @return String
+ */
+ public String getName( ) {
+ return _myName;
+ }
+
+ /**
+ * moves the controller to another tab. The tab is defined by parameter theTabName. if controlP5 can't find a tab
+ * with given name, controlP5 will create this tab and add it to the main window.
+ *
+ * @param theTabName String
+ * @return Controller
+ */
+ public final T moveTo( final String theTabName ) {
+ setTab( theTabName );
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.moveTo( theTabName );
+ }
+ return me;
+ }
+
+ /**
+ * moves the controller to another tab.
+ *
+ * @param theTab
+ * @return Controller
+ */
+ public final T moveTo( final Tab theTab ) {
+ setTab( theTab.getWindow( ) , theTab.getName( ) );
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.moveTo( theTab );
+ }
+ return me;
+ }
+
+ /**
+ * moves the controller to the default tab inside the main window.
+ *
+ * @param theApplet
+ * @return Controller
+ */
+ public final T moveTo( final PApplet theApplet ) {
+ setTab( "default" );
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.moveTo( theApplet );
+ }
+ return me;
+ }
+
+ /**
+ * moves the controller to a tab inside the main window.
+ *
+ * @param theApplet
+ * @param theTabName
+ */
+ public final T moveTo( final PApplet theApplet , final String theTabName ) {
+ setTab( theTabName );
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.moveTo( theApplet , theTabName );
+ }
+ return me;
+ }
+
+ /**
+ * moves the controller to the default tab of a control window - other than the main window.
+ *
+ * @param theControlWindow
+ */
+ public final T moveTo( final ControlWindow theControlWindow ) {
+ setTab( theControlWindow , "default" );
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.moveTo( theControlWindow );
+ }
+ return me;
+ }
+
+ /**
+ *
+ * @param theControlWindow
+ * @param theTabName
+ * @return Controller
+ */
+ public final T moveTo( final ControlWindow theControlWindow , final String theTabName ) {
+ setTab( theControlWindow , theTabName );
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.moveTo( theControlWindow , theTabName );
+ }
+ return me;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public final T moveTo( final ControllerGroup< ? > theGroup , final Tab theTab , ControlWindow theControlWindow ) {
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.moveTo( theGroup , theTab , theControlWindow );
+ }
+
+ if ( theGroup != null ) {
+ setGroup( theGroup );
+ return me;
+ }
+
+ if ( theControlWindow == null ) {
+ theControlWindow = cp5.controlWindow;
+ }
+
+ setTab( theControlWindow , theTab.getName( ) );
+ return me;
+ }
+
+ /**
+ *
+ * @param theGroup
+ * @return Controller
+ */
+ public final T moveTo( final ControlGroup< ? > theGroup ) {
+ if ( theGroup != null ) {
+ setGroup( theGroup );
+ }
+ return me;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public final T moveTo( final ControllerGroup< ? > theGroup ) {
+ if ( theGroup != null ) {
+ setGroup( theGroup );
+ }
+ return me;
+ }
+
+ /**
+ * sets the tab of the controller.
+ *
+ * @param theName String
+ * @return Controller
+ */
+ public final T setTab( final String theName ) {
+ setParent( cp5.getTab( theName ) );
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.setTab( theName );
+ }
+ return me;
+ }
+
+ /**
+ *
+ */
+ public final T setTab( final ControlWindow theWindow , final String theName ) {
+ setParent( cp5.getTab( theWindow , theName ) );
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.setTab( theWindow , theName );
+ }
+ return me;
+ }
+
+ /**
+ * sets the group of the controller.
+ *
+ * @param theName String
+ * @return Controller
+ */
+ public final T setGroup( final String theName ) {
+ setParent( cp5.getGroup( theName ) );
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.setGroup( theName );
+ }
+ return me;
+ }
+
+ public final T setGroup( final ControllerGroup< ? > theGroup ) {
+ setParent( theGroup );
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.setGroup( theGroup );
+ }
+ return me;
+ }
+
+ /**
+ * get the instance of the tab the controller belongs to.
+ *
+ * @return Tab
+ */
+ public Tab getTab( ) {
+ if ( _myParent instanceof Tab ) {
+ return ( Tab ) _myParent;
+ }
+ return _myParent.getTab( );
+ }
+
+ /**
+ * set the parent of a parent of a controller. this method is only meant for internal use. this method is final and
+ * can't be overwritten.
+ *
+ * @param theParent ControllerInterface
+ * @return Controller
+ */
+ @ControlP5.Invisible public final T setParent( final ControllerInterface< ? > theParent ) {
+ if ( _myParent != null ) {
+ _myParent.remove( this );
+ }
+ set( absolutePosition , x( position ) , y( position ) );
+ if ( theParent != null ) {
+ _myParent = theParent;
+ _myParent.add( this );
+ set( absolutePosition , x( absolutePosition ) + x( _myParent.getPosition( ) ) , y( absolutePosition ) + y( _myParent.getPosition( ) ) );
+ _myControlWindow = _myParent.getWindow( );
+ }
+ setMouseOver( false );
+ return me;
+ }
+
+ /**
+ * returns the parent of a controller.
+ *
+ * @return ControllerInterface
+ */
+
+ @ControlP5.Invisible @Override @ControlP5.Layout public ControllerInterface< ? > getParent( ) {
+ return _myParent;
+ }
+
+ /**
+ * returns the control window of the controller
+ *
+ * @return ControlWindow
+ */
+ public ControlWindow getWindow( ) {
+ return _myControlWindow;
+ }
+
+ /**
+ * checks if the mouse is within the area of a controller.
+ *
+ * @return boolean
+ */
+ protected boolean inside( ) {
+ /* constrain the bounds of the controller to the dimensions of the cp5 area, required since PGraphics as render
+ * area has been introduced. */
+ float x0 = PApplet.max( 0 , x( position ) + x( _myParent.getAbsolutePosition( ) ) );
+ float x1 = PApplet.min( cp5.pgw , x( position ) + x( _myParent.getAbsolutePosition( ) ) + getWidth( ) );
+ float y0 = PApplet.max( 0 , y( position ) + y( _myParent.getAbsolutePosition( ) ) );
+ float y1 = PApplet.min( cp5.pgh , y( position ) + y( _myParent.getAbsolutePosition( ) ) + getHeight( ) );
+ return ( _myControlWindow.mouseX > x0 && _myControlWindow.mouseX < x1 && _myControlWindow.mouseY > y0 && _myControlWindow.mouseY < y1 );
+ }
+
+ /**
+ * returns true or false and indicates if the mouse is inside the area of a controller.
+ *
+ * @return boolean
+ */
+ public boolean isInside( ) {
+ return isInside;
+ }
+
+ /**
+ * checks if a controller is active.
+ *
+ * @return boolean
+ */
+ @ControlP5.Layout public boolean isActive( ) {
+ return isActive;
+ }
+
+ /**
+ * returns true or false if the mouse has is pressed.
+ *
+ * @return boolean
+ */
+ public boolean isMousePressed( ) {
+ return isMousePressed;
+ }
+
+ public T addListenerFor( int theAction , CallbackListener theListener ) {
+ if ( _myControlListenerLUT == null ) {
+ _myControlListenerLUT = new HashMap< Integer , List< CallbackListener >>( );
+ }
+ if ( _myControlListenerLUT.get( theAction ) == null ) {
+ _myControlListenerLUT.put( theAction , new ArrayList( ) );
+ }
+ _myControlListenerLUT.get( theAction ).add( theListener );
+ return me;
+ }
+
+ public T removeListenerFor( int theAction , CallbackListener theListener ) {
+ if ( _myControlListenerLUT == null ) {
+ return me;
+ }
+ if ( _myControlListenerLUT.get( theAction ) == null ) {
+ return me;
+ }
+ _myControlListenerLUT.get( theAction ).remove( theListener );
+ return me;
+ }
+
+ public T removeListenersFor( int theAction ) {
+ if ( _myControlListenerLUT == null ) {
+ return me;
+ }
+ if ( _myControlListenerLUT.get( theAction ) == null ) {
+ return me;
+ }
+ _myControlListenerLUT.get( theAction ).clear( );
+ return me;
+ }
+
+ protected void callListener( int theAction ) {
+ if ( _myControlListenerLUT != null ) {
+ List< CallbackListener > l = _myControlListenerLUT.get( theAction );
+ if ( l != null ) {
+ CallbackEvent event = new CallbackEvent( this , theAction );
+ for ( CallbackListener cl : l ) {
+ cl.controlEvent( event );
+ }
+ }
+ }
+ }
+
+ public T onDraw( ControllerView< T > theView ) {
+ return setView( theView );
+ }
+
+ public T onEnter( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_ENTER , theListener );
+ }
+
+ public T onLeave( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_LEAVE , theListener );
+ }
+
+ public T onDrag( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_DRAG , theListener );
+ }
+
+ public T onStartDrag( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_START_DRAG , theListener );
+ }
+
+ public T onEndDrag( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_END_DRAG , theListener );
+ }
+
+ public T onWheel( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_WHEEL , theListener );
+ }
+
+ public T onMove( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_MOVE , theListener );
+ }
+
+ public T onClick( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_CLICK , theListener );
+ }
+
+ public T onPress( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_PRESS , theListener );
+ }
+
+ public T onDoublePress( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_DOUBLE_PRESS , theListener );
+ }
+
+ public T onRelease( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_RELEASE , theListener );
+ }
+
+ public T onReleaseOutside( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_RELEASE_OUTSIDE , theListener );
+ }
+
+ public T onChange( CallbackListener theListener ) {
+ return addListenerFor( ControlP5Constants.ACTION_BROADCAST , theListener );
+ }
+
+ protected void onEnter( ) {
+ }
+
+ protected void onLeave( ) {
+ }
+
+ protected void onDrag( ) {
+ }
+
+ protected void onStartDrag( ) {
+ }
+
+ protected void onEndDrag( ) {
+ }
+
+ protected void onWheel( ) {
+ }
+
+ protected void onMove( ) {
+ }
+
+ protected void onClick( ) {
+ }
+
+ protected void onPress( ) {
+ }
+
+ protected void onDoublePress( ) {
+ }
+
+ protected void onRelease( ) {
+ }
+
+ protected void onScroll( int theAmount ) {
+ }
+
+ protected void onReleaseOutside( ) {
+ }
+
+ protected void mousePressed( ) {
+ this.setActive();
+ }
+
+ protected void mouseReleased( ) {
+ }
+
+ protected void mouseReleasedOutside( ) {
+ }
+
+ public void setActive(){
+ ( (ControllerGroup>) _myParent).setActiveController(this);
+ }
+
+ protected void setIsInside( boolean theFlag ) {
+ isInside = theFlag;
+ }
+
+ protected boolean getIsInside( ) {
+ return isInside;
+ }
+
+ /**
+ *
+ * @param KeyEvent theEvent
+ */
+ public void keyEvent( final KeyEvent theEvent ) {
+ }
+
+ /**
+ * set the id of a controller.
+ *
+ * @param int theId
+ * @return Controller
+ */
+ @ControlP5.Layout public T setId( final int theId ) {
+ _myId = theId;
+ return me;
+ }
+
+ /**
+ * returns the id of a controller, by default the id is -1. Any int can be given to a controller as its ID,
+ * controlP5 does not recognize duplicates, this has to be managed on the user site.
+ *
+ * @return int
+ */
+ @ControlP5.Layout public int getId( ) {
+ return _myId;
+ }
+
+ protected ControllerPlug getControllerPlug( int theIndex ) {
+ return _myControllerPlugList.get( theIndex );
+ }
+
+ /**
+ *
+ * @return List
+ */
+ public List< ControllerPlug > getControllerPlugList( ) {
+ return _myControllerPlugList;
+ }
+
+ protected boolean checkControllerPlug( ControllerPlug thePlug ) {
+ for ( ControllerPlug cp : _myControllerPlugList ) {
+ if ( cp.getObject( ).equals( thePlug.getObject( ) ) && cp.getName( ).equals( thePlug.getName( ) ) ) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ protected void addControllerPlug( final ControllerPlug thePlug ) {
+ if ( checkControllerPlug( thePlug ) )
+ return;
+ _myControllerPlugList.add( thePlug );
+ }
+
+ protected void removeControllerPlug( final ControllerPlug thePlug ) {
+ _myControllerPlugList.remove( thePlug );
+ }
+
+ /**
+ * plugs the controller to a list of objects
+ *
+ * @param theObject
+ * @return Controller
+ */
+ public T plugTo( final Object[] theObjects ) {
+ for ( Object o : theObjects ) {
+ plugTo( o , _myName );
+ }
+ return me;
+ }
+
+ /**
+ *
+ * @param theObjects
+ * @param theName
+ * @return Controller
+ */
+ public T plugTo( final Object[] theObjects , String theName ) {
+ for ( Object o : theObjects ) {
+ plugTo( o , theName );
+ }
+ return me;
+ }
+
+ /**
+ * @param theObject
+ * @return Controller
+ */
+ public T plugTo( Object theObject ) {
+ return plugTo( theObject , _myName );
+ }
+
+ public T plugTo( Object theObject , String theName ) {
+ if ( ( theObject instanceof PApplet ) ) {
+ unplugFrom( theObject );
+ }
+ cp5.getControlBroadcaster( ).plug( theObject , this , theName );
+ cp5.getControlBroadcaster( ).plug( theObject , this , cp5.getControlBroadcaster( ).getEventMethod( ) );
+ return me;
+ }
+
+ /**
+ * unplugs the controller from a list of objects
+ *
+ * @param theObjects
+ * @return
+ */
+ public T unplugFrom( final Object[] theObjects ) {
+ for ( Object o : theObjects ) {
+ unplugFrom( o );
+ }
+ return me;
+ }
+
+ /**
+ * unplugs the Controller for a single object
+ *
+ * @param theObject
+ * @return Controller
+ */
+ public T unplugFrom( final Object theObject ) {
+ for ( Iterator< ControllerPlug > i = _myControllerPlugList.iterator( ) ; i.hasNext( ) ; ) {
+ if ( i.next( ).getObject( ).equals( theObject ) ) {
+ i.remove( );
+ }
+ }
+ return me;
+ }
+
+ /**
+ * @param theValue float
+ */
+ @ControlP5.Layout public T setValue( float theValue ) {
+ _myValue = theValue;
+ broadcast( ControlP5Constants.FLOAT );
+ return me;
+ }
+
+ public T setValueSelf( float theValue ) {
+ boolean broadcast = isBroadcast( );
+ setBroadcast( false );
+ _myValue = theValue;
+ broadcast( ControlP5Constants.FLOAT );
+ setBroadcast( broadcast );
+ return me;
+ }
+
+ /**
+ * @see Controller#getStringValue()
+ * @see Controller#getArrayValue()
+ * @return float
+ */
+ @ControlP5.Layout public float getValue( ) {
+ return _myValue;
+ }
+
+ /**
+ * @param theValue
+ * @return Controller
+ */
+ @ControlP5.Layout public T setStringValue( String theValue ) {
+ _myStringValue = theValue;
+ return me;
+ }
+
+ /**
+ * @see Controller#getValue()
+ * @see Controller#getArrayValue()
+ *
+ * @return String
+ */
+ @ControlP5.Layout public String getStringValue( ) {
+ return _myStringValue;
+ }
+
+ /**
+ * returns the current float array value of a controller.
+ *
+ * @see Controller#getValue()
+ * @see Controller#getStringValue()
+ *
+ * @return float[]
+ */
+ @ControlP5.Layout public float[] getArrayValue( ) {
+ return _myArrayValue;
+ }
+
+ /**
+ * @param theIndex
+ * @return float
+ */
+ public float getArrayValue( int theIndex ) {
+ if ( theIndex >= 0 && theIndex < _myArrayValue.length ) {
+ return _myArrayValue[ theIndex ];
+ } else {
+ return Float.NaN;
+ }
+ }
+
+ /**
+ *
+ * @param theArray
+ * @return Controller
+ */
+ @ControlP5.Layout public T setArrayValue( float[] theArray ) {
+ _myArrayValue = theArray;
+ return me;
+ }
+
+ /**
+ *
+ * @param theIndex
+ * @param theValue
+ * @return Controller
+ */
+ public T setArrayValue( int theIndex , float theValue ) {
+ if ( theIndex >= 0 && theIndex < _myArrayValue.length ) {
+ _myArrayValue[ theIndex ] = theValue;
+ }
+ return me;
+ }
+
+ /**
+ * sets the value of the controller without sending the broadcast event. this function is final.
+ *
+ * @param theValue float
+ * @return Controller
+ */
+ public final T changeValue( float theValue ) {
+ boolean br = this.isBroadcast;
+ this.isBroadcast = false;
+ setValue( theValue );
+ this.isBroadcast = br;
+ return me;
+ }
+
+ /**
+ * updates the value of the controller without having to set the value explicitly. update does not visually update
+ * the controller. the updating status can be set with setUpdate(true/false) and checked with isUpdate().
+ *
+ * @see Controller#setUpdate(boolean)
+ * @see Controller#isUpdate()
+ * @return Controller
+ */
+ public T update( ) {
+ return me;
+ }
+
+ /**
+ * disables the update function for a controller.
+ *
+ * @see Controller#update()
+ * @see Controller#isUpdate()
+ *
+ * @param theFlag boolean
+ * @return Controller
+ */
+ @Override public T setUpdate( final boolean theFlag ) {
+ isUpdate = theFlag;
+ return me;
+ }
+
+ /**
+ * enables the update function for a controller.
+ *
+ * @see Controller#update()
+ * @see Controller#setUpdate(boolean)
+ *
+ * @return boolean
+ */
+ public boolean isUpdate( ) {
+ return isUpdate;
+ }
+
+ @ControlP5.Invisible public int getPickingColor( ) {
+ return _myPickingColor;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override @ControlP5.Layout public CColor getColor( ) {
+ return color;
+ }
+
+ /**
+ * sets the content of the caption label of a controller.
+ *
+ * @param theLabel
+ * @return Controller
+ */
+ @ControlP5.Layout public T setCaptionLabel( final String theLabel ) {
+ _myCaptionLabel.set( theLabel );
+ return me;
+ }
+
+ /**
+ * set or change the value of the value label of a controller. (this is cheating, but maybe useful for some cases.)
+ *
+ * @param theLabel
+ * @return Controller
+ */
+ @ControlP5.Layout public T setValueLabel( final String theLabel ) {
+ _myValueLabel.set( theLabel );
+ return me;
+ }
+
+ /**
+ * returns the controller's caption label text.
+ *
+ * @return String
+ */
+ @ControlP5.Invisible public String getLabel( ) {
+ return _myCaptionLabel.getText( );
+ }
+
+ /**
+ * @see ControlListener
+ * @param theListener ControlListener
+ * @return Controller
+ */
+ public T addListener( final ControlListener theListener ) {
+ _myControlListener.add( theListener );
+ return me;
+ }
+
+ /**
+ * @see ControlListener
+ * @param theListener ControlListener
+ * @return Controller
+ */
+ public T removeListener( final ControlListener theListener ) {
+ _myControlListener.remove( theListener );
+ return me;
+ }
+
+ /**
+ * @return int
+ */
+ public int listenerSize( ) {
+ return _myControlListener.size( );
+ }
+
+ /**
+ * @see CallbackListener
+ * @param theListener
+ * @return Controller
+ */
+ public T addCallback( CallbackListener theListener ) {
+ cp5.addCallback( theListener , this );
+ return me;
+ }
+
+ /**
+ * @see CallbackListener
+ * @param theListener
+ * @return Controller
+ */
+ public T removeCallback( CallbackListener theListener ) {
+ cp5.removeCallback( theListener );
+ return me;
+ }
+
+ /**
+ * @return Controller
+ */
+ public T removeCallback( ) {
+ cp5.removeCallback( this );
+ return me;
+ }
+
+ protected void broadcast( ) {
+ broadcast( _myBroadcastType );
+ }
+
+ protected void broadcast( int theType ) {
+ theType = _myBroadcastType;
+ final ControlEvent myEvent = new ControlEvent( this );
+ for ( ControlListener cl : _myControlListener ) {
+ cl.controlEvent( myEvent );
+ }
+ if ( isBroadcast && isInit ) {
+ cp5.getControlBroadcaster( ).broadcast( myEvent , theType );
+ cp5.getControlBroadcaster( ).invokeAction( new CallbackEvent( this , ControlP5Constants.ACTION_BROADCAST ) );
+ callListener( ControlP5Constants.ACTION_BROADCAST );
+ }
+ isInit = true;
+ }
+
+ /**
+ * @return boolean
+ */
+ @ControlP5.Layout @Override public boolean isVisible( ) {
+ if ( getParent( ) != null ) {
+ if (!getParent().isVisible()) {
+ return false;
+ }
+ }
+ return isVisible;
+ }
+
+ /**
+ * @param theFlag boolean
+ * @return Controller
+ */
+ @ControlP5.Layout public T setVisible( final boolean theFlag ) {
+ isVisible = theFlag;
+ if (!theFlag) {
+ isActive = false;
+ }
+ return me;
+ }
+
+ /**
+ * @return Controller
+ */
+ @Override public T hide( ) {
+ setMouseOver( false );
+ isVisible = false;
+ isActive = false;
+ return me;
+ }
+
+ /**
+ * @return Controller
+ */
+ @Override public T show( ) {
+ isVisible = true;
+ return me;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public T setColor( CColor theColor ) {
+ color.set( theColor );
+ setColorCaptionLabel( theColor.getCaptionLabel( ) );
+ setColorValueLabel( theColor.getValueLabel( ) );
+ return me;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override @ControlP5.Layout public T setColorActive( final int theColor ) {
+ color.setActive( theColor );
+ return me;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override @ControlP5.Layout public T setColorForeground( final int theColor ) {
+ color.setForeground( theColor );
+ return me;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override @ControlP5.Layout public T setColorBackground( final int theColor ) {
+ color.setBackground( theColor );
+ return me;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @param theColor
+ * @return Controller
+ */
+ @ControlP5.Layout public T setColorCaptionLabel( final int theColor ) {
+ color.setCaptionLabel( theColor );
+ _myCaptionLabel.setColor( color.getCaptionLabel( ) );
+ return me;
+ }
+
+ /**
+ * @param theColor
+ * @return Controller
+ */
+ @ControlP5.Layout public T setColorValueLabel( final int theColor ) {
+ color.setValueLabel( theColor );
+ if ( _myValueLabel != null ) {
+ _myValueLabel.setColor( color.getValueLabel( ) );
+ }
+ return me;
+ }
+
+ /**
+ * by default controllers use simple shapes, to replace these shapes with images, use setImages(). This can be handy
+ * for buttons, toggles, bangs, for more complex controllers such as sliders, range, dropdownlist this is not
+ * advisable.
+ *
+ * @param theImageDefault
+ * @param theImageOver
+ * @param theImageActive
+ * @return Controller
+ */
+ public T setImages( PImage theImageDefault , PImage theImageOver , PImage theImageActive ) {
+ setImage( theImageDefault , ControlP5Constants.DEFAULT );
+ setImage( theImageOver , ControlP5Constants.OVER );
+ setImage( theImageActive , ControlP5Constants.ACTIVE );
+ setImage( theImageActive , ControlP5Constants.HIGHLIGHT );
+ return me;
+ }
+
+ public T setImages( PImage theImageDefault , PImage theImageOver , PImage theImageActive , PImage theImageHighlight ) {
+ setImage( theImageDefault , ControlP5Constants.DEFAULT );
+ setImage( theImageOver , ControlP5Constants.OVER );
+ setImage( theImageActive , ControlP5Constants.ACTIVE );
+ setImage( theImageHighlight , ControlP5Constants.HIGHLIGHT );
+ return me;
+ }
+
+ public T setImages( PImage ... imgs ) {
+ if ( imgs.length < 3 || imgs.length > 4 ) {
+ return me;
+ }
+ setImage( imgs[ 0 ] , ControlP5Constants.DEFAULT );
+ setImage( imgs[ 1 ] , ControlP5Constants.OVER );
+ setImage( imgs[ 2 ] , ControlP5Constants.ACTIVE );
+ setImage( imgs.length == 3 ? imgs[ 2 ] : imgs[ 3 ] , ControlP5Constants.HIGHLIGHT );
+ return me;
+ }
+
+ public T setImage( PImage theImage ) {
+ return setImage( theImage , ControlP5Constants.DEFAULT );
+ }
+
+ /**
+ * @param theImage
+ * @param theState use Controller.DEFAULT (background) Controller.OVER (foreground) Controller.ACTIVE (active)
+ */
+ public T setImage( PImage theImage , int theState ) {
+ if ( theImage != null ) {
+ images[ theState ] = theImage;
+ availableImages[ theState ] = true;
+ updateDisplayMode( ControlP5Constants.IMAGE );
+ }
+ return me;
+ }
+
+ public T updateSize( ) {
+ if ( images[ ControlP5Constants.DEFAULT ] != null ) {
+ setSize( images[ ControlP5Constants.DEFAULT ] );
+ }
+ return me;
+ }
+
+ /**
+ * auto-updates the size of a controller according to the dimensions of the PImage.
+ *
+ * @param theImage
+ * @return Controller
+ */
+ public T setSize( PImage theImage ) {
+ if ( theImage != null ) {
+ setSize( theImage.width , theImage.height );
+ }
+ return me;
+ }
+
+ /**
+ * @param theWidth
+ * @param theHeight
+ * @return Controller
+ */
+ public T setSize( int theWidth , int theHeight ) {
+ setWidth( theWidth );
+ setHeight( theHeight );
+ return me;
+ }
+
+ protected T updateDisplayMode( int theMode ) {
+ if ( theMode != ControlP5Constants.DEFAULT ) {
+ ControlP5.logger( ).warning( "Image-based or custom displays are not yet implemented for this type of controller. (" + this.getClass( ).getName( ) + ")" );
+ }
+ return me;
+ }
+
+ /**
+ * use setDisplay to customize your controller look. A new controller-display class required to implement interface
+ * ControllerView. By default the display mode will be set to CUSTOM when setting a new display.
+ *
+ * @see ControllerView
+ * @param theView
+ * @return Controller
+ */
+ public T setView( ControllerView< T > theView ) {
+ setView( theView , ControlP5Constants.CUSTOM );
+ return me;
+ }
+
+ public void setView( ControllerView< T > theView , int theMode ) {
+ _myDisplayMode = theMode;
+ _myControllerView = theView;
+ }
+
+ public ControllerView< T > getView( ) {
+ return _myControllerView;
+ }
+
+ /**
+ * @see Label
+ * @return Label
+ */
+ @ControlP5.Layout public Label getCaptionLabel( ) {
+ return _myCaptionLabel;
+ }
+
+ /**
+ * @return Label
+ */
+ @ControlP5.Layout public Label getValueLabel( ) {
+ return _myValueLabel;
+ }
+
+ /**
+ * returns the maximum value of the controller.
+ *
+ * @return float
+ */
+ @ControlP5.Layout public float getMax( ) {
+ return _myMax;
+ }
+
+ /**
+ * returns the minimum value of the controller.
+ *
+ * @return float
+ */
+ @ControlP5.Layout public float getMin( ) {
+ return _myMin;
+ }
+
+ /**
+ * sets the minimum value of the Controller.
+ *
+ * @param theValue float
+ * @return Controller
+ */
+ @ControlP5.Layout public T setMin( float theValue ) {
+ _myMin = theValue;
+ changeValue( getValue( ) );
+ return me;
+ }
+
+ /**
+ * sets the maximum value of the Controller.
+ *
+ * @param theValue float
+ * @return Controller
+ */
+ @ControlP5.Layout public T setMax( float theValue ) {
+ _myMax = theValue;
+ changeValue( getValue( ) );
+ return me;
+ }
+
+ /**
+ * @param theWidth
+ * @return Controller
+ */
+ @ControlP5.Layout public T setWidth( int theWidth ) {
+ width = theWidth;
+ return me;
+ }
+
+ /**
+ * @param theHeight
+ * @return Controller
+ */
+ @ControlP5.Layout public T setHeight( int theHeight ) {
+ height = theHeight;
+ return me;
+ }
+
+ /**
+ * @return int
+ */
+ @ControlP5.Layout public int getWidth( ) {
+ return width;
+ }
+
+ /**
+ * @return int
+ */
+ @ControlP5.Layout public int getHeight( ) {
+ return height;
+ }
+
+ /**
+ * sets the decimal precision of a controller's float value displayed. the precision does not apply to the returned
+ * float value.
+ *
+ * @param theValue
+ * @return Controller
+ */
+ @ControlP5.Layout public T setDecimalPrecision( int theValue ) {
+ _myDecimalPoints = theValue;
+ // TODO transfer color values of existing label
+ int[] t = _myValueLabel.getAlign( );
+ _myValueLabel = new Label( cp5 , ((adjustValue(_myMax)).length() > (adjustValue(_myMin)).length()) ? adjustValue(_myMax) : adjustValue(_myMin));
+ _myValueLabel.align( t );
+ _myValueLabel.setColor( color.getValueLabel( ) );
+ _myValueLabel.set(adjustValue(getValue()));
+ return me;
+ }
+
+ /**
+ * @return int
+ */
+ @ControlP5.Layout public int getDecimalPrecision( ) {
+ return _myDecimalPoints;
+ }
+
+ /**
+ * @param theValue float
+ * @return String
+ */
+ protected String adjustValue( final float theValue ) {
+ return adjustValue( theValue , _myDecimalPoints );
+ }
+
+ /**
+ * @param theValue
+ * @param theFloatPrecision
+ * @return String
+ */
+ protected String adjustValue( final float theValue , final int theFloatPrecision ) {
+
+ int myFloatNumberLength = theFloatPrecision + 1;
+ if ( getControllerPlugList( ).size( ) > 0 ) {
+ for ( ControllerPlug cp : getControllerPlugList( ) ) {
+ if (cp.getClassType() == int.class) {
+ myFloatNumberLength = 0;
+ break;
+ }
+ }
+ }
+ String myLabelValue = String.valueOf(theValue);
+ int myIndex = myLabelValue.indexOf( '.' );
+ if ( myIndex > 0 ) {
+
+ if ( theFloatPrecision == 0 ) {
+ myIndex--;
+ }
+ myLabelValue = myLabelValue.substring( 0 , Math.min( myLabelValue.length( ) , myIndex + myFloatNumberLength ));
+
+ final int n = ( myLabelValue.length( ) - myIndex );
+ if ( n < myFloatNumberLength ) {
+ for ( int i = 0 ; i < myFloatNumberLength - n ; i++ ) {
+ myLabelValue += "0";
+ }
+ }
+ } else {
+ myLabelValue += ".";
+ for ( int i = 0 ; i < myFloatNumberLength ; i++ ) {
+ myLabelValue += "0";
+ }
+ }
+
+ return myLabelValue;
+ }
+
+ public T align( int theCaptionX , int theCaptionY , int theValueX , int theValueY ) {
+ getCaptionLabel( ).align( theCaptionX , theCaptionY );
+ getCaptionLabel( ).align( theValueX , theValueY );
+ return me;
+ }
+
+ /**
+ * @return ControlWindow
+ */
+ public ControlWindow getControlWindow( ) {
+ return _myControlWindow;
+ }
+
+ /**
+ * disables the controller to be moved, or changed or controlled by the user.
+ *
+ * @return Controller
+ */
+ public T lock( ) {
+ isLock = true;
+ return me;
+ }
+
+ /**
+ * enables the controller to be moved, changed and controlled by the user.
+ *
+ * @return Controller
+ */
+ public T unlock( ) {
+ isLock = false;
+ return me;
+ }
+
+ /**
+ * @return boolean
+ */
+ @ControlP5.Layout public boolean isLock( ) {
+ return isLock;
+ }
+
+ /**
+ * sets the lock status of the controller
+ *
+ * @param theValue
+ * @return Controller
+ */
+ @ControlP5.Layout public T setLock( boolean theValue ) {
+ isLock = theValue;
+ return me;
+ }
+
+ /**
+ * @exclude TODO
+ */
+ @ControlP5.Invisible public T setUserInteraction( boolean theValue ) {
+ isUserInteraction = theValue;
+ return me;
+ }
+
+ /**
+ * @exclude
+ * @return boolean
+ */
+ @ControlP5.Invisible public boolean isUserInteraction( ) {
+ return isUserInteraction;
+ }
+
+ /**
+ * adds a tooltip to a controller, by default the tooltip is disabled. A Tooltip is made visible when entering a
+ * controller with the mouse, when the mouse is moved inside the controller, the tooltip will hide.
+ *
+ * @param theText
+ * @return Controller
+ */
+ public T registerTooltip( String theText ) {
+ cp5.getTooltip( ).register( this , theText );
+ return me;
+ }
+
+ /**
+ * @see Controller#registerTooltip(String)
+ * @return Controller
+ */
+ public T unregisterTooltip( ) {
+ cp5.getTooltip( ).unregister( this );
+ return me;
+ }
+
+ protected T setTooltipEnabled( boolean theValue ) {
+ tooltipEnabled = theValue;
+ return me;
+ }
+
+ protected boolean isTooltipEnabled( ) {
+ return tooltipEnabled;
+ }
+
+ /**
+ * @return Controller
+ */
+ public T linebreak( ) {
+ cp5.linebreak( this , true , autoWidth , autoHeight , autoSpacing );
+ return me;
+ }
+
+ class DebugView implements ControllerView< T > {
+
+ public void display( PGraphics theGraphics , T theController ) {
+ if ( inside( ) ) {
+ theGraphics.fill( 255 , 0 , 0 , 50 );
+ theGraphics.stroke( 255 , 0 , 0 );
+ } else {
+ theGraphics.fill( 255 , 50 );
+ theGraphics.stroke( 255 );
+ }
+
+ theGraphics.pushMatrix( );
+ theGraphics.rect( 0 , 0 , width , height );
+ theGraphics.popMatrix( );
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public ControllerProperty getProperty( String thePropertyName ) {
+ return cp5.getProperties( ).getProperty( this , thePropertyName );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public ControllerProperty getProperty( String theSetter , String theGetter ) {
+ return cp5.getProperties( ).getProperty( this , theSetter , theGetter );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public T registerProperty( String thePropertyName ) {
+ cp5.getProperties( ).register( this , thePropertyName );
+ return me;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public T registerProperty( String theSetter , String theGetter ) {
+ cp5.getProperties( ).register( this , theSetter , theGetter );
+ return me;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public T removeProperty( String thePropertyName ) {
+ cp5.getProperties( ).remove( this , thePropertyName );
+ return me;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public T removeProperty( String theSetter , String theGetter ) {
+ cp5.getProperties( ).remove( this , theSetter , theGetter );
+ return me;
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override public String toString( ) {
+ return getName( ) + " [" + getClass( ).getSimpleName( ) + "]";
+ }
+
+ /**
+ * @exclude
+ * @return String
+ */
+ public String getInfo( ) {
+ return "[ type:\tController" + "\nname:\t" + _myName + "\n" + "label:\t" + _myCaptionLabel.getText( ) + "\n" + "id:\t" + _myId + "\n" + "value:\t" + getValue( ) + "\n" + "arrayvalue:\t" + CP.arrayToString( _myArrayValue ) + "\n" + "position:\t"
+ + position + "\n" + "absolute:\t" + absolutePosition + "\n" + "width:\t" + getWidth( ) + "\n" + "height:\t" + getHeight( ) + "\n" + "color:\t" + getColor( ) + "\n" + "visible:\t" + isVisible + "\n" + "moveable:\t" + isMoveable + " ]";
+ }
+
+ /**
+ * convenience method to fill a float array in favor of theArray[0] = 1.2; etc.
+ * takes a float array and fills it (starting from index 0) with arguments starting from index 1.
+ */
+ static public float[] set( float[] theArray , float ... theValues ) {
+ if ( theValues.length > theArray.length ) {
+ System.arraycopy( theValues , 0 , theArray , 0 , theArray.length );
+ } else {
+ System.arraycopy( theValues , 0 , theArray , 0 , theValues.length );
+ }
+ return theArray;
+ }
+
+ /**
+ * returns the first element of the float array.
+ */
+ static public float x( float[] theArray ) {
+ if ( theArray.length > 0 ) {
+ return theArray[ 0 ];
+ }
+ return 0;
+ }
+
+ /**
+ * returns the second element of the float array.
+ */
+ static public float y( float[] theArray ) {
+ if ( theArray.length > 1 ) {
+ return theArray[ 1 ];
+ }
+ return 0;
+ }
+
+ @Override public T setLabel( String theString ) {
+ getCaptionLabel( ).setText( theString );
+ return me;
+ }
+
+ @Override public T setColorLabel( int theColor ) {
+ getCaptionLabel( ).setColor( theColor );
+ return me;
+ }
+
+ @Override public T setColorValue( int theColor ) {
+ getValueLabel( ).setColor( theColor );
+ return me;
+ }
+
+ @Override public T setFont( PFont thePFont ) {
+ getValueLabel( ).setFont( thePFont );
+ getCaptionLabel( ).setFont( thePFont );
+ return me;
+ }
+
+ @Override public T setFont( ControlFont theFont ) {
+ getValueLabel( ).setFont( theFont );
+ getCaptionLabel( ).setFont( theFont );
+ return me;
+ }
+
+}
diff --git a/controlP5/ControllerAutomator.java b/controlP5/ControllerAutomator.java
new file mode 100755
index 0000000..15059a0
--- /dev/null
+++ b/controlP5/ControllerAutomator.java
@@ -0,0 +1,352 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+/**
+ * Used to convert Annotations into individual controllers this method of creating controllers is
+ * derived from cp5magic by Karsten Schmidt http://hg.postspectacular.com/cp5magic/wiki/Home
+ */
+
+class ControllerAutomator {
+
+ static Map< Set< Class< ? >> , Class< ? extends Controller< ? >>> mapping = new HashMap< Set< Class< ? >> , Class< ? extends Controller< ? >>>( );
+
+ static {
+ mapping.put( makeKey( boolean.class ) , Toggle.class );
+ mapping.put( makeKey( int.class ) , Slider.class );
+ mapping.put( makeKey( float.class ) , Slider.class );
+ mapping.put( makeKey( String.class ) , Textfield.class );
+ }
+
+ static Map< String , Class< ? extends ControllerInterface< ? >>> types = new HashMap< String , Class< ? extends ControllerInterface< ? >>>( );
+
+ static {
+ types.put( "slider" , Slider.class );
+ types.put( "knob" , Knob.class );
+ types.put( "numberbox" , Numberbox.class );
+ types.put( "toggle" , Toggle.class );
+ types.put( "bang" , Bang.class );
+ types.put( "toggle" , Toggle.class );
+ types.put( "textfield" , Textfield.class );
+ types.put( "label" , Textlabel.class );
+ types.put( "textlabel" , Textlabel.class );
+ types.put( "list" , ListBox.class );
+ types.put( "dropdown" , DropdownList.class );
+ types.put( "scrollable" , ScrollableList.class );
+ }
+
+ static Set< Class< ? >> makeKey( Class< ? > ... cs ) {
+ Set< Class< ? >> set = new HashSet< Class< ? >>( );
+ Collections.addAll(set, cs);
+ return set;
+ }
+
+ private final ControlP5 cp5;
+
+ ControllerAutomator( ControlP5 c ) {
+ cp5 = c;
+ }
+
+ private Object[] getParameters( Class< ? >[] cs , String v ) {
+
+ if ( cs[ 0 ] == int.class ) {
+ return new Object[] { i( v , 0 ) };
+ } else if ( cs[ 0 ] == float.class ) {
+ return new Object[] { Float.parseFloat( v ) };
+ } else if ( cs[ 0 ] == String.class ) {
+ return new Object[] { v };
+ } else if ( cs[ 0 ] == boolean.class ) {
+ return new Object[] { Boolean.parseBoolean( v ) };
+ }
+ return new Object[ 0 ];
+ }
+
+ /**
+ * analyzes an object and adds fields with ControlElement annotations to controlP5.
+ *
+ */
+ void addControllersFor( final String theAddressSpace , final Object t ) {
+ System.out.println("OKOK");
+ if ( t instanceof List< ? > ) {
+ return;
+ }
+
+ Class< ? > c = t.getClass( );
+
+ Field[] fs = c.getFields( );
+
+ Method[] ms = c.getMethods( );
+
+ Map< ControllerInterface , Integer > controllersIndexed = new HashMap< ControllerInterface , Integer >( );
+
+ for ( Method m : ms ) {
+
+ int zindex = 0;
+
+ if ( m.isAnnotationPresent( ControlElement.class ) ) {
+
+ ControlElement ce = m.getAnnotation( ControlElement.class );
+
+ Map< String , String > params = new HashMap< String , String >( );
+
+ Class< ? extends ControllerInterface< ? >> type = null;
+
+ for ( String s : ce.properties( ) ) {
+ String[] a = s.split( "=" );
+ if ( a[ 0 ].startsWith( "type" ) ) {
+ type = types.get( a[ 1 ].toLowerCase( ) );
+ } else if ( a[ 0 ].equals( "z-index" ) ) {
+ zindex = i( a[ 1 ] , 0 );
+ } else {
+ params.put( "set" + capitalize( a[ 0 ] ) , a[ 1 ] );
+ }
+ }
+
+ if ( type == null ) {
+ type = mapping.get( makeKey( m.getParameterTypes( ) ) );
+ }
+ if ( type != null ) {
+
+ ControllerInterface< ? > cntr = null;
+
+ if ( params.containsKey( "setItems" ) ) {
+
+ if ( type.equals( ListBox.class ) ) {
+
+ cntr = cp5.addScrollableList( t , theAddressSpace , m.getName( ) , ce.x( ) , ce.y( ) , 100 , 100 );
+ ( ( ScrollableList ) cntr ).addItems( params.get( "setItems" ).split( "," ) );
+ ( ( ScrollableList ) cntr ).setOpen( true );
+ ( ( ScrollableList ) cntr ).setType(ScrollableList.LIST);
+
+ } else if ( type.equals( DropdownList.class ) ) {
+
+ cntr = cp5.addScrollableList( t , theAddressSpace , m.getName( ) , ce.x( ) , ce.y( ) , 100 , 100 );
+ ( ( ScrollableList ) cntr ).addItems( params.get( "setItems" ).split( "," ) );
+ ( ( ScrollableList ) cntr ).setOpen( false );
+ ( ( ScrollableList ) cntr ).setType(ScrollableList.DROPDOWN);
+
+ } else if ( type.equals( ScrollableList.class ) ) {
+
+ cntr = cp5.addScrollableList( t , theAddressSpace , m.getName( ) , ce.x( ) , ce.y( ) , 100 , 100 );
+ ( ( ScrollableList ) cntr ).addItems( params.get( "setItems" ).split( "," ) );
+
+ }
+
+ } else {
+ cntr = cp5.addController( t , theAddressSpace , m.getName( ) , type , ce.x( ) , ce.y( ) );
+ }
+
+ controllersIndexed.put( cntr , zindex );
+
+ if ( ce.label( ).length( ) > 0 ) {
+ cntr.setCaptionLabel( ce.label( ) );
+ }
+
+ for ( Iterator< String > i = params.keySet( ).iterator( ) ; i.hasNext( ) ; ) {
+ String k = i.next( );
+ String v = params.get( k );
+ for ( Method method : cntr.getClass( ).getMethods( ) ) {
+ if ( method.getName( ).equals( k ) ) {
+ try {
+ Object[] os = getParameters( method.getParameterTypes( ) , v );
+ method.setAccessible( true );
+ method.invoke( cntr , os );
+ } catch ( Exception e ) {
+ /* TODO is thrown when running ControlP5annotation example */
+ // ControlP5.logger.severe( e.toString( ) );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ for ( Field f : fs ) {
+
+ int zindex = 0;
+
+ if ( f.isAnnotationPresent( ControlElement.class ) ) {
+
+ ControlElement ce = f.getAnnotation( ControlElement.class );
+
+ Map< String , String > params = new HashMap< String , String >( );
+
+ Class< ? extends ControllerInterface< ? >> type = null;
+
+ for ( String s : ce.properties( ) ) {
+ String[] a = s.split( "=" );
+ if ( a[ 0 ].startsWith( "type" ) ) {
+ type = types.get( a[ 1 ].toLowerCase( ) );
+ } else if ( a[ 0 ].equals( "z-index" ) ) {
+ zindex = i( a[ 1 ] , 0 );
+ } else {
+ params.put( "set" + capitalize( a[ 0 ] ) , a[ 1 ] );
+ }
+ }
+
+ ControllerInterface< ? > cntr = null;
+
+ f.setAccessible( true );
+
+ if ( f.getType( ) == float.class || f.getType( ) == int.class ) {
+
+ if ( type == Knob.class ) {
+
+ cntr = cp5.addKnob( t , theAddressSpace , f.getName( ) );
+
+ } else if ( type == Numberbox.class ) {
+
+ cntr = cp5.addNumberbox( t , theAddressSpace , f.getName( ) );
+
+ } else {
+ cntr = cp5.addSlider( t , theAddressSpace , f.getName( ) );
+
+ }
+ try {
+ if ( f.getType( ) == float.class ) {
+ cntr.setValue( f.getFloat( t ) );
+ } else {
+ cntr.setValue( f.getInt( t ) );
+ }
+ } catch ( Exception e ) {
+ ControlP5.logger.severe( e.toString( ) );
+ }
+ } else if ( f.getType( ) == String.class ) {
+ if ( type == Textlabel.class ) {
+ String s = "";
+ try {
+ s = String.valueOf(f.get(t));
+ if ( f.get( t ) == null ) {
+ s = ce.label( );
+ }
+ } catch ( Exception e ) {
+ }
+ cntr = cp5.addTextlabel( t , theAddressSpace , f.getName( ) , s );
+ } else {
+ cntr = cp5.addTextfield( t , theAddressSpace , f.getName( ) );
+ }
+ } else if ( f.getType( ) == boolean.class ) {
+ cntr = cp5.addToggle( t , theAddressSpace , f.getName( ) );
+ try {
+ cntr.setValue( f.getBoolean( t ) ? 1 : 0 );
+ } catch ( Exception e ) {
+ ControlP5.logger.severe( e.toString( ) );
+ }
+ }
+
+ if ( cntr != null ) {
+
+ controllersIndexed.put( cntr , zindex );
+
+ if ( ce.label( ).length( ) > 0 ) {
+ cntr.setCaptionLabel( ce.label( ) );
+ }
+ cntr.setPosition( ce.x( ) , ce.y( ) );
+
+ for ( Iterator< String > i = params.keySet( ).iterator( ) ; i.hasNext( ) ; ) {
+ String k = i.next( );
+ String v = params.get( k );
+ for ( Method method : cntr.getClass( ).getMethods( ) ) {
+ if ( method.getName( ).equals( k ) ) {
+ try {
+ Object[] os = getParameters( method.getParameterTypes( ) , v );
+ method.setAccessible( true );
+ method.invoke( cntr , os );
+ } catch ( Exception e ) {
+ ControlP5.logger.severe( e.toString( ) );
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /* */
+ for ( Entry< ControllerInterface , Integer > entry : entriesSortedByValues( controllersIndexed ) ) {
+ entry.getKey( ).bringToFront( );
+ }
+ }
+
+ private static < K , V extends Comparable< ? super V >> List< Entry< K , V >> entriesSortedByValues( Map< K , V > map ) {
+
+ List< Entry< K , V >> sortedEntries = new ArrayList< Entry< K , V >>( map.entrySet( ) );
+
+ Collections.sort( sortedEntries , new Comparator< Entry< K , V >>( ) {
+ @Override
+ public int compare( Entry< K , V > e1 , Entry< K , V > e2 ) {
+ return e1.getValue( ).compareTo( e2.getValue( ) );
+ }
+ } );
+
+ return sortedEntries;
+ }
+
+ /**
+ * capitalizes a string.
+ *
+ * @param theString
+ * @return String
+ */
+ static String capitalize( String theString ) {
+ final StringBuilder result = new StringBuilder( theString.length( ) );
+ String[] words = theString.split( "\\s" );
+ for ( int i = 0 , l = words.length ; i < l ; ++i ) {
+ if ( i > 0 )
+ result.append( " " );
+ result.append( Character.toUpperCase( words[ i ].charAt( 0 ) ) ).append( words[ i ].substring( 1 ) );
+ }
+ return result.toString( );
+ }
+
+ private int i( String o , int theDefault ) {
+ return isNumeric( o ) ? Integer.parseInt( o ) : isHex( o ) ? o.length( ) == 6 ? ( int ) Long.parseLong( "FF" + o , 16 ) : ( int ) Long.parseLong( o , 16 ) : theDefault;
+ }
+
+ private boolean isNumeric( String str ) {
+ return str.matches( "(-|\\+)?\\d+(\\.\\d+)?" );
+ }
+
+ private boolean isHex( String str ) {
+ // (?:0[xX])?[0-9a-fA-F]+ (This will match with or without 0x prefix)
+ // System.out.println( "isHex? " + str + " " + str.matches( "[\\dA-Fa-f]+" ) );
+ return str.matches( "[\\dA-Fa-f]+" );
+ }
+}
diff --git a/controlP5/ControllerDisplay.java b/controlP5/ControllerDisplay.java
new file mode 100755
index 0000000..8a81a9a
--- /dev/null
+++ b/controlP5/ControllerDisplay.java
@@ -0,0 +1,52 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PApplet;
+
+/**
+ * The interface ControllerDisplay can be used to define custom displays for
+ * controllers.
+ *
+ * @see controlP5.draw(processing.core.PApplet)
+ * @see controlP5.setDisplay(ControllerDisplay)
+ *
+ */
+@SuppressWarnings("unchecked")
+@Deprecated
+public interface ControllerDisplay extends ControllerView {
+
+ /**
+ * draws your custom controllers. display() will be called by a controller's
+ * draw() function and will pass a reference of PApplet as well as the
+ * Controller itself to your custom display class.
+ *
+ * @param theApplet
+ * @param theController
+ */
+ void display(PApplet theApplet, Controller theController);
+
+}
diff --git a/controlP5/ControllerGroup.java b/controlP5/ControllerGroup.java
new file mode 100755
index 0000000..5dd9e83
--- /dev/null
+++ b/controlP5/ControllerGroup.java
@@ -0,0 +1,987 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ **/
+
+import java.util.ArrayList;
+import java.util.List;
+
+import processing.core.PApplet;
+import processing.core.PFont;
+import processing.core.PGraphics;
+import processing.event.KeyEvent;
+
+/**
+ * ControllerGroup is an abstract class and is extended by class ControlGroup, Tab, or the ListBox.
+ *
+ */
+public abstract class ControllerGroup< T > implements ControllerInterface< T > , ControlP5Constants , ControlListener {
+
+ protected float[] position = new float[ 2 ];
+ protected float[] positionBuffer = new float[ 2 ];
+ protected float[] absolutePosition = new float[ 2 ];
+ protected ControllerList controllers;
+
+ /* the controller that receives KeyEvents*/
+ protected Controller> activeController;
+ protected List< ControlListener > _myControlListener;
+ // protected ControlWindow _myControlWindow;
+ protected ControlP5 cp5;
+ protected ControllerGroup< ? > _myParent;
+ protected String _myName;
+ protected int _myId = -1;
+ protected CColor color = new CColor( );
+ protected boolean isMousePressed = false;
+ // only applies to the area of the title bar of a group
+ protected boolean isInside = false;
+ // applies to the area including controllers, currently only supported for listbox
+ protected boolean isInsideGroup = false;
+ protected boolean isVisible = true;
+ protected boolean isOpen = true;
+ protected boolean isBarVisible = true;
+ protected boolean isArrowVisible = true;
+ protected Button _myCloseButton;
+ protected boolean isMoveable = true;
+ protected Label _myLabel;
+ protected Label _myValueLabel;
+ protected int _myWidth = 99;
+ protected int _myHeight = 9;
+ protected boolean isUpdate;
+ protected List< Canvas > _myCanvas;
+ protected float _myValue;
+ protected String _myStringValue;
+ protected float[] _myArrayValue;
+ protected boolean isCollapse = true;
+ protected int _myPickingColor = 0x6600ffff;
+ protected float[] autoPosition = new float[] { 10 , 30 };
+ protected float tempAutoPositionHeight = 0;
+ protected float autoPositionOffsetX = 10;
+ private String _myAddress = "";
+ private boolean mouseover;
+ protected final T me;
+
+ /**
+ * Convenience constructor to extend ControllerGroup.
+ */
+ public ControllerGroup( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ public ControllerGroup( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , float theX , float theY ) {
+ position = new float[] { theX , theY };
+ cp5 = theControlP5;
+ me = ( T ) this;
+ color.set( ( theParent == null ) ? ControlP5.color : theParent.color );
+ _myName = theName;
+ controllers = new ControllerList( );
+ _myCanvas = new ArrayList< Canvas >( );
+ _myControlListener = new ArrayList< ControlListener >( );
+ _myLabel = new Label( cp5 , _myName );
+ _myLabel.setText( _myName );
+ _myLabel.setColor( color.getCaptionLabel( ) );
+ _myLabel.align( ControlP5Constants.LEFT , ControlP5Constants.TOP );
+ setParent( ( theParent == null ) ? this : theParent );
+ }
+
+ protected ControllerGroup( int theX , int theY ) {
+ position = new float[] { theX , theY };
+ me = ( T ) this;
+ controllers = new ControllerList( );
+ _myCanvas = new ArrayList< Canvas >( );
+ }
+
+ @ControlP5.Invisible public void init( ) {
+ }
+
+ @ControlP5.Invisible @Override public ControllerInterface< ? > getParent( ) {
+ return _myParent;
+ }
+
+ void setParent( ControllerGroup< ? > theParent ) {
+
+ if ( _myParent != null && _myParent != this ) {
+ _myParent.remove( this );
+ }
+
+ _myParent = theParent;
+
+ if ( _myParent != this ) {
+ _myParent.add( this );
+ }
+
+ set( absolutePosition , x( position ) , y( position ) );
+ set( absolutePosition , x( absolutePosition ) + x( _myParent.absolutePosition ) , y( absolutePosition ) + y( _myParent.absolutePosition ) );
+ set( positionBuffer , x( position ) , y( position ) );
+
+ if ( cp5.getWindow( ) != null ) {
+ setMouseOver( false );
+ }
+ }
+
+ public final T setGroup( ControllerGroup< ? > theGroup ) {
+ setParent( theGroup );
+ return me;
+ }
+
+ public final T setGroup( String theName ) {
+ setParent( cp5.getGroup( theName ) );
+ return me;
+ }
+
+ public final T moveTo( ControllerGroup< ? > theGroup , Tab theTab , ControlWindow theControlWindow ) {
+ if ( theGroup != null ) {
+ setGroup( theGroup );
+ return me;
+ }
+
+ if ( theControlWindow == null ) {
+ theControlWindow = cp5.controlWindow;
+ }
+
+ setTab( theControlWindow , theTab.getName( ) );
+ return me;
+ }
+
+ public final T moveTo( ControllerGroup< ? > theGroup ) {
+ moveTo( theGroup , null , null );
+ return me;
+ }
+
+ public final T moveTo( Tab theTab ) {
+ moveTo( null , theTab , theTab.getWindow( ) );
+ return me;
+ }
+
+ public T moveTo( PApplet thePApplet ) {
+ moveTo( cp5.controlWindow );
+ return me;
+ }
+
+ public T moveTo( ControlWindow theControlWindow ) {
+ moveTo( null , theControlWindow.getTab( "default" ) , theControlWindow );
+ return me;
+ }
+
+ public final T moveTo( String theTabName ) {
+ moveTo( null , cp5.controlWindow.getTab( theTabName ) , cp5.controlWindow );
+ return me;
+ }
+
+ public final T moveTo( String theTabName , ControlWindow theControlWindow ) {
+ moveTo( null , theControlWindow.getTab( theTabName ) , theControlWindow );
+ return me;
+ }
+
+ public final T moveTo( ControlWindow theControlWindow , String theTabName ) {
+ moveTo( null , theControlWindow.getTab( theTabName ) , theControlWindow );
+ return me;
+ }
+
+ public final T moveTo( Tab theTab , ControlWindow theControlWindow ) {
+ moveTo( null , theTab , theControlWindow );
+ return me;
+ }
+
+ public final T setTab( String theName ) {
+ setParent( cp5.getTab( theName ) );
+ return me;
+ }
+
+ public final T setTab( ControlWindow theWindow , String theName ) {
+ setParent( cp5.getTab( theWindow , theName ) );
+ return me;
+ }
+
+ public final T setTab( Tab theTab ) {
+ setParent( theTab );
+ return me;
+ }
+
+ public Tab getTab( ) {
+ if ( this instanceof Tab ) {
+ return ( Tab ) this;
+ }
+ if ( _myParent instanceof Tab ) {
+ return ( Tab ) _myParent;
+ }
+ return _myParent.getTab( );
+ }
+
+ protected void updateFont( ControlFont theControlFont ) {
+ _myLabel.updateFont( theControlFont );
+ if ( _myValueLabel != null ) {
+ _myValueLabel.updateFont( theControlFont );
+ }
+ for ( int i = 0 ; i < controllers.size( ) ; i++ ) {
+ if ( controllers.get( i ) instanceof Controller< ? > ) {
+ ( ( Controller< ? > ) controllers.get( i ) ).updateFont( theControlFont );
+ } else {
+ ( ( ControllerGroup< ? > ) controllers.get( i ) ).updateFont( theControlFont );
+ }
+ }
+ }
+
+ @ControlP5.Invisible public float[] getAbsolutePosition( ) {
+ return new float[] { x( absolutePosition ) , y( absolutePosition ) };
+ }
+
+ @ControlP5.Invisible public T setAbsolutePosition( float[] thePos ) {
+ set( absolutePosition , x( thePos ) , y( thePos ) );
+ return me;
+ }
+
+ public float[] getPosition( ) {
+ return new float[] { x( position ) , y( position ) };
+ }
+
+ public T setPosition( float theX , float theY ) {
+ set( position , ( int ) theX , ( int ) theY );
+ set( positionBuffer , x( position ) , y( position ) );
+ updateAbsolutePosition( );
+ return me;
+ }
+
+ public T setPosition( float[] thePosition ) {
+ setPosition( x( thePosition ) , y( thePosition ) );
+ return me;
+ }
+
+ public T updateAbsolutePosition( ) {
+ set( absolutePosition , x( position ) , y( position ) );
+ set( absolutePosition , x( absolutePosition ) + x( _myParent.getAbsolutePosition( ) ) , y( absolutePosition ) + y( _myParent.getAbsolutePosition( ) ) );
+ for ( int i = 0 ; i < controllers.size( ) ; i++ ) {
+ controllers.get( i ).updateAbsolutePosition( );
+ }
+ return me;
+ }
+
+ @ControlP5.Invisible public void continuousUpdateEvents( ) {
+ if ( controllers.size( ) <= 0 ) {
+ return;
+ }
+ for ( int i = controllers.size( ) - 1 ; i >= 0 ; i-- ) {
+ controllers.get( i ).continuousUpdateEvents( );
+ }
+ }
+
+ public T update( ) {
+ if ( controllers.size( ) <= 0 ) {
+ return me;
+ }
+ for ( int i = controllers.size( ) - 1 ; i >= 0 ; i-- ) {
+ if ( controllers.get( i ).isUpdate( ) ) {
+ controllers.get( i ).update( );
+ }
+ }
+ return me;
+ }
+
+ /**
+ * enables or disables the update function of a controller.
+ */
+ @Override public T setUpdate( boolean theFlag ) {
+ isUpdate = theFlag;
+ for ( int i = 0 ; i < controllers.size( ) ; i++ ) {
+ controllers.get( i ).setUpdate( theFlag );
+ }
+ return me;
+ }
+
+ /**
+ * checks the update status of a controller.
+ */
+ public boolean isUpdate( ) {
+ return isUpdate;
+ }
+
+ @ControlP5.Invisible public T updateEvents( ) {
+ if ( isOpen ) {
+ for ( int i = controllers.size( ) - 1 ; i >= 0 ; i-- ) {
+ controllers.get( i ).updateEvents( );
+ }
+ }
+ if ( isVisible ) {
+ if ( ( isMousePressed == cp5.getWindow( ).mouselock ) ) {
+ if ( isMousePressed && cp5.isAltDown( ) && isMoveable ) {
+ if ( !cp5.isMoveable ) {
+ set( positionBuffer , x( positionBuffer ) + cp5.getWindow( ).mouseX - cp5.getWindow( ).pmouseX , y( positionBuffer ) + cp5.getWindow( ).mouseY - cp5.getWindow( ).pmouseY );
+ if ( cp5.isShiftDown( ) ) {
+ set( position , ( ( ( int ) ( x( positionBuffer ) ) / 10 ) * 10 ) , ( ( ( int ) ( y( positionBuffer ) ) / 10 ) * 10 ) );
+ } else {
+ set( position , x( positionBuffer ) , y( positionBuffer ) );
+ }
+ updateAbsolutePosition( );
+ }
+ } else {
+ if ( isInside ) {
+ setMouseOver( true );
+ }
+ if ( inside( ) ) {
+ if ( !isInside ) {
+ isInside = true;
+ onEnter( );
+ setMouseOver( true );
+ }
+ } else {
+ if ( isInside && !isMousePressed ) {
+ onLeave( );
+ isInside = false;
+ setMouseOver( false );
+ }
+ }
+ }
+ }
+ }
+ return me;
+ }
+
+ @ControlP5.Invisible public T updateInternalEvents( PApplet theApplet ) {
+ return me;
+ }
+
+ public boolean isMouseOver( ) {
+ mouseover = isInside || isInsideGroup || !isBarVisible;
+ return mouseover;
+ }
+
+ public T setMouseOver( boolean theFlag ) {
+
+ mouseover = isBarVisible && theFlag;
+
+ if ( !mouseover ) {
+ isInside = false;
+ isInsideGroup = false;
+ cp5.getWindow( ).removeMouseOverFor( this );
+ for ( int i = controllers.size( ) - 1 ; i >= 0 ; i-- ) {
+ controllers.get( i ).setMouseOver( false );
+ }
+ } else {
+ // TODO since inside can be either isInside or isInsideGroup, there are 2 options here,
+ // which i am not sure how to handle them yet.
+ cp5.getWindow( ).setMouseOverController( this );
+ }
+ return me;
+ }
+
+ @ControlP5.Invisible public final void draw( PGraphics theGraphics ) {
+ if ( isVisible ) {
+ theGraphics.pushMatrix( );
+ theGraphics.translate( x( position ) , y( position ) );
+ preDraw( theGraphics );
+ drawControllers( cp5.papplet , theGraphics );
+ postDraw( theGraphics );
+ if ( _myValueLabel != null ) {
+ _myValueLabel.draw( theGraphics , 2 , 2 , this );
+ }
+ theGraphics.popMatrix( );
+ }
+ }
+
+ protected void drawControllers( PApplet theApplet , PGraphics theGraphics ) {
+ if ( isOpen ) {
+
+ for ( Canvas cc : _myCanvas ) {
+ if ( cc.mode( ) == Canvas.PRE ) {
+ cc.draw( theGraphics );
+ }
+ }
+ for ( ControllerInterface< ? > ci : controllers.get( ) ) {
+ if ( ci.isVisible( ) ) {
+ ci.updateInternalEvents( theApplet );
+ ci.draw( theGraphics );
+ }
+ }
+
+ for ( CDrawable cd : controllers.getDrawables( ) ) {
+ cd.draw( theGraphics );
+ }
+
+ for ( Canvas cc : _myCanvas ) {
+ if ( cc.mode( ) == Canvas.POST ) {
+ cc.draw( theGraphics );
+ }
+ }
+ }
+ }
+
+ protected void preDraw( PGraphics theGraphics ) {
+ }
+
+ protected void postDraw( PGraphics theGraphics ) {
+ }
+
+ /**
+ * Adds a canvas to a controllerGroup such as a tab or group. Use processing's draw methods to
+ * add visual content.
+ */
+ public Canvas addCanvas( Canvas theCanvas ) {
+ _myCanvas.add( theCanvas );
+ // TODO theCanvas.setup( cp5.papplet );
+ return theCanvas;
+ }
+
+ /**
+ * Removes a canvas from a controller group.
+ */
+ public T removeCanvas( Canvas theCanvas ) {
+ _myCanvas.remove( theCanvas );
+ return me;
+ }
+
+ /**
+ * Adds a controller to the group, but use Controller.setGroup() instead.
+ */
+ public T add( ControllerInterface< ? > theElement ) {
+ controllers.add( theElement );
+ return me;
+ }
+
+ @Override public T bringToFront( ) {
+ return bringToFront( this );
+ }
+
+ @Override public T bringToFront( ControllerInterface< ? > theController ) {
+ if ( _myParent instanceof Tab ) {
+ moveTo( ( Tab ) _myParent );
+ } else {
+ _myParent.bringToFront( theController );
+ }
+ if ( theController != this ) {
+ if ( controllers.get( ).contains( theController ) ) {
+ controllers.remove( theController );
+ controllers.add( theController );
+ }
+ }
+ return me;
+ }
+
+ /**
+ * Removes a controller from the group, but use Controller.setGroup() instead.
+ */
+
+ public T remove( ControllerInterface< ? > theElement ) {
+ if ( theElement != null ) {
+ theElement.setMouseOver( false );
+ }
+ controllers.remove( theElement );
+ return me;
+ }
+
+ @ControlP5.Invisible public T addDrawable( CDrawable theElement ) {
+ controllers.addDrawable( theElement );
+ return me;
+ }
+
+ public T remove( CDrawable theElement ) {
+ controllers.removeDrawable( theElement );
+ return me;
+ }
+
+ /**
+ * removes the group from controlP5.
+ */
+ public void remove( ) {
+ cp5.getWindow( ).removeMouseOverFor( this );
+ if ( _myParent != null ) {
+ _myParent.remove( this );
+ }
+ if ( cp5 != null ) {
+ cp5.remove( this );
+ }
+
+ for ( int i = controllers.size( ) - 1 ; i >= 0 ; i-- ) {
+ controllers.get( i ).remove( );
+ }
+ controllers.clear( );
+ controllers.clearDrawable( );
+ controllers = new ControllerList( );
+ if ( this instanceof Tab ) {
+ cp5.getWindow( ).removeTab( ( Tab ) this );
+ }
+ }
+
+ public String getName( ) {
+ return _myName;
+ }
+
+ public String getAddress( ) {
+ return _myAddress;
+ }
+
+ @Override public T setAddress( String theAddress ) {
+ if ( _myAddress.length( ) == 0 ) {
+ _myAddress = theAddress;
+ }
+ return me;
+ }
+
+ public ControlWindow getWindow( ) {
+ return cp5.getWindow( );
+ }
+
+ @ControlP5.Invisible public void keyEvent( KeyEvent theEvent ) {
+ //for ( int i = 0 ; i < controllers.size( ) ; i++ ) {
+ // ( ( ControllerInterface< ? > ) controllers.get( i ) ).keyEvent( theEvent );
+ //}
+ if ( activeController != null ){
+ activeController.keyEvent(theEvent);
+ }
+ }
+
+ public ControllerGroup setActiveController(Controller> theController){
+ activeController = theController;
+ return this;
+ }
+
+ public Controller> getActiveController(){
+ return activeController;
+ }
+
+
+
+ public boolean setMousePressed( boolean theStatus ) {
+ if ( !isVisible ) {
+ return false;
+ }
+ for ( int i = controllers.size( ) - 1 ; i >= 0 ; i-- ) {
+ if ( controllers.get( i ).setMousePressed( theStatus ) ) {
+ return true;
+ }
+ }
+ if (theStatus) {
+ if ( isInside ) {
+ isMousePressed = true;
+ mousePressed( );
+ return true;
+ }
+ } else {
+ if (isMousePressed) {
+ isMousePressed = false;
+ mouseReleased( );
+ }
+ }
+ return false;
+ }
+
+ protected void mousePressed( ) {
+ }
+
+ protected void mouseReleased( ) {
+ }
+
+ protected void onEnter( ) {
+ }
+
+ protected void onLeave( ) {
+ }
+
+ protected void onScroll( int theAmount ) {
+ }
+
+ public T setId( int theId ) {
+ _myId = theId;
+ return me;
+ }
+
+ public int getId( ) {
+ return _myId;
+ }
+
+ public T setColor( CColor theColor ) {
+ for ( ControllerInterface< ? > ci : controllers.get( ) ) {
+ ci.setColor( theColor );
+ }
+ return me;
+ }
+
+ public T setColorActive( int theColor ) {
+ color.setActive( theColor );
+ for ( ControllerInterface< ? > ci : controllers.get( ) ) {
+ ci.setColorActive( theColor );
+ }
+ return me;
+ }
+
+ public T setColorForeground( int theColor ) {
+ color.setForeground( theColor );
+ for ( ControllerInterface< ? > ci : controllers.get( ) ) {
+ ci.setColorForeground( theColor );
+ }
+ return me;
+ }
+
+ public T setColorBackground( int theColor ) {
+ color.setBackground( theColor );
+ for ( ControllerInterface< ? > ci : controllers.get( ) ) {
+ ci.setColorBackground( theColor );
+ }
+ return me;
+ }
+
+ public T setColorLabel( int theColor ) {
+ color.setCaptionLabel( theColor );
+ if ( _myLabel != null ) {
+ _myLabel.setColor( color.getCaptionLabel( ) );
+ }
+ for ( ControllerInterface< ? > ci : controllers.get( ) ) {
+ ci.setColorLabel( theColor );
+ }
+ return me;
+ }
+
+ public T setColorValue( int theColor ) {
+ color.setValueLabel( theColor );
+ if ( _myValueLabel != null ) {
+ _myValueLabel.setColor( color.getValueLabel( ) );
+ }
+ for ( ControllerInterface< ? > ci : controllers.get( ) ) {
+ ci.setColorValue( theColor );
+ }
+ return me;
+ }
+
+ public T setLabel( String theLabel ) {
+ _myLabel.set( theLabel );
+ return me;
+ }
+
+ public boolean isVisible( ) {
+ if ( _myParent != null && _myParent != this ) {
+ if (!getParent().isVisible()) {
+ return false;
+ }
+ }
+ return isVisible;
+ }
+
+ public T setVisible( boolean theFlag ) {
+ isVisible = theFlag;
+ return me;
+ }
+
+ public T hide( ) {
+ isVisible = false;
+ return me;
+ }
+
+ public T show( ) {
+ isVisible = true;
+ return me;
+ }
+
+ /**
+ * set the moveable status of the group, when false, the group can't be moved.
+ */
+ public T setMoveable( boolean theFlag ) {
+ isMoveable = theFlag;
+ return me;
+ }
+
+ public boolean isMoveable( ) {
+ return isMoveable;
+ }
+
+ public T setOpen( boolean theFlag ) {
+ isOpen = theFlag;
+ return me;
+ }
+
+ public boolean isOpen( ) {
+ return isOpen;
+ }
+
+ public T open( ) {
+ setOpen( true );
+ return me;
+ }
+
+ public T close( ) {
+ setOpen( false );
+ return me;
+ }
+
+ /**
+ * TODO redesign or deprecate remove the close button.
+ */
+ @ControlP5.Invisible public T removeCloseButton( ) {
+ if ( _myCloseButton == null ) {
+ _myCloseButton.remove( );
+ }
+ _myCloseButton = null;
+ return me;
+ }
+
+ public T setTitle( String theTitle ) {
+ getCaptionLabel( ).set( theTitle );
+ return me;
+ }
+
+ public T hideBar( ) {
+ isBarVisible = false;
+ return me;
+ }
+
+ public T showBar( ) {
+ isBarVisible = true;
+ return me;
+ }
+
+ public boolean isBarVisible( ) {
+ return isBarVisible;
+ }
+
+ public T hideArrow( ) {
+ isArrowVisible = false;
+ return me;
+ }
+
+ public T showArrow( ) {
+ isArrowVisible = true;
+ return me;
+ }
+
+ /**
+ * TODO redesign or deprecate add a close button to the controlbar of this controlGroup.
+ */
+ @ControlP5.Invisible public T addCloseButton( ) {
+ if ( _myCloseButton == null ) {
+ _myCloseButton = new Button( cp5 , this , getName( ) + "close" , 1 , _myWidth + 1 , -10 , 12 , 9 );
+ _myCloseButton.setCaptionLabel( "X" );
+ _myCloseButton.addListener( this );
+ }
+ return me;
+ }
+
+ @ControlP5.Invisible public int getPickingColor( ) {
+ return _myPickingColor;
+ }
+
+ public CColor getColor( ) {
+ return color;
+ }
+
+ public T setValue( float theValue ) {
+ _myValue = theValue;
+ return me;
+ }
+
+ public float getValue( ) {
+ return _myValue;
+ }
+
+ public String getStringValue( ) {
+ return _myStringValue;
+ }
+
+ public T setStringValue( String theValue ) {
+ _myStringValue = theValue;
+ return me;
+ }
+
+ public float[] getArrayValue( ) {
+ return _myArrayValue;
+ }
+
+ public float getArrayValue( int theIndex ) {
+ if ( theIndex >= 0 && theIndex < _myArrayValue.length ) {
+ return _myArrayValue[ theIndex ];
+ } else {
+ return Float.NaN;
+ }
+ }
+
+ public T setArrayValue( int theIndex , float theValue ) {
+ if ( theIndex >= 0 && theIndex < _myArrayValue.length ) {
+ _myArrayValue[ theIndex ] = theValue;
+ }
+ return me;
+ }
+
+ public T setArrayValue( float[] theArray ) {
+ _myArrayValue = theArray;
+ return me;
+ }
+
+ public Controller< ? > getController( String theController ) {
+ return cp5.getController( theController );
+ }
+
+ public T setCaptionLabel( String theValue ) {
+ getCaptionLabel( ).set( theValue );
+ return me;
+ }
+
+ public Label getCaptionLabel( ) {
+ return _myLabel;
+ }
+
+ public Label getValueLabel( ) {
+ return _myValueLabel;
+ }
+
+ public T enableCollapse( ) {
+ isCollapse = true;
+ return me;
+ }
+
+ public T disableCollapse( ) {
+ isCollapse = false;
+ return me;
+ }
+
+ public boolean isCollapse( ) {
+ return isCollapse;
+ }
+
+ public int getWidth( ) {
+ return _myWidth;
+ }
+
+ public int getHeight( ) {
+ return _myHeight;
+ }
+
+ public T setWidth( int theWidth ) {
+ _myWidth = theWidth;
+ return me;
+ }
+
+ public T setHeight( int theHeight ) {
+ _myHeight = theHeight;
+ return me;
+ }
+
+ public T setSize( int theWidth , int theHeight ) {
+ setWidth( theWidth );
+ // setHeight(theHeight) will set the Height of the bar therefore will not be used here.
+ return me;
+ }
+
+ protected boolean inside( ) {
+ return ( cp5.getWindow( ).mouseX > x( position ) + x( _myParent.absolutePosition ) && cp5.getWindow( ).mouseX < x( position ) + x( _myParent.absolutePosition ) + _myWidth
+ && cp5.getWindow( ).mouseY > y( position ) + y( _myParent.absolutePosition ) - _myHeight && cp5.getWindow( ).mouseY < y( position ) + y( _myParent.absolutePosition ) );
+ }
+
+ public ControllerProperty getProperty( String thePropertyName ) {
+ return cp5.getProperties( ).getProperty( this , thePropertyName );
+ }
+
+ public ControllerProperty getProperty( String theSetter , String theGetter ) {
+ return cp5.getProperties( ).getProperty( this , theSetter , theGetter );
+ }
+
+ public T registerProperty( String thePropertyName ) {
+ cp5.getProperties( ).register( this , thePropertyName );
+ return me;
+ }
+
+ public T registerProperty( String theSetter , String theGetter ) {
+ cp5.getProperties( ).register( this , theSetter , theGetter );
+ return me;
+ }
+
+ public T removeProperty( String thePropertyName ) {
+ cp5.getProperties( ).remove( this , thePropertyName );
+ return me;
+ }
+
+ public T removeProperty( String theSetter , String theGetter ) {
+ cp5.getProperties( ).remove( this , theSetter , theGetter );
+ return me;
+ }
+
+ public void controlEvent( ControlEvent theEvent ) {
+ }
+
+ public T addListener( final ControlListener theListener ) {
+ _myControlListener.add( theListener );
+ return me;
+ }
+
+ public T removeListener( final ControlListener theListener ) {
+ _myControlListener.remove( theListener );
+ return me;
+ }
+
+ public int listenerSize( ) {
+ return _myControlListener.size( );
+ }
+
+ @Override public String toString( ) {
+ return getName( ) + " [" + getClass( ).getSimpleName( ) + "]";
+ }
+
+ public String getInfo( ) {
+ return "type:\tControllerGroup" + "\nname:\t" + _myName + "\n" + "label:\t" + _myLabel.getText( ) + "\n" + "id:\t" + _myId + "\n" + "value:\t" + _myValue + "\n" + "arrayvalue:\t" + CP.arrayToString( _myArrayValue ) + "\n" + "position:\t"
+ + position + "\n" + "absolute:\t" + absolutePosition + "\n" + "width:\t" + getWidth( ) + "\n" + "height:\t" + getHeight( ) + "\n" + "color:\t" + getColor( ) + "\n" + "visible:\t" + isVisible + "\n" + "moveable:\t" + isMoveable + "\n";
+ }
+
+ /**
+ * convenience method to fill a float array in favor of theArray[0] = 1.2; etc.
+ * takes a float array and fills it (starting from index 0) with arguments starting from index 1.
+ */
+ static public float[] set( float[] theArray , float ... theValues ) {
+ if ( theValues.length > theArray.length ) {
+ System.arraycopy( theValues , 0 , theArray , 0 , theArray.length );
+ } else {
+ System.arraycopy( theValues , 0 , theArray , 0 , theValues.length );
+ }
+ return theArray;
+ }
+
+ /**
+ * returns the first element of the float array.
+ */
+ static public float x( float[] theArray ) {
+ if ( theArray.length > 0 ) {
+ return theArray[ 0 ];
+ }
+ return 0;
+ }
+
+ /**
+ * returns the second element of the float array.
+ */
+ static public float y( float[] theArray ) {
+ if ( theArray.length > 1 ) {
+ return theArray[ 1 ];
+ }
+ return 0;
+ }
+
+ @Override public T setFont( PFont thePFont ) {
+ getValueLabel( ).setFont( thePFont );
+ getCaptionLabel( ).setFont( thePFont );
+ return me;
+ }
+
+ @Override public T setFont( ControlFont theFont ) {
+ getValueLabel( ).setFont( theFont );
+ getCaptionLabel( ).setFont( theFont );
+ return me;
+ }
+
+}
diff --git a/controlP5/ControllerInterface.java b/controlP5/ControllerInterface.java
new file mode 100755
index 0000000..c7dcbaa
--- /dev/null
+++ b/controlP5/ControllerInterface.java
@@ -0,0 +1,185 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PApplet;
+import processing.core.PFont;
+import processing.core.PGraphics;
+import processing.event.KeyEvent;
+
+/**
+ *
+ * The ControllerInterface is inherited by all ControllerGroup and Controller classes.
+ *
+ */
+public interface ControllerInterface< T > {
+
+ @ControlP5.Invisible
+ void init( );
+
+ int getWidth( );
+
+ int getHeight( );
+
+ T setValue( float theValue );
+
+ float getValue( );
+
+ T setStringValue( String theValue );
+
+ String getStringValue( );
+
+ float[] getArrayValue( );
+
+ float getArrayValue( int theIndex );
+
+ T setArrayValue( int theIndex , float theValue );
+
+ T setArrayValue( float[] theArray );
+
+ int getId( );
+
+ float[] getPosition( );
+
+ @ControlP5.Invisible
+ T setPosition(float theX , float theY );
+
+ @ControlP5.Invisible
+ T setPosition(float[] thePosition );
+
+ float[] getAbsolutePosition( );
+
+ T setAbsolutePosition( float[] thePosition );
+
+ T updateAbsolutePosition( );
+
+ ControllerInterface< ? > getParent( );
+
+ T update( );
+
+ T setUpdate( boolean theFlag );
+
+ T bringToFront( );
+
+ T bringToFront( ControllerInterface< ? > theController );
+
+ boolean isUpdate( );
+
+ @ControlP5.Invisible
+ T updateEvents( );
+
+ @ControlP5.Invisible
+ void continuousUpdateEvents( );
+
+ /**
+ * a method for putting input events like e.g. mouse or keyboard events and queries. this has
+ * been taken out of the draw method for better overwriting capability.
+ *
+ *
+ */
+ @ControlP5.Invisible
+ T updateInternalEvents(PApplet theApplet );
+
+ @ControlP5.Invisible
+ void draw(PGraphics theGraphics );
+
+ T add( ControllerInterface< ? > theElement );
+
+ T remove( ControllerInterface< ? > theElement );
+
+ void remove( );
+
+ String getName( );
+
+ String getAddress( );
+
+ ControlWindow getWindow( );
+
+ Tab getTab( );
+
+ boolean setMousePressed( boolean theStatus );
+
+ @ControlP5.Invisible
+ void keyEvent(KeyEvent theEvent );
+
+ @ControlP5.Invisible
+ T setAddress(String theAddress );
+
+ T setId( int theValue );
+
+ T setLabel( String theString );
+
+ T setColorActive( int theColor );
+
+ T setColorForeground( int theColor );
+
+ T setColorBackground( int theColor );
+
+ T setColorLabel( int theColor );
+
+ T setColorValue( int theColor );
+
+ T setColor( CColor theColor );
+
+ CColor getColor( );
+
+ T show( );
+
+ T hide( );
+
+ boolean isVisible( );
+
+ T moveTo( ControllerGroup< ? > theGroup , Tab theTab , ControlWindow theWindow );
+
+ T moveTo( ControllerGroup< ? > theGroup );
+
+ @ControlP5.Invisible
+ int getPickingColor( );
+
+ ControllerProperty getProperty( String thePropertyName );
+
+ ControllerProperty getProperty( String theSetter , String theGetter );
+
+ T registerProperty( String thePropertyName );
+
+ T registerProperty( String theSetter , String theGetter );
+
+ T removeProperty( String thePropertyName );
+
+ T removeProperty( String theSetter , String theGetter );
+
+ boolean isMouseOver( );
+
+ T setMouseOver( boolean theFlag );
+
+ T setFont( PFont theFont );
+
+ T setFont( ControlFont theFont );
+
+ T addListener( ControlListener theListener );
+
+ T setCaptionLabel( String theValue );
+}
diff --git a/controlP5/ControllerLayout.java b/controlP5/ControllerLayout.java
new file mode 100755
index 0000000..b6d7116
--- /dev/null
+++ b/controlP5/ControllerLayout.java
@@ -0,0 +1,180 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.logging.Logger;
+
+
+class ControllerLayout {
+
+ private final ControlP5 cp5;
+
+ public static final Logger logger = Logger.getLogger( ControllerLayout.class.getName( ) );
+
+ static {
+ Map< Class< ? > , Class< ? >> datatypes = new HashMap< Class< ? > , Class< ? >>( );
+ datatypes.put( Integer.class , int.class );
+ datatypes.put( Float.class , float.class );
+ datatypes.put( Boolean.class , boolean.class );
+ datatypes.put( Character.class , char.class );
+ datatypes.put( Long.class , long.class );
+ datatypes.put( Double.class , double.class );
+ datatypes.put( Byte.class , byte.class );
+ datatypes.put( CColor.class , CColor.class );
+ }
+
+ ControllerLayout( ControlP5 theControlP5 ) {
+ cp5 = theControlP5;
+ }
+
+ public void save( String theLayoutPath ) {
+ theLayoutPath = cp5.checkPropertiesPath( theLayoutPath );
+ Class< ? >[] classes = new Class< ? >[] { RadioButton.class , ListBox.class , ColorPicker.class , DropdownList.class };
+ HashSet< ControllerLayoutElement > layoutelements = new HashSet< ControllerLayoutElement >( );
+ for ( ControllerInterface< ? > c : cp5.getList( ) ) {
+ if ( !Arrays.asList( classes ).contains( c.getParent( ).getClass( ) ) ) {
+ layoutelements.add( new ControllerLayoutElement( c ) );
+ System.out.print( c.getAddress( ) );
+ System.out.print( " (" + c.getName( ) + ") " );
+ System.out.print( "\tpos:" + Controller.x( c.getPosition( ) ) + "," + Controller.y( c.getPosition( ) ) );
+ System.out.print( "\tdim:" + c.getWidth( ) + "," + c.getHeight( ) );
+ System.out.print( "\tparent:" + c.getParent( ) );
+ System.out.println( "\tclass:" + c.getClass( ).getSimpleName( ) );
+ }
+ }
+ try {
+ FileOutputStream fos = new FileOutputStream( theLayoutPath );
+ ObjectOutputStream oos = new ObjectOutputStream( fos );
+
+ logger.info( "Saving layout-items to " + theLayoutPath );
+ oos.writeInt( layoutelements.size( ) );
+
+ for ( ControllerLayoutElement ce : layoutelements ) {
+ oos.writeObject( ce );
+ }
+ oos.flush( );
+ oos.close( );
+ fos.close( );
+
+ } catch ( Exception e ) {
+ logger.warning( "Exception during serialization: " + e );
+ }
+ }
+
+ protected boolean isClassAssignableFromSuperclass( Class< ? > theClass , Class< ? > theSuper ) {
+ Class< ? > _mySuper = theClass.getSuperclass( );
+ while ( _mySuper.getSuperclass( ) != null ) {
+ if ( _mySuper.isAssignableFrom( theSuper ) ) {
+ return true;
+ }
+ _mySuper = _mySuper.getSuperclass( );
+ }
+ return false;
+ }
+
+ public void load( String theLayoutPath ) {
+ theLayoutPath = cp5.checkPropertiesPath( theLayoutPath );
+ ArrayList< ControllerLayoutElement > list = new ArrayList< ControllerLayoutElement >( );
+ try {
+ FileInputStream fis = new FileInputStream( theLayoutPath );
+ ObjectInputStream ois = new ObjectInputStream( fis );
+ int size = ois.readInt( );
+ logger.info( "loading " + size + " layout-items." + fis.getFD( ) );
+
+ for ( int i = 0 ; i < size ; i++ ) {
+ try {
+ ControllerLayoutElement ce = ( ControllerLayoutElement ) ois.readObject( );
+ list.add( ce );
+ } catch ( Exception e ) {
+ logger.warning( "skipping a property, " + e );
+ }
+ }
+ ois.close( );
+ } catch ( Exception e ) {
+ logger.warning( "Exception during deserialization: " + e );
+ }
+
+ for ( ControllerLayoutElement ce : list ) {
+ /* ControllerInterface ci = cp5.getController(ce.getName());
+ * if (ci == null) {
+ * try {
+ * if (isClassAssignableFromSuperclass(ce.getType(), ControllerGroup.class)) {
+ * ControllerGroup c = (ControllerGroup) cp5.addGroup(null, "", ce.getName(), ce.getType(), ce.getX(), ce.getY(), ce.getWidth(),
+ * ce.getHeight());
+ * c.setWidth(ce.getWidth());
+ * c.setHeight(ce.getHeight());
+ * if (c instanceof ListBox) {
+ * System.out.println("found listbox or dropdownlist!");
+ * ((ListBox) c).setHeight(200);
+ * ((ListBox) c).setBarHeight(ce.getHeight());
+ * }
+ * } else {
+ * Controller c = (Controller) cp5.addController(ce.getName(), ce.getType(), ce.getX(), ce.getY());
+ * c.setWidth(ce.getWidth());
+ * c.setHeight(ce.getHeight());
+ * }
+ * } catch (Exception e) {
+ *
+ * }
+ * }
+ * ci = cp5.get(ce.getName());
+ * if (ci != null) {
+ * ci.setAddress(ce.getAddress());
+ * System.out.println("name:" + ce.getName() + "\tparent:" + ce.getParent() + "\telement:" + ci + "\ttype:" + ce.getType() + "\t" +
+ * ce.getHeight());
+ * } else {
+ * System.out.println("could not create " + ce.getName() + "," + ce.getType());
+ * }
+ * // if(cp5.get(ce.getName()) instanceof DropdownList) {
+ * // DropdownList dl = (DropdownList)(cp5.get(ce.getName()));
+ * // dl.setHeight(200);
+ * // } */
+ }
+
+ for ( ControllerLayoutElement ce : list ) {
+ /* ControllerInterface ci = cp5.get(ce.getName());
+ * if (ci != null) {
+ * ControllerGroup g = cp5.getGroup(ce.getParent());
+ * if (g == null) {
+ * g = cp5.getTab(ce.getParent());
+ * }
+ * if (g != null) {
+ * ci.moveTo(g);
+ * }
+ * } */
+ }
+ }
+
+}
diff --git a/controlP5/ControllerLayoutElement.java b/controlP5/ControllerLayoutElement.java
new file mode 100755
index 0000000..86bfbfb
--- /dev/null
+++ b/controlP5/ControllerLayoutElement.java
@@ -0,0 +1,52 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+class ControllerLayoutElement implements Serializable, Cloneable {
+
+ private static final long serialVersionUID = -5006855922546529005L;
+
+ private final transient ControllerInterface> controller;
+
+ private final Class> type;
+
+ private final Map values;
+
+ ControllerLayoutElement(ControllerInterface> theController) {
+ controller = theController;
+ type = theController.getClass();
+ values = new HashMap();
+ }
+
+ private void cascade(Object theObject) {
+
+ }
+
+}
\ No newline at end of file
diff --git a/controlP5/ControllerList.java b/controlP5/ControllerList.java
new file mode 100755
index 0000000..52ae011
--- /dev/null
+++ b/controlP5/ControllerList.java
@@ -0,0 +1,97 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.List;
+import java.util.Vector;
+
+/**
+ * Stores objects of type ControllerInterface and CDrawable, mainly for internal use.
+ */
+public class ControllerList {
+
+ protected List< ControllerInterface< ? >> controllers;
+
+ protected List< CDrawable > drawables;
+
+ public ControllerList( ) {
+ controllers = new Vector< ControllerInterface< ? >>( );
+ drawables = new Vector< CDrawable >( );
+ }
+
+ public void add( ControllerInterface< ? > theController ) {
+ if (!controllers.contains(theController)) {
+ controllers.add( theController );
+ }
+ }
+
+ protected void remove( ControllerInterface< ? > theController ) {
+ controllers.remove( theController );
+ }
+
+ protected void addDrawable( CDrawable theController ) {
+ if (!drawables.contains(theController)) {
+ drawables.add( theController );
+ }
+ }
+
+ protected void removeDrawable( CDrawable theController ) {
+ drawables.remove( theController );
+ }
+
+ public ControllerInterface< ? > get( int theIndex ) {
+ return controllers.get( theIndex );
+ }
+
+ public List< ControllerInterface< ? >> get( ) {
+ return controllers;
+ }
+
+ public CDrawable getDrawable( int theIndex ) {
+ return drawables.get( theIndex );
+ }
+
+ public List< CDrawable > getDrawables( ) {
+ return drawables;
+ }
+
+ public int sizeDrawable( ) {
+ return drawables.size( );
+ }
+
+ public int size( ) {
+ return controllers.size( );
+ }
+
+ protected void clear( ) {
+ controllers.clear( );
+ }
+
+ protected void clearDrawable( ) {
+ drawables.clear( );
+ }
+
+}
diff --git a/controlP5/ControllerPlug.java b/controlP5/ControllerPlug.java
new file mode 100755
index 0000000..6ae6be4
--- /dev/null
+++ b/controlP5/ControllerPlug.java
@@ -0,0 +1,273 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Field;
+import java.security.AccessControlException;
+
+/**
+ * The ControllerPlug is used to do all the reflection procedures to link a controller to a variable
+ * or function inside your main application.
+ *
+ * @example use/ControlP5plugTo
+ */
+public class ControllerPlug {
+
+ private Object _myObject;
+ private String _myName;
+ private Method _myMethod;
+ private Field _myField;
+ private int _myType = ControlP5Constants.INVALID;
+ private Class< ? > _myParameterClass;
+ private int _myParameterType = -1;
+ private Object _myValue = null;
+ private Class< ? >[] _myAcceptClassList;
+ private Class< ? > _myEventMethodParameter = ControlEvent.class;
+
+ public ControllerPlug( final Object theObject , final String theName , final int theType , final int theParameterType , Class< ? >[] theAcceptClassList ) {
+ set( theObject , theName , theType , theParameterType , theAcceptClassList );
+ }
+
+ ControllerPlug( Class< ? > param , final Object theObject , final String theName , final int theType , final int theParameterType ) {
+ setEventMethodParameter( param );
+ set( theObject , theName , theType , theParameterType , null );
+ }
+
+ void setEventMethodParameter( Class< ? > theClass ) {
+ _myEventMethodParameter = theClass;
+ }
+
+ protected void set( Object theObject ) {
+ set( theObject , getName( ) , getType( ) , getParameterType( ) , getAcceptClassList( ) );
+ }
+
+ public void set( final Object theObject , final String theName , final int theType , final int theParameterType , final Class< ? >[] theAcceptClassList ) {
+ _myObject = theObject;
+ _myName = theName;
+ _myType = theType;
+ _myParameterType = theParameterType;
+ _myAcceptClassList = theAcceptClassList;
+ Class< ? > myClass = theObject.getClass( );
+
+ /* check for methods */
+ if ( _myType == ControlP5Constants.METHOD ) {
+ try {
+ Method[] myMethods = myClass.getMethods( );
+ for ( int i = 0 ; i < myMethods.length ; i++ ) {
+ if ( ( myMethods[ i ].getName( ) ).equals( theName ) ) {
+ if ( myMethods[ i ].getParameterTypes( ).length == 1 ) {
+ for ( int j = 0 ; j < _myAcceptClassList.length ; j++ ) {
+ if ( myMethods[ i ].getParameterTypes( )[ 0 ] == _myAcceptClassList[ j ] ) {
+ _myParameterClass = myMethods[ i ].getParameterTypes( )[ 0 ];
+ break;
+ }
+ }
+ } else if ( myMethods[ i ].getParameterTypes( ).length == 0 ) {
+ _myParameterClass = null;
+ break;
+ }
+ break;
+ }
+ }
+ Class< ? >[] myArgs = ( _myParameterClass == null ) ? new Class[] { } : new Class[] { _myParameterClass };
+ _myMethod = myClass.getMethod( _myName , myArgs );
+ _myMethod.setAccessible( true );
+ } catch ( SecurityException e ) {
+ printSecurityWarning( e );
+ } catch ( NoSuchMethodException e ) {
+ if ( _myParameterClass != CallbackEvent.class ) {
+ ControlP5.logger( ).warning( " plug() failed. If function " + theName + " does exist, make it public. " + e );
+ }
+ }
+
+ /* check for controlEvent */
+ } else if ( _myType == ControlP5Constants.EVENT ) {
+ try {
+
+ _myMethod = _myObject.getClass( ).getMethod( _myName , _myEventMethodParameter);
+ _myMethod.setAccessible( true );
+ _myParameterClass = _myEventMethodParameter;
+ } catch ( SecurityException e ) {
+ printSecurityWarning( e );
+ } catch ( NoSuchMethodException e ) {
+ if ( _myEventMethodParameter != CallbackEvent.class ) {
+ ControlP5.logger( ).warning( " plug() failed " + _myParameterClass + ". If function " + theName + " does exist, make it public. " + e );
+ }
+ }
+ /* check for fields */
+ } else if ( _myType == ControlP5Constants.FIELD ) {
+
+ Field[] myFields = ControlBroadcaster.getFieldsFor( myClass );
+
+ for ( int i = 0 ; i < myFields.length ; i++ ) {
+ if ( myFields[ i ].getName( ).equals( _myName ) ) {
+ _myParameterClass = myFields[ i ].getType( );
+ }
+ }
+ if ( _myParameterClass != null ) {
+ /**
+ * note. when running in applet mode. for some reason setAccessible(true) works for
+ * methods but not for fields. theAccessControlException is thrown. therefore, make
+ * fields in your code public.
+ */
+
+ try {
+ _myField = myClass.getDeclaredField( _myName );
+ try {
+ _myField.setAccessible( true );
+ } catch ( java.security.AccessControlException e ) {
+ printSecurityWarning( e );
+ }
+ try {
+ _myValue = ( _myField.get( theObject ) );
+ } catch ( Exception ex ) {
+ printSecurityWarning( ex );
+ }
+ } catch ( NoSuchFieldException e ) {
+ ControlP5.logger( ).warning( e.toString( ) );
+ }
+ }
+ }
+ }
+
+ private void printSecurityWarning( Exception e ) {
+ // AccessControlException required for applets.
+ if ( e.getClass( ).equals( AccessControlException.class ) ) {
+ ControlP5.isApplet = true;
+ ControlP5.logger( ).warning( "You are probably running in applet mode.\n" + "make sure fields and methods in your code are public.\n" + e );
+ }
+ }
+
+ protected Object getValue( ) {
+ return _myValue;
+ }
+
+ protected Object getObject( ) {
+ return _myObject;
+ }
+
+ protected String getName( ) {
+ return _myName;
+ }
+
+ protected int getType( ) {
+ return _myType;
+ }
+
+ protected int getParameterType( ) {
+ return _myParameterType;
+ }
+
+ protected Class< ? >[] getAcceptClassList( ) {
+ return _myAcceptClassList;
+ }
+
+ protected Class< ? > getClassType( ) {
+ return _myParameterClass;
+ }
+
+ protected boolean checkType( int theType ) {
+ return _myType == theType;
+ }
+
+ protected boolean checkName( String theName ) {
+ return ( _myName.equals( theName ) );
+ }
+
+ private Object get( float theValue ) {
+ if ( _myParameterClass == float.class ) {
+ return new Float( theValue );
+ } else if ( _myParameterClass == int.class ) {
+ return Integer.valueOf((int) theValue);
+ } else if ( _myParameterClass == boolean.class ) {
+ return ( theValue > 0.5 ) ? Boolean.TRUE : Boolean.FALSE;
+ } else {
+ return null;
+ }
+ }
+
+ protected Object getFieldParameter( float theValue ) {
+ return get( theValue );
+ }
+
+ protected Object[] getMethodParameter( float theValue ) {
+ return new Object[] { get( theValue ) };
+ }
+
+ protected Method getMethod( ) {
+ return _myMethod;
+ }
+
+ protected Field getField( ) {
+ return _myField;
+ }
+
+ static public boolean checkPlug( Object theObject , String thePlugName , Class< ? >[] theArgs ) {
+ try {
+ theObject.getClass( ).getMethod( thePlugName , theArgs );
+ return true;
+ } catch ( Exception e ) {
+ return false;
+ }
+ }
+
+ @Deprecated
+ protected Class< ? > classType( ) {
+ return _myParameterClass;
+ }
+
+ @Deprecated
+ protected Object value( ) {
+ return _myValue;
+ }
+
+ @Deprecated
+ protected Object object( ) {
+ return _myObject;
+ }
+
+ @Deprecated
+ protected String name( ) {
+ return _myName;
+ }
+
+ @Deprecated
+ protected int type( ) {
+ return _myType;
+ }
+
+ @Deprecated
+ protected int parameterType( ) {
+ return _myParameterType;
+ }
+
+ @Deprecated
+ protected Class< ? >[] acceptClassList( ) {
+ return _myAcceptClassList;
+ }
+
+}
diff --git a/controlP5/ControllerProperties.java b/controlP5/ControllerProperties.java
new file mode 100755
index 0000000..733040a
--- /dev/null
+++ b/controlP5/ControllerProperties.java
@@ -0,0 +1,921 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.StringReader;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.logging.Logger;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import processing.core.PApplet;
+import processing.data.JSONArray;
+import processing.data.JSONObject;
+
+/**
+ * Values of controllers can be stored inside properties files which can be saved to file or memory.
+ *
+ * @example controllers/ControlP5properties
+ */
+public class ControllerProperties {
+
+ public final static int OPEN = 0;
+ public final static int CLOSE = 1;
+ public static String defaultName = "controlP5";
+
+
+ PropertiesStorageFormat format;
+
+ /**
+ * all ControllerProperties will be stored inside Map allProperties. ControllerProperties need to be unique or will
+ * otherwise be overwritten.
+ *
+ * A hashSet containing names of PropertiesSets is assigned to each ControllerProperty. HashSets are used instead of
+ * ArrayList to only allow unique elements.
+ */
+
+ private final Map< ControllerProperty , HashSet< String >> allProperties;
+
+ /**
+ * A set of unique property-set names.
+ */
+ private final Set< String > allSets;
+ final ControlP5 controlP5;
+ private final String _myDefaultSetName = "default";
+ public static final Logger logger = Logger.getLogger( ControllerProperties.class.getName( ) );
+ private final Map< String , Set< ControllerProperty >> _mySnapshots;
+
+ public ControllerProperties( ControlP5 theControlP5 ) {
+ controlP5 = theControlP5;
+ // setFormat( new SerializedFormat( ) );
+ setFormat( new JSONFormat( ) );
+ allProperties = new HashMap< ControllerProperty , HashSet< String >>( );
+ allSets = new HashSet< String >( );
+ addSet( _myDefaultSetName );
+ _mySnapshots = new LinkedHashMap< String , Set< ControllerProperty >>( );
+ }
+
+ public Map< ControllerProperty , HashSet< String >> get( ) {
+ return allProperties;
+ }
+
+ /**
+ * adds a property based on names of setter and getter methods of a controller.
+ *
+ * @param thePropertySetter
+ * @param thePropertyGetter
+ */
+ public ControllerProperty register( ControllerInterface< ? > theController , String thePropertySetter , String thePropertyGetter ) {
+ ControllerProperty p = new ControllerProperty( theController , thePropertySetter , thePropertyGetter );
+ if ( !allProperties.containsKey( p ) ) {
+ // register a new property with the main properties container
+ allProperties.put( p , new HashSet< String >( ) );
+ // register the property wit the default properties set
+ allProperties.get( p ).add( _myDefaultSetName );
+ }
+ return p;
+ }
+
+ /**
+ * registering a property with only one parameter assumes that there is a setter and getter function present for the
+ * Controller. register("value") for example would create a property reference to setValue and getValue. Notice that
+ * the first letter of value is being capitalized.
+ *
+ * @param theProperty
+ * @return
+ */
+ public ControllerProperties register( ControllerInterface< ? > theController , String theProperty ) {
+ theProperty = Character.toUpperCase( theProperty.charAt( 0 ) ) + theProperty.substring( 1 );
+ register( theController , "set" + theProperty , "get" + theProperty );
+ return this;
+ }
+
+ public ControllerProperties remove( ControllerInterface< ? > theController , String theSetter , String theGetter ) {
+ ControllerProperty cp = new ControllerProperty( theController , theSetter , theGetter );
+ allProperties.remove( cp );
+ return this;
+ }
+
+ public ControllerProperties remove( ControllerInterface< ? > theController ) {
+ ArrayList< ControllerProperty > list = new ArrayList< ControllerProperty >( allProperties.keySet( ) );
+ for ( ControllerProperty cp : list ) {
+ if ( cp.getController( ).equals( theController ) ) {
+ allProperties.remove( cp );
+ }
+ }
+ return this;
+ }
+
+ public ControllerProperties remove( ControllerInterface< ? > theController , String theProperty ) {
+ return remove( theController , "set" + theProperty , "get" + theProperty );
+ }
+
+ public List< ControllerProperty > get( ControllerInterface< ? > theController ) {
+ List< ControllerProperty > props = new ArrayList< ControllerProperty >( );
+ List< ControllerProperty > list = new ArrayList< ControllerProperty >( allProperties.keySet( ) );
+ for ( ControllerProperty cp : list ) {
+ if ( cp.getController( ).equals( theController ) ) {
+ props.add( cp );
+ }
+ }
+ return props;
+ }
+
+ public ControllerProperty getProperty( ControllerInterface< ? > theController , String theSetter , String theGetter ) {
+ ControllerProperty cp = new ControllerProperty( theController , theSetter , theGetter );
+ Iterator< ControllerProperty > iter = allProperties.keySet( ).iterator( );
+ while ( iter.hasNext( ) ) {
+ ControllerProperty p = iter.next( );
+ if ( p.equals( cp ) ) {
+ return p;
+ }
+ }
+ // in case the property has not been registered before, it will be
+ // registered here automatically - you don't need to call
+ // Controller.registerProperty() but can use Controller.getProperty()
+ // instead.
+ return register( theController , theSetter , theGetter );
+ }
+
+ public ControllerProperty getProperty( ControllerInterface< ? > theController , String theProperty ) {
+ theProperty = Character.toUpperCase( theProperty.charAt( 0 ) ) + theProperty.substring( 1 );
+ return getProperty( theController , "set" + theProperty , "get" + theProperty );
+ }
+
+ public HashSet< ControllerProperty > getPropertySet( ControllerInterface< ? > theController ) {
+ HashSet< ControllerProperty > set = new HashSet< ControllerProperty >( );
+ Iterator< ControllerProperty > iter = allProperties.keySet( ).iterator( );
+ while ( iter.hasNext( ) ) {
+ ControllerProperty p = iter.next( );
+ if ( p.getController( ).equals( theController ) ) {
+ set.add( p );
+ }
+ }
+ return set;
+ }
+
+ public ControllerProperties addSet( String theSet ) {
+ allSets.add( theSet );
+ return this;
+ }
+
+ /**
+ * Moves a ControllerProperty from one set to another.
+ */
+ public ControllerProperties move( ControllerProperty theProperty , String fromSet , String toSet ) {
+ if ( !exists( theProperty ) ) {
+ return this;
+ }
+ if ( allProperties.containsKey( theProperty ) ) {
+ allProperties.get( theProperty ).remove( fromSet );
+ addSet( toSet );
+ allProperties.get( theProperty ).add( toSet );
+ }
+ return this;
+ }
+
+ public ControllerProperties move( ControllerInterface< ? > theController , String fromSet , String toSet ) {
+ HashSet< ControllerProperty > set = getPropertySet( theController );
+ for ( ControllerProperty cp : set ) {
+ move( cp , fromSet , toSet );
+ }
+ return this;
+ }
+
+ /**
+ * copies a ControllerProperty from one set to other(s);
+ */
+ public ControllerProperties copy( ControllerProperty theProperty , String ... theSet ) {
+ if ( !exists( theProperty ) ) {
+ return this;
+ }
+ for ( String s : theSet ) {
+ allProperties.get( theProperty ).add( s );
+ if ( !allSets.contains( s ) ) {
+ addSet( s );
+ }
+ }
+ return this;
+ }
+
+ public ControllerProperties copy( ControllerInterface< ? > theController , String ... theSet ) {
+ HashSet< ControllerProperty > set = getPropertySet( theController );
+ for ( ControllerProperty cp : set ) {
+ copy( cp , theSet );
+ }
+ return this;
+ }
+
+ /**
+ * removes a ControllerProperty from one or multiple sets.
+ */
+ public ControllerProperties remove( ControllerProperty theProperty , String ... theSet ) {
+ if ( !exists( theProperty ) ) {
+ return this;
+ }
+ for ( String s : theSet ) {
+ allProperties.get( theProperty ).remove( s );
+ }
+ return this;
+ }
+
+ public ControllerProperties remove( ControllerInterface< ? > theController , String ... theSet ) {
+ HashSet< ControllerProperty > set = getPropertySet( theController );
+ for ( ControllerProperty cp : set ) {
+ remove( cp , theSet );
+ }
+ return this;
+ }
+
+ /**
+ * stores a ControllerProperty in one particular set only.
+ */
+ public ControllerProperties only( ControllerProperty theProperty , String theSet ) {
+ // clear all the set-references for a particular property
+ allProperties.get( theProperty ).clear( );
+ // add theSet to the empty collection of sets for this particular
+ // property
+ allProperties.get( theProperty ).add( theSet );
+ return this;
+ }
+
+ ControllerProperties only( ControllerInterface< ? > theController , String ... theSet ) {
+ return this;
+ }
+
+ private boolean exists( ControllerProperty theProperty ) {
+ return allProperties.containsKey( theProperty );
+ }
+
+ public ControllerProperties print( ) {
+ for ( Entry< ControllerProperty , HashSet< String >> entry : allProperties.entrySet( ) ) {
+ System.out.println( entry.getKey( ) + "\t" + entry.getValue( ) );
+ }
+ return this;
+ }
+
+ /**
+ * deletes a ControllerProperty from all Sets including the default set.
+ */
+ public ControllerProperties delete( ControllerProperty theProperty ) {
+ if ( !exists( theProperty ) ) {
+ return this;
+ }
+ allProperties.remove( theProperty );
+ return this;
+ }
+
+ private boolean updatePropertyValue( ControllerProperty theProperty ) {
+ Method method;
+ try {
+ method = theProperty.getController( ).getClass( ).getMethod( theProperty.getGetter( ) );
+ Object value = method.invoke( theProperty.getController( ) );
+ theProperty.setType( method.getReturnType( ) );
+ theProperty.setValue( value );
+ if ( checkSerializable( value ) ) {
+ return true;
+ }
+ } catch ( Exception e ) {
+ logger.severe(String.valueOf(e));
+ }
+ return false;
+ }
+
+ private boolean checkSerializable( Object theProperty ) {
+ try {
+ ByteArrayOutputStream out = new ByteArrayOutputStream( );
+ ObjectOutputStream stream = new ObjectOutputStream( out );
+ stream.writeObject( theProperty );
+ stream.close( );
+ return true;
+ } catch ( Exception e ) {
+ return false;
+ }
+ }
+
+ /**
+ * logs all registered properties in memory. Here, clones of properties are stored inside a map and can be accessed
+ * by key using the getLog method.
+ *
+ * @see ControllerProperties#getSnapshot(String)
+ * @param theKey
+ * @return ControllerProperties
+ */
+ public ControllerProperties setSnapshot( String theKey ) {
+ Set< ControllerProperty > l = new HashSet< ControllerProperty >( );
+ for ( ControllerProperty cp : allProperties.keySet( ) ) {
+ updatePropertyValue( cp );
+ try {
+ l.add( ( ControllerProperty ) cp.clone( ) );
+ } catch ( CloneNotSupportedException e ) {
+ // TODO Auto-generated catch block
+ }
+ }
+ _mySnapshots.put( theKey , l );
+ return this;
+ }
+
+ /**
+ * convenience method, setSnapshot(String) also works here since it will override existing log with the same key.
+ */
+ public ControllerProperties updateSnapshot( String theKey ) {
+ return setSnapshot( theKey );
+ }
+
+ /**
+ * removes a snapshot by key.
+ */
+ public ControllerProperties removeSnapshot( String theKey ) {
+ _mySnapshots.remove( theKey );
+ return this;
+ }
+
+ ControllerProperties setSnapshot( String theKey , String ... theSets ) {
+ return this;
+ }
+
+ /**
+ * saves a snapshot into your sketch's sketch folder.
+ */
+ public ControllerProperties saveSnapshot( String theKey ) {
+ saveSnapshotAs( controlP5.papplet.sketchPath( theKey ) , theKey );
+ return this;
+ }
+
+ /**
+ * saves a snapshot to the file with path given by the first parameter (thePropertiesPath).
+ */
+ public ControllerProperties saveSnapshotAs( String thePropertiesPath , String theKey ) {
+ Set< ControllerProperty > log = _mySnapshots.get( theKey );
+ if ( log == null ) {
+ return this;
+ }
+ thePropertiesPath = getPathWithExtension( format , controlP5.checkPropertiesPath( thePropertiesPath ) );
+
+ format.compile( log , thePropertiesPath );
+
+ return this;
+ }
+
+ private String getPathWithExtension( PropertiesStorageFormat theFormat , String thePropertiesPath ) {
+ return ( thePropertiesPath.endsWith( "." + theFormat.getExtension( ) ) ) ? thePropertiesPath : thePropertiesPath + "." + theFormat.getExtension( );
+ }
+
+ /**
+ * restores properties previously stored as snapshot in memory.
+ *
+ * @see ControllerProperties#setSnapshot(String)
+ */
+ public ControllerProperties getSnapshot( String theKey ) {
+ Set< ControllerProperty > l = _mySnapshots.get( theKey );
+ if ( l != null ) {
+ for ( ControllerProperty cp : l ) {
+ ControllerInterface< ? > ci = controlP5.getController( cp.getAddress( ) );
+ ci = ( ci == null ) ? controlP5.getGroup( cp.getAddress( ) ) : ci;
+ ControlP5.invoke(ci, cp.getSetter( ) , cp.getValue( ) );
+ }
+ }
+ return this;
+ }
+
+ /**
+ * properties stored in memory can be accessed by index, getSnapshotIndices() returns the index of the snapshot
+ * list.
+ */
+ public ArrayList< String > getSnapshotIndices( ) {
+ return new ArrayList< String >( _mySnapshots.keySet( ) );
+ }
+
+ /**
+ * load properties from the default properties file 'controlP5.properties'
+ */
+ public boolean load( ) {
+ return load( controlP5.papplet.sketchPath( defaultName + "." + format.getExtension( ) ) );
+ }
+
+ public boolean load( String thePropertiesPath ) {
+ return format.load( getPathWithExtension( format , controlP5.checkPropertiesPath( thePropertiesPath ) ) );
+ }
+
+ /**
+ * use ControllerProperties.SERIALIZED, ControllerProperties.XML or ControllerProperties.JSON as parameter.
+ */
+ public void setFormat( PropertiesStorageFormat theFormat ) {
+ format = theFormat;
+ }
+
+ public void setFormat( String theFormat ) {
+ if ( theFormat.equals( ControlP5.JSON ) ) {
+ setFormat( new JSONFormat( ) );
+ } else if ( theFormat.equals( ControlP5.SERIALIZED ) ) {
+ setFormat( new SerializedFormat( ) );
+ } else {
+ System.out.println( "sorry format " + theFormat + " does not exist." );
+ }
+ }
+
+ /**
+ * saves all registered properties into the default 'controlP5.properties' file into your sketch folder.
+ */
+ public boolean save( ) {
+ System.out.println( "save properties using format " + format + " (" + format.getExtension( ) + ") " + controlP5.papplet.sketchPath( defaultName ) );
+ format.compile( allProperties.keySet( ) , getPathWithExtension( format , controlP5.papplet.sketchPath( defaultName ) ) );
+ return true;
+ }
+
+ /**
+ * saves all registered properties into a file specified by parameter thePropertiesPath.
+ */
+ public boolean saveAs( final String thePropertiesPath ) {
+ format.compile( allProperties.keySet( ) , getPathWithExtension( format , controlP5.checkPropertiesPath( thePropertiesPath ) ) );
+ return true;
+ }
+
+ /**
+ * saves a list of properties sets into a file specified by parameter thePropertiesPath.
+ */
+ public boolean saveAs( String thePropertiesPath , String ... theSets ) {
+ thePropertiesPath = controlP5.checkPropertiesPath( thePropertiesPath );
+ HashSet< ControllerProperty > sets = new HashSet< ControllerProperty >( );
+ Iterator< ControllerProperty > iter = allProperties.keySet( ).iterator( );
+ while ( iter.hasNext( ) ) {
+ ControllerProperty p = iter.next( );
+ if ( allProperties.containsKey( p ) ) {
+ HashSet< String > set = allProperties.get( p );
+ for ( String str : set ) {
+ for ( String s : theSets ) {
+ if ( str.equals( s ) ) {
+ sets.add( p );
+ }
+ }
+ }
+ }
+ }
+ format.compile( sets , getPathWithExtension( format , thePropertiesPath ) );
+ return true;
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ public String toString( ) {
+ String s = "";
+ s += this.getClass( ).getName( ) + "\n";
+ s += "total num of properties:\t" + allProperties.size( ) + "\n";
+ for ( ControllerProperty c : allProperties.keySet( ) ) {
+ s += "\t" + c + "\n";
+ }
+ s += "total num of sets:\t\t" + allSets.size( ) + "\n";
+ for ( String set : allSets ) {
+ s += "\t" + set + "\n";
+ }
+ return s;
+ }
+
+ interface PropertiesStorageFormat {
+
+ void compile( Set< ControllerProperty > theProperties , String thePropertiesPath );
+
+ boolean load( String thePropertiesPath );
+
+ String getExtension( );
+
+ }
+
+ class XMLFormat implements PropertiesStorageFormat {
+ public void compile( Set< ControllerProperty > theProperties , String thePropertiesPath ) {
+ System.out.println( "Dont use the XMLFormat yet, it is not fully implemented with 0.5.9, use SERIALIZED instead." );
+ System.out.println( "Compiling with XMLFormat" );
+ StringBuffer xml = new StringBuffer( );
+ xml.append( "\n" );
+ xml.append( "\n" );
+ for ( ControllerProperty cp : theProperties ) {
+ if ( cp.isActive( ) ) {
+ updatePropertyValue( cp );
+ xml.append( getXML( cp ) );
+ }
+ }
+ xml.append( "" );
+ controlP5.papplet.saveStrings( thePropertiesPath , PApplet.split( xml.toString( ) , "\n" ) );
+ System.out.println( "saving xml, " + thePropertiesPath );
+ }
+
+ public String getExtension( ) {
+ return "xml";
+ }
+
+ public boolean load( String thePropertiesPath ) {
+ String s;
+ try {
+ s = PApplet.join( controlP5.papplet.loadStrings( thePropertiesPath ) , "\n" );
+ } catch ( Exception e ) {
+ logger.warning( thePropertiesPath + ", file not found." );
+ return false;
+ }
+ System.out.println( "loading xml \n" + s );
+ try {
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance( );
+ DocumentBuilder db = dbf.newDocumentBuilder( );
+ InputSource is = new InputSource( );
+ is.setCharacterStream( new StringReader( s ) );
+ Document doc = db.parse( is );
+ doc.getDocumentElement( ).normalize( );
+ NodeList nodeLst = doc.getElementsByTagName( "property" );
+ for ( int i = 0 ; i < nodeLst.getLength( ) ; i++ ) {
+ Node node = nodeLst.item( i );
+ if ( node.getNodeType( ) == Node.ELEMENT_NODE ) {
+ Element fstElmnt = ( Element ) node;
+ String myAddress = getElement( fstElmnt , "address" );
+ String mySetter = getElement( fstElmnt , "setter" );
+ String myType = getElement( fstElmnt , "type" );
+ String myValue = getElement( fstElmnt , "value" );
+ // String myClass = getElement(fstElmnt, "class");
+ // String myGetter = getElement(fstElmnt, "getter");
+ try {
+ System.out.print( "setting controller " + myAddress + " " );
+ ControllerInterface< ? > ci = controlP5.getController( myAddress );
+ ci = ( ci == null ) ? controlP5.getGroup( myAddress ) : ci;
+ System.out.println( ci );
+ Method method;
+ try {
+ Class< ? > c = getClass( myType );
+ System.out.println( myType + " / " + c );
+ method = ci.getClass( ).getMethod( mySetter , c);
+ method.setAccessible( true );
+ method.invoke( ci , getValue( myValue , myType , c ));
+ } catch ( Exception e ) {
+ logger.severe( e.toString( ) );
+ }
+ } catch ( Exception e ) {
+ logger.warning( "skipping a property, " + e );
+ }
+ }
+
+ }
+ } catch ( SAXException e ) {
+ logger.warning( "SAXException, " + e );
+ return false;
+ } catch ( IOException e ) {
+ logger.warning( "IOException, " + e );
+ return false;
+ } catch ( ParserConfigurationException e ) {
+ logger.warning( "ParserConfigurationException, " + e );
+ return false;
+ }
+ return true;
+ }
+
+ private Object getValue( String theValue , String theType , Class< ? > theClass ) {
+ if ( theClass == int.class ) {
+ return Integer.parseInt( theValue );
+ } else if ( theClass == float.class ) {
+ return Float.parseFloat( theValue );
+ } else if ( theClass == boolean.class ) {
+ return Boolean.parseBoolean( theValue );
+ } else if ( theClass.isArray( ) ) {
+ System.out.println( "this is an array: " + theType + ", " + theValue + ", " + theClass );
+ int dim = 0;
+ while ( true ) {
+ if ( theType.charAt( dim ) != '[' || dim >= theType.length( ) ) {
+ break;
+ }
+ dim++;
+ }
+ } else {
+ System.out.println( "is array? " + theClass.isArray( ) );
+ }
+ return theValue;
+ }
+
+ private Class< ? > getClass( String theType ) {
+ if ( theType.equals( "int" ) ) {
+ return int.class;
+ } else if ( theType.equals( "float" ) ) {
+ return float.class;
+ } else if ( theType.equals( "String" ) ) {
+ return String.class;
+ }
+ try {
+ return Class.forName( theType );
+ } catch ( ClassNotFoundException e ) {
+ logger.warning( "ClassNotFoundException, " + e );
+ }
+ return null;
+ }
+
+ private String getElement( Element theElement , String theName ) {
+ NodeList fstNmElmntLst = theElement.getElementsByTagName( theName );
+ Element fstNmElmnt = ( Element ) fstNmElmntLst.item( 0 );
+ NodeList fstNm = fstNmElmnt.getChildNodes( );
+ return fstNm.item( 0 ).getNodeValue( );
+ }
+
+ public String getXML( ControllerProperty theProperty ) {
+ // Mapping Between JSON and Java Entities
+ // http://code.google.com/p/json-simple/wiki/MappingBetweenJSONAndJavaEntities
+ String s = "\t\n";
+ s += "\t\t" + theProperty.getAddress( ) + "\n";
+ s += "\t\t" + CP.formatGetClass( theProperty.getController( ).getClass( ) ) + "\n";
+ s += "\t\t" + theProperty.getSetter( ) + "\n";
+ s += "\t\t" + theProperty.getGetter( ) + "\n";
+ s += "\t\t" + CP.formatGetClass( theProperty.getType( ) ) + "\n";
+ s += "\t\t" + cdata( OPEN , theProperty.getValue( ).getClass( ) ) + ( theProperty.getValue( ).getClass( ).isArray( ) ? CP.arrayToString( theProperty.getValue( ) ) : theProperty.getValue( ) )
+ + cdata( CLOSE , theProperty.getValue( ).getClass( ) ) + "\n";
+ s += "\t\n";
+ return s;
+ }
+
+ private String cdata( int a , Class< ? > c ) {
+ if ( c == String.class || c.isArray( ) ) {
+ return ( a == OPEN ? "" );
+ }
+ return "";
+ }
+ }
+
+ public class JSONFormat implements PropertiesStorageFormat {
+
+ public void compile( Set< ControllerProperty > theProperties , String thePropertiesPath ) {
+ long t = System.currentTimeMillis( );
+ JSONObject json = new JSONObject( );
+ for ( ControllerProperty cp : theProperties ) {
+
+ if ( cp.isActive( ) ) {
+ if ( updatePropertyValue( cp ) ) {
+ cp.setId( cp.getController( ).getId( ) );
+
+ if ( !json.keys( ).contains( cp.getAddress( ) ) ) {
+ json.setJSONObject( cp.getAddress( ) , new JSONObject( ) );
+ }
+ JSONObject item = json.getJSONObject( cp.getAddress( ) );
+ String key = cp.getSetter( );
+ key = Character.toLowerCase( key.charAt( 3 ) ) + key.substring( 4 );
+ if ( cp.getValue( ) instanceof Number ) {
+ if ( cp.getValue( ) instanceof Integer ) {
+ item.setInt( key , ControlP5.i( cp.getValue( ) ) );
+ } else if ( cp.getValue( ) instanceof Float ) {
+ item.setFloat( key , ControlP5.f( cp.getValue( ) ) );
+ } else if ( cp.getValue( ) instanceof Double ) {
+ item.setDouble( key , ControlP5.d( cp.getValue( ) ) );
+ }
+ } else if ( cp.getValue( ) instanceof Boolean ) {
+ item.setBoolean( key , ControlP5.b( cp.getValue( ) ) );
+ } else {
+
+ if ( cp.getValue( ).getClass( ).isArray( ) ) {
+ JSONArray arr = new JSONArray( );
+ if ( cp.getValue( ) instanceof int[] ) {
+ for ( Object o : ( int[] ) cp.getValue( ) ) {
+ arr.append( ControlP5.i( o ) );
+ }
+ } else if ( cp.getValue( ) instanceof float[] ) {
+ for ( Object o : ( float[] ) cp.getValue( ) ) {
+ arr.append( ControlP5.f( o ) );
+ }
+ }
+ item.setJSONArray( key , arr );
+ } else {
+ item.setString( key , cp.getValue( ).toString( ) );
+ }
+ }
+ }
+ }
+ }
+ json.save( new File( getPathWithExtension( this , thePropertiesPath ) ) , "" );
+ }
+
+ public String getExtension( ) {
+ return "json";
+ }
+
+ public boolean load( String thePropertiesPath ) {
+ JSONReader reader = new JSONReader( controlP5.papplet );
+ Map< ? , ? > entries = ControlP5.toMap( reader.parse( thePropertiesPath ) );
+ for ( Map.Entry entry : entries.entrySet( ) ) {
+ String name = entry.getKey( ).toString( );
+ Controller c = controlP5.getController( name );
+ Map< ? , ? > values = ControlP5.toMap( entry.getValue( ) );
+ for ( Map.Entry value : values.entrySet( ) ) {
+ String i0 = value.getKey( ).toString( );
+ String member = "set" + Character.toUpperCase( i0.charAt( 0 ) ) + i0.substring( 1 );
+ Object i1 = value.getValue( );
+ if ( i1 instanceof Number ) {
+ ControlP5.invoke( c , member , ControlP5.f( value.getValue( ) ) );
+ } else if ( i1 instanceof String ) {
+ ControlP5.invoke( c , member , ControlP5.s( value.getValue( ) ) );
+ } else if ( i1 instanceof float[] ) {
+ ControlP5.invoke( c , member , i1);
+ } else {
+ if ( i1 instanceof List ) {
+ List l = ( List ) i1;
+ float[] arr = new float[ l.size( ) ];
+ for ( int i = 0 ; i < l.size( ) ; i++ ) {
+ arr[ i ] = ControlP5.f( l.get( i ) );
+ }
+ ControlP5.invoke( c , member , arr );
+ } else {
+ ControlP5.invoke( c , member , value.getValue( ) );
+ }
+
+ }
+ }
+ }
+ return false;
+ }
+ }
+
+ private class JSONReader {
+
+ private final PApplet papplet;
+
+ public JSONReader( Object o ) {
+ if ( o instanceof PApplet ) {
+ papplet = ( PApplet ) o;
+ } else {
+ papplet = null;
+ System.out.println( "Sorry, argument is not of instance PApplet" );
+ }
+ }
+
+ public Object parse( String s ) {
+ if ( s.indexOf( "{" ) >= 0 ) {
+ return get( JSONObject.parse( s ) , new LinkedHashMap( ) );
+ } else {
+ return get( papplet.loadJSONObject( s ) , new LinkedHashMap( ) );
+ }
+ }
+
+ Object get( Object o , Object m ) {
+ if ( o instanceof JSONObject ) {
+ if ( m instanceof Map ) {
+ Set set = ( ( JSONObject ) o ).keys( );
+ for ( Object o1 : set ) {
+ Object o2 = ControlP5.invoke( o , "opt" , o1.toString( ) );
+ if ( o2 instanceof JSONObject ) {
+ Map m1 = new LinkedHashMap( );
+ ( ( Map ) m ).put( o1.toString( ) , m1 );
+ get( o2 , m1 );
+ } else if ( o2 instanceof JSONArray ) {
+ List l1 = new ArrayList( );
+ ( ( Map ) m ).put( o1.toString( ) , l1 );
+ get( o2 , l1 );
+ } else {
+ ( ( Map ) m ).put( o1.toString( ) , o2 );
+ }
+ }
+ }
+ } else if ( o instanceof JSONArray ) {
+ if ( m instanceof List ) {
+ List l = ( ( List ) m );
+ int n = 0;
+ Object o3 = ControlP5.invoke( o , "opt" , n );
+ while ( o3 != null ) {
+ if ( o3 instanceof JSONArray ) {
+ List l1 = new ArrayList( );
+ l.add( l1 );
+ get( o3 , l1 );
+ } else if ( o3 instanceof JSONObject ) {
+ Map l1 = new LinkedHashMap( );
+ l.add( l1 );
+ get( o3 , l1 );
+ } else {
+ l.add( o3 );
+ }
+ o3 = ControlP5.invoke( o , "opt" , ++n );
+ }
+ } else {
+ System.err.println( "JSONReader type mismatch." );
+ }
+ }
+ return m;
+ }
+
+ }
+
+ public class SerializedFormat implements PropertiesStorageFormat {
+
+ public boolean load( String thePropertiesPath ) {
+ try {
+ FileInputStream fis = new FileInputStream( thePropertiesPath );
+ ObjectInputStream ois = new ObjectInputStream( fis );
+ int size = ois.readInt( );
+ logger.info( "loading " + size + " property-items. " );
+
+ for ( int i = 0 ; i < size ; i++ ) {
+ try {
+ ControllerProperty cp = ( ControllerProperty ) ois.readObject( );
+ ControllerInterface< ? > ci = controlP5.getController( cp.getAddress( ) );
+ ci = ( ci == null ) ? controlP5.getGroup( cp.getAddress( ) ) : ci;
+ ci.setId( cp.getId( ) );
+ Method method;
+ try {
+ method = ci.getClass( ).getMethod( cp.getSetter( ) , cp.getType( ));
+ method.setAccessible( true );
+ method.invoke( ci , cp.getValue( ));
+ } catch ( Exception e ) {
+ logger.severe( e.toString( ) );
+ }
+
+ } catch ( Exception e ) {
+ logger.warning( "skipping a property, " + e );
+ }
+ }
+ ois.close( );
+ } catch ( Exception e ) {
+ logger.warning( "Exception during deserialization: " + e );
+ return false;
+ }
+ return true;
+ }
+
+ public String getExtension( ) {
+ return "ser";
+ }
+
+ public void compile( Set< ControllerProperty > theProperties , String thePropertiesPath ) {
+ int active = 0;
+ int total = 0;
+ HashSet< ControllerProperty > propertiesToBeSaved = new HashSet< ControllerProperty >( );
+ for ( ControllerProperty cp : theProperties ) {
+ if ( cp.isActive( ) ) {
+ if ( updatePropertyValue( cp ) ) {
+ active++;
+ cp.setId( cp.getController( ).getId( ) );
+ propertiesToBeSaved.add( cp );
+ }
+ }
+ total++;
+ }
+
+ int ignored = total - active;
+
+ try {
+ FileOutputStream fos = new FileOutputStream( thePropertiesPath );
+ ObjectOutputStream oos = new ObjectOutputStream( fos );
+
+ logger.info( "Saving property-items to " + thePropertiesPath );
+ oos.writeInt( active );
+
+ for ( ControllerProperty cp : propertiesToBeSaved ) {
+ if ( cp.isActive( ) ) {
+ oos.writeObject( cp );
+ }
+ }
+ logger.info( active + " items saved, " + ( ignored ) + " items ignored. Done saving properties." );
+ oos.flush( );
+ oos.close( );
+ fos.close( );
+ } catch ( Exception e ) {
+ logger.warning( "Exception during serialization: " + e );
+ }
+ }
+ }
+}
diff --git a/controlP5/ControllerProperty.java b/controlP5/ControllerProperty.java
new file mode 100755
index 0000000..ea6a8b1
--- /dev/null
+++ b/controlP5/ControllerProperty.java
@@ -0,0 +1,173 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.io.Serializable;
+
+/**
+ * A controller property saves the value, address, getter and setter of a registered controller.
+ *
+ * @example controllers/ControlP5properties
+ */
+
+public class ControllerProperty implements Serializable , Cloneable {
+
+ private static final long serialVersionUID = 4506431150330867327L;
+ private String setter;
+ private String getter;
+ private Class< ? > type;
+ private Object value;
+ private String address;
+ private int id;
+ private transient boolean active;
+ private transient ControllerInterface< ? > controller;
+
+ ControllerProperty( ControllerInterface< ? > theController , String theSetter , String theGetter ) {
+ setController( theController );
+ setAddress( theController.getAddress( ) );
+ setSetter( theSetter );
+ setGetter( theGetter );
+ setActive( true );
+ setId( theController.getId( ) );
+ }
+
+ @Override protected Object clone( ) throws CloneNotSupportedException {
+ ControllerProperty clone = ( ControllerProperty ) super.clone( );
+ clone.setSetter( getSetter( ) );
+ clone.setGetter( getGetter( ) );
+ clone.setType( getType( ) );
+ clone.setValue( getValue( ) );
+ clone.setAddress( getAddress( ) );
+ clone.setActive( isActive( ) );
+ clone.setController( getController( ) );
+ clone.setId( getId( ) );
+ return clone;
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override public boolean equals( Object o ) {
+
+ if ( this == o ) {
+ return true;
+ }
+ if ( o == null || getClass( ) != o.getClass( ) ) {
+ return false;
+ }
+
+ ControllerProperty p = ( ControllerProperty ) o;
+ return address.equals(p.address) && setter.equals(p.setter) && getter.equals(p.getter);
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override public int hashCode( ) {
+ int result = 17;
+ result = 37 * result + ( address != null ? address.hashCode( ) : 0 );
+ result = 37 * result + ( setter != null ? setter.hashCode( ) : 0 );
+ result = 37 * result + ( getter != null ? getter.hashCode( ) : 0 );
+ return result;
+ }
+
+ public void disable( ) {
+ active = false;
+ }
+
+ public void enable( ) {
+ active = true;
+ }
+
+ @Override public String toString( ) {
+ return address + " " + setter + ", " + getter;
+ }
+
+ void setAddress( String theAddress ) {
+ address = theAddress;
+ }
+
+ String getAddress( ) {
+ return address;
+ }
+
+ ControllerInterface< ? > getController( ) {
+ return controller;
+ }
+
+ void setController( ControllerInterface< ? > theController ) {
+ controller = theController;
+ }
+
+ Object getValue( ) {
+ return value;
+ }
+
+ void setValue( Object theValue ) {
+ value = theValue;
+ }
+
+ Class< ? > getType( ) {
+ return type;
+ }
+
+ void setType( Class< ? > theType ) {
+ type = theType;
+ }
+
+ boolean isActive( ) {
+ return active;
+ }
+
+ void setActive( boolean theValue ) {
+ active = theValue;
+ }
+
+ String getGetter( ) {
+ return getter;
+ }
+
+ void setGetter( String theValue ) {
+ getter = theValue;
+ }
+
+ String getSetter( ) {
+ return setter;
+ }
+
+ void setSetter( String theValue ) {
+ setter = theValue;
+ }
+
+ int getId( ) {
+ return id;
+ }
+
+ void setId( int theValue ) {
+ id = theValue;
+ }
+
+}
diff --git a/controlP5/ControllerStyle.java b/controlP5/ControllerStyle.java
new file mode 100755
index 0000000..75c2193
--- /dev/null
+++ b/controlP5/ControllerStyle.java
@@ -0,0 +1,153 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.io.Serializable;
+
+
+/**
+ * Labels use the ControllerStyle class to store margin and padding information.
+ *
+ * @see Label#getStyle()
+ *
+ * @example extra/ControlP5style
+ */
+public class ControllerStyle implements Serializable {
+
+ private static final long serialVersionUID = 3250201688970310633L;
+
+ public int paddingTop = 0;
+ public int paddingRight = 0;
+ public int paddingBottom = 0;
+ public int paddingLeft = 0;
+ public int marginTop = 0;
+ public int marginRight = 0;
+ public int marginBottom = 0;
+ public int marginLeft = 0;
+ public int background;
+ public int backgroundWidth = -1;
+ public int backgroundHeight = -1;
+ public int color;
+
+ public ControllerStyle margin( int theValue ) {
+ marginTop = theValue;
+ marginRight = theValue;
+ marginBottom = theValue;
+ marginLeft = theValue;
+ return this;
+ }
+
+ public ControllerStyle padding( int theValue ) {
+ paddingTop = theValue;
+ paddingRight = theValue;
+ paddingBottom = theValue;
+ paddingLeft = theValue;
+ return this;
+ }
+
+ public ControllerStyle setPadding( int theTop , int theRight , int theBottom , int theLeft ) {
+ padding( theTop , theRight , theBottom , theLeft );
+ return this;
+ }
+
+ public ControllerStyle setPaddingTop( int theValue ) {
+ paddingTop = theValue;
+ return this;
+ }
+
+ public ControllerStyle setPaddingBottom( int theValue ) {
+ paddingBottom = theValue;
+ return this;
+ }
+
+ public ControllerStyle setPaddingRight( int theValue ) {
+ paddingRight = theValue;
+ return this;
+ }
+
+ public ControllerStyle setPaddingLeft( int theValue ) {
+ paddingLeft = theValue;
+ return this;
+ }
+
+ public ControllerStyle margin( int theTop , int theRight , int theBottom , int theLeft ) {
+ marginTop = theTop;
+ marginRight = theRight;
+ marginBottom = theBottom;
+ marginLeft = theLeft;
+ return this;
+ }
+
+ public ControllerStyle setMargin( int theTop , int theRight , int theBottom , int theLeft ) {
+ margin( theTop , theRight , theBottom , theLeft );
+ return this;
+ }
+
+ public ControllerStyle setMarginTop( int theValue ) {
+ marginTop = theValue;
+ return this;
+ }
+
+ public ControllerStyle setMarginBottom( int theValue ) {
+ marginBottom = theValue;
+ return this;
+ }
+
+ public ControllerStyle setMarginRight( int theValue ) {
+ marginRight = theValue;
+ return this;
+ }
+
+ public ControllerStyle setMarginLeft( int theValue ) {
+ marginLeft = theValue;
+ return this;
+ }
+
+ public ControllerStyle padding( int theTop , int theRight , int theBottom , int theLeft ) {
+ paddingTop = theTop;
+ paddingRight = theRight;
+ paddingBottom = theBottom;
+ paddingLeft = theLeft;
+ return this;
+ }
+
+ public ControllerStyle moveMargin( int theTop , int theRight , int theBottom , int theLeft ) {
+ marginTop += theTop;
+ marginRight += theRight;
+ marginBottom += theBottom;
+ marginLeft += theLeft;
+ return this;
+ }
+
+ public ControllerStyle movePadding( int theTop , int theRight , int theBottom , int theLeft ) {
+ paddingTop += theTop;
+ paddingRight += theRight;
+ paddingBottom += theBottom;
+ paddingLeft += theLeft;
+ return this;
+ }
+
+}
diff --git a/controlP5/ControllerView.java b/controlP5/ControllerView.java
new file mode 100755
index 0000000..d14d9dd
--- /dev/null
+++ b/controlP5/ControllerView.java
@@ -0,0 +1,50 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PGraphics;
+
+/**
+ * The interface ControllerView can be used to define custom displays for controllers.
+ *
+ * @see controlP5.draw(processing.core.PApplet)
+ * @see controlP5.setView(ControlleView)
+ *
+ * @example use/ControlP5customDisplay
+ */
+public interface ControllerView< T > {
+
+ /**
+ * draws your custom controllers. display() will be called by a controller's draw() function and
+ * will pass a reference of PApplet as well as the Controller itself to your custom display
+ * class.
+ *
+ * @param theApplet
+ * @param theController
+ */
+ void display( PGraphics theGraphics , T theController );
+
+}
diff --git a/controlP5/DropdownList.java b/controlP5/DropdownList.java
new file mode 100755
index 0000000..466582d
--- /dev/null
+++ b/controlP5/DropdownList.java
@@ -0,0 +1,466 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+import static main.java.src2.main.java.controlP5.controlP5.ControlP5.b;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+import processing.event.KeyEvent;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+public class DropdownList extends Controller< DropdownList > implements ControlListener {
+
+ private int _myType = DROPDOWN;
+ protected int _myBackgroundColor = 0x00ffffff;
+ protected int itemHeight = 13;
+ protected int barHeight = 10;
+ private float scrollSensitivity = 1;
+ private boolean isOpen = true;
+ protected List< Map< String , Object > > items;
+ protected int itemRange = 5;
+ protected int itemHover = -1;
+ private int itemIndexOffset = 0;
+ private final int itemSpacing = 1;
+ private int _myDirection = PApplet.DOWN;
+ private boolean isBarVisible = true;
+ static public final int LIST = ControlP5.LIST;
+ static public final int DROPDOWN = ControlP5.DROPDOWN;
+ static public final int CHECKBOX = ControlP5.CHECKBOX; /* TODO */
+ static public final int TREE = ControlP5.TREE; /* TODO */
+
+ public DropdownList( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 99 , 199 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected DropdownList( ControlP5 theControlP5 , ControllerGroup< ? > theGroup , String theName , int theX , int theY , int theW , int theH ) {
+ super( theControlP5 , theGroup , theName , theX , theY , theW , theH );
+ items = new ArrayList< Map< String , Object > >( );
+ updateHeight( );
+ getValueLabel( ).align( PApplet.LEFT , PApplet.CENTER );
+ }
+
+ public boolean isOpen( ) {
+ return isOpen;
+ }
+
+ public DropdownList open( ) {
+ return setOpen( true );
+ }
+
+ public DropdownList close( ) {
+ return setOpen( false );
+ }
+
+ public DropdownList setOpen( boolean b ) {
+ isOpen = b;
+ return this;
+ }
+
+ @Override public int getHeight( ) {
+ return isOpen ? super.getHeight( ) : barHeight;
+ }
+
+ public DropdownList setType( int theType ) {
+ _myType = theType;
+ return this;
+ }
+
+ public void setDirection( int theDirection ) {
+ _myDirection = ( theDirection == PApplet.UP ) ? PApplet.UP : PApplet.DOWN;
+ }
+
+ @Override protected boolean inside( ) {
+ /* constrain the bounds of the controller to the
+ * dimensions of the cp5 area, required since
+ * PGraphics as render area has been introduced. */
+ float x0 = PApplet.max( 0 , x( position ) + x( _myParent.getAbsolutePosition( ) ) );
+ float x1 = PApplet.min( cp5.pgw , x( position ) + x( _myParent.getAbsolutePosition( ) ) + getWidth( ) );
+ float y0 = PApplet.max( 0 , y( position ) + y( _myParent.getAbsolutePosition( ) ) );
+ float y1 = PApplet.min( cp5.pgh , y( position ) + y( _myParent.getAbsolutePosition( ) ) + getHeight( ) );
+ if ( y1 < y0 ) {
+ float ty = y0;
+ y0 = y1;
+ y1 = ty;
+ }
+ return ( _myControlWindow.mouseX > x0 && _myControlWindow.mouseX < x1 && _myControlWindow.mouseY > ( y1 < y0 ? y1 : y0 ) && _myControlWindow.mouseY < ( y0 < y1 ? y1 : y0 ) );
+ }
+
+ @Override protected void onRelease( ) {
+ if ( !isDragged ) {
+ if ( getPointer( ).y( ) >= 0 && getPointer( ).y( ) <= barHeight ) {
+ setOpen( !isOpen( ) );
+ } else if ( isOpen ) {
+
+ double n = Math.floor( ( getPointer( ).y( ) - barHeight ) / itemHeight );
+
+ // n += itemRange; /* UP */
+ int index = ( int ) n + itemIndexOffset;
+
+ if (index < items.size()) {
+ Map m = items.get( index );
+
+ switch ( _myType ) {
+ case ( LIST ):
+ setValue( index );
+ for ( Object o : items ) {
+ ( ( Map ) o ).put( "state" , false );
+ }
+ m.put( "state" , !ControlP5.b( m.get( "state" ) ) );
+ break;
+ case ( DROPDOWN ):
+ setValue( index );
+ setOpen( false );
+ getCaptionLabel( ).setText( ( m.get( "text" ).toString( ) ) );
+ break;
+ case ( CHECKBOX ):
+ m.put( "state" , !ControlP5.b( m.get( "state" ) ) );
+ break;
+ }
+ }
+
+ }
+ }
+ }
+
+ @Override protected void onDrag( ) {
+ scroll( getPointer( ).dy( ) );
+ }
+
+ @Override protected void onScroll( int theValue ) {
+ scroll( theValue );
+ }
+
+ private void scroll( int theValue ) {
+ if ( isOpen ) {
+ itemIndexOffset += theValue;
+ itemIndexOffset = ( int ) ( Math.floor( Math.max( 0 , Math.min( itemIndexOffset , items.size( ) - itemRange ) ) ) );
+ itemHover = -2;
+ }
+ }
+
+ @Override protected void onLeave( ) {
+ itemHover = -1;
+ }
+
+ private void updateHover( ) {
+ if ( getPointer( ).y( ) > barHeight ) {
+ double n = Math.floor( ( getPointer( ).y( ) - barHeight ) / itemHeight );
+ itemHover = ( int ) ( itemIndexOffset + n );
+ } else {
+ itemHover = -1;
+ }
+ }
+
+ @Override protected void onEnter( ) {
+ updateHover( );
+ }
+
+ @Override protected void onMove( ) {
+ updateHover( );
+ }
+
+ @Override protected void onEndDrag( ) {
+ updateHover( );
+ }
+
+ private int updateHeight( ) {
+ itemRange = ( PApplet.abs( getHeight( ) ) - ( isBarVisible( ) ? barHeight : 0 ) ) / itemHeight;
+ return itemHeight * ( items.size( ) < itemRange ? items.size( ) : itemRange );
+ }
+
+ public DropdownList setItemHeight( int theHeight ) {
+ itemHeight = theHeight;
+ updateHeight( );
+ return this;
+ }
+
+ public DropdownList setBarHeight( int theHeight ) {
+ barHeight = theHeight;
+ updateHeight( );
+ return this;
+ }
+
+ public int getBarHeight( ) {
+ return barHeight;
+ }
+
+ public DropdownList setScrollSensitivity( float theSensitivity ) {
+ scrollSensitivity = theSensitivity;
+ return this;
+ }
+
+ public DropdownList setBarVisible( boolean b ) {
+ isBarVisible = b;
+ updateHeight( );
+ return this;
+ }
+
+ public boolean isBarVisible( ) {
+ return isBarVisible;
+ }
+
+ private Map< String , Object > getDefaultItemMap( String theName , Object theValue ) {
+ Map< String , Object > item = new HashMap< String , Object >( );
+ item.put( "name" , theName );
+ item.put( "text" , theName );
+ item.put( "value" , theValue );
+ item.put( "color" , getColor( ) );
+ item.put( "view" , new CDrawable( ) {
+ @Override public void draw( PGraphics theGraphics ) {
+ }
+
+ } );
+ item.put( "state" , false );
+ return item;
+ }
+
+ public DropdownList addItem( String theName , Object theValue ) {
+ Map< String , Object > item = getDefaultItemMap( theName , theValue );
+ items.add( item );
+ return this;
+ }
+
+ public DropdownList addItems( String[] theItems ) {
+ addItems( Arrays.asList( theItems ) );
+ return this;
+ }
+
+ public DropdownList addItems( List< String > theItems ) {
+ for ( int i = 0 ; i < theItems.size( ) ; i++ ) {
+ addItem(theItems.get( i ), i );
+ }
+ return this;
+ }
+
+ public DropdownList addItems( Map< String , Object > theItems ) {
+ for ( Map.Entry< String , Object > item : theItems.entrySet( ) ) {
+ addItem( item.getKey( ) , item.getValue( ) );
+ }
+ return this;
+ }
+
+ public DropdownList setItems( String[] theItems ) {
+ setItems( Arrays.asList( theItems ) );
+ return this;
+ }
+
+ public DropdownList setItems( List< String > theItems ) {
+ items.clear( );
+ return addItems( theItems );
+ }
+
+ public DropdownList setItems( Map< String , Object > theItems ) {
+ items.clear( );
+ return addItems( theItems );
+ }
+
+ public DropdownList removeItems( List< String > theItems ) {
+ for ( String s : theItems ) {
+ removeItem( s );
+ }
+ return this;
+ }
+
+ public DropdownList removeItem( String theName ) {
+ if ( theName != null ) {
+
+ List l = new ArrayList( );
+ for ( Map m : items ) {
+ if ( theName.equals( m.get( "name" ) ) ) {
+ l.add( m );
+ }
+ }
+ items.removeAll( l );
+ }
+ return this;
+ }
+
+ public void updateItemIndexOffset( ) {
+ int m1 = items.size( ) > itemRange ? ( itemIndexOffset + itemRange ) : items.size( );
+ int n = ( m1 - items.size( ) );
+ if ( n >= 0 ) {
+ itemIndexOffset -= n;
+ }
+ }
+
+ public Map< String , Object > getItem( int theIndex ) {
+ return items.get( theIndex );
+ }
+
+ public Map< String , Object > getItem( String theName ) {
+ if ( theName != null ) {
+ for ( Map< String , Object > o : items ) {
+ if ( theName.equals( o.get( "name" ) ) ) {
+ return o;
+ }
+ }
+ }
+ return Collections.EMPTY_MAP;
+ }
+
+ public List getItems( ) {
+ return Collections.unmodifiableList( items );
+ }
+
+ public DropdownList clear( ) {
+ for ( int i = items.size( ) - 1 ; i >= 0 ; i-- ) {
+ items.remove( i );
+ }
+ items.clear( );
+ itemIndexOffset = 0;
+ return this;
+ }
+
+ @Override public void controlEvent( ControlEvent theEvent ) {
+ // TODO Auto-generated method stub
+ }
+
+ public DropdownList setBackgroundColor( int theColor ) {
+ _myBackgroundColor = theColor;
+ return this;
+ }
+
+ public int getBackgroundColor( ) {
+ return _myBackgroundColor;
+ }
+
+ @Override @ControlP5.Invisible public DropdownList updateDisplayMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = new DropdownListView( );
+ break;
+ case ( IMAGE ):
+ case ( SPRITE ):
+ case ( CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ static public class DropdownListView implements ControllerView< DropdownList > {
+
+ public void display( PGraphics g , DropdownList c ) {
+
+ // setHeight( -200 ); /* UP */
+
+ g.noStroke( );
+
+ if ( c.isBarVisible( ) ) {
+ boolean b = c.itemHover == -1 && c.isInside && !c.isDragged;
+ g.fill( b ? c.getColor( ).getForeground( ) : c.getColor( ).getBackground( ) );
+ g.rect( 0 , 0 , c.getWidth( ) , c.barHeight );
+ g.pushMatrix( );
+ g.translate( c.getWidth( ) - 8 , c.barHeight / 2 - 2 );
+ g.fill( c.getColor( ).getCaptionLabel( ) );
+ if ( c.isOpen( ) ) {
+ g.triangle( -3 , 0 , 3 , 0 , 0 , 3 );
+ } else {
+ g.triangle( -3 , 3 , 3 , 3 , 0 , 0 );
+ }
+ g.popMatrix( );
+
+ c.getCaptionLabel( ).draw( g , 4 , c.barHeight / 2 );
+ }
+
+ if ( c.isOpen( ) ) {
+ int bar = ( c.isBarVisible( ) ? c.barHeight : 0 );
+ int h = ( ( c.updateHeight( ) ) );
+ g.pushMatrix( );
+ // g.translate( 0 , - ( h + bar +
+ // c.itemSpacing ) ); /* UP */
+ g.fill( c.getBackgroundColor( ) );
+ g.rect( 0 , bar , c.getWidth( ) , h );
+ g.pushMatrix( );
+ g.translate( 0 , ( bar == 0 ? 0 : ( c.barHeight + c.itemSpacing ) ) );
+ /* draw visible items */
+ c.updateItemIndexOffset( );
+ int m0 = c.itemIndexOffset;
+ int m1 = c.items.size( ) > c.itemRange ? ( c.itemIndexOffset + c.itemRange ) : c.items.size( );
+ for ( int i = m0 ; i < m1 ; i++ ) {
+ Map< String , Object > item = c.items.get( i );
+ CColor color = ( CColor ) item.get( "color" );
+ g.fill( ( b( item.get( "state" ) ) ) ? color.getActive( ) : ( i == c.itemHover ) ? ( c.isMousePressed ? color.getActive( ) : color.getForeground( ) ) : color.getBackground( ) );
+ g.rect( 0 , 0 , c.getWidth( ) , c.itemHeight - 1 );
+ c.getValueLabel( ).set( item.get( "text" ).toString( ) ).draw( g , 4 , c.itemHeight / 2 );
+ g.translate( 0 , c.itemHeight );
+ }
+ g.popMatrix( );
+
+ if ( c.isInside ) {
+ int m = c.items.size( ) - c.itemRange;
+ if ( m > 0 ) {
+ g.fill( c.getColor( ).getCaptionLabel( ) );
+ g.pushMatrix( );
+ int s = 4; /* spacing */
+ int s2 = s / 2;
+ g.translate( c.getWidth( ) - s , c.barHeight );
+ int len = ( int ) PApplet.map( ( float ) Math.log( m * 10 ) , 0 , 10 , h , 0 );
+ int pos = ( int ) ( PApplet.map( c.itemIndexOffset , 0 , m , s2 , h - len - s2 ) );
+ g.rect( 0 , pos , s2 , len );
+ g.popMatrix( );
+ }
+ }
+ g.popMatrix( );
+ }
+
+ }
+
+ }
+
+ public void keyEvent( KeyEvent theKeyEvent ) {
+ if ( isInside && theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
+ switch ( theKeyEvent.getKeyCode( ) ) {
+ case (UP):
+ scroll( theKeyEvent.isAltDown( ) ? -itemIndexOffset : theKeyEvent.isShiftDown( ) ? -10 : -1 );
+ updateHover( );
+ break;
+ case (DOWN):
+ scroll( theKeyEvent.isAltDown( ) ? items.size( ) - itemRange : theKeyEvent.isShiftDown( ) ? 10 : 1 );
+ updateHover( );
+ break;
+ case (LEFT):
+ break;
+ case (RIGHT):
+ break;
+ case (ENTER):
+ onRelease( );
+ break;
+ }
+ }
+ }
+ /* TODO keycontrol: arrows, return dragging moving items
+ * sorting custom view custom event types */
+}
\ No newline at end of file
diff --git a/controlP5/FieldChangedListener.java b/controlP5/FieldChangedListener.java
new file mode 100755
index 0000000..f3654fc
--- /dev/null
+++ b/controlP5/FieldChangedListener.java
@@ -0,0 +1,134 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.lang.reflect.Field;
+
+/**
+ * the FieldChangedListener is used to observe changes of variables that are
+ * linked to a controller. The FieldChangedListener is for primarily for
+ * internal use.
+ *
+ * @see Controller#listen(boolean)
+ */
+class FieldChangedListener {
+
+ private FieldValue value;
+
+ private final ControlP5 controlP5;
+
+ public FieldChangedListener(ControlP5 theControlP5) {
+ controlP5 = theControlP5;
+ }
+
+ /**
+ * Assigns a listener to a specific field of an object.
+ *
+ * this can be done in a more elegant way using generics.
+ *
+ * @param theObject
+ * @param theFieldName
+ */
+ public void listenTo(final Object theObject, final String theFieldName) {
+ try {
+ Class> c = theObject.getClass();
+ final Field field = c.getDeclaredField(theFieldName);
+ field.setAccessible(true);
+ if (field.getType().isAssignableFrom(Float.TYPE)) {
+ value = new FieldValue() {
+ float then;
+
+ public void check() {
+ try {
+ float now = (Float) field.get(theObject);
+ if (now != then) {
+ controlP5.getController(theFieldName, theObject).setValue(now);
+ then = now;
+ }
+ } catch (IllegalAccessException e) {
+ }
+ }
+ };
+ } else if (field.getType().isAssignableFrom(Integer.TYPE)) {
+ value = new FieldValue() {
+ int then;
+
+ public void check() {
+ try {
+ int now = (Integer) field.get(theObject);
+ if (now != then) {
+ controlP5.getController(theFieldName, theObject).setValue(now);
+ then = now;
+ }
+ } catch (IllegalAccessException e) {
+ }
+ }
+ };
+ } else if (field.getType().isAssignableFrom(Boolean.TYPE)) {
+ value = new FieldValue() {
+ boolean then;
+
+ public void check() {
+ try {
+ boolean now = (Boolean) field.get(theObject);
+ if (now != then) {
+ controlP5.getController(theFieldName, theObject).setValue(now ? 1 : 0);
+ then = now;
+ }
+ } catch (IllegalAccessException e) {
+ }
+ }
+ };
+ } else if (field.getType().isAssignableFrom(String.class)) {
+
+ value = new FieldValue() {
+ String then;
+
+ public void check() {
+ try {
+ String now = (String) field.get(theObject);
+ if (!now.equals(then)) {
+ controlP5.getController(theFieldName, theObject).setStringValue(now);
+ then = now;
+ }
+ } catch (IllegalAccessException e) {
+ }
+ }
+ };
+ }
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ }
+
+ void update() {
+ value.check();
+ }
+}
+
+interface FieldValue {
+ void check();
+}
diff --git a/controlP5/FrameRate.java b/controlP5/FrameRate.java
new file mode 100755
index 0000000..f2ca384
--- /dev/null
+++ b/controlP5/FrameRate.java
@@ -0,0 +1,58 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+public class FrameRate extends Textlabel {
+
+ private int _myInterval = 10;
+
+ private float _myIntervalSum = 0;
+
+ private int cnt = 0;
+
+ protected FrameRate( final ControlP5 theControlP5 , final Tab theParent , final String theValue , final int theX , final int theY ) {
+ super( theControlP5 , theParent , "framerate" , "-" , theX , theY );
+ }
+
+ public FrameRate setInterval( int theValue ) {
+ _myInterval = theValue;
+ return this;
+ }
+
+ @Override
+ public void draw( PGraphics theGraphics ) {
+ if ( ( cnt++ ) % _myInterval == 0 ) {
+ setText(String.valueOf(PApplet.round(_myIntervalSum / _myInterval)));
+ _myIntervalSum = 0;
+ }
+ _myIntervalSum += cp5.papplet.frameRate;
+ super.draw( theGraphics );
+ }
+
+}
diff --git a/controlP5/Group.java b/controlP5/Group.java
new file mode 100755
index 0000000..ca7797e
--- /dev/null
+++ b/controlP5/Group.java
@@ -0,0 +1,43 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+public class Group extends ControlGroup< Group > {
+
+ /**
+ * Convenience constructor to extend Group.
+ *
+ * @example use/ControlP5extendController
+ */
+ public Group( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 99 , 9 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ public Group( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , int theX , int theY , int theW , int theH ) {
+ super( theControlP5 , theParent , theName , theX , theY , theW , theH );
+ }
+
+}
diff --git a/controlP5/Icon.java b/controlP5/Icon.java
new file mode 100644
index 0000000..b77ef01
--- /dev/null
+++ b/controlP5/Icon.java
@@ -0,0 +1,405 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PApplet;
+import processing.core.PFont;
+import processing.core.PGraphics;
+
+public class Icon extends Controller< Icon > {
+
+ protected boolean isPressed;
+ protected boolean isOn = false;
+ public static int autoWidth = 69;
+ public static int autoHeight = 19;
+ protected int activateBy = ControlP5Constants.RELEASE;
+ protected boolean isSwitch = false;
+ protected int roundedCorners = 0;
+ protected boolean isFill = true;
+ protected boolean isStroke = false;
+ protected float scl = 1;
+ protected int[] fontIcons = new int[] { -1 , -1 , -1 , -1 };
+ protected boolean isHideBackground = true;
+ protected float strokeWeight = 1;
+ protected float scalePressed = 1.0f;
+ protected float scaleReleased = 1.0f;
+
+ public Icon( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 0 , autoWidth , autoHeight );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected Icon( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , float theDefaultValue , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ _myValue = theDefaultValue;
+ _myCaptionLabel.align( ControlP5Constants.CENTER , ControlP5Constants.CENTER );
+ }
+
+ @Override protected void onEnter( ) {
+ isActive = true;
+ }
+
+ @Override protected void onLeave( ) {
+ isActive = false;
+ setIsInside( false );
+ }
+
+ /**
+ * @exclude
+ */
+ @Override @ControlP5.Invisible public void mousePressed( ) {
+ isActive = getIsInside( );
+ isPressed = true;
+ if ( activateBy == ControlP5Constants.PRESSED ) {
+ activate( );
+ }
+ scl = scalePressed;
+ }
+
+ /**
+ * @exclude
+ */
+ @Override @ControlP5.Invisible public void mouseReleased( ) {
+ isPressed = false;
+ if ( activateBy == ControlP5Constants.RELEASE ) {
+ activate( );
+ }
+ isActive = false;
+ scl = scaleReleased;
+ }
+
+ /**
+ * A Icon can be activated by a mouse PRESSED or mouse
+ * RELEASE. Default value is RELEASE.
+ */
+ public Icon activateBy( int theValue ) {
+ if ( theValue == ControlP5Constants.PRESS ) {
+ activateBy = ControlP5Constants.PRESS;
+ } else {
+ activateBy = ControlP5Constants.RELEASE;
+ }
+ return this;
+ }
+
+ protected void activate( ) {
+ if ( isActive ) {
+ isActive = false;
+ isOn = !isOn;
+ setValue( _myValue );
+ }
+ }
+
+ @Override @ControlP5.Invisible public void mouseReleasedOutside( ) {
+ mouseReleased( );
+ }
+
+ @Override public Icon setValue( float theValue ) {
+ _myValue = theValue;
+ broadcast( ControlP5Constants.FLOAT );
+ return this;
+ }
+
+ @Override public Icon update( ) {
+ return setValue( _myValue );
+ }
+
+ /**
+ * Turns an icon into a switch.
+ */
+ public Icon setSwitch( boolean theFlag ) {
+ isSwitch = theFlag;
+ if ( isSwitch ) {
+ _myBroadcastType = ControlP5Constants.BOOLEAN;
+ } else {
+ _myBroadcastType = ControlP5Constants.FLOAT;
+ }
+ return this;
+ }
+
+ /**
+ * If the Icon acts as a switch, setOn will turn on
+ * the switch. Use
+ * {@link Icon#setSwitch(boolean) setSwitch}
+ * to turn a Icon into a Switch.
+ */
+ public Icon setOn( ) {
+ if ( isSwitch ) {
+ isOn = false;
+ isActive = true;
+ activate( );
+ }
+ return this;
+ }
+
+ /**
+ * If the Icon acts as a switch, setOff will turn off
+ * the switch. Use
+ * {@link Icon#setSwitch(boolean) setSwitch}
+ * to turn a Icon into a Switch.
+ */
+ public Icon setOff( ) {
+ if ( isSwitch ) {
+ isOn = true;
+ isActive = true;
+ activate( );
+ }
+ return this;
+ }
+
+ public boolean isOn( ) {
+ return isOn;
+ }
+
+ public boolean isSwitch( ) {
+ return isSwitch;
+ }
+
+ public boolean isPressed( ) {
+ return isPressed;
+ }
+
+ /**
+ * Returns true or false and indicates the switch state
+ * of the Icon. {@link setSwitch(boolean) setSwitch}
+ * should have been set before.
+ */
+ public boolean getBooleanValue( ) {
+ return isOn;
+ }
+
+ public Icon setRoundedCorners( int theRadius ) {
+ roundedCorners = theRadius;
+ return this;
+ }
+
+ public Icon setFontIconSize( int theSize ) {
+ _myCaptionLabel.setSize( theSize );
+ return this;
+ }
+
+ public Icon setFont( PFont thePFont ) {
+ _myCaptionLabel.setFont( thePFont );
+ return this;
+ }
+
+ public Icon setFont( PFont thePFont , int theSize ) {
+ _myCaptionLabel.setFont( thePFont );
+ setFontIconSize( theSize );
+ return this;
+ }
+
+ public Icon setFontIndex( int theIndex ) {
+ _myCaptionLabel.set(String.valueOf((char) theIndex));
+ return this;
+ }
+
+ public Icon setStroke( boolean theBoolean ) {
+ isStroke = theBoolean;
+ return this;
+ }
+
+ public Icon setStrokeWeight( float theStrokeWeight ) {
+ strokeWeight = theStrokeWeight;
+ return this;
+ }
+
+ public Icon setFill( boolean theBoolean ) {
+ isFill = theBoolean;
+ return this;
+ }
+
+ public Icon setFontIcons( int theStateOff , int theStateOn ) {
+ setFontIcon( theStateOn , ControlP5Constants.ACTIVE );
+ setFontIcon( theStateOff , ControlP5Constants.DEFAULT );
+ return this;
+ }
+
+ public Icon setFontIconOn( int theStateOn ) {
+ setFontIcon( theStateOn , ControlP5Constants.ACTIVE );
+ return this;
+ }
+
+ public Icon setFontIconOff( int theStateOff ) {
+ setFontIcon( theStateOff , ControlP5Constants.DEFAULT );
+ return this;
+ }
+
+ public Icon setFontIcons( int ... theIds ) {
+ if ( theIds.length < 3 || theIds.length > 4 ) {
+ return this;
+ }
+ setFontIcon( theIds[ 0 ] , ControlP5Constants.DEFAULT );
+ setFontIcon( theIds[ 1 ] , ControlP5Constants.OVER );
+ setFontIcon( theIds[ 2 ] , ControlP5Constants.ACTIVE );
+ setFontIcon( theIds.length == 3 ? theIds[ 2 ] : theIds[ 3 ] , ControlP5Constants.HIGHLIGHT );
+ return this;
+ }
+
+ public Icon setFontIcon( int theId ) {
+ return setFontIcon( theId , ControlP5Constants.DEFAULT );
+ }
+
+ public int getFontIcon( int theState ) {
+ if ( theState >= 0 && theState < 4 ) {
+ return fontIcons[ theState ];
+ } else {
+ return fontIcons[ ControlP5Constants.DEFAULT ];
+ }
+ }
+
+ /**
+ * @param theImage
+ * @param theState use Controller.DEFAULT (background) Controller.OVER (foreground) Controller.ACTIVE (active)
+ */
+ public Icon setFontIcon( int theId , int theState ) {
+ fontIcons[ theState ] = theId;
+ updateDisplayMode( ControlP5Constants.DEFAULT );
+ return this;
+ }
+
+ public Icon hideBackground( ) {
+ isHideBackground = true;
+ return this;
+ }
+
+ public Icon showBackground( ) {
+ isHideBackground = false;
+ return this;
+ }
+
+ public Icon setScale( float theScalePressed , float theScaleReleased ) {
+ scalePressed = theScalePressed;
+ scaleReleased = theScaleReleased;
+ return this;
+ }
+
+ @Override @ControlP5.Invisible public Icon updateDisplayMode( int theMode ) {
+ return updateViewMode( theMode );
+ }
+
+ /**
+ * @exclude
+ */
+ @ControlP5.Invisible public Icon updateViewMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( ControlP5Constants.DEFAULT ):
+ _myControllerView = new IconView( );
+ break;
+ case ( ControlP5Constants.IMAGE ):
+ _myControllerView = new IconImageView( );
+ break;
+ case ( ControlP5Constants.CUSTOM ):
+ default:
+ break;
+
+ }
+ return this;
+ }
+
+ private class IconView implements ControllerView< Icon > {
+
+ public void display( PGraphics theGraphics , Icon theController ) {
+
+ if ( !isHideBackground ) {
+ if ( isStroke ) {
+ theGraphics.stroke( color.getBackground( ) );
+ theGraphics.strokeWeight( strokeWeight );
+ } else {
+ theGraphics.noStroke( );
+ }
+
+ if ( isFill ) {
+ theGraphics.fill( color.getBackground( ) );
+ } else {
+ theGraphics.noFill( );
+ }
+ }
+
+ float w_half = getWidth( ) / 2;
+ float h_half = getHeight( ) / 2;
+ theGraphics.translate( w_half , h_half );
+ theGraphics.scale( scl );
+
+ if ( !isHideBackground ) {
+ if ( roundedCorners == 0 ) {
+ theGraphics.rect( -w_half , -h_half , getWidth( ) , getHeight( ) );
+ } else if ( roundedCorners == -1 ) {
+ theGraphics.ellipseMode(PApplet.CORNER);
+ theGraphics.ellipse( -w_half , -h_half , getWidth( ) , getHeight( ) );
+ } else {
+ theGraphics.rect( -w_half , -h_half , getWidth( ) , getHeight( ) , roundedCorners , roundedCorners , roundedCorners , roundedCorners );
+ }
+ }
+
+ if ( isSwitch ) {
+ if ( !isOn ) {
+ setFontIndex( getFontIcon( ControlP5Constants.ACTIVE ) );
+ } else {
+ setFontIndex( getFontIcon( ControlP5Constants.DEFAULT ) );
+ }
+ } else {
+ setFontIndex( getFontIcon( ControlP5Constants.DEFAULT ) );
+ }
+ _myCaptionLabel.setColor( isOn && isSwitch || isPressed && !isSwitch ? color.getActive( ) : color.getForeground( ) );
+ _myCaptionLabel.draw( theGraphics , -( int ) w_half , -( int ) ( h_half * 1.05f ) , theController );
+
+ }
+ }
+
+ private class IconImageView implements ControllerView< Icon > {
+
+ public void display( PGraphics theGraphics , Icon theController ) {
+
+ float w_half = getWidth( ) / 2;
+ float h_half = getHeight( ) / 2;
+ theGraphics.translate( w_half , h_half );
+ theGraphics.scale( scl );
+
+ if ( isOn && isSwitch ) {
+ theGraphics.image( (availableImages[ControlP5Constants.HIGHLIGHT]) ? images[ ControlP5Constants.HIGHLIGHT ] : images[ ControlP5Constants.DEFAULT ] , -w_half , -h_half );
+ return;
+ }
+ if ( getIsInside( ) ) {
+ if ( isPressed ) {
+ theGraphics.image( (availableImages[ControlP5Constants.ACTIVE]) ? images[ ControlP5Constants.ACTIVE ] : images[ ControlP5Constants.DEFAULT ] , -w_half , -h_half );
+ } else {
+ theGraphics.image( (availableImages[ControlP5Constants.OVER]) ? images[ ControlP5Constants.OVER ] : images[ ControlP5Constants.DEFAULT ] , -w_half , -h_half );
+ }
+ } else {
+ theGraphics.image( images[ ControlP5Constants.DEFAULT ] , -w_half , -h_half );
+ }
+ }
+ }
+
+ @Override public String getInfo( ) {
+ return "type:\tIcon\n" + super.getInfo( );
+ }
+
+ @Override public String toString( ) {
+ return super.toString( ) + " [ " + getValue( ) + " ] " + "Icon" + " (" + this.getClass( ).getSuperclass( ) + ")";
+ }
+}
diff --git a/controlP5/Knob.java b/controlP5/Knob.java
new file mode 100755
index 0000000..2c8f36f
--- /dev/null
+++ b/controlP5/Knob.java
@@ -0,0 +1,568 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+/**
+ * A knob is a circular slider which can be used with a limited and unlimited range. Knobs come in 3
+ * designs LINE, ARC and ELLIPSE and can be controller with both the mouse and the mouse wheel.
+ *
+ * @example controllers/ControlP5knob
+ */
+public class Knob extends Controller< Knob > {
+
+ protected float _myDiameter;
+ protected float _myRadius;
+ protected float myAngle;
+ protected float startAngle;
+ protected float angleRange;
+ protected float resolution = 200.0f; // sensitivity.
+ protected int _myTickMarksNum = 8;
+ protected boolean isShowTickMarks;
+ protected boolean isSnapToTickMarks;
+ protected int myTickMarkLength = 2;
+ protected float myTickMarkWeight = 1;
+ protected boolean isShowAngleRange = true;
+ protected float currentValue;
+ protected float previousValue;
+ protected float modifiedValue;
+ protected boolean isConstrained;
+ protected int _myDragDirection = HORIZONTAL;
+ protected int viewStyle = LINE;
+ public static int autoWidth = 39;
+ public static int autoHeight = 39;
+ protected float[] autoSpacing = new float[] { 10 , 20 };
+
+ private float scrollSensitivity = 1.0f / resolution;
+
+ /**
+ * Convenience constructor to extend Knob.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Knob( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 100 , 0 , 0 , 0 , autoWidth );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ /**
+ * @exclude
+ */
+ public Knob( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , float theMin , float theMax , float theDefaultValue , int theX , int theY , int theWidth ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theWidth );
+ _myValue = theDefaultValue;
+ setMin( theMin );
+ setMax( theMax );
+ _myDiameter = theWidth;
+ _myRadius = _myDiameter / 2;
+ _myUnit = ( _myMax - _myMin ) / TWO_PI;
+ startAngle = HALF_PI + PI * 0.25f;
+ angleRange = PI + HALF_PI;
+ myAngle = startAngle;
+ isConstrained = true;
+ getCaptionLabel( ).align( CENTER , BOTTOM_OUTSIDE );
+ setViewStyle( ARC );
+ }
+
+ @Override public Knob setSize( int theWidth , int theHeight ) {
+ return setRadius( theWidth / 2 );
+ }
+
+ public Knob setRadius( float theValue ) {
+ _myRadius = theValue;
+ _myDiameter = _myRadius * 2;
+ setWidth( ( int ) _myDiameter );
+ setHeight( ( int ) _myDiameter );
+ return this;
+ }
+
+ public float getRadius( ) {
+ return _myRadius;
+ }
+
+ /**
+ * The start angle is a value between 0 and TWO_PI. By default the start angle is set to HALF_PI
+ * + PI * 0.25f
+ */
+ public Knob setStartAngle( float theAngle ) {
+ startAngle = theAngle;
+ setInternalValue( modifiedValue );
+ return this;
+ }
+
+ /**
+ * get the start angle, 0 is at 3 o'clock.
+ */
+ public float getStartAngle( ) {
+ return startAngle;
+ }
+
+ /**
+ * set the range in between which the know operates. By default the range is PI + HALF_PI
+ */
+ public Knob setAngleRange( float theRange ) {
+ angleRange = theRange;
+ setInternalValue( modifiedValue );
+ return this;
+ }
+
+ public float getAngleRange( ) {
+ return angleRange;
+ }
+
+ public float getAngle( ) {
+ return myAngle;
+ }
+
+ public boolean isShowAngleRange( ) {
+ return isShowAngleRange;
+ }
+
+ public Knob setShowAngleRange( boolean theValue ) {
+ isShowAngleRange = theValue;
+ return this;
+ }
+
+ /**
+ * Sets the drag direction, when controlling a knob, parameter is either Controller.HORIZONTAL
+ * or Controller.VERTICAL.
+ *
+ * @param theValue
+ * must be Controller.HORIZONTAL or Controller.VERTICAL
+ * @return Knob
+ */
+ public Knob setDragDirection( int theValue ) {
+ if ( theValue == HORIZONTAL ) {
+ _myDragDirection = HORIZONTAL;
+ } else {
+ _myDragDirection = VERTICAL;
+ }
+ return this;
+ }
+
+ /**
+ * Gets the drag direction which is either Controller.HORIZONTAL or Controller.VERTICAL.
+ *
+ * @return int returns Controller.HORIZONTAL or Controller.VERTICAL
+ */
+ public int getDragDirection( ) {
+ return _myDragDirection;
+ }
+
+ /**
+ * resolution is a sensitivity value when dragging a knob. the higher the value, the more
+ * sensitive the dragging.
+ */
+ public Knob setResolution( float theValue ) {
+ resolution = theValue;
+ return this;
+ }
+
+ public float getResolution( ) {
+ return resolution;
+ }
+
+ public Knob setNumberOfTickMarks( int theNumber ) {
+ _myTickMarksNum = theNumber;
+ showTickMarks( );
+ return this;
+ }
+
+ public int getNumberOfTickMarks( ) {
+ return _myTickMarksNum;
+ }
+
+ public Knob showTickMarks( ) {
+ isShowTickMarks = true;
+ return this;
+ }
+
+ public Knob hideTickMarks( ) {
+ isShowTickMarks = false;
+ return this;
+ }
+
+ public boolean isShowTickMarks( ) {
+ return isShowTickMarks;
+ }
+
+ public Knob snapToTickMarks( boolean theFlag ) {
+ isSnapToTickMarks = theFlag;
+ update( );
+ return this;
+ }
+
+ public Knob setTickMarkLength( int theLength ) {
+ myTickMarkLength = theLength;
+ return this;
+ }
+
+ public int getTickMarkLength( ) {
+ return myTickMarkLength;
+ }
+
+ public Knob setTickMarkWeight( float theWeight ) {
+ myTickMarkWeight = theWeight;
+ return this;
+ }
+
+ public float getTickMarkWeight( ) {
+ return myTickMarkWeight;
+ }
+
+ public Knob setConstrained( boolean theValue ) {
+ isConstrained = theValue;
+ setShowAngleRange(isConstrained);
+ return this;
+ }
+
+ public boolean isConstrained( ) {
+ return isConstrained;
+ }
+
+ /**
+ * @exclude
+ */
+ @Override @ControlP5.Invisible public Knob updateInternalEvents( PApplet theApplet ) {
+ if ( isMousePressed && !cp5.isAltDown( ) ) {
+ if ( isActive ) {
+ float c = ( _myDragDirection == HORIZONTAL ) ? _myControlWindow.mouseX - _myControlWindow.pmouseX : _myControlWindow.mouseY - _myControlWindow.pmouseY;
+ currentValue += ( c ) / resolution;
+ if ( isConstrained ) {
+ currentValue = PApplet.constrain( currentValue , 0 , 1 );
+ }
+ setInternalValue( currentValue );
+ }
+ }
+ return this;
+ }
+
+ protected void onEnter( ) {
+ isActive = true;
+ }
+
+ protected void onLeave( ) {
+ isActive = false;
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override @ControlP5.Invisible public void mousePressed( ) {
+ float x = x(_myParent.getAbsolutePosition( )) + x(position) + _myRadius;
+ float y = y(_myParent.getAbsolutePosition( )) + y(position) + _myRadius;
+ if ( PApplet.dist( x , y , _myControlWindow.mouseX , _myControlWindow.mouseY ) < _myRadius ) {
+ isActive = true;
+ if ( PApplet.dist( x , y , _myControlWindow.mouseX , _myControlWindow.mouseY ) > ( _myRadius * 0.6 ) ) {
+ myAngle = ( PApplet.atan2( _myControlWindow.mouseY - y , _myControlWindow.mouseX - x ) - startAngle );
+ if ( myAngle < 0 ) {
+ myAngle = TWO_PI + myAngle;
+ }
+ if ( isConstrained ) {
+ myAngle %= TWO_PI;
+ }
+ currentValue = PApplet.map( myAngle , 0 , angleRange , 0 , 1 );
+ setInternalValue( currentValue );
+
+ }
+ }
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override @ControlP5.Invisible public void mouseReleasedOutside( ) {
+ isActive = false;
+ }
+
+ @Override public Knob setMin( float theValue ) {
+ _myMin = theValue;
+ return this;
+ }
+
+ @Override public Knob setMax( float theValue ) {
+ _myMax = theValue;
+ return this;
+ }
+
+ public Knob setRange( float theMin , float theMax ) {
+ setMin( theMin );
+ setMax( theMax );
+ update( );
+ return this;
+ }
+
+ protected void setInternalValue( float theValue ) {
+ modifiedValue = ( isSnapToTickMarks ) ? PApplet.round( ( theValue * _myTickMarksNum ) ) / ( ( float ) _myTickMarksNum ) : theValue;
+ currentValue = theValue;
+ myAngle = PApplet.map( isSnapToTickMarks ? modifiedValue : currentValue , 0 , 1 , startAngle , startAngle + angleRange );
+
+ if ( isSnapToTickMarks ) {
+ if ( previousValue != modifiedValue && isSnapToTickMarks ) {
+ broadcast( FLOAT );
+ _myValueLabel.set( adjustValue( getValue( ) ) );
+ previousValue = modifiedValue;
+ return;
+ }
+ }
+ if ( previousValue != currentValue ) {
+ broadcast( FLOAT );
+ _myValueLabel.set( adjustValue( getValue( ) ) );
+ previousValue = modifiedValue;
+ }
+ }
+
+ @Override public Knob setValue( float theValue ) {
+ theValue = PApplet.map( theValue , _myMin , _myMax , 0 , 1 );
+ if ( isConstrained ) {
+ theValue = PApplet.constrain( theValue , 0 , 1 );
+ }
+ _myValueLabel.set( adjustValue( getValue( ) ) );
+ setInternalValue( theValue );
+ return this;
+ }
+
+ @Override public float getValue( ) {
+ _myValue = PApplet.map( _myTickMarksNum > 0 ? modifiedValue : currentValue , 0 , 1 , _myMin , _myMax );
+ return _myValue;
+ }
+
+ /**
+ * Assigns a random value to the controller.
+ */
+ public Knob shuffle( ) {
+ float r = ( float ) Math.random( );
+ setValue( PApplet.map( r , 0 , 1 , getMin( ) , getMax( ) ) );
+ return this;
+ }
+
+ /**
+ * Sets the sensitivity for the scroll behavior when using the mouse wheel or the scroll
+ * function of a multi-touch track pad. The smaller the value (closer to 0) the higher the
+ * sensitivity.
+ *
+ * @param theValue
+ * @return Knob
+ */
+ public Knob setScrollSensitivity( float theValue ) {
+ scrollSensitivity = theValue;
+ return this;
+ }
+
+ /**
+ * Changes the value of the knob when hovering and using the mouse wheel or the scroll function
+ * of a multi-touch track pad.
+ */
+ @ControlP5.Invisible public Knob scrolled( int theRotationValue ) {
+ float f = getValue( );
+ float steps = isSnapToTickMarks ? ( 1.0f / getNumberOfTickMarks( ) ) : scrollSensitivity;
+ f += ( getMax( ) - getMin( ) ) * ( -theRotationValue * steps );
+ setValue( f );
+ return this;
+ }
+
+ /**
+ * @exclude
+ */
+ @Override @ControlP5.Invisible public Knob update( ) {
+ setValue( _myValue );
+ return this;
+ }
+
+ /**
+ * set the display style of a knob. takes parameters Knob.LINE, Knob.ELLIPSE or Knob.ARC.
+ * default style is Knob.LINE
+ *
+ * @param theStyle
+ * use Knob.LINE, Knob.ELLIPSE or Knob.ARC
+ * @return Knob
+ */
+ public Knob setViewStyle( int theStyle ) {
+ viewStyle = theStyle;
+ return this;
+ }
+
+ public int getViewStyle( ) {
+ return viewStyle;
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override @ControlP5.Invisible public Knob updateDisplayMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = new KnobView( );
+ break;
+ case ( SPRITE ):
+ case ( IMAGE ):
+ _myControllerView = new KnobView( );
+ break;
+ case ( CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ class KnobView implements ControllerView< Knob > {
+
+ public void display( PGraphics theGraphics , Knob theController ) {
+ theGraphics.translate( ( int ) getRadius( ) , ( int ) getRadius( ) );
+
+ theGraphics.pushMatrix( );
+ theGraphics.ellipseMode( PApplet.CENTER );
+ theGraphics.noStroke( );
+ theGraphics.fill( getColor( ).getBackground( ) );
+ theGraphics.ellipse( 0 , 0 , getRadius( ) * 2 , getRadius( ) * 2 );
+ theGraphics.popMatrix( );
+ int c = isActive( ) ? getColor( ).getActive( ) : getColor( ).getForeground( );
+ theGraphics.pushMatrix( );
+ if ( getViewStyle( ) == LINE) {
+ theGraphics.rotate( getAngle( ) );
+ theGraphics.stroke( c );
+ theGraphics.strokeWeight( getTickMarkWeight( ) );
+ theGraphics.line( 0 , 0 , getRadius( ) , 0 );
+ } else if ( getViewStyle( ) == ELLIPSE) {
+ theGraphics.rotate( getAngle( ) );
+ theGraphics.fill( c );
+ theGraphics.ellipse( getRadius( ) * 0.75f , 0 , getRadius( ) * 0.2f , getRadius( ) * 0.2f );
+ } else if ( getViewStyle( ) == ARC) {
+ theGraphics.fill( c );
+ theGraphics.arc( 0 , 0 , getRadius( ) * 1.8f , getRadius( ) * 1.8f , getStartAngle( ) , getAngle( ) + ( ( getStartAngle( ) == getAngle( ) ) ? 0.06f : 0f ) );
+ theGraphics.fill( theGraphics.red( getColor( ).getBackground( ) ) , theGraphics.green( getColor( ).getBackground( ) ) , theGraphics.blue( getColor( ).getBackground( ) ) , 255 );
+ theGraphics.ellipse( 0 , 0 , getRadius( ) * 1.2f , getRadius( ) * 1.2f );
+ }
+ theGraphics.popMatrix( );
+
+ theGraphics.pushMatrix( );
+ theGraphics.rotate( getStartAngle( ) );
+
+ if ( isShowTickMarks( ) ) {
+ float step = getAngleRange( ) / getNumberOfTickMarks( );
+ theGraphics.stroke( getColor( ).getForeground( ) );
+ theGraphics.strokeWeight( getTickMarkWeight( ) );
+ for ( int i = 0 ; i <= getNumberOfTickMarks( ) ; i++ ) {
+ theGraphics.line( getRadius( ) + 2 , 0 , getRadius( ) + getTickMarkLength( ) + 2 , 0 );
+ theGraphics.rotate( step );
+ }
+ } else {
+ if ( isShowAngleRange( ) ) {
+ theGraphics.stroke( getColor( ).getForeground( ) );
+ theGraphics.strokeWeight( getTickMarkWeight( ) );
+ theGraphics.line( getRadius( ) + 2 , 0 , getRadius( ) + getTickMarkLength( ) + 2 , 0 );
+ theGraphics.rotate( getAngleRange( ) );
+ theGraphics.line( getRadius( ) + 2 , 0 , getRadius( ) + getTickMarkLength( ) + 2 , 0 );
+ }
+ }
+ theGraphics.noStroke( );
+ theGraphics.popMatrix( );
+
+ theGraphics.pushMatrix( );
+ theGraphics.translate( -getWidth( ) / 2 , -getHeight( ) / 2 );
+ if ( isLabelVisible ) {
+ _myCaptionLabel.draw( theGraphics , 0 , 0 , theController );
+ _myValueLabel.align(CENTER, CENTER);
+ _myValueLabel.draw( theGraphics , 0 , 0 , theController );
+ }
+ theGraphics.popMatrix( );
+
+ }
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated public Knob setOffsetAngle( float theValue ) {
+ return setStartAngle( theValue );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated public float value( ) {
+ return getValue( );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated public Knob setDisplayStyle( int theStyle ) {
+ viewStyle = theStyle;
+ return this;
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated public int getDisplayStyle( ) {
+ return viewStyle;
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated @ControlP5.Invisible public Knob setSensitivity( float theValue ) {
+ scrollSensitivity = theValue;
+ return this;
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ */
+ @Deprecated public Knob showTickMarks( boolean theFlag ) {
+ isShowTickMarks = theFlag;
+ return this;
+ }
+
+}
+/* settings for:
+ *
+ * TODO tickmarks: distance from edge
+ *
+ * TODO only start-end marks if isLimited and tickmarks are off.
+ *
+ * TODO arc: add setter for distance to center + distance to edge currently percental.
+ *
+ * TODO enable/disable drag and click control (for endless, click should be disabled).
+ *
+ * TODO dragging: add another option to control the knob. currently only linear dragging is
+ * implemented, add circular dragging (as before) as well */
+
+/* (non-Javadoc)
+ *
+ * @see main.java.src2.main.java.controlP5.controlp5.Controller#updateInternalEvents(processing.core.PApplet) */
diff --git a/controlP5/Label.java b/controlP5/Label.java
new file mode 100755
index 0000000..f1fa7d2
--- /dev/null
+++ b/controlP5/Label.java
@@ -0,0 +1,542 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser
+ * General Public License as published by the Free Software
+ * Foundation; either version 2.1 of the License, or (at
+ * your option) any later version. This library is
+ * distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PFont;
+import processing.core.PGraphics;
+
+/**
+ * A custom label using controlP5's BitFonts or PFont based
+ * ControlFonts.
+ *
+ *
+ * @see ControlFont
+ * @example controllers/ControlP5Textlabel
+ *
+ */
+public class Label implements CDrawable {
+
+ public static boolean isToUpperCaseDefault = true;
+ protected int _myLetterSpacing = 0;
+ protected boolean isMultiline;
+ protected boolean isFixedSize;
+ protected ControllerStyle _myControllerStyle = new ControllerStyle( );
+ protected boolean isVisible = true;
+ protected int _myColor = 0xffffffff;
+ protected boolean isColorBackground;
+ protected boolean isToUpperCase = isToUpperCaseDefault;
+ protected boolean changed;
+ protected int _myColorBackground = 0xffffffff;
+ protected int _myHeight = -1;
+ protected int _myWidth = -1;
+ protected String _myText = "";
+ protected ControlFont _myFontLabel;
+ protected int _myLineHeight = 0;
+ protected int alignX = ControlP5.LEFT;
+ protected int alignY = ControlP5.LEFT;
+ protected int textAlign = ControlP5.LEFT;
+ public static int paddingX = 4;
+ public static int paddingY = 4;
+ public int _myPaddingX = paddingX;
+ public int _myPaddingY = paddingY;
+ protected Labeltype _myLabeltype;
+ protected int _myTextHeight = 1;
+ protected float offsetYratio = 0;
+ private ControlP5 cp5;
+
+ private Label( Label theLabel ) {
+ _myText = theLabel.getText( );
+ isToUpperCase = theLabel.isToUpperCase( );
+ _myLetterSpacing = theLabel.getLetterSpacing( );
+ _myLineHeight = theLabel.getLineHeight( );
+ _myFontLabel = theLabel.getFont( );
+ _myLabeltype = theLabel.getLabeltype( );
+ }
+
+ public Label( ControlP5 theControlP5 , String theValue ) {
+ init( theControlP5 , theValue , 0 , 0 , _myColor );
+ }
+
+ public Label( ControlP5 theControlP5 , String theValue , int theWidth , int theHeight , int theColor ) {
+ init( theControlP5 , theValue , theWidth , theHeight , theColor );
+ }
+
+ private void init( ControlP5 theControlP5 , String theValue , int theWidth , int theHeight , int theColor ) {
+ cp5 = theControlP5;
+ _myWidth = theWidth;
+ _myHeight = theHeight;
+ _myText = theValue;
+ _myColor = theColor;
+ setLabeltype( new SinglelineLabel( ) );
+ setFont( cp5.controlFont );
+ setLabeltype( new SinglelineLabel( ) );
+ set( _myText );
+ _myControllerStyle = new ControllerStyle( );
+ }
+
+ Label setLabeltype( Labeltype theType ) {
+ _myLabeltype = theType;
+ return this;
+ }
+
+ Labeltype getLabeltype( ) {
+ return _myLabeltype;
+ }
+
+ public Label align( int[] a ) {
+ alignX = a[ 0 ];
+ alignY = a[ 1 ];
+ return this;
+ }
+
+ public Label align( int theX , int theY ) {
+ alignX = theX;
+ alignY = theY;
+ return this;
+ }
+
+ public Label alignX( int theX ) {
+ alignX = theX;
+ return this;
+ }
+
+ public Label alignY( int theY ) {
+ alignY = theY;
+ return this;
+ }
+
+ public int[] getAlign( ) {
+ return new int[] { alignX , alignY };
+ }
+
+ public Label setPadding( int thePaddingX , int thePaddingY ) {
+ _myPaddingX = thePaddingX;
+ _myPaddingY = thePaddingY;
+ return this;
+ }
+
+ public Label setPaddingX( int thePaddingX ) {
+ _myPaddingX = thePaddingX;
+ return this;
+ }
+
+ public Label setPaddingY( int thePaddingY ) {
+ _myPaddingY = thePaddingY;
+ return this;
+ }
+
+ public void draw( PGraphics theGraphics , int theX , int theY , ControllerInterface< ? > theController ) {
+ if ( isVisible ) {
+ getLabeltype( ).draw( this , theGraphics , theX , theY , theController );
+ }
+ }
+
+ public void draw( PGraphics theGraphics , int theX , int theY , int theW , int theH ) {
+ if ( isVisible ) {
+ getLabeltype( ).draw( this , theGraphics , theX , theY , theW , theH );
+ }
+ }
+
+ @Override public void draw( PGraphics theGraphics ) {
+ if ( isVisible ) {
+ _myFontLabel.adjust( theGraphics , this );
+ draw( theGraphics , 0 , 0 );
+ }
+ }
+
+ public void draw( PGraphics theGraphics , int theX , int theY ) {
+ if ( isVisible ) {
+ theGraphics.pushMatrix( );
+ theGraphics.translate( _myControllerStyle.marginLeft , _myControllerStyle.marginTop );
+ theGraphics.translate( theX , theY );
+
+ if ( isColorBackground ) {
+
+ float ww = getStyle( ).paddingRight + getStyle( ).paddingLeft;
+ if ( getStyle( ).backgroundWidth > -1 ) {
+ ww += _myControllerStyle.backgroundWidth;
+ } else {
+ ww += _myFontLabel.getWidth( );
+ }
+ float hh = getStyle( ).paddingBottom + getStyle( ).paddingTop;
+ if ( getStyle( ).backgroundHeight > -1 ) {
+ hh += getStyle( ).backgroundHeight;
+ } else {
+ hh += _myFontLabel.getHeight( );
+ }
+ theGraphics.fill( _myColorBackground );
+ theGraphics.rect( 0 , 1 , ww , hh );
+ }
+ theGraphics.translate( _myControllerStyle.paddingLeft , _myControllerStyle.paddingTop );
+ _myFontLabel.draw( theGraphics , this );
+ theGraphics.popMatrix( );
+ }
+ }
+
+ public Label hide( ) {
+ return setVisible( false );
+ }
+
+ public Label show( ) {
+ return setVisible( true );
+ }
+
+ public Label setVisible( boolean theValue ) {
+ isVisible = theValue;
+ return this;
+ }
+
+ public Label updateFont( ControlFont theFont ) {
+ return setFont( theFont );
+ }
+
+ public Label set( String theValue ) {
+ return setText( theValue );
+ }
+
+ public Label setText( String theValue ) {
+ _myText = theValue;
+ setChanged( true );
+ return this;
+ }
+
+ public Label setFixedSize( boolean theValue ) {
+ isFixedSize = theValue;
+ return this;
+ }
+
+ public boolean isFixedSize( ) {
+ return !isMultiline && isFixedSize;
+ }
+
+ public String getText( ) {
+ return _myText;
+ }
+
+ public String getTextFormatted( ) {
+ return getLabeltype( ).getTextFormatted( );
+ }
+
+ public ControllerStyle getStyle( ) {
+ return _myControllerStyle;
+ }
+
+ public Label setWidth( int theWidth ) {
+ _myWidth = theWidth;
+ setChanged( true );
+ return this;
+ }
+
+ public Label setHeight( int theHeight ) {
+ _myHeight = theHeight;
+ setChanged( true );
+ return this;
+ }
+
+ public int getWidth( ) {
+ return _myLabeltype.getWidth( );
+ }
+
+ public int getHeight( ) {
+ return _myLabeltype.getHeight( );
+ }
+
+ public int getOverflow( ) {
+ return getLabeltype( ).getOverflow( );
+ }
+
+ public Label setMultiline( boolean theValue ) {
+ isMultiline = theValue;
+ _myLabeltype = ( isMultiline ) ? new MultilineLabel( ) : new SinglelineLabel( );
+ return this;
+ }
+
+ public Label toUpperCase( boolean theValue ) {
+ isToUpperCase = theValue;
+ setChanged( true );
+ return this;
+ }
+
+ public ControlFont getFont( ) {
+ return _myFontLabel;
+ }
+
+ public Label setFont( int theBitFontIndex ) {
+ ControlP5.logger.warning( "BitFont is now of type PFont, use setFont(PFont) instead." );
+ return this;
+ }
+
+ public Label setFont( PFont thePFont ) {
+ return setFont( new ControlFont( thePFont ) );
+ }
+
+ public Label setFont( ControlFont theFont ) {
+ setLineHeight( theFont.getSize( ) );
+ _myFontLabel = new ControlFont( theFont.getFont( ) , theFont.getSize( ) );
+ _myFontLabel.init( this );
+ setChanged( true );
+ return this;
+ }
+
+ public Label setSize( int theSize ) {
+ _myFontLabel.setSize( theSize );
+ return this;
+ }
+
+ protected boolean isChanged( ) {
+ return changed;
+ }
+
+ protected Label setChanged( boolean theValue ) {
+ changed = theValue;
+ return this;
+ }
+
+ Label setTextHeight( int theHeight ) {
+ _myTextHeight = theHeight;
+ return this;
+ }
+
+ public int getTextHeight( ) {
+ return _myFontLabel.getTextHeight( );
+ }
+
+ public int getLineHeight( ) {
+ return _myLineHeight;
+ }
+
+ public Label setOffsetY( int theValue ) {
+ return this;
+ }
+
+ public Label setOffsetYratio( float theValue ) {
+ offsetYratio = theValue;
+ setChanged( true );
+ return this;
+ }
+
+ public float getOffsetYratio( ) {
+ return offsetYratio;
+ }
+
+ public Label setLineHeight( int theValue ) {
+ _myLineHeight = theValue;
+ setChanged( true );
+ return this;
+ }
+
+ public Label setColor( int theValue , boolean theFlag ) {
+ setColor( theValue );
+ setFixedSize( theFlag );
+ return this;
+ }
+
+ public Label setColor( int theColor ) {
+ _myColor = theColor;
+ setChanged( true );
+ return this;
+ }
+
+ public int getColor( ) {
+ return _myColor;
+ }
+
+ public Label setColorBackground( int theColor ) {
+ enableColorBackground( );
+ _myColorBackground = theColor;
+ return this;
+ }
+
+ public Label disableColorBackground( ) {
+ isColorBackground = false;
+ return this;
+ }
+
+ public Label enableColorBackground( ) {
+ isColorBackground = true;
+ return this;
+ }
+
+ public int getLetterSpacing( ) {
+ return _myLetterSpacing;
+ }
+
+ public Label setLetterSpacing( int theValue ) {
+ _myLetterSpacing = theValue;
+ setChanged( true );
+ return this;
+ }
+
+ public boolean isMultiline( ) {
+ return isMultiline;
+ }
+
+ public boolean isVisible( ) {
+ return isVisible;
+ }
+
+ public boolean isToUpperCase( ) {
+ return isToUpperCase;
+ }
+
+ protected Label copy( ) {
+ return new Label( this );
+ }
+
+
+ public static void setUpperCaseDefault( boolean theValue ) {
+ isToUpperCaseDefault = theValue;
+ }
+
+ interface Labeltype {
+
+ void draw( Label theLabel , PGraphics theGraphics , int theX , int theY , ControllerInterface< ? > theController );
+
+ void draw( Label theLabel , PGraphics theGraphics , int theX , int theY , int theW , int theH );
+
+ int getWidth( );
+
+ int getHeight( );
+
+ int getOverflow( );
+
+ String getTextFormatted( );
+ }
+
+ class SinglelineTextfield extends SinglelineLabel {
+
+ public String getTextFormatted( ) {
+ return _myText;
+ }
+ }
+
+ class SinglelineLabel implements Labeltype {
+
+ private void align( PGraphics theGraphics , int theAlignX , int theAlignY , int theW , int theH ) {
+ int x = 0;
+ int y = 0;
+ switch ( theAlignX ) {
+ case ( ControlP5.CENTER ):
+ x = ( theW - _myFontLabel.getWidth( ) ) / 2;
+ break;
+ case ( ControlP5.LEFT ):
+ x = _myPaddingX;
+ break;
+ case ( ControlP5.RIGHT ):
+ x = theW - _myFontLabel.getWidth( ) - _myPaddingX;
+ break;
+ case ( ControlP5.LEFT_OUTSIDE ):
+ x = -_myFontLabel.getWidth( ) - _myPaddingX;
+ break;
+ case ( ControlP5.RIGHT_OUTSIDE ):
+ x = theW + _myPaddingX;
+ break;
+ }
+ switch ( theAlignY ) {
+ case ( ControlP5.CENTER ):
+ y = theH / 2 + _myFontLabel.getTop( ) - _myFontLabel.getCenter( );
+ break;
+ case ( ControlP5.TOP ):
+ y = 0;
+ break;
+ case ( ControlP5.BOTTOM ):
+ y = theH - _myFontLabel.getHeight( ) - 1;
+ break;
+ case ( ControlP5.BASELINE ):
+ y = theH + _myFontLabel.getTop( ) - 1;
+ break;
+ case ( ControlP5.BOTTOM_OUTSIDE ):
+ y = theH + _myPaddingY;
+ break;
+ case ( ControlP5.TOP_OUTSIDE ):
+ y = -_myFontLabel.getHeight( ) - _myPaddingY;
+ break;
+ }
+ theGraphics.translate( x , y );
+ }
+
+ @Override public void draw( Label theLabel , PGraphics theGraphics , int theX , int theY , int theW , int theH ) {
+ _myFontLabel.adjust( theGraphics , theLabel );
+ theGraphics.pushMatrix( );
+ align( theGraphics , alignX , alignY , theW , theH );
+ theLabel.draw( theGraphics , theX , theY );
+ theGraphics.popMatrix( );
+ }
+
+ @Override public void draw( Label theLabel , PGraphics theGraphics , int theX , int theY , ControllerInterface< ? > theController ) {
+ draw( theLabel , theGraphics , theX , theY , theController.getWidth( ) , theController.getHeight( ) );
+ }
+
+ @Override public int getWidth( ) {
+ return isFixedSize ? _myWidth : _myFontLabel.getWidth( );
+ }
+
+ @Override public int getHeight( ) {
+ return _myFontLabel.getHeight( );
+ }
+
+ @Override public int getOverflow( ) {
+ return -1;
+ }
+
+ @Override public String getTextFormatted( ) {
+ return ( isToUpperCase ? _myText.toUpperCase( ) : _myText );
+ }
+ }
+
+ class MultilineLabel implements Labeltype {
+
+ @Override public void draw( Label theLabel , PGraphics theGraphics , int theX , int theY , int theW , int theH ) {
+ _myFontLabel.adjust( theGraphics , theLabel );
+ theLabel.draw( theGraphics , theX , theY );
+ }
+
+ @Override public void draw( Label theLabel , PGraphics theGraphics , int theX , int theY , ControllerInterface< ? > theController ) {
+ _myFontLabel.adjust( theGraphics , theLabel );
+ theLabel.draw( theGraphics , theX , theY );
+ }
+
+ @Override public int getWidth( ) {
+ return _myWidth;
+ }
+
+ @Override public int getHeight( ) {
+ return _myHeight;
+ }
+
+ @Override public int getOverflow( ) {
+ return _myFontLabel.getOverflow( );
+ }
+
+ @Override public String getTextFormatted( ) {
+ return ( isToUpperCase ? _myText.toUpperCase( ) : _myText );
+ }
+
+ }
+
+}
diff --git a/controlP5/ListBox.java b/controlP5/ListBox.java
new file mode 100755
index 0000000..242d2f1
--- /dev/null
+++ b/controlP5/ListBox.java
@@ -0,0 +1,469 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import static main.java.src2.main.java.controlP5.controlP5.ControlP5.b;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+import processing.event.KeyEvent;
+
+/**
+ * A ListBox is a list of vertically aligned items which can be scrolled if required.
+ *
+ * @see ListBox
+ * @example controllers/ControlP5listBox
+ */
+public class ListBox extends Controller< ListBox > implements ControlListener {
+
+ private int _myType = LIST;
+ protected int _myBackgroundColor = 0x00ffffff;
+ protected int itemHeight = 13;
+ protected int barHeight = 10;
+ private float scrollSensitivity = 1;
+ private boolean isOpen = true;
+ protected List< Map< String , Object > > items;
+ protected int itemRange = 5;
+ protected int itemHover = -1;
+ private int itemIndexOffset = 0;
+ private final int itemSpacing = 1;
+ private int _myDirection = PApplet.DOWN;
+ private boolean isBarVisible = true;
+ static public final int LIST = ControlP5.LIST;
+ static public final int DROPDOWN = ControlP5.DROPDOWN;
+ static public final int CHECKBOX = ControlP5.CHECKBOX; /* TODO */
+ static public final int TREE = ControlP5.TREE; /* TODO */
+
+ public ListBox( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 99 , 199 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected ListBox( ControlP5 theControlP5 , ControllerGroup< ? > theGroup , String theName , int theX , int theY , int theW , int theH ) {
+ super( theControlP5 , theGroup , theName , theX , theY , theW , theH );
+ items = new ArrayList< Map< String , Object > >( );
+ updateHeight( );
+ }
+
+ public boolean isOpen( ) {
+ return isOpen;
+ }
+
+ public ListBox open( ) {
+ return setOpen( true );
+ }
+
+ public ListBox close( ) {
+ return setOpen( false );
+ }
+
+ public ListBox setOpen( boolean b ) {
+ isOpen = b;
+ return this;
+ }
+
+ @Override public int getHeight( ) {
+ return isOpen ? super.getHeight( ) : barHeight;
+ }
+
+ public ListBox setType( int theType ) {
+ _myType = theType;
+ return this;
+ }
+
+ public void setDirection( int theDirection ) {
+ _myDirection = ( theDirection == PApplet.UP ) ? PApplet.UP : PApplet.DOWN;
+ }
+
+ @Override protected boolean inside( ) {
+ /* constrain the bounds of the controller to the
+ * dimensions of the cp5 area, required since
+ * PGraphics as render area has been introduced. */
+ float x0 = PApplet.max( 0 , x( position ) + x( _myParent.getAbsolutePosition( ) ) );
+ float x1 = PApplet.min( cp5.pgw , x( position ) + x( _myParent.getAbsolutePosition( ) ) + getWidth( ) );
+ float y0 = PApplet.max( 0 , y( position ) + y( _myParent.getAbsolutePosition( ) ) );
+ float y1 = PApplet.min( cp5.pgh , y( position ) + y( _myParent.getAbsolutePosition( ) ) + getHeight( ) );
+ if ( y1 < y0 ) {
+ float ty = y0;
+ y0 = y1;
+ y1 = ty;
+ }
+ return ( _myControlWindow.mouseX > x0 && _myControlWindow.mouseX < x1 && _myControlWindow.mouseY > ( y1 < y0 ? y1 : y0 ) && _myControlWindow.mouseY < ( y0 < y1 ? y1 : y0 ) );
+ }
+
+ @Override protected void onRelease( ) {
+ if ( !isDragged ) {
+ if ( getPointer( ).y( ) >= 0 && getPointer( ).y( ) <= barHeight ) {
+ setOpen( !isOpen( ) );
+ } else if ( isOpen ) {
+
+ double n = Math.floor( ( getPointer( ).y( ) - barHeight ) / itemHeight );
+
+ // n += itemRange; /* UP */
+ int index = ( int ) n + itemIndexOffset;
+
+ Map m = items.get( index );
+
+ switch ( _myType ) {
+ case ( LIST ):
+ setValue( index );
+ for ( Object o : items ) {
+ ( ( Map ) o ).put( "state" , false );
+ }
+ m.put( "state" , !ControlP5.b( m.get( "state" ) ) );
+ break;
+ case ( DROPDOWN ):
+ setValue( index );
+ setOpen( false );
+ getCaptionLabel( ).setText( ( m.get( "text" ).toString( ) ) );
+ break;
+ case ( CHECKBOX ):
+ m.put( "state" , !ControlP5.b( m.get( "state" ) ) );
+ break;
+ }
+
+ }
+ }
+ }
+
+ @Override protected void onDrag( ) {
+ scroll( getPointer( ).dy( ) );
+ }
+
+ @Override protected void onScroll( int theValue ) {
+ scroll( theValue );
+ }
+
+ private void scroll( int theValue ) {
+ if ( isOpen ) {
+ itemIndexOffset += theValue;
+ itemIndexOffset = ( int ) ( Math.floor( Math.max( 0 , Math.min( itemIndexOffset , items.size( ) - itemRange ) ) ) );
+ itemHover = -2;
+ }
+ }
+
+ @Override protected void onLeave( ) {
+ itemHover = -1;
+ }
+
+ private void updateHover( ) {
+ if ( getPointer( ).y( ) > barHeight ) {
+ double n = Math.floor( ( getPointer( ).y( ) - barHeight ) / itemHeight );
+ itemHover = ( int ) ( itemIndexOffset + n );
+ } else {
+ itemHover = -1;
+ }
+ }
+
+ @Override protected void onEnter( ) {
+ updateHover( );
+ }
+
+ @Override protected void onMove( ) {
+ updateHover( );
+ }
+
+ @Override protected void onEndDrag( ) {
+ updateHover( );
+ }
+
+ private int updateHeight( ) {
+ itemRange = ( PApplet.abs( getHeight( ) ) - ( isBarVisible( ) ? barHeight : 0 ) ) / itemHeight;
+ return itemHeight * ( items.size( ) < itemRange ? items.size( ) : itemRange );
+ }
+
+ public ListBox setItemHeight( int theHeight ) {
+ itemHeight = theHeight;
+ updateHeight( );
+ return this;
+ }
+
+ public ListBox setBarHeight( int theHeight ) {
+ barHeight = theHeight;
+ updateHeight( );
+ return this;
+ }
+
+ public int getBarHeight( ) {
+ return barHeight;
+ }
+
+ public ListBox setScrollSensitivity( float theSensitivity ) {
+ scrollSensitivity = theSensitivity;
+ return this;
+ }
+
+ public ListBox setBarVisible( boolean b ) {
+ isBarVisible = b;
+ updateHeight( );
+ return this;
+ }
+
+ public boolean isBarVisible( ) {
+ return isBarVisible;
+ }
+
+ private Map< String , Object > getDefaultItemMap( String theName , Object theValue ) {
+ Map< String , Object > item = new HashMap< String , Object >( );
+ item.put( "name" , theName );
+ item.put( "text" , theName );
+ item.put( "value" , theValue );
+ item.put( "color" , getColor( ) );
+ item.put( "view" , new CDrawable( ) {
+ @Override public void draw( PGraphics theGraphics ) {
+ }
+
+ } );
+ item.put( "state" , false );
+ return item;
+ }
+
+ public ListBox addItem( String theName , Object theValue ) {
+ Map< String , Object > item = getDefaultItemMap( theName , theValue );
+ items.add( item );
+ return this;
+ }
+
+ public ListBox addItems( String[] theItems ) {
+ addItems( Arrays.asList( theItems ) );
+ return this;
+ }
+
+ public ListBox addItems( List< String > theItems ) {
+ for ( int i = 0 ; i < theItems.size( ) ; i++ ) {
+ addItem(theItems.get( i ), i );
+ }
+ return this;
+ }
+
+ public ListBox addItems( Map< String , Object > theItems ) {
+ for ( Map.Entry< String , Object > item : theItems.entrySet( ) ) {
+ addItem( item.getKey( ) , item.getValue( ) );
+ }
+ return this;
+ }
+
+ public ListBox setItems( String[] theItems ) {
+ setItems( Arrays.asList( theItems ) );
+ return this;
+ }
+
+ public ListBox setItems( List< String > theItems ) {
+ items.clear( );
+ return addItems( theItems );
+ }
+
+ public ListBox setItems( Map< String , Object > theItems ) {
+ items.clear( );
+ return addItems( theItems );
+ }
+
+ public ListBox removeItems( List< String > theItems ) {
+ for ( String s : theItems ) {
+ removeItem( s );
+ }
+ return this;
+ }
+
+ public ListBox removeItem( String theName ) {
+ if ( theName != null ) {
+
+ List l = new ArrayList( );
+ for ( Map m : items ) {
+ if ( theName.equals( m.get( "name" ) ) ) {
+ l.add( m );
+ }
+ }
+ items.removeAll( l );
+ }
+ return this;
+ }
+
+ public void updateItemIndexOffset( ) {
+ int m1 = items.size( ) > itemRange ? ( itemIndexOffset + itemRange ) : items.size( );
+ int n = ( m1 - items.size( ) );
+ if ( n >= 0 ) {
+ itemIndexOffset -= n;
+ }
+ }
+
+ public Map< String , Object > getItem( int theIndex ) {
+ return items.get( theIndex );
+ }
+
+ public Map< String , Object > getItem( String theName ) {
+ if ( theName != null ) {
+ for ( Map< String , Object > o : items ) {
+ if ( theName.equals( o.get( "name" ) ) ) {
+ return o;
+ }
+ }
+ }
+ return Collections.EMPTY_MAP;
+ }
+
+ public List getItems( ) {
+ return Collections.unmodifiableList( items );
+ }
+
+ public ListBox clear( ) {
+ for ( int i = items.size( ) - 1 ; i >= 0 ; i-- ) {
+ items.remove( i );
+ }
+ items.clear( );
+ itemIndexOffset = 0;
+ return this;
+ }
+
+ @Override public void controlEvent( ControlEvent theEvent ) {
+ // TODO Auto-generated method stub
+ }
+
+ public ListBox setBackgroundColor( int theColor ) {
+ _myBackgroundColor = theColor;
+ return this;
+ }
+
+ public int getBackgroundColor( ) {
+ return _myBackgroundColor;
+ }
+
+ @Override @ControlP5.Invisible public ListBox updateDisplayMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = new ListBoxView( );
+ break;
+ case ( IMAGE ):
+ case ( SPRITE ):
+ case ( CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ static public class ListBoxView implements ControllerView< ListBox > {
+
+ public void display( PGraphics g , ListBox c ) {
+
+ // setHeight( -200 ); /* UP */
+
+ g.noStroke( );
+
+ if ( c.isBarVisible( ) ) {
+ boolean b = c.itemHover == -1 && c.isInside && !c.isDragged;
+ g.fill( b ? c.getColor( ).getForeground( ) : c.getColor( ).getBackground( ) );
+ g.rect( 0 , 0 , c.getWidth( ) , c.barHeight );
+ g.pushMatrix( );
+ g.translate( c.getWidth( ) - 8 , c.barHeight / 2 - 2 );
+ g.fill( c.getColor( ).getCaptionLabel( ) );
+ if ( c.isOpen( ) ) {
+ g.triangle( -3 , 0 , 3 , 0 , 0 , 3 );
+ } else {
+ g.triangle( -3 , 3 , 3 , 3 , 0 , 0 );
+ }
+ g.popMatrix( );
+
+ c.getCaptionLabel( ).align( PApplet.LEFT , PApplet.CENTER ).draw( g , 4 , c.barHeight / 2 );
+ }
+
+ if ( c.isOpen( ) ) {
+ int bar = ( c.isBarVisible( ) ? c.barHeight : 0 );
+ int h = ( ( c.updateHeight( ) ) );
+ g.pushMatrix( );
+ // g.translate( 0 , - ( h + bar +
+ // c.itemSpacing ) ); /* UP */
+ g.fill( c.getBackgroundColor( ) );
+ g.rect( 0 , bar , c.getWidth( ) , h );
+ g.pushMatrix( );
+ g.translate( 0 , ( bar == 0 ? 0 : ( c.barHeight + c.itemSpacing ) ) );
+ /* draw visible items */
+ c.updateItemIndexOffset( );
+ int m0 = c.itemIndexOffset;
+ int m1 = c.items.size( ) > c.itemRange ? ( c.itemIndexOffset + c.itemRange ) : c.items.size( );
+ for ( int i = m0 ; i < m1 ; i++ ) {
+ Map< String , Object > item = c.items.get( i );
+ CColor color = ( CColor ) item.get( "color" );
+ g.fill( ( ControlP5.b( item.get( "state" ) ) ) ? color.getActive( ) : ( i == c.itemHover ) ? ( c.isMousePressed ? color.getActive( ) : color.getForeground( ) ) : color.getBackground( ) );
+ g.rect( 0 , 0 , c.getWidth( ) , c.itemHeight - 1 );
+ c.getValueLabel( ).align( PApplet.LEFT , PApplet.CENTER ).set( item.get( "text" ).toString( ) ).draw( g , 4 , c.itemHeight / 2 );
+ g.translate( 0 , c.itemHeight );
+ }
+ g.popMatrix( );
+
+ if ( c.isInside ) {
+ int m = c.items.size( ) - c.itemRange;
+ if ( m > 0 ) {
+ g.fill( c.getColor( ).getCaptionLabel( ) );
+ g.pushMatrix( );
+ int s = 4; /* spacing */
+ int s2 = s / 2;
+ g.translate( c.getWidth( ) - s , c.barHeight );
+ int len = ( int ) PApplet.map( ( float ) Math.log( m * 10 ) , 0 , 10 , h , 0 );
+ int pos = ( int ) ( PApplet.map( c.itemIndexOffset , 0 , m , s2 , h - len - s2 ) );
+ g.rect( 0 , pos , s2 , len );
+ g.popMatrix( );
+ }
+ }
+ g.popMatrix( );
+ }
+
+ }
+
+ }
+
+ public void keyEvent( KeyEvent theKeyEvent ) {
+ if ( isInside && theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
+ switch ( theKeyEvent.getKeyCode( ) ) {
+ case (UP):
+ scroll( theKeyEvent.isAltDown( ) ? -itemIndexOffset : theKeyEvent.isShiftDown( ) ? -10 : -1 );
+ updateHover( );
+ break;
+ case (DOWN):
+ scroll( theKeyEvent.isAltDown( ) ? items.size( ) - itemRange : theKeyEvent.isShiftDown( ) ? 10 : 1 );
+ updateHover( );
+ break;
+ case (LEFT):
+ break;
+ case (RIGHT):
+ break;
+ case (ENTER):
+ onRelease( );
+ break;
+ }
+ }
+ }
+ /* TODO keycontrol: arrows, return dragging moving items
+ * sorting custom view custom event types */
+}
diff --git a/controlP5/Matrix.java b/controlP5/Matrix.java
new file mode 100755
index 0000000..f2628ff
--- /dev/null
+++ b/controlP5/Matrix.java
@@ -0,0 +1,422 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+/**
+ * A matrix is a 2d array with a pointer that traverses through the matrix in a timed interval. if
+ * an item of a matrix-column is active, the x and y position of the corresponding cell will trigger
+ * an event and notify the program. see the ControlP5matrix example for more information.
+ *
+ * @example controllers/ControlP5matrix
+ */
+public class Matrix extends Controller< Matrix > {
+
+ protected int cnt;
+ protected int[][] _myCells;
+ protected int stepX;
+ protected int stepY;
+ protected int cellX;
+ protected int cellY;
+ protected boolean isPressed;
+ protected int _myCellX;
+ protected int _myCellY;
+ protected int sum;
+ protected int _myInterval = 100;
+ protected int currentX = -1;
+ protected int currentY = -1;
+ protected int _myMode = SINGLE_ROW;
+ private Thread t;
+ protected int gapX = 1;
+ protected int gapY = 1;
+ private Object _myPlug;
+ private String _myPlugName;
+ private boolean playing = true;
+ private int bg = 0x00000000;
+
+ /**
+ * Convenience constructor to extend Matrix.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Matrix( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 10 , 10 , 0 , 0 , 100 , 100 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ public Matrix( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , int theCellX , int theCellY , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ _myInterval = 100;
+ setGrid( theCellX , theCellY );
+
+ _myPlug = cp5.papplet;
+ _myPlugName = getName( );
+ _myCaptionLabel.align(LEFT, BOTTOM_OUTSIDE);
+ _myCaptionLabel.setPadding( 0 , 4 );
+ runThread( );
+ }
+
+ public Matrix setGrid( int theCellX , int theCellY ) {
+ _myCellX = theCellX;
+ _myCellY = theCellY;
+ sum = _myCellX * _myCellY;
+ stepX = getWidth( ) / _myCellX;
+ stepY = getHeight( ) / _myCellY;
+ _myCells = new int[ _myCellX ][ _myCellY ];
+ for ( int x = 0 ; x < _myCellX ; x++ ) {
+ for ( int y = 0 ; y < _myCellY ; y++ ) {
+ _myCells[ x ][ y ] = 0;
+ }
+ }
+ return this;
+ }
+
+ /**
+ * set the speed of intervals in millis iterating through the matrix.
+ *
+ * @param theInterval int
+ * @return Matrix
+ */
+
+ public Matrix setInterval( int theInterval ) {
+ _myInterval = theInterval;
+ return this;
+ }
+
+ public int getInterval( ) {
+ return _myInterval;
+ }
+
+ @ControlP5.Invisible public Matrix updateInternalEvents( PApplet theApplet ) {
+ setIsInside( inside( ) );
+
+ if ( getIsInside( ) ) {
+ if ( isPressed ) {
+ int tX = ( int ) ( ( theApplet.mouseX - x( position ) ) / stepX );
+ int tY = ( int ) ( ( theApplet.mouseY - y( position ) ) / stepY );
+
+ if ( tX != currentX || tY != currentY ) {
+ tX = PApplet.min( PApplet.max( 0 , tX ) , _myCellX );
+ tY = PApplet.min( PApplet.max( 0 , tY ) , _myCellY );
+ boolean isMarkerActive = _myCells[tX][tY] == 1;
+ switch ( _myMode ) {
+ default:
+ case ( SINGLE_COLUMN ):
+ for ( int i = 0 ; i < _myCellY ; i++ ) {
+ _myCells[ tX ][ i ] = 0;
+ }
+ _myCells[ tX ][ tY ] = ( !isMarkerActive ) ? 1 : _myCells[ tX ][ tY ];
+ break;
+ case ( SINGLE_ROW ):
+ for ( int i = 0 ; i < _myCellY ; i++ ) {
+ _myCells[ tX ][ i ] = 0;
+ }
+ _myCells[ tX ][ tY ] = ( !isMarkerActive ) ? 1 : _myCells[ tX ][ tY ];
+ break;
+ case ( MULTIPLES ):
+ _myCells[ tX ][ tY ] = ( _myCells[ tX ][ tY ] == 1 ) ? 0 : 1;
+ break;
+ }
+ currentX = tX;
+ currentY = tY;
+ }
+ }
+ }
+ return this;
+ }
+
+ protected void onEnter( ) {
+ isActive = true;
+ }
+
+ protected void onLeave( ) {
+ isActive = false;
+ }
+
+ @ControlP5.Invisible public void mousePressed( ) {
+ isActive = getIsInside( );
+ if ( getIsInside( ) ) {
+ isPressed = true;
+ }
+ }
+
+ protected void mouseReleasedOutside( ) {
+ mouseReleased( );
+ }
+
+ @ControlP5.Invisible public void mouseReleased( ) {
+ if ( isActive ) {
+ isActive = false;
+ }
+ isPressed = false;
+ currentX = -1;
+ currentY = -1;
+ }
+
+ @Override public Matrix setValue( float theValue ) {
+ _myValue = theValue;
+ broadcast( FLOAT );
+ return this;
+ }
+
+ public Matrix play( ) {
+ playing = true;
+ return this;
+ }
+
+ public boolean isPlaying( ) {
+ return playing;
+ }
+
+ public Matrix pause( ) {
+ playing = false;
+ return this;
+ }
+
+ public Matrix stop( ) {
+ playing = false;
+ cnt = 0;
+ return this;
+ }
+
+ public Matrix trigger( int theColumn ) {
+
+ if ( theColumn < 0 || theColumn >= _myCells.length ) {
+ return this;
+ }
+
+ for ( int i = 0 ; i < _myCellY ; i++ ) {
+ if ( _myCells[ theColumn ][ i ] == 1 ) {
+ _myValue = 0;
+ _myValue = ( theColumn << 0 ) + ( i << 8 );
+ setValue( _myValue );
+ /* TODO remove printStack and replace with Logger */
+ try {
+ Method method = _myPlug.getClass( ).getMethod( _myPlugName , int.class , int.class );
+ method.setAccessible( true );
+ method.invoke( _myPlug , theColumn , i );
+ } catch ( SecurityException ex ) {
+ ex.printStackTrace( );
+ } catch ( NoSuchMethodException ex ) {
+ //ex.printStackTrace( );
+ } catch ( IllegalArgumentException ex ) {
+ ex.printStackTrace( );
+ } catch ( IllegalAccessException ex ) {
+ ex.printStackTrace( );
+ } catch ( InvocationTargetException ex ) {
+ ex.printStackTrace( );
+ }
+ }
+ }
+ return this;
+ }
+
+ @Override public Matrix update( ) {
+ return setValue( _myValue );
+ }
+
+ public Matrix setGap( int theX , int theY ) {
+ gapX = theX;
+ gapY = theY;
+ return this;
+ }
+
+ public Matrix plugTo( Object theObject ) {
+ _myPlug = theObject;
+ return this;
+ }
+
+ public Matrix plugTo( Object theObject , String thePlugName ) {
+ _myPlug = theObject;
+ _myPlugName = thePlugName;
+ return this;
+ }
+
+ /**
+ * set the state of a particular cell inside a matrix. use true or false for parameter theValue
+ *
+ * @param theX
+ * @param theY
+ * @param theValue
+ * @return Matrix
+ */
+ public Matrix set( int theX , int theY , boolean theValue ) {
+ _myCells[ theX ][ theY ] = (theValue) ? 1 : 0;
+ return this;
+ }
+
+ public boolean get( int theX , int theY ) {
+ return _myCells[theX][theY] == 1;
+ }
+
+ public Matrix clear( ) {
+ for ( int x = 0 ; x < _myCells.length ; x++ ) {
+ for ( int y = 0 ; y < _myCells[ x ].length ; y++ ) {
+ _myCells[ x ][ y ] = 0;
+ }
+ }
+ return this;
+ }
+
+ public static int getX( int thePosition ) {
+ return ( ( thePosition >> 0 ) & 0xff );
+ }
+
+ public static int getY( int thePosition ) {
+ return ( ( thePosition >> 8 ) & 0xff );
+ }
+
+ public static int getX( float thePosition ) {
+ return ( ( ( int ) thePosition >> 0 ) & 0xff );
+ }
+
+ public static int getY( float thePosition ) {
+ return ( ( ( int ) thePosition >> 8 ) & 0xff );
+ }
+
+ public Matrix setCells( int[][] theCells ) {
+ setGrid( theCells.length , theCells[ 0 ].length );
+ _myCells = theCells;
+ return this;
+ }
+
+ public int[][] getCells( ) {
+ return _myCells;
+ }
+
+ private void triggerEventFromThread( ) {
+ if ( playing ) {
+ cnt += 1;
+ cnt %= _myCellX;
+ trigger( cnt );
+ }
+ }
+
+ private void runThread( ) {
+ if ( t == null ) {
+ t = new Thread( getName( ) ) {
+
+ public void run( ) {
+ while ( true ) {
+ triggerEventFromThread( );
+ try {
+ Thread.sleep( _myInterval );
+ } catch ( InterruptedException e ) {
+ // throw new RuntimeException(e);
+ }
+ }
+ }
+ };
+ t.start( );
+ }
+ }
+
+ @Override public void remove( ) {
+ if ( t != null ) {
+ t.interrupt( );
+ }
+ super.remove( );
+ }
+
+ /**
+ * use setMode to change the cell-activation which by default is ControlP5.SINGLE_ROW, 1 active
+ * cell per row, but can be changed to ControlP5.SINGLE_COLUMN or ControlP5.MULTIPLES
+ *
+ * @param theMode return Matrix
+ */
+ public Matrix setMode( int theMode ) {
+ _myMode = theMode;
+ return this;
+ }
+
+ public int getMode( ) {
+ return _myMode;
+ }
+
+ public Matrix setBackground( int c ) {
+ bg = 0x00000000;
+ if ( ( c >> 24 & 0xff ) > 0 ) {
+ bg = ( c >> 24 ) << 24 | ( c >> 16 ) << 16 | ( c >> 8 ) << 8 | ( c >> 0 ) << 0;
+ }
+ return this;
+ }
+
+ @Override @ControlP5.Invisible public Matrix updateDisplayMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = new MatrixView( );
+ break;
+ case ( IMAGE ):
+ case ( SPRITE ):
+ case ( CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ class MatrixView implements ControllerView< Matrix > {
+
+ public void display( PGraphics theGraphics , Matrix theController ) {
+ theGraphics.noStroke( );
+ theGraphics.fill( bg );
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+
+ float gx = gapX / 2;
+ float gy = gapY / 2;
+ for ( int x = 0 ; x < _myCellX ; x++ ) {
+ for ( int y = 0 ; y < _myCellY ; y++ ) {
+
+ theGraphics.fill( _myCells[ x ][ y ] == 1 ? color.getActive( ) : color.getBackground( ) );
+ theGraphics.rect( x * stepX + gx , y * stepY + gy , stepX - gapX , stepY - gapY );
+ }
+ }
+ if ( isInside( ) ) {
+ // TODO
+ // int x = (int) ((theGraphics.mouseX - position.x) / stepX);
+ // int y = (int) ((theGraphics.mouseY - position.y) / stepY);
+ // if (x >= 0 && x < _myCellX && y >= 0 && y < _myCellY) {
+ // theGraphics.fill(_myCells[x][y] == 1 ? color.getActive() :
+ // color.getForeground());
+ // theGraphics.rect(x * stepX, y * stepY, stepX - gapX, stepY - gapY);
+ // }
+ }
+ theGraphics.fill( color.getActive( ) );
+ theGraphics.rect( cnt * stepX , 0 , 1 , getHeight( ) - gapY );
+ if ( isLabelVisible ) {
+ _myCaptionLabel.draw( theGraphics , 0 , 0 , theController );
+ }
+ }
+ }
+}
diff --git a/controlP5/MultiList.java b/controlP5/MultiList.java
new file mode 100755
index 0000000..db192ea
--- /dev/null
+++ b/controlP5/MultiList.java
@@ -0,0 +1,270 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+/**
+ * A Multilist is a multi-menu-tree controller. see the example for more information and how to use.
+ *
+ * @example controllers/ControlP5multiList
+ *
+ * TODO is currently broken, is this due to replacing PVector with float[]?
+ *
+ */
+public class MultiList extends Controller< MultiList > implements MultiListInterface , ControlListener {
+
+ /* TODO reflection does not work properly. TODO add an option to remove MultiListButtons */
+
+ protected Tab _myTab;
+ protected boolean isVisible = true;
+ private int cnt;
+ protected boolean isOccupied;
+ protected boolean isUpdateLocation = false;
+ protected MultiListInterface mostRecent;
+ protected int[] _myRect = new int[ 4 ];
+ protected int _myDirection = ControlP5Constants.RIGHT;
+ public int closeDelay = 30;
+ protected int _myDefaultButtonHeight = 10;
+ protected boolean isUpperCase = true;
+
+ /**
+ * Convenience constructor to extend MultiList.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public MultiList( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 99 , 19 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ public MultiList( ControlP5 theControlP5 , Tab theParent , String theName , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , 0 );
+ _myDefaultButtonHeight = theHeight;
+ setup( );
+ }
+
+ public MultiList toUpperCase( boolean theValue ) {
+ isUpperCase = theValue;
+ for ( Controller c : getSubelements( ) ) {
+ c.getCaptionLabel( ).toUpperCase( isUpperCase );
+ }
+ return this;
+ }
+
+ @ControlP5.Invisible public void setup( ) {
+ mostRecent = this;
+ isVisible = true;
+ updateRect( Controller.x( position ) , Controller.y( position ) , getWidth( ) , _myDefaultButtonHeight );
+ }
+
+ protected void updateRect( float theX , float theY , float theW , float theH ) {
+ _myRect = new int[] { ( int ) theX , ( int ) theY , ( int ) theW , ( int ) theH };
+ }
+
+ public int getDirection( ) {
+ return _myDirection;
+ }
+
+ /**
+ * TODO does not work.
+ *
+ * @param theDirection
+ */
+ void setDirection( int theDirection ) {
+ _myDirection = ( theDirection == ControlP5Constants.LEFT ) ? ControlP5Constants.LEFT : ControlP5Constants.RIGHT;
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ ( ( MultiListButton ) getSubelements( ).get( i ) ).setDirection( _myDirection );
+ }
+ }
+
+ /**
+ * @param theX
+ * float
+ * @param theY
+ * float
+ */
+ @ControlP5.Invisible public void updateLocation( float theX , float theY ) {
+ Controller.set( position , theX , theY );
+ updateRect( Controller.x( position ) , Controller.y( position ) , getWidth( ) , _myDefaultButtonHeight );
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ ( ( MultiListInterface ) getSubelements( ).get( i ) ).updateLocation( theX , theY );
+ }
+
+ }
+
+ /**
+ * removes the multilist.
+ */
+ public void remove( ) {
+ super.remove( );
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ getSubelements( ).get( i ).removeListener( this );
+ getSubelements( ).get( i ).remove( );
+ }
+ }
+
+ /**
+ * adds multilist buttons to the multilist.
+ *
+ * @param theName
+ * String
+ * @param theValue
+ * int
+ * @return MultiListButton
+ */
+ public MultiListButton add( String theName , int theValue ) {
+ int x = ( int ) Controller.x( position );
+ int yy = 0;
+ for ( Controller< ? > c : getSubelements( ) ) {
+ yy += c.getHeight( ) + 1;
+ }
+ int y = ( int ) Controller.y( position ) + yy;// (_myDefaultButtonHeight + 1) * _myChildren.size();
+ MultiListButton b = new MultiListButton( cp5 , theName , theValue , x , y , getWidth( ) , _myDefaultButtonHeight , this , this );
+ b.toUpperCase( isUpperCase );
+ b.isMoveable = false;
+ cp5.register( null , "" , b );
+ b.addListener( this );
+ getSubelements( ).add( b );
+ b.show( );
+ updateRect( Controller.x( position ) , Controller.y( position ) , getWidth( ) , ( _myDefaultButtonHeight + 1 ) * getSubelements( ).size( ) );
+ return b;
+ }
+
+ /**
+ * @param theEvent
+ */
+ @Override @ControlP5.Invisible public void controlEvent( ControlEvent theEvent ) {
+ if ( theEvent.getController( ) instanceof MultiListButton ) {
+ _myValue = theEvent.getController( ).getValue( );
+ ControlEvent myEvent = new ControlEvent( this );
+ cp5.getControlBroadcaster( ).broadcast( myEvent , ControlP5Constants.FLOAT);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override @ControlP5.Invisible public void draw( PGraphics theGraphics ) {
+ super.draw( theGraphics );
+ // TODO update( theGraphics );
+ }
+
+ /**
+ *
+ * @param theApplet
+ * @return boolean
+ */
+ @ControlP5.Invisible public boolean update( PApplet theApplet ) {
+ if ( !isOccupied ) {
+ cnt++;
+ if ( cnt == closeDelay ) {
+ close( );
+ }
+ }
+
+ if ( isUpdateLocation ) {
+ updateLocation( ( _myControlWindow.mouseX - _myControlWindow.pmouseX ) , ( _myControlWindow.mouseY - _myControlWindow.pmouseY ) );
+ isUpdateLocation = theApplet.mousePressed;
+ }
+
+ if ( isOccupied ) {
+ if ( theApplet.keyPressed && theApplet.mousePressed ) {
+ if ( theApplet.keyCode == PApplet.ALT ) {
+ isUpdateLocation = true;
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @param theFlag
+ * boolean
+ */
+ @ControlP5.Invisible public void occupied( boolean theFlag ) {
+ isOccupied = theFlag;
+ cnt = 0;
+ }
+
+ /**
+ * @return boolean
+ */
+ @ControlP5.Invisible public boolean observe( ) {
+ return CP.inside( _myRect , _myControlWindow.mouseX , _myControlWindow.mouseY );
+ }
+
+ /**
+ * @param theInterface
+ * MultiListInterface
+ */
+ public void close( MultiListInterface theInterface ) {
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ if ( theInterface != getSubelements( ).get( i )) {
+ ( ( MultiListInterface ) getSubelements( ).get( i ) ).close( );
+ }
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public void close( ) {
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ ( ( MultiListInterface ) getSubelements( ).get( i ) ).close( );
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public void open( ) {
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ ( ( MultiListInterface ) getSubelements( ).get( i ) ).open( );
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public MultiList setValue( float theValue ) {
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public MultiList update( ) {
+ return setValue( _myValue );
+ }
+
+}
diff --git a/controlP5/MultiListButton.java b/controlP5/MultiListButton.java
new file mode 100755
index 0000000..21733d9
--- /dev/null
+++ b/controlP5/MultiListButton.java
@@ -0,0 +1,223 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+/**
+ * Used by MultiList.
+ *
+ * @example controllers/ControlP5multiList
+ * @nosuperclasses Controller Controller
+ */
+public class MultiListButton extends Button implements MultiListInterface {
+
+ // private MultiListInterface parent;
+
+ private final Controller parent;
+ private final MultiList root;
+ private int[] _myRect = new int[ 4 ];
+ protected int _myDirection = RIGHT;
+ private boolean isUpperCase = true;
+
+ /**
+ *
+ * @param theProperties ControllerProperties
+ * @param theParent MultiListInterface
+ * @param theRoot MultiList
+ */
+ protected MultiListButton( ControlP5 theControlP5 , String theName , float theValue , int theX , int theY , int theWidth , int theHeight , Controller theParent , MultiList theRoot ) {
+ super( theControlP5 , ( ControllerGroup< ? > ) theRoot.getParent( ) , theName , theValue , theX , theY , theWidth , theHeight );
+ parent = theParent;
+ root = theRoot;
+ updateRect( x( position ) , y( position ) , getWidth( ) , getHeight( ) );
+ _myCaptionLabel.align( LEFT , CENTER );
+ }
+
+ public MultiListButton toUpperCase( boolean theValue ) {
+ isUpperCase = theValue;
+ for ( Controller< ? > c : getSubelements( ) ) {
+ c.getCaptionLabel( ).toUpperCase( isUpperCase );
+ }
+ _myCaptionLabel.toUpperCase( isUpperCase );
+ return this;
+ }
+
+ public void remove( ) {
+ int myYoffset = 0;
+ for ( int i = 0 ; i < parent.getSubelements( ).size( ) ; i++ ) {
+ if ( parent.getSubelements( ).get( i ) == this ) {
+ myYoffset = getHeight( ) + 1;
+ }
+ ( ( MultiListButton ) parent.getSubelements( ).get( i ) ).updateLocation( 0 , -myYoffset );
+ }
+
+ if ( _myParent != null ) {
+ removeListener( root );
+ _myParent.remove( this );
+ }
+ if ( cp5 != null ) {
+ removeListener( root );
+ cp5.remove( this );
+ }
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ getSubelements( ).get( i ).remove( );
+ }
+ }
+
+ public int getDirection( ) {
+ return _myDirection;
+ }
+
+ protected void setDirection( int theDirection ) {
+ _myDirection = theDirection;
+ }
+
+ public void updateRect( float theX , float theY , float theW , float theH ) {
+ _myRect = new int[] { ( int ) theX , ( int ) theY , ( int ) theW , ( int ) theH };
+ }
+
+ public void updateLocation( float theX , float theY ) {
+ set( position , theX , theY );
+ updateRect( x( position ) , y( position ) , getWidth( ) , getHeight( ) );
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ ( ( MultiListInterface ) getSubelements( ).get( i ) ).updateLocation( theX , theY );
+ }
+ }
+
+ /**
+ * set the width of a multlist button.
+ *
+ * @param theWidth int
+ */
+ public MultiListButton setWidth( int theWidth ) {
+ // negative direction
+ int dif = ( _myDirection == LEFT ) ? theWidth - getWidth( ) : 0;
+ super.setWidth( theWidth );
+ updateLocation( -dif , 0 );
+ return this;
+ }
+
+ /**
+ * set the height of a multlist button.
+ *
+ * @param theHeight int
+ */
+ public MultiListButton setHeight( int theHeight ) {
+ int difHeight = getHeight( );
+ super.setHeight( theHeight );
+ difHeight = getHeight( ) - difHeight;
+ int myYoffset = 0;
+ for ( int i = 0 ; i < parent.getSubelements( ).size( ) ; i++ ) {
+ if ( parent.getSubelements( ).get( i ) instanceof MultiListInterface ) {
+ ( ( MultiListInterface ) parent.getSubelements( ).get( i ) ).updateLocation( 0 , myYoffset );
+ if ( ( parent.getSubelements( ).get( i ) ) == this ) {
+ myYoffset = difHeight;
+ }
+ }
+ }
+ updateLocation( 0 , 0 );
+ return this;
+ }
+
+ /**
+ * add a new button to the sublist of this multilist button.
+ *
+ * @param theName String
+ * @param theValue int
+ * @return MultiListButton
+ */
+ public MultiListButton add( String theName , float theValue ) {
+ int myHeight = - ( getHeight( ) + 1 );
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ myHeight += ( getSubelements( ).get( i ) ).getHeight( ) + 1;
+ }
+ // negative direction, this is static now, make it dynamic depending on
+ // the
+ // location of the list.
+ int xx = ( ( int ) x( position ) + ( getWidth( ) + 1 ) );
+ MultiListButton b = new MultiListButton( cp5 , theName , theValue , xx , ( int ) y( position ) + ( getHeight( ) + 1 ) + myHeight , getWidth( ), getHeight( ), this , root );
+ b.isMoveable = false;
+ b.toUpperCase( isUpperCase );
+ b.hide( );
+ cp5.register( null , "" , b );
+ b.addListener( root );
+ getSubelements( ).add( b );
+ updateRect( xx , y( position ) , getWidth( ) , ( getHeight( ) + 1 ) + myHeight );
+ return b;
+ }
+
+ protected void onEnter( ) {
+ if ( !root.isUpdateLocation ) {
+ isActive = true;
+ root.occupied( true );
+ root.mostRecent = this;
+ if ( parent instanceof MultiListInterface ) {
+ ( ( MultiListInterface ) parent ).close( this );
+ }
+ open( );
+ }
+ }
+
+ protected void onLeave( ) {
+ if ( parent instanceof MultiListInterface ) {
+ if ( ! ( ( MultiListInterface ) parent ).observe( ) && !root.isUpdateLocation && root.mostRecent == this ) {
+ isActive = false;
+ root.occupied( false );
+ }
+ }
+ }
+
+ public void mouseReleasedOutside( ) {
+ // !!! other than in the Button class, calling mouseReleased here
+ // conflicts with mouseReleased();
+ }
+
+ public boolean observe( ) {
+ return CP.inside( _myRect , _myControlWindow.mouseX , _myControlWindow.mouseY );
+ }
+
+ public void close( MultiListInterface theInterface ) {
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ if ( theInterface != getSubelements( ).get( i )) {
+ ( ( MultiListInterface ) getSubelements( ).get( i ) ).close( );
+ }
+ }
+
+ }
+
+ public void close( ) {
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ ( ( MultiListButton ) getSubelements( ).get( i ) ).close( );
+ ( ( MultiListButton ) getSubelements( ).get( i ) ).hide( );
+ }
+ }
+
+ public void open( ) {
+ for ( int i = 0 ; i < getSubelements( ).size( ) ; i++ ) {
+ ( ( MultiListButton ) getSubelements( ).get( i ) ).show( );
+ }
+ }
+
+}
diff --git a/controlP5/MultiListInterface.java b/controlP5/MultiListInterface.java
new file mode 100755
index 0000000..eaaa1f9
--- /dev/null
+++ b/controlP5/MultiListInterface.java
@@ -0,0 +1,48 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PGraphics;
+
+interface MultiListInterface {
+
+ void close( );
+
+ void open( );
+
+ void close( MultiListInterface theInterface );
+
+ boolean observe( );
+
+ void updateLocation( float theX , float theY );
+
+ void draw( PGraphics theGraphics );
+
+ int getDirection( );
+
+ MultiListInterface toUpperCase( boolean theValue );
+
+}
diff --git a/controlP5/MultilineTextfield.java b/controlP5/MultilineTextfield.java
new file mode 100644
index 0000000..37eb17e
--- /dev/null
+++ b/controlP5/MultilineTextfield.java
@@ -0,0 +1,26 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+import processing.event.KeyEvent;
+
+public class MultilineTextfield extends Textfield {
+
+ public MultilineTextfield(ControlP5 theControlP5, String theName) {
+ super(theControlP5, theName);
+ }
+
+ @Override
+ public void keyEvent(KeyEvent theKeyEvent) {
+ if (isUserInteraction && isTexfieldActive && isActive && theKeyEvent.getAction() == KeyEvent.PRESS) {
+ if (ignorelist.contains(cp5.getKeyCode())) {
+ return;
+ }
+ if (cp5.getKeyCode() == ENTER) {
+ // Append a new line character to the text buffer
+ _myTextBuffer.insert(_myTextBufferIndex, '\n');
+ setIndex(_myTextBufferIndex + 1);
+ } else {
+ super.keyEvent(theKeyEvent);
+ }
+ }
+ }
+}
diff --git a/controlP5/Numberbox.java b/controlP5/Numberbox.java
new file mode 100755
index 0000000..dfca762
--- /dev/null
+++ b/controlP5/Numberbox.java
@@ -0,0 +1,302 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+/**
+ * Click and drag the mouse inside a numberbox and move up and down to change the value of a
+ * numberbox. By default the value changes when dragging the mouse up and down. use
+ * setDirection(Controller.HORIZONTAL) to change the mouse control to left and right.
+ *
+ * Why do I get -1000000 as initial value when creating a numberbox without a default value? the
+ * value of a numberbox defaults back to its minValue, which is -1000000. either use a default value
+ * or link a variable to the numberbox - this is done by giving a float or int variable the same
+ * name as the numberbox.
+ *
+ * Use setMultiplier(float) to change the sensitivity of values increasing/decreasing, by default
+ * the multiplier is 1.
+ *
+ *
+ * @example controllers/ControlP5numberbox
+ * @nosuperclasses Controller Controller
+ */
+public class Numberbox extends Controller< Numberbox > {
+
+ protected int cnt;
+ protected boolean isActive;
+ public static int LEFT = 0;
+ public static int UP = 1;
+ public static int RIGHT = 2;
+ public static int DOWN = 3;
+ protected int _myNumberCount = VERTICAL;
+ protected float _myMultiplier = 1;
+ public static int autoWidth = 69;
+ public static int autoHeight = 19;
+ protected float[] autoSpacing = new float[] { 10 , 20 };
+ protected float scrollSensitivity = 0.1f;
+
+ /**
+ * Convenience constructor to extend Numberbox.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Numberbox( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 0 , autoWidth , autoHeight );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ /**
+ *
+ * @param theControlP5 ControlP5
+ * @param theParent Tab
+ * @param theName String
+ * @param theDefaultValue float
+ * @param theX int
+ * @param theY int
+ * @param theWidth int
+ * @param theHeight int
+ */
+ public Numberbox( ControlP5 theControlP5 , Tab theParent , String theName , float theDefaultValue , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ _myMin = -Float.MAX_VALUE;
+ _myMax = Float.MAX_VALUE;
+ _myValue = theDefaultValue;
+ _myValueLabel = new Label( cp5 , String.valueOf(_myValue), theWidth , 12 , color.getValueLabel( ) );
+ if ( Float.isNaN( _myValue ) ) {
+ _myValue = 0;
+ }
+ }
+
+ /* (non-Javadoc)
+ *
+ * @see ControllerInterfalce.updateInternalEvents */
+ @ControlP5.Invisible
+ public Numberbox updateInternalEvents( PApplet theApplet ) {
+ if ( isActive ) {
+ if ( !cp5.isAltDown( ) ) {
+ if ( _myNumberCount == VERTICAL ) {
+ setValue( _myValue + ( _myControlWindow.mouseY - _myControlWindow.pmouseY ) * _myMultiplier );
+ } else {
+ setValue( _myValue + ( _myControlWindow.mouseX - _myControlWindow.pmouseX ) * _myMultiplier );
+ }
+ }
+ }
+ return this;
+ }
+
+ /* (non-Javadoc)
+ *
+ * @see main.java.src2.main.java.controlP5.controlp5.Controller#mousePressed() */
+ @Override
+ @ControlP5.Invisible
+ public void mousePressed( ) {
+ isActive = true;
+ }
+
+ /* (non-Javadoc)
+ *
+ * @see main.java.src2.main.java.controlP5.controlp5.Controller#mouseReleased() */
+ @Override
+ @ControlP5.Invisible
+ public void mouseReleased( ) {
+ isActive = false;
+ }
+
+ /* (non-Javadoc)
+ *
+ * @see main.java.src2.main.java.controlP5.controlp5.Controller#mouseReleasedOutside() */
+ @Override
+ @ControlP5.Invisible
+ public void mouseReleasedOutside( ) {
+ mouseReleased( );
+ }
+
+ /**
+ *
+ * @param theMultiplier
+ * @return Numberbox
+ */
+ public Numberbox setMultiplier( float theMultiplier ) {
+ _myMultiplier = theMultiplier;
+ return this;
+ }
+
+ /**
+ *
+ * @return float
+ */
+ public float getMultiplier( ) {
+ return _myMultiplier;
+ }
+
+ /**
+ * set the value of the numberbox.
+ *
+ * @param theValue float
+ * @return Numberbox
+ */
+ @Override
+ public Numberbox setValue( float theValue ) {
+ _myValue = theValue;
+ _myValue = Math.max( _myMin , Math.min( _myMax , _myValue ) );
+ broadcast( FLOAT );
+ _myValueLabel.set( adjustValue( _myValue ) );
+ return this;
+ }
+
+ /**
+ * assigns a random value to the controller.
+ *
+ * @return Numberbox
+ */
+ public Numberbox shuffle( ) {
+ float r = ( float ) Math.random( );
+ if ( getMax( ) != Float.MAX_VALUE && getMin( ) != -Float.MAX_VALUE ) {
+ setValue( PApplet.map( r , 0 , 1 , getMin( ) , getMax( ) ) );
+ }
+ return this;
+ }
+
+ public Numberbox setRange( float theMin , float theMax ) {
+ setMin( theMin );
+ setMax( theMax );
+ setValue( getValue( ) );
+ return this;
+ }
+
+ /**
+ * sets the sensitivity for the scroll behavior when using the mouse wheel or the scroll
+ * function of a multi-touch track pad. The smaller the value (closer to 0) the higher the
+ * sensitivity.
+ *
+ * @param theValue
+ * @return Numberbox
+ */
+ public Numberbox setScrollSensitivity( float theValue ) {
+ scrollSensitivity = theValue;
+ return this;
+ }
+
+ /**
+ * changes the value of the numberbox when hovering and using the mouse wheel or the scroll
+ * function of a multi-touch track pad.
+ *
+ * @param theRotationValue
+ * @return Numberbox
+ */
+ @ControlP5.Invisible
+ public Numberbox scrolled( int theRotationValue ) {
+ float f = getValue( );
+ f += ( _myMultiplier == 1 ) ? ( theRotationValue * scrollSensitivity ) : theRotationValue * _myMultiplier;
+ setValue( f );
+ return this;
+ }
+
+ /**
+ * set the direction for changing the numberbox value when dragging the mouse. by default this
+ * is up/down (VERTICAL), use setDirection(Controller.HORIZONTAL) to change to left/right or
+ * back with setDirection(Controller.VERTICAL).
+ *
+ * @param theValue
+ */
+ public Numberbox setDirection( int theValue ) {
+ if ( theValue == HORIZONTAL || theValue == VERTICAL ) {
+ _myNumberCount = theValue;
+ } else {
+ _myNumberCount = VERTICAL;
+ }
+ return this;
+ }
+
+ /* (non-Javadoc)
+ *
+ * @see main.java.src2.main.java.controlP5.controlp5.Controller#update() */
+ @Override
+ public Numberbox update( ) {
+ return setValue( _myValue );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Numberbox linebreak( ) {
+ cp5.linebreak( this , true , autoWidth , autoHeight , autoSpacing );
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @ControlP5.Invisible
+ public Numberbox updateDisplayMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = new NumberboxView( );
+ case ( SPRITE ):
+ case ( IMAGE ):
+ case ( CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ class NumberboxView implements ControllerView< Numberbox > {
+
+ NumberboxView( ) {
+ _myValueLabel.align( LEFT , CENTER ).setPadding( 0 , Label.paddingY );
+ _myCaptionLabel.align( LEFT , BOTTOM_OUTSIDE ).setPadding( 0 , Label.paddingY );
+ }
+
+ public void display( PGraphics theGraphics , Numberbox theController ) {
+ theGraphics.fill( color.getBackground( ) );
+ theGraphics.rect( 0 , 0 , getWidth() , getHeight() );
+ theGraphics.fill( ( isActive ) ? color.getActive( ) : color.getForeground( ) );
+ int h = getHeight() / 2;
+ theGraphics.triangle( 0 , h - 6 , 6 , h , 0 , h + 6 );
+ _myValueLabel.draw( theGraphics , 10 , 0 , theController );
+ _myCaptionLabel.draw( theGraphics , 0 , 0 , theController );
+ }
+ }
+
+ /**
+ * @see Numberbox#setScrollSensitivity(float)
+ *
+ * @param theValue
+ * @return
+ */
+ @Deprecated
+ public Numberbox setSensitivity( float theValue ) {
+ return setScrollSensitivity( theValue );
+ }
+}
diff --git a/controlP5/Pad.java b/controlP5/Pad.java
new file mode 100755
index 0000000..ea78e2c
--- /dev/null
+++ b/controlP5/Pad.java
@@ -0,0 +1,31 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+class Pad {
+ // pad for placing controllers, like matrix but without the grid
+ // a sequencer
+}
diff --git a/controlP5/Pointer.java b/controlP5/Pointer.java
new file mode 100755
index 0000000..dcb9d4a
--- /dev/null
+++ b/controlP5/Pointer.java
@@ -0,0 +1,47 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+public interface Pointer {
+
+ int x();
+
+ int y();
+
+ int px();
+
+ int py();
+
+ int dx();
+
+ int dy();
+
+ long pt();
+
+ long dt();
+
+ long t();
+}
diff --git a/controlP5/Println.java b/controlP5/Println.java
new file mode 100755
index 0000000..2726ab1
--- /dev/null
+++ b/controlP5/Println.java
@@ -0,0 +1,108 @@
+
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.io.IOException;
+import java.io.PipedInputStream;
+import java.io.PipedOutputStream;
+import java.io.PrintStream;
+
+public class Println {
+
+ int max = -1;
+
+ final Textarea c;
+
+ String buffer = "";
+
+ boolean paused;
+
+
+ public Println(Textarea theTextarea) {
+ c = theTextarea;
+ run();
+ }
+
+
+ public Println setMax(int theMax) {
+ max = theMax;
+ return this;
+ }
+
+
+ private void run() {
+ try {
+ final PipedInputStream pi = new PipedInputStream();
+ final PipedOutputStream po = new PipedOutputStream(pi);
+ System.setOut(new PrintStream(po, true));
+
+ (new Thread() {
+
+ public void run() {
+ final byte[] buf = new byte[1024];
+ try {
+ while (true) {
+ final int len = pi.read(buf);
+ if (len == -1) {
+ break;
+ }
+ if (!paused) {
+ if (!c._myScrollbar.isMousePressed) {
+ c.append(buffer + new String(buf, 0, len), max);
+ buffer = "";
+ c.scroll(1);
+ }
+ else {
+ buffer += new String(buf, 0, len);
+ }
+ }
+ }
+ } catch (IOException e) {
+ }
+ }
+ }).start();
+ } catch (IOException e) {
+ System.out.println("Problems setting up console");
+ }
+ }
+
+
+ public void clear() {
+ c.clear();
+ }
+
+
+ public void pause() {
+ paused = true;
+ }
+
+
+ public void play() {
+ paused = false;
+ }
+
+}
diff --git a/controlP5/Radio.java b/controlP5/Radio.java
new file mode 100755
index 0000000..1c6bc4d
--- /dev/null
+++ b/controlP5/Radio.java
@@ -0,0 +1,39 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+/*
+ * Backwards compatibility, cp5magic for example uses it.
+ * But if possible, upgrade to RadioButton
+ */
+
+public class Radio extends RadioButton {
+
+ public Radio( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , int theX , int theY ) {
+ super( theControlP5 , theParent , theName , theX , theY );
+ }
+
+}
diff --git a/controlP5/RadioButton.java b/controlP5/RadioButton.java
new file mode 100755
index 0000000..a474e81
--- /dev/null
+++ b/controlP5/RadioButton.java
@@ -0,0 +1,643 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import processing.core.PImage;
+
+/**
+ * A radioButton is a list of toggles that can be turned on or off. radioButton is of type
+ * ControllerGroup, therefore a controllerPlug can't be set. this means that an event from a
+ * radioButton can't be forwarded to a method other than controlEvent in a sketch.
+ *
+ * a radioButton has 2 sets of values. radioButton.getValue() returns the value of the active
+ * radioButton item. radioButton.getArrayValue() returns a float array that represents the active
+ * (1) and inactive (0) items of a radioButton.
+ *
+ * ControlP5 CheckBox Toggle
+ *
+ * @example controllers/ControlP5radioButton
+ *
+ * @nosuperclasses Controller Controller
+ */
+public class RadioButton extends ControlGroup< RadioButton > {
+
+ protected List< Toggle > _myRadioToggles;
+ protected int spacingRow = 1;
+ protected int spacingColumn = 1;
+ protected int itemsPerRow = -1;
+ protected boolean isMultipleChoice;
+ protected int itemHeight = 9;
+ protected int itemWidth = 9;
+ protected boolean[] availableImages = new boolean[ 3 ];
+ protected PImage[] images = new PImage[ 3 ];
+ protected boolean noneSelectedAllowed = true;
+ private Object _myPlug;
+ private String _myPlugName;
+ protected int alignX = RIGHT_OUTSIDE;
+ protected int alignY = CENTER;
+ protected int _myPaddingX = Label.paddingX;
+ protected int _myPaddingY = 0;
+
+ /**
+ * Convenience constructor to extend RadioButton.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public RadioButton( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ /**
+ * @exclude
+ * @param theControlP5
+ * @param theParent
+ * @param theName
+ * @param theX
+ * @param theY
+ */
+ public RadioButton( final ControlP5 theControlP5 , final ControllerGroup< ? > theParent , final String theName , final int theX , final int theY ) {
+ super( theControlP5 , theParent , theName , theX , theY , 99 , 9 );
+ isBarVisible = false;
+ isCollapse = false;
+ _myRadioToggles = new ArrayList< Toggle >( );
+ setItemsPerRow( 1 );
+ _myPlug = cp5.papplet;
+ _myPlugName = getName( );
+ if ( !ControllerPlug.checkPlug( _myPlug , _myPlugName , new Class[] { int.class } ) ) {
+ _myPlug = null;
+ }
+ }
+
+ /**
+ * @param theName
+ * @param theValue
+ * @return
+ */
+ public RadioButton addItem( final String theName , final float theValue ) {
+ Toggle t = cp5.addToggle( theName , 0 , 0 , itemWidth , itemHeight );
+ t.getCaptionLabel( ).align( alignX , alignY ).setPadding( _myPaddingX , _myPaddingY );
+ t.setMode(DEFAULT);
+ t.setImages( images[ 0 ] , images[ 1 ] , images[ 2 ] );
+ t.setSize( images[ 0 ] );
+ addItem( t , theValue );
+ return this;
+ }
+
+ /**
+ * @param theToggle
+ * @param theValue
+ * @return
+ */
+ public RadioButton addItem( final Toggle theToggle , final float theValue ) {
+ theToggle.setGroup( this );
+ theToggle.isMoveable = false;
+ theToggle.setInternalValue( theValue );
+ theToggle.isBroadcast = false;
+ _myRadioToggles.add( theToggle );
+ updateLayout( );
+ getColor( ).copyTo( theToggle );
+ theToggle.addListener( this );
+ updateValues( false );
+ cp5.removeProperty( theToggle );
+ return this;
+ }
+
+ /**
+ * @param theName
+ */
+ public RadioButton removeItem( final String theName ) {
+ int n = _myRadioToggles.size( );
+ for ( int i = n-1 ; i >= 0 ; i-- ) {
+ if ( ( _myRadioToggles.get( i ) ).getName( ).equals( theName ) ) {
+ ( _myRadioToggles.get( i ) ).removeListener( this );
+ _myRadioToggles.get( i ).remove();
+ _myRadioToggles.remove( i );
+ }
+ }
+ updateValues( false );
+ updateLayout( );
+ return this;
+ }
+
+ private void updateAlign( ) {
+ for ( Toggle t : _myRadioToggles ) {
+ t.getCaptionLabel( ).align( alignX , alignY );
+ }
+ }
+
+ public RadioButton align( int[] a ) {
+ return align( a[ 0 ] , a[ 1 ] );
+ }
+
+ public RadioButton align( int theX , int theY ) {
+ alignX = theX;
+ alignY = theY;
+ updateAlign( );
+ return this;
+ }
+
+ public RadioButton alignX( int theX ) {
+ return align( theX , alignY );
+ }
+
+ public RadioButton alignY( int theY ) {
+ return align( alignX , theY );
+ }
+
+ public int[] getAlign( ) {
+ return new int[] { alignX , alignY };
+ }
+
+ public RadioButton setLabelPadding( int thePaddingX , int thePaddingY ) {
+ _myPaddingX = thePaddingX;
+ _myPaddingY = thePaddingY;
+ for ( Toggle t : _myRadioToggles ) {
+ t.getCaptionLabel( ).setPadding( thePaddingX , thePaddingY );
+ }
+ return this;
+ }
+
+ /**
+ *
+ * @param theDefaultImage
+ * @param theOverImage
+ * @param theActiveImage
+ * @return RadioButton
+ */
+ public RadioButton setImages( PImage theDefaultImage , PImage theOverImage , PImage theActiveImage ) {
+ setImage( theDefaultImage , DEFAULT );
+ setImage( theOverImage , OVER );
+ setImage( theActiveImage , ACTIVE );
+ return this;
+ }
+
+ /**
+ * @param theImage
+ */
+ public RadioButton setImage( PImage theImage ) {
+ return setImage( theImage , DEFAULT );
+ }
+
+ /**
+ * @param theImage
+ * @param theState
+ * use Controller.DEFAULT (background), or Controller.OVER (foreground), or
+ * Controller.ACTIVE (active)
+ * @return
+ */
+ public RadioButton setImage( PImage theImage , int theState ) {
+ if ( theImage != null ) {
+ images[ theState ] = theImage;
+ availableImages[ theState ] = true;
+ for ( int i = 0 ; i < _myRadioToggles.size( ) ; i++ ) {
+ _myRadioToggles.get( i ).setImage( theImage , theState );
+ }
+ }
+ return this;
+ }
+
+ public RadioButton setSize( PImage theImage ) {
+ return setSize( theImage.width , theImage.height );
+ }
+
+ public RadioButton setSize( int theWidth , int theHeight ) {
+ setItemWidth( theWidth );
+ setItemHeight( theHeight );
+ return this;
+ }
+
+ /**
+ * set the height of a radioButton/checkBox item. by default the height is 11px. in order to
+ * recognize a custom height, the itemHeight has to be set before adding items to a
+ * radioButton/checkBox.
+ *
+ * @param theItemHeight
+ */
+ public RadioButton setItemHeight( int theItemHeight ) {
+ itemHeight = theItemHeight;
+ for ( Toggle t : _myRadioToggles ) {
+ t.setHeight( theItemHeight );
+ }
+ updateLayout( );
+ return this;
+ }
+
+ /**
+ * set the width of a radioButton/checkBox item. by default the width is 11px. in order to
+ * recognize a custom width, the itemWidth has to be set before adding items to a
+ * radioButton/checkBox.
+ *
+ * @param theItemWidth
+ */
+ public RadioButton setItemWidth( int theItemWidth ) {
+ itemWidth = theItemWidth;
+ for ( Toggle t : _myRadioToggles ) {
+ t.setWidth( theItemWidth );
+ }
+ updateLayout( );
+ return this;
+ }
+
+ /**
+ * Gets a radio button item by index.
+ *
+ * @param theIndex
+ * @return Toggle
+ */
+ public Toggle getItem( int theIndex ) {
+ return _myRadioToggles.get( theIndex );
+ }
+
+ public Toggle getItem( String theName ) {
+ for ( Toggle t : _myRadioToggles ) {
+ if ( theName.equals( t.getName( ) ) ) {
+ return t;
+ }
+ }
+ return null;
+ }
+
+ public List< Toggle > getItems( ) {
+ return _myRadioToggles;
+ }
+
+ /**
+ * Gets the state of an item - this can be true (for on) or false (for off) - by index.
+ *
+ * @param theIndex
+ * @return boolean
+ */
+ public boolean getState( int theIndex ) {
+ if ( theIndex < _myRadioToggles.size( ) && theIndex >= 0 ) {
+ return _myRadioToggles.get( theIndex ).getState( );
+ }
+ return false;
+ }
+
+ /**
+ * Gets the state of an item - this can be true (for on) or false (for off) - by name.
+ *
+ * @param theName
+ * @return
+ */
+ public boolean getState( String theName ) {
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ if ( theName.equals( t.getName( ) ) ) {
+ return t.getState( );
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @exclude
+ */
+ public void updateLayout( ) {
+ int nn = 0;
+ int xx = 0;
+ int yy = 0;
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ set( t.position , xx , yy );
+
+ xx += t.getWidth( ) + spacingColumn;
+ nn++;
+ if ( nn == itemsPerRow ) {
+ nn = 0;
+ _myWidth = xx;
+ yy += t.getHeight( ) + spacingRow;
+ xx = 0;
+ } else {
+ _myWidth = xx;
+ }
+ }
+ }
+
+ /**
+ * Items of a radioButton or a checkBox are organized in columns and rows. SetItemsPerRow sets
+ * the limit of items per row. items exceeding the limit will be pushed to the next row.
+ *
+ * @param theValue
+ */
+ public RadioButton setItemsPerRow( final int theValue ) {
+ itemsPerRow = theValue;
+ updateLayout( );
+ return this;
+ }
+
+ /**
+ * Sets the spacing in pixels between columns.
+ *
+ * @param theSpacing
+ */
+ public RadioButton setSpacingColumn( final int theSpacing ) {
+ spacingColumn = theSpacing;
+ updateLayout( );
+ return this;
+ }
+
+ /**
+ * Sets the spacing in pixels between rows.
+ *
+ * @param theSpacing
+ */
+ public RadioButton setSpacingRow( final int theSpacing ) {
+ spacingRow = theSpacing;
+ updateLayout( );
+ return this;
+ }
+
+ public RadioButton deactivateAll( ) {
+ if ( !isMultipleChoice && !noneSelectedAllowed ) {
+ return this;
+ }
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ _myRadioToggles.get( i ).deactivate( );
+ }
+ _myValue = -1;
+ updateValues( true );
+ return this;
+ }
+
+ /**
+ * Deactivates all active RadioButton items and only activates the item corresponding to
+ * theIndex.
+ * TODO does not trigger function or value when called by code, fix!
+ *
+ * @param theIndex
+ */
+ public RadioButton activate( int theIndex ) {
+ int n = _myRadioToggles.size( );
+ if ( theIndex < n ) {
+ for ( int i = 0 ; i < n ; i++ ) {
+ _myRadioToggles.get( i ).deactivate( );
+ }
+ _myRadioToggles.get( theIndex ).activate( );
+ _myValue = _myRadioToggles.get( theIndex ).internalValue( );
+ updateValues( true );
+ }
+ return this;
+ }
+
+ /**
+ * @param theIndex
+ */
+ public RadioButton deactivate( int theIndex ) {
+ if ( !isMultipleChoice && !noneSelectedAllowed ) {
+ return this;
+ }
+ if ( theIndex < _myRadioToggles.size( ) ) {
+ Toggle t = _myRadioToggles.get( theIndex );
+ if ( t.isActive ) {
+ t.deactivate( );
+ _myValue = -1;
+ updateValues( true );
+ }
+ }
+ return this;
+ }
+
+ /**
+ * Actives an item of the Radio button by name.
+ *
+ * @param theName
+ */
+ public RadioButton activate( String theName ) {
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ if ( theName.equals( t.getName( ) ) ) {
+ activate( i );
+ return this;
+ }
+ }
+ return this;
+ }
+
+ /**
+ * Deactivates a RadioButton by name and sets the value of the RadioButton to the default value
+ * -1.
+ *
+ * @param theName
+ */
+ public RadioButton deactivate( String theName ) {
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ if ( theName.equals( t.getName( ) ) ) {
+ t.deactivate( );
+ _myValue = -1;
+ updateValues( true );
+ return this;
+ }
+ }
+ return this;
+ }
+
+ /**
+ * @exclude
+ * @param theIndex
+ */
+ public RadioButton toggle( int theIndex ) {
+ // TODO
+ // boolean itemState = ((Toggle)
+ // _myRadioToggles.get(theIndex)).getState();
+ // if (theIndex < _myRadioToggles.size()) {
+ // Toggle t = ((Toggle) _myRadioToggles.get(theIndex));
+ // if (t.isActive) {
+ // t.deactivate();
+ // _myValue = -1;
+ // updateValues(true);
+ // }
+ // }
+ ControlP5.logger( ).info( "toggle() not yet implemented, working on it." );
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @exclude
+ */
+ @ControlP5.Invisible @Override public void controlEvent( ControlEvent theEvent ) {
+ if ( !isMultipleChoice ) {
+ if ( !noneSelectedAllowed && theEvent.getController( ).getValue( ) < 1 ) {
+ if ( theEvent.getController( ) instanceof Toggle ) {
+ Toggle t = ( ( Toggle ) theEvent.getController( ) );
+ boolean b = t.isBroadcast( );
+ t.setBroadcast( false );
+ t.setState( true );
+ t.setBroadcast( b );
+ return;
+ }
+ }
+ _myValue = -1;
+ int n = _myRadioToggles.size( );
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ if ( !t.equals( theEvent.getController( ) ) ) {
+ t.deactivate( );
+ } else {
+ if ( t.isOn ) {
+ _myValue = t.internalValue( );
+ }
+ }
+ }
+ }
+ if ( _myPlug != null ) {
+ try {
+ Method method = _myPlug.getClass( ).getMethod( _myPlugName , int.class );
+ method.invoke( _myPlug , ( int ) _myValue );
+ } catch ( SecurityException ex ) {
+ ex.printStackTrace( );
+ } catch ( NoSuchMethodException ex ) {
+ ex.printStackTrace( );
+ } catch ( IllegalArgumentException ex ) {
+ ex.printStackTrace( );
+ } catch ( IllegalAccessException ex ) {
+ ex.printStackTrace( );
+ } catch ( InvocationTargetException ex ) {
+ ex.printStackTrace( );
+ }
+ }
+ updateValues( true );
+ }
+
+ public RadioButton plugTo( Object theObject ) {
+ _myPlug = theObject;
+ if ( !ControllerPlug.checkPlug( _myPlug , _myPlugName , new Class[] { int.class } ) ) {
+ _myPlug = null;
+ }
+ return this;
+ }
+
+ public RadioButton plugTo( Object theObject , String thePlugName ) {
+ _myPlug = theObject;
+ _myPlugName = thePlugName;
+ if ( !ControllerPlug.checkPlug( _myPlug , _myPlugName , new Class[] { int.class } ) ) {
+ _myPlug = null;
+ }
+ return this;
+ }
+
+ protected void updateValues( boolean theBroadcastFlag ) {
+ int n = _myRadioToggles.size( );
+ _myArrayValue = new float[ n ];
+ for ( int i = 0 ; i < n ; i++ ) {
+ Toggle t = _myRadioToggles.get( i );
+ _myArrayValue[ i ] = t.getValue( );
+ }
+ if ( theBroadcastFlag ) {
+ ControlEvent myEvent = new ControlEvent( this );
+ cp5.getControlBroadcaster( ).broadcast( myEvent , FLOAT);
+ }
+
+ }
+
+ /**
+ * In order to always have 1 item selected, use setNoneSelectedAllowed(false), by default this
+ * is true. setNoneSelectedAllowed does not apply when in multipleChoice mode.
+ *
+ * @param theValue
+ */
+ public RadioButton setNoneSelectedAllowed( boolean theValue ) {
+ noneSelectedAllowed = theValue;
+ return this;
+ }
+
+ /**
+ * Sets the value for all RadioButton items according to the values of the array passed on. 0
+ * will turn off an item, any other value will turn it on.
+ */
+ @Override public RadioButton setArrayValue( float[] theArray ) {
+ for ( int i = 0 ; i < theArray.length ; i++ ) {
+ if ( _myArrayValue[ i ] != theArray[ i ] ) {
+ if ( theArray[ i ] == 0 ) {
+ deactivate( i );
+ } else {
+ activate( i );
+ }
+ }
+ }
+ super.setArrayValue( theArray );
+ return this;
+ }
+
+ public RadioButton setColorLabels( int theColor ) {
+ for ( Toggle t : _myRadioToggles ) {
+ t.getCaptionLabel( ).setColor( theColor );
+ }
+ return this;
+ }
+
+ public RadioButton hideLabels( ) {
+ for ( Toggle t : _myRadioToggles ) {
+ t.getCaptionLabel( ).setVisible( false );
+ }
+ return this;
+ }
+
+ public RadioButton showLabels( ) {
+ for ( Toggle t : _myRadioToggles ) {
+ t.getCaptionLabel( ).setVisible( true );
+ }
+ return this;
+ }
+
+ public RadioButton toUpperCase( boolean theValue ) {
+ for ( Toggle t : _myRadioToggles ) {
+ t.getCaptionLabel( ).toUpperCase( theValue );
+ }
+ return this;
+ }
+
+ /**
+ * @exclude {@inheritDoc}
+ */
+ @Override public String getInfo( ) {
+ return "type:\tRadioButton\n" + super.getInfo( );
+ }
+
+ /**
+ * @deprecated
+ * @exclude
+ */
+ @Deprecated public RadioButton add( final String theName , final float theValue ) {
+ return addItem( theName , theValue );
+ }
+}
diff --git a/controlP5/Range.java b/controlP5/Range.java
new file mode 100755
index 0000000..3904cba
--- /dev/null
+++ b/controlP5/Range.java
@@ -0,0 +1,519 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.ArrayList;
+import java.util.logging.Level;
+
+import processing.core.PApplet;
+import processing.core.PFont;
+import processing.core.PGraphics;
+
+/**
+ * A range slider works just like a slider but can be adjusted on both ends.
+ *
+ * @see Slider
+ * @example controllers/ControlP5range
+ * @nosuperclasses Controller Controller
+ */
+public class Range extends Controller< Range > {
+
+ /* TODO if range value is int, value labels do initialize as floats. first click makes them
+ * display as ints without decimal point */
+ protected static final int HORIZONTAL = 0;
+ protected static final int VERTICAL = 1;
+ protected int _myDirection;
+ protected float _myValuePosition;
+ protected boolean isDragging;
+ protected boolean isDraggable = true;
+ protected boolean isFirstClick;
+ protected Label _myHighValueLabel;
+ protected float _myValueRange;
+ protected boolean isMinHandle;
+ protected boolean isMaxHandle;
+ protected boolean isMoveHandle;
+ protected float distanceHandle;
+ protected int handleSize = 10;
+ protected int minHandle = 0;
+ protected int maxHandle = 0;
+ protected int mr = 0;
+ protected final ArrayList< TickMark > _myTickMarks = new ArrayList< TickMark >( );
+ protected boolean isShowTickMarks;
+ protected boolean isSnapToTickMarks;
+ public static int autoWidth = 99;
+ public static int autoHeight = 9;
+ public static float[] autoSpacing = new float[]{ 0 , 5 , 0 };
+ public int alignValueLabel = ControlP5Constants.CENTER;
+ protected int _myColorTickMark = 0xffffffff;
+ private int mode = -1;
+
+ /**
+ * Convenience constructor to extend Range.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Range( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 100 , 0 , 100 , 0 , 0 , 99 , 9 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ /**
+ *
+ * @param theControlP5 ControlP5
+ * @param theParent ControllerGroup
+ * @param theName String
+ * @param theMin float
+ * @param theMax float
+ * @param theDefaultValue float
+ * @param theX int
+ * @param theY int
+ * @param theWidth int
+ * @param theHeight int
+ */
+ @ControlP5.Invisible public Range( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , float theMin , float theMax , float theDefaultMinValue , float theDefaultMaxValue , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+
+ _myArrayValue = new float[] { theDefaultMinValue , theDefaultMaxValue };
+
+ _myMin = theMin;
+ _myMax = theMax;
+ _myValueRange = _myMax - _myMin;
+
+ minHandle = ( int ) PApplet.map( theDefaultMinValue , _myMin , _myMax , handleSize , getWidth( ) - handleSize );
+ maxHandle = ( int ) PApplet.map( theDefaultMaxValue , _myMin , _myMax , handleSize , getWidth( ) - handleSize );
+ mr = maxHandle - minHandle;
+
+ _myCaptionLabel = new Label( cp5 , theName ).setColor( color.getCaptionLabel( ) ).align( ControlP5Constants.RIGHT_OUTSIDE , ControlP5Constants.CENTER );
+ _myValueLabel = new Label( cp5 , adjustValue(_myMin)).setColor( color.getValueLabel( ) ).set(adjustValue(theDefaultMinValue)).align( ControlP5Constants.LEFT , ControlP5Constants.CENTER );
+ _myHighValueLabel = new Label( cp5 , adjustValue( _myMax ) ).setColor( color.getValueLabel( ) ).set(adjustValue(theDefaultMaxValue)).align( ControlP5Constants.RIGHT , ControlP5Constants.CENTER );
+
+ _myValue = theDefaultMinValue;
+
+ _myDirection = HORIZONTAL;
+
+ update( );
+
+ }
+
+ @Override public Range setColorValueLabel( int theColor ) {
+ _myValueLabel.setColor( theColor );
+ _myHighValueLabel.setColor( theColor );
+ return this;
+ }
+
+ @Override public Range setColorCaptionLabel( int theColor ) {
+ _myCaptionLabel.setColor( theColor );
+ return this;
+ }
+
+ public Range setHighValueLabel( final String theLabel ) {
+ _myHighValueLabel.set( theLabel );
+ return this;
+ }
+
+ public Range setLowValueLabel( final String theLabel ) {
+ _myValueLabel.set( theLabel );
+ return this;
+ }
+
+ @ControlP5.Invisible public Range setSliderMode( int theMode ) {
+ return this;
+ }
+
+ public Range setHandleSize( int theSize ) {
+ handleSize = theSize;
+ setLowValue( _myArrayValue[ 0 ] , false );
+ setHighValue( _myArrayValue[ 1 ] , false );
+ mr = maxHandle - minHandle;
+ return this;
+ }
+
+ @ControlP5.Invisible public Range updateInternalEvents( PApplet theApplet ) {
+ if ( isVisible ) {
+ int c = _myControlWindow.mouseX - _myControlWindow.pmouseX;
+ if ( c == 0 ) {
+ return this;
+ }
+ if ( isMousePressed && !cp5.isAltDown( ) ) {
+ switch ( mode ) {
+ case ( ControlP5Constants.LEFT ):
+ minHandle = PApplet.max( handleSize , PApplet.min( maxHandle , minHandle + c ) );
+ break;
+ case ( ControlP5Constants.RIGHT ):
+ maxHandle = PApplet.max( minHandle , PApplet.min( getWidth( ) - handleSize , maxHandle + c ) );
+ break;
+ case ( ControlP5Constants.CENTER ):
+ minHandle = PApplet.max( handleSize , PApplet.min( getWidth( ) - mr - handleSize , minHandle + c ) );
+ maxHandle = PApplet.max( minHandle , PApplet.min( getWidth( ) - handleSize , minHandle + mr ) );
+ break;
+ }
+ update( );
+ }
+ }
+ return this;
+ }
+
+ @Override @ControlP5.Invisible
+ public void mousePressed( ) {
+
+ final float posX = Controller.x( _myParent.getAbsolutePosition( ) ) + Controller.x( position );
+ final float posY = Controller.y( _myParent.getAbsolutePosition( ) ) + Controller.y( position );
+
+ if ( _myControlWindow.mouseY < posY || _myControlWindow.mouseY > posY + getHeight( ) ) {
+ mode = -1;
+ isMinHandle = isMaxHandle = false;
+ return;
+ }
+
+ int x0 = ( int ) ( posX + minHandle );
+ int x1 = ( int ) ( posX + maxHandle );
+
+ if ( _myControlWindow.mouseX >= x0 - handleSize && _myControlWindow.mouseX < x0 ) {
+ mode = ControlP5Constants.LEFT;
+ isMinHandle = true;
+ } else if ( _myControlWindow.mouseX >= x1 && _myControlWindow.mouseX < x1 + handleSize ) {
+ mode = ControlP5Constants.RIGHT;
+ isMaxHandle = true;
+ } else if ( _myControlWindow.mouseX > x0 && _myControlWindow.mouseX < x1 && isDraggable ) {
+ mode = ControlP5Constants.CENTER;
+ }
+ }
+
+ /**
+ * set the value of the range-slider. to set the low and high value, use setLowValue and
+ * setHighValue or setRangeValues
+ *
+ * @see #setLowValue(float)
+ * @see #setHighValue(float)
+ * @see #setRangeValues(float, float)
+ *
+ * @param theValue float
+ * @return Range
+ */
+ @Override @ControlP5.Invisible public Range setValue( float theValue ) {
+ _myValue = theValue;
+ broadcast( ControlP5Constants.ARRAY );
+ return this;
+ }
+
+ /**
+ * @exclude
+ */
+ @Override @ControlP5.Invisible public Range update( ) {
+ _myArrayValue[ 0 ] = PApplet.map( minHandle , handleSize , getWidth( ) - handleSize , _myMin , _myMax );
+ _myArrayValue[ 1 ] = PApplet.map( maxHandle , handleSize , getWidth( ) - handleSize , _myMin , _myMax );
+ mr = maxHandle - minHandle;
+ _myHighValueLabel.set( adjustValue( _myArrayValue[ 1 ] ) );
+ _myValueLabel.set( adjustValue( _myArrayValue[ 0 ] ) );
+ return setValue( _myValue );
+ }
+
+ @ControlP5.Invisible public Range setDraggable( boolean theFlag ) {
+ isDraggable = theFlag;
+ isDragging = theFlag && isDragging;
+ return this;
+ }
+
+ public float[] getArrayValue( ) {
+ return _myArrayValue;
+ }
+
+ @Override public Range setArrayValue( float[] theArray ) {
+ setLowValue( theArray[ 0 ] , false );
+ setHighValue( theArray[ 1 ] , false );
+ return update( );
+ }
+
+ @Override public Range setMin( float theValue ) {
+ _myMin = theValue;
+ _myValueRange = _myMax - _myMin;
+ return setLowValue( _myArrayValue[ 0 ] );
+ }
+
+ @Override public Range setMax( float theValue ) {
+ _myMax = theValue;
+ _myValueRange = _myMax - _myMin;
+ return setHighValue( _myArrayValue[ 1 ] );
+ }
+
+ public float getLowValue( ) {
+ return _myArrayValue[ 0 ];
+ }
+
+ public float getHighValue( ) {
+ return _myArrayValue[ 1 ];
+ }
+
+ @Override public Range setWidth( int theValue ) {
+ super.setWidth( theValue );
+ return this;
+ }
+
+ @Override public Range setHeight( int theValue ) {
+ super.setHeight( theValue );
+ return this;
+ }
+
+ @Override @ControlP5.Invisible public void mouseReleased( ) {
+ isDragging = isMinHandle = isMaxHandle = isMoveHandle = false;
+ mode = -1;
+ }
+
+ @Override @ControlP5.Invisible public void mouseReleasedOutside( ) {
+ mouseReleased( );
+ }
+
+ @Override @ControlP5.Invisible public void onLeave( ) {
+ isMinHandle = false;
+ isMaxHandle = false;
+ }
+
+ protected void setTickMarks( ) {
+ System.out.println( "Range Tickmarks not yet supported" );
+ }
+
+ public Range setColorTickMark( int theColor ) {
+ _myColorTickMark = theColor;
+ return this;
+ }
+
+ public Range showTickMarks( boolean theFlag ) {
+ isShowTickMarks = theFlag;
+ return this;
+ }
+
+ public Range snapToTickMarks( boolean theFlag ) {
+ isSnapToTickMarks = theFlag;
+ System.out.println( "Range Tickmarks not yet supported" );
+ return this;
+ }
+
+ @ControlP5.Invisible public TickMark getTickMark( ) {
+ System.out.println( "Range Tickmarks not yet supported" );
+ return null;
+ }
+
+ public ArrayList< TickMark > getTickMarks( ) {
+ return _myTickMarks;
+ }
+
+ public Range setNumberOfTickMarks( int theNumber ) {
+ System.out.println( "Range Tickmarks not yet supported" );
+ _myTickMarks.clear( );
+ if ( theNumber > 0 ) {
+ for ( int i = 0 ; i < theNumber ; i++ ) {
+ _myTickMarks.add( new TickMark( this ) );
+ }
+ showTickMarks( true );
+ snapToTickMarks( true );
+ } else {
+ showTickMarks( false );
+ snapToTickMarks( false );
+ }
+ _myUnit = ( _myMax - _myMin ) / ( ( getWidth( ) > getHeight( ) ) ? getWidth( ) - 1 : getHeight( ) - 1 );
+ setLowValue( _myArrayValue[ 0 ] , false );
+ setHighValue( _myArrayValue[ 1 ] , false );
+ return update( );
+ }
+
+ public Range setRange( float theMinValue , float theMaxValue ) {
+ setMin( theMinValue );
+ setMax( theMaxValue );
+ return this;
+ }
+
+ public Range setRangeValues( float theLowValue , float theHighValue ) {
+ return setArrayValue( new float[] { theLowValue , theHighValue } );
+ }
+
+ private Range setLowValue( float theValue , boolean isUpdate ) {
+ _myArrayValue[ 0 ] = PApplet.max( _myMin , snapValue( theValue ) );
+ minHandle = ( int ) PApplet.map( _myArrayValue[ 0 ] , _myMin , _myMax , handleSize , getWidth( ) - handleSize );
+ return ( isUpdate ) ? update( ) : this;
+ }
+
+ public Range setLowValue( float theValue ) {
+ return setLowValue( theValue , true );
+ }
+
+ private Range setHighValue( float theValue , boolean isUpdate ) {
+ _myArrayValue[ 1 ] = PApplet.min( _myMax , snapValue( theValue ) );
+ maxHandle = ( int ) PApplet.map( _myArrayValue[ 1 ] , _myMin , _myMax , handleSize , getWidth( ) - handleSize );
+ return ( isUpdate ) ? update( ) : this;
+ }
+
+ public Range setHighValue( float theValue ) {
+ return setHighValue( theValue , true );
+ }
+
+ protected float snapValue( float theValue ) {
+ if ( isMousePressed ) {
+ return theValue;
+ }
+ if ( isSnapToTickMarks ) {
+ _myValuePosition = ( ( theValue - _myMin ) / _myUnit );
+ float n = PApplet.round( PApplet.map( _myValuePosition , 0 , ( _myDirection == HORIZONTAL ) ? getWidth( ) : getHeight( ) , 0 , _myTickMarks.size( ) - 1 ) );
+ theValue = PApplet.map( n , 0 , _myTickMarks.size( ) - 1 , _myMin , _myMax );
+ }
+ return theValue;
+ }
+
+ @Override @ControlP5.Invisible public Range updateDisplayMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( ControlP5Constants.DEFAULT ):
+ _myControllerView = new RangeView( );
+ break;
+ case ( ControlP5Constants.SPRITE ):
+ _myControllerView = new RangeSpriteView( );
+ break;
+ case ( ControlP5Constants.IMAGE ):
+ _myControllerView = new RangeImageView( );
+ break;
+ case ( ControlP5Constants.CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ class RangeSpriteView implements ControllerView< Range > {
+
+ public void display( PGraphics theGraphics , Range theController ) {
+
+ ControlP5.logger( ).log( Level.INFO , "RangeSpriteDisplay not available." );
+
+ }
+
+ }
+
+ class RangeView implements ControllerView< Range > {
+
+ public void display( PGraphics theGraphics , Range theController ) {
+
+ int high = mode;
+
+ final float posX = Controller.x( _myParent.getAbsolutePosition( ) ) + Controller.x( position );
+ int x0 = ( int ) ( posX + minHandle );
+ int x1 = ( int ) ( posX + maxHandle );
+
+ if ( isInside( ) && high < 0 ) {
+ if ( _myControlWindow.mouseX >= x0 - handleSize && _myControlWindow.mouseX < x0 ) {
+ high = ControlP5Constants.LEFT;
+ } else if ( _myControlWindow.mouseX >= x1 && _myControlWindow.mouseX < x1 + handleSize ) {
+ high = ControlP5Constants.RIGHT;
+ } else if ( _myControlWindow.mouseX > x0 && _myControlWindow.mouseX < x1 && isDraggable ) {
+ high = ControlP5Constants.CENTER;
+ }
+ }
+
+ theGraphics.pushMatrix( );
+
+ theGraphics.fill( color.getBackground( ) );
+
+ theGraphics.noStroke( );
+
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+
+ theGraphics.fill( high == ControlP5Constants.CENTER ? color.getActive( ) : color.getForeground( ) );
+
+ if ( isShowTickMarks ) {
+ int n = handleSize / 2;
+ theGraphics.rect( minHandle - n , 0 , mr + handleSize , getHeight( ) );
+ theGraphics.fill( ( isMinHandle || high == ControlP5Constants.LEFT ) ? color.getActive( ) : color.getForeground( ) );
+ theGraphics.triangle( minHandle - handleSize , 0 , minHandle , 0 , minHandle - n , getHeight( ) );
+ theGraphics.fill( ( isMaxHandle || high == ControlP5Constants.RIGHT ) ? color.getActive( ) : color.getForeground( ) );
+ theGraphics.triangle( maxHandle , 0 , maxHandle + handleSize , 0 , maxHandle + n , getHeight( ) );
+ } else {
+ theGraphics.rect( minHandle , 0 , mr , getHeight( ) );
+ theGraphics.fill( ( isMinHandle || high == ControlP5Constants.LEFT ) ? color.getActive( ) : color.getForeground( ) );
+ theGraphics.rect( ( minHandle - handleSize ) , 0 , handleSize , getHeight( ) );
+ theGraphics.fill( ( isMaxHandle || high == ControlP5Constants.RIGHT ) ? color.getActive( ) : color.getForeground( ) );
+ theGraphics.rect( maxHandle , 0 , handleSize , getHeight( ) );
+
+ }
+
+ if ( isLabelVisible ) {
+ _myCaptionLabel.draw( theGraphics , 0 , 0 , theController );
+ _myValueLabel.draw( theGraphics , 0 , 0 , theController );
+ _myHighValueLabel.draw( theGraphics , 0 , 0 , theController );
+ }
+
+ theGraphics.popMatrix( );
+
+ if ( isShowTickMarks ) {
+ theGraphics.pushMatrix( );
+ float x = ( getWidth( ) - handleSize ) / ( getTickMarks( ).size( ) - 1 );
+ theGraphics.translate( handleSize / 2 , getHeight( ) );
+ theGraphics.fill( _myColorTickMark );
+ for ( TickMark tm : getTickMarks( ) ) {
+ tm.draw( theGraphics );
+ theGraphics.translate( x , 0 );
+ }
+ theGraphics.popMatrix( );
+ }
+ }
+ }
+
+ class RangeImageView implements ControllerView< Range > {
+
+ public void display( PGraphics theGraphics , Range theController ) {
+
+ ControlP5.logger( ).log( Level.INFO , "RangeImageDisplay not implemented." );
+
+ }
+
+ }
+
+ @Override public Range setFont( PFont thePFont ) {
+ _myHighValueLabel.setFont( thePFont );
+ return super.setFont( thePFont );
+ }
+
+ @Override public Range setFont( ControlFont theFont ) {
+ _myHighValueLabel.setFont( theFont );
+ return super.setFont( theFont );
+ }
+
+ @Override @ControlP5.Invisible public String toString( ) {
+ return "type:\tRange\n" + super.toString( );
+ }
+
+ @Deprecated public float lowValue( ) {
+ return getLowValue( );
+ }
+
+ @Deprecated public float highValue( ) {
+ return getHighValue( );
+ }
+
+ @Deprecated public float[] arrayValue( ) {
+ return _myArrayValue;
+ }
+
+}
diff --git a/controlP5/ScrollableList.java b/controlP5/ScrollableList.java
new file mode 100644
index 0000000..3953d9f
--- /dev/null
+++ b/controlP5/ScrollableList.java
@@ -0,0 +1,483 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import static main.java.src2.main.java.controlP5.controlP5.ControlP5.b;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+import processing.event.KeyEvent;
+
+/**
+ * A ScrollableList is a list of vertically aligned items
+ * which can be scrolled if required.
+ *
+ * @example controllers/ControlP5scrollableList
+ */
+public class ScrollableList extends Controller< ScrollableList > implements ControlListener {
+
+ private int _myType = DROPDOWN;
+ protected int _myBackgroundColor = 0x00ffffff;
+ protected int itemHeight = 13;
+ protected int barHeight = 10;
+ private float scrollSensitivity = 1;
+ private boolean isOpen = true;
+ protected List< Map< String , Object > > items;
+ protected int itemRange = 5;
+ protected int itemHover = -1;
+ private int itemIndexOffset = 0;
+ private final int itemSpacing = 1;
+ private int _myDirection = PApplet.DOWN;
+ private boolean isBarVisible = true;
+ static public final int LIST = ControlP5.LIST;
+ static public final int DROPDOWN = ControlP5.DROPDOWN;
+ static public final int CHECKBOX = ControlP5.CHECKBOX; /* TODO */
+ static public final int TREE = ControlP5.TREE; /* TODO */
+
+ public ScrollableList( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 99 , 199 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected ScrollableList( ControlP5 theControlP5 , ControllerGroup< ? > theGroup , String theName , int theX , int theY , int theW , int theH ) {
+ super( theControlP5 , theGroup , theName , theX , theY , theW , theH );
+ items = new ArrayList< Map< String , Object > >( );
+ updateHeight( );
+ getValueLabel( ).align( PApplet.LEFT , PApplet.CENTER );
+ }
+
+ public boolean isOpen( ) {
+ return isOpen;
+ }
+
+ public ScrollableList open( ) {
+ return setOpen( true );
+ }
+
+ public ScrollableList close( ) {
+ return setOpen( false );
+ }
+
+ public ScrollableList setOpen( boolean b ) {
+ isOpen = b;
+ return this;
+ }
+
+ @Override public int getHeight( ) {
+ return isOpen ? super.getHeight( ) : barHeight;
+ }
+
+ public ScrollableList setType( int theType ) {
+ _myType = theType;
+ return this;
+ }
+
+ public void setDirection( int theDirection ) {
+ _myDirection = ( theDirection == PApplet.UP ) ? PApplet.UP : PApplet.DOWN;
+ }
+
+ @Override protected boolean inside( ) {
+ /* constrain the bounds of the controller to the
+ * dimensions of the cp5 area, required since
+ * PGraphics as render area has been introduced. */
+ float x0 = PApplet.max( 0 , x( position ) + x( _myParent.getAbsolutePosition( ) ) );
+ float x1 = PApplet.min( cp5.pgw , x( position ) + x( _myParent.getAbsolutePosition( ) ) + getWidth( ) );
+ float y0 = PApplet.max( 0 , y( position ) + y( _myParent.getAbsolutePosition( ) ) );
+ float y1 = PApplet.min( cp5.pgh , y( position ) + y( _myParent.getAbsolutePosition( ) ) + getHeight( ) );
+ if ( y1 < y0 ) {
+ float ty = y0;
+ y0 = y1;
+ y1 = ty;
+ }
+ return ( _myControlWindow.mouseX > x0 && _myControlWindow.mouseX < x1 && _myControlWindow.mouseY > ( y1 < y0 ? y1 : y0 ) && _myControlWindow.mouseY < ( y0 < y1 ? y1 : y0 ) );
+ }
+
+ @Override protected void onRelease( ) {
+ if ( !isDragged ) {
+ if ( getPointer( ).y( ) >= 0 && getPointer( ).y( ) <= barHeight ) {
+ setOpen( !isOpen( ) );
+ } else if ( isOpen ) {
+
+ double n = Math.floor( ( getPointer( ).y( ) - barHeight ) / itemHeight );
+
+ // n += itemRange; /* UP */
+ int index = ( int ) n + itemIndexOffset;
+ updateIndex( index );
+ }
+ }
+ }
+
+ private void updateIndex( int theIndex ) {
+ if ( theIndex >= items.size( ) ) {
+ return;
+ }
+
+ Map m = items.get( theIndex );
+
+ switch ( _myType ) {
+ case ( LIST ):
+ super.setValue( theIndex );
+ for ( Object o : items ) {
+ ( ( Map ) o ).put( "state" , false );
+ }
+ m.put( "state" , !ControlP5.b( m.get( "state" ) ) );
+ break;
+ case ( DROPDOWN ):
+ super.setValue( theIndex );
+ setOpen( false );
+ getCaptionLabel( ).setText( ( m.get( "text" ).toString( ) ) );
+ break;
+ case ( CHECKBOX ):
+ m.put( "state" , !ControlP5.b( m.get( "state" ) ) );
+ break;
+ }
+
+ }
+
+ public ScrollableList setValue( float theValue ) {
+ updateIndex( ( int ) ( theValue ) );
+ return this;
+ }
+
+ @Override protected void onDrag( ) {
+ scroll( getPointer( ).dy( ) );
+ }
+
+ @Override protected void onScroll( int theValue ) {
+ scroll( theValue );
+ }
+
+ private void scroll( int theValue ) {
+ if ( isOpen ) {
+ itemIndexOffset += theValue;
+ itemIndexOffset = ( int ) ( Math.floor( Math.max( 0 , Math.min( itemIndexOffset , items.size( ) - itemRange ) ) ) );
+ itemHover = -2;
+ }
+ }
+
+ @Override protected void onLeave( ) {
+ itemHover = -1;
+ }
+
+ private void updateHover( ) {
+ if ( getPointer( ).y( ) > barHeight ) {
+ double n = Math.floor( ( getPointer( ).y( ) - barHeight ) / itemHeight );
+ itemHover = ( int ) ( itemIndexOffset + n );
+ } else {
+ itemHover = -1;
+ }
+ }
+
+ @Override protected void onEnter( ) {
+ updateHover( );
+ }
+
+ @Override protected void onMove( ) {
+ updateHover( );
+ }
+
+ @Override protected void onEndDrag( ) {
+ updateHover( );
+ }
+
+ private int updateHeight( ) {
+ itemRange = ( PApplet.abs( getHeight( ) ) - ( isBarVisible( ) ? barHeight : 0 ) ) / itemHeight;
+ return itemHeight * ( items.size( ) < itemRange ? items.size( ) : itemRange );
+ }
+
+ public ScrollableList setItemHeight( int theHeight ) {
+ itemHeight = theHeight;
+ updateHeight( );
+ return this;
+ }
+
+ public ScrollableList setBarHeight( int theHeight ) {
+ barHeight = theHeight;
+ updateHeight( );
+ return this;
+ }
+
+ public int getBarHeight( ) {
+ return barHeight;
+ }
+
+ public ScrollableList setScrollSensitivity( float theSensitivity ) {
+ scrollSensitivity = theSensitivity;
+ return this;
+ }
+
+ public ScrollableList setBarVisible( boolean b ) {
+ isBarVisible = b;
+ updateHeight( );
+ return this;
+ }
+
+ public boolean isBarVisible( ) {
+ return isBarVisible;
+ }
+
+ private Map< String , Object > getDefaultItemMap( String theName , Object theValue ) {
+ Map< String , Object > item = new HashMap< String , Object >( );
+ item.put( "name" , theName );
+ item.put( "text" , theName );
+ item.put( "value" , theValue );
+ item.put( "color" , getColor( ) );
+ item.put( "view" , new CDrawable( ) {
+ @Override public void draw( PGraphics theGraphics ) {
+ }
+
+ } );
+ item.put( "state" , false );
+ return item;
+ }
+
+ public ScrollableList addItem( String theName , Object theValue ) {
+ Map< String , Object > item = getDefaultItemMap( theName , theValue );
+ items.add( item );
+ return this;
+ }
+
+ public ScrollableList addItems( String[] theItems ) {
+ addItems( Arrays.asList( theItems ) );
+ return this;
+ }
+
+ public ScrollableList addItems( List< String > theItems ) {
+ for ( int i = 0 ; i < theItems.size( ) ; i++ ) {
+ addItem(theItems.get( i ), i );
+ }
+ return this;
+ }
+
+ public ScrollableList addItems( Map< String , Object > theItems ) {
+ for ( Map.Entry< String , Object > item : theItems.entrySet( ) ) {
+ addItem( item.getKey( ) , item.getValue( ) );
+ }
+ return this;
+ }
+
+ public ScrollableList setItems( String[] theItems ) {
+ setItems( Arrays.asList( theItems ) );
+ return this;
+ }
+
+ public ScrollableList setItems( List< String > theItems ) {
+ items.clear( );
+ return addItems( theItems );
+ }
+
+ public ScrollableList setItems( Map< String , Object > theItems ) {
+ items.clear( );
+ return addItems( theItems );
+ }
+
+ public ScrollableList removeItems( List< String > theItems ) {
+ for ( String s : theItems ) {
+ removeItem( s );
+ }
+ return this;
+ }
+
+ public ScrollableList removeItem( String theName ) {
+ if ( theName != null ) {
+
+ List l = new ArrayList( );
+ for ( Map m : items ) {
+ if ( theName.equals( m.get( "name" ) ) ) {
+ l.add( m );
+ }
+ }
+ items.removeAll( l );
+ }
+ return this;
+ }
+
+ public void updateItemIndexOffset( ) {
+ int m1 = items.size( ) > itemRange ? ( itemIndexOffset + itemRange ) : items.size( );
+ int n = ( m1 - items.size( ) );
+ if ( n >= 0 ) {
+ itemIndexOffset -= n;
+ }
+ }
+
+ public Map< String , Object > getItem( int theIndex ) {
+ return items.get( theIndex );
+ }
+
+ public Map< String , Object > getItem( String theName ) {
+ if ( theName != null ) {
+ for ( Map< String , Object > o : items ) {
+ if ( theName.equals( o.get( "name" ) ) ) {
+ return o;
+ }
+ }
+ }
+ return Collections.EMPTY_MAP;
+ }
+
+ public List getItems( ) {
+ return Collections.unmodifiableList( items );
+ }
+
+ public ScrollableList clear( ) {
+ for ( int i = items.size( ) - 1 ; i >= 0 ; i-- ) {
+ items.remove( i );
+ }
+ items.clear( );
+ itemIndexOffset = 0;
+ return this;
+ }
+
+ @Override public void controlEvent( ControlEvent theEvent ) {
+ // TODO Auto-generated method stub
+ }
+
+ public ScrollableList setBackgroundColor( int theColor ) {
+ _myBackgroundColor = theColor;
+ return this;
+ }
+
+ public int getBackgroundColor( ) {
+ return _myBackgroundColor;
+ }
+
+ @Override @ControlP5.Invisible public ScrollableList updateDisplayMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = new ScrollableListView( );
+ break;
+ case ( IMAGE ):
+ case ( SPRITE ):
+ case ( CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ static public class ScrollableListView implements ControllerView< ScrollableList > {
+
+ public void display( PGraphics g , ScrollableList c ) {
+
+ // setHeight( -200 ); /* UP */
+
+ g.noStroke( );
+
+ if ( c.isBarVisible( ) ) {
+ boolean b = c.itemHover == -1 && c.isInside && !c.isDragged;
+ g.fill( b ? c.getColor( ).getForeground( ) : c.getColor( ).getBackground( ) );
+ g.rect( 0 , 0 , c.getWidth( ) , c.barHeight );
+ g.pushMatrix( );
+ g.translate( c.getWidth( ) - 8 , c.barHeight / 2 - 2 );
+ g.fill( c.getColor( ).getCaptionLabel( ) );
+ if ( c.isOpen( ) ) {
+ g.triangle( -3 , 0 , 3 , 0 , 0 , 3 );
+ } else {
+ g.triangle( -3 , 3 , 3 , 3 , 0 , 0 );
+ }
+ g.popMatrix( );
+
+ c.getCaptionLabel( ).draw( g , 4 , c.barHeight / 2 );
+
+ }
+
+ if ( c.isOpen( ) ) {
+ int bar = ( c.isBarVisible( ) ? c.barHeight : 0 );
+ int h = ( ( c.updateHeight( ) ) );
+ g.pushMatrix( );
+ // g.translate( 0 , - ( h + bar +
+ // c.itemSpacing ) ); /* UP */
+ g.fill( c.getBackgroundColor( ) );
+ g.rect( 0 , bar , c.getWidth( ) , h );
+ g.pushMatrix( );
+ g.translate( 0 , ( bar == 0 ? 0 : ( c.barHeight + c.itemSpacing ) ) );
+ /* draw visible items */
+ c.updateItemIndexOffset( );
+ int m0 = c.itemIndexOffset;
+ int m1 = c.items.size( ) > c.itemRange ? ( c.itemIndexOffset + c.itemRange ) : c.items.size( );
+ for ( int i = m0 ; i < m1 ; i++ ) {
+ Map< String , Object > item = c.items.get( i );
+ CColor color = ( CColor ) item.get( "color" );
+ g.fill( ( ControlP5.b( item.get( "state" ) ) ) ? color.getActive( ) : ( i == c.itemHover ) ? ( c.isMousePressed ? color.getActive( ) : color.getForeground( ) ) : color.getBackground( ) );
+ g.rect( 0 , 0 , c.getWidth( ) , c.itemHeight - 1 );
+ c.getValueLabel( ).set( item.get( "text" ).toString( ) ).draw( g , 4 , c.itemHeight / 2 );
+ g.translate( 0 , c.itemHeight );
+ }
+ g.popMatrix( );
+
+ if ( c.isInside ) {
+ int m = c.items.size( ) - c.itemRange;
+ if ( m > 0 ) {
+ g.fill( c.getColor( ).getCaptionLabel( ) );
+ g.pushMatrix( );
+ int s = 4; /* spacing */
+ int s2 = s / 2;
+ g.translate( c.getWidth( ) - s , c.barHeight );
+ int len = ( int ) PApplet.map( ( float ) Math.log( m * 10 ) , 0 , 10 , h , 0 );
+ int pos = ( int ) ( PApplet.map( c.itemIndexOffset , 0 , m , s2 , h - len - s2 ) );
+ g.rect( 0 , pos , s2 , len );
+ g.popMatrix( );
+ }
+ }
+ g.popMatrix( );
+ }
+
+ }
+
+ }
+
+ public void keyEvent( KeyEvent theKeyEvent ) {
+ if ( isInside && theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
+ switch ( theKeyEvent.getKeyCode( ) ) {
+ case (UP):
+ scroll( theKeyEvent.isAltDown( ) ? -itemIndexOffset : theKeyEvent.isShiftDown( ) ? -10 : -1 );
+ updateHover( );
+ break;
+ case (DOWN):
+ scroll( theKeyEvent.isAltDown( ) ? items.size( ) - itemRange : theKeyEvent.isShiftDown( ) ? 10 : 1 );
+ updateHover( );
+ break;
+ case (LEFT):
+ break;
+ case (RIGHT):
+ break;
+ case (ENTER):
+ onRelease( );
+ break;
+ }
+ }
+ }
+ /* TODO keycontrol: arrows, return dragging moving items
+ * sorting custom view custom event types */
+}
diff --git a/controlP5/Slider.java b/controlP5/Slider.java
new file mode 100755
index 0000000..80f202d
--- /dev/null
+++ b/controlP5/Slider.java
@@ -0,0 +1,648 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.ArrayList;
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+/**
+ * A slider is either used horizontally or vertically. when adding a slider to controlP5, the width
+ * is compared against the height. if the width is bigger, you get a horizontal slider, is the
+ * height bigger, you get a vertical slider. a slider can have a fixed slider handle (one end of the
+ * slider is fixed to the left or bottom side of the controller), or a flexible slider handle (a
+ * handle you can drag).
+ *
+ *
+ * @example controllers/ControlP5slider
+ */
+public class Slider extends Controller< Slider > {
+
+ public final static int FIX = 1;
+ public final static int FLEXIBLE = 0;
+ protected int _mySliderMode = FIX;
+ protected float _myValuePosition;
+ protected int _myHandleSize = 0;
+ protected int _myDefaultHandleSize = 10;
+ protected int triggerId = PRESSED;
+ protected ArrayList< TickMark > _myTickMarks = new ArrayList< TickMark >( );
+ protected boolean isShowTickMarks;
+ protected boolean isSnapToTickMarks;
+ protected static int autoWidth = 99;
+ protected static int autoHeight = 9;
+ protected float scrollSensitivity = 0.1f;
+ protected int _myColorTickMark = 0xffffffff;
+ private SliderView _myView;
+ protected float _myMinReal = 0;
+ protected float _myMaxReal = 1;
+ protected float _myInternalValue = 0;
+
+ /**
+ * Convenience constructor to extend Slider.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Slider( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 100 , 0 , 0 , 0 , autoWidth , autoHeight );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ public Slider( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , float theMin , float theMax , float theDefaultValue , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+
+ _myMin = 0;
+ _myMax = 1;
+
+ // with _myMinReal and _myMaxReal the range of values can now range
+ // from big to small (e.g. 255 to 0) as well as from small to big (e.g. 0 to 255)
+ _myMinReal = theMin;
+ _myMaxReal = theMax;
+
+ _myValue = PApplet.map( theDefaultValue , _myMinReal , _myMaxReal , 0 , 1 );
+
+ _myCaptionLabel = new Label( cp5 , theName ).setColor( color.getCaptionLabel( ) );
+ _myValueLabel = new Label( cp5 , String.valueOf(getValue())).setColor( color.getValueLabel( ) );
+ setSliderMode( FIX );
+
+ }
+
+ @ControlP5.Invisible @Override public void init( ) {
+ // need to override init here since _myValue will only be a
+ // normalized value here but _myDefaultValue needs to be absolute.
+ // by normalizing _myValue the range of values can be from 'big-to-small'
+ // as well as from 'small-to-big'
+ // in order not to break anything, init() will be overwritten here.
+
+ _myDefaultValue = getValue( );
+ cp5.getControlBroadcaster( ).plug( cp5.papplet , this , _myName );
+ initControllerValue( );
+ isInit = cp5.isAutoInitialization;
+ setValue( _myDefaultValue );
+ isInit = true;
+ updateDisplayMode( DEFAULT );
+
+ }
+
+ /**
+ * use the slider mode to set the mode of the slider bar, which can be Slider.FLEXIBLE or
+ * Slider.FIX
+ *
+ * @param theMode
+ * int
+ */
+ public Slider setSliderMode( int theMode ) {
+ _myView = ( getWidth( ) > getHeight( ) ) ? new SliderViewH( ) : new SliderViewV( );
+ _myControllerView = ( getWidth( ) > getHeight( ) ) ? new SliderViewH( ) : new SliderViewV( );
+ _mySliderMode = theMode;
+ if ( _mySliderMode == FLEXIBLE ) {
+ _myHandleSize = ( _myDefaultHandleSize >= getHeight( ) / 2 ) ? _myDefaultHandleSize / 2 : _myDefaultHandleSize;
+ } else {
+ _myHandleSize = 0;
+ }
+ _myView.updateUnit( );
+ setValue( PApplet.map( _myValue , 0 , 1 , _myMinReal , _myMaxReal ) );
+ return this;
+ }
+
+ public int getSliderMode( ) {
+ return _mySliderMode;
+ }
+
+ /**
+ * sets the size of the Slider handle, by default it is set to either the width or height of the
+ * slider.
+ *
+ * @param theSize
+ */
+ public Slider setHandleSize( int theSize ) {
+ _myDefaultHandleSize = theSize;
+ setSliderMode( _mySliderMode );
+ return this;
+ }
+
+ public int getHandleSize( ) {
+ return _myHandleSize;
+ }
+
+ /**
+ * @see ControllerInterface.updateInternalEvents
+ *
+ */
+ @ControlP5.Invisible public Slider updateInternalEvents( PApplet theApplet ) {
+ if ( isVisible ) {
+ if ( isMousePressed && !cp5.isAltDown( ) ) {
+ _myView.updateInternalEvents( theApplet );
+ }
+ }
+ return this;
+ }
+
+ /**
+ * the trigger event is set to Slider.PRESSED by default but can be changed to Slider.RELEASE so
+ * that events are triggered when the slider is released.
+ *
+ * @param theEventID
+ */
+ public Slider setTriggerEvent( int theEventID ) {
+ triggerId = theEventID;
+ return this;
+ }
+
+ /**
+ * returns the current trigger event which is either Slider.PRESSED or Slider.RELEASE
+ *
+ * @return int
+ */
+ public int getTriggerEvent( ) {
+ return triggerId;
+ }
+
+ @Override protected void mouseReleasedOutside( ) {
+ mouseReleased( );
+ }
+
+ @Override protected void mouseReleased( ) {
+ if ( triggerId == RELEASE ) {
+ _myView.update( );
+ broadcast( FLOAT );
+ }
+ }
+
+ protected Slider snapValue( float theValue ) {
+ if ( isSnapToTickMarks ) {
+ _myValuePosition = ( ( _myValue - _myMin ) / _myUnit );
+ _myView.setSnapValue( );
+ }
+ return this;
+ }
+
+ public float getValuePosition( ) {
+ return _myValuePosition;
+ }
+
+ /**
+ * set the value of the slider.
+ *
+ * @param theValue
+ * float
+ */
+ @Override public Slider setValue( float theValue ) {
+ if ( isMousePressed && theValue == getValue( ) ) {
+ return this;
+ }
+ _myInternalValue = theValue;
+ _myValue = PApplet.map( theValue , _myMinReal , _myMaxReal , 0 , 1 );
+ snapValue( _myValue );
+ _myValue = ( _myValue <= _myMin ) ? _myMin : _myValue;
+ _myValue = ( _myValue >= _myMax ) ? _myMax : _myValue;
+ _myValuePosition = ( ( _myValue - _myMin ) / _myUnit );
+ _myValueLabel.set( adjustValue( getValue( ) ) );
+ if ( triggerId == PRESSED ) {
+ broadcast( FLOAT );
+ }
+ return this;
+ }
+
+ @Override public float getValue( ) {
+ return PApplet.map( _myValue , 0 , 1 , _myMinReal , _myMaxReal );
+ }
+
+ /**
+ * assigns a random value to the slider.
+ */
+ public Slider shuffle( ) {
+ float r = ( float ) Math.random( );
+ setValue( PApplet.map( r , 0 , 1 , _myMinReal , _myMaxReal ) );
+ return this;
+ }
+
+ /**
+ * sets the sensitivity for the scroll behavior when using the mouse wheel or the scroll
+ * function of a multi-touch track pad. The smaller the value (closer to 0) the higher the
+ * sensitivity. by default this value is set to 0.1
+ *
+ * @param theValue
+ * @return Slider
+ */
+ public Slider setScrollSensitivity( float theValue ) {
+ scrollSensitivity = theValue;
+ return this;
+ }
+
+ /**
+ * changes the value of the slider when hovering and using the mouse wheel or the scroll
+ * function of a multi-touch track pad.
+ *
+ * @param theRotationValue
+ * @return Slider
+ */
+ @ControlP5.Invisible public Slider scrolled( int theRotationValue ) {
+ if ( isVisible ) {
+ float f = _myValue;
+ float steps = isSnapToTickMarks ? ( 1.0f / getNumberOfTickMarks( ) ) : scrollSensitivity * 0.1f;
+ f += ( _myMax - _myMin ) * ( -theRotationValue * steps );
+ setValue( PApplet.map( f , 0 , 1 , _myMinReal , _myMaxReal ) );
+ if ( triggerId == RELEASE ) {
+ broadcast( FLOAT );
+ }
+ }
+ return this;
+ }
+
+ @Override public Slider update( ) {
+ return setValue( PApplet.map( _myValue , 0 , 1 , _myMinReal , _myMaxReal ) );
+ }
+
+ /**
+ * sets the minimum value of the slider.
+ *
+ * @param theValue
+ * float
+ */
+ @Override public Slider setMin( float theValue ) {
+ float f = getValue( );
+ _myMinReal = theValue;
+ _myValue = PApplet.map( f , _myMinReal , _myMaxReal , 0 , 1 );
+ setSliderMode( _mySliderMode );
+ return this;
+ }
+
+ /**
+ * set the maximum value of the slider.
+ *
+ * @param theValue
+ * float
+ */
+ @Override public Slider setMax( float theValue ) {
+ float f = getValue( );
+ _myMaxReal = theValue;
+ _myValue = PApplet.map( f , _myMinReal , _myMaxReal , 0 , 1 );
+ setSliderMode( _mySliderMode );
+ return this;
+ }
+
+ @Override public float getMin( ) {
+ return _myMinReal;
+ }
+
+ @Override public float getMax( ) {
+ return _myMaxReal;
+ }
+
+ public Slider setRange( float theMin , float theMax ) {
+ float f = _myInternalValue;
+ _myMinReal = theMin;
+ _myMaxReal = theMax;
+ _myValue = PApplet.map( f , _myMinReal , _myMaxReal , 0 , 1 );
+ setSliderMode( _mySliderMode );
+ return this;
+ }
+
+ /**
+ * set the width of the slider.
+ *
+ * @param theValue
+ * int
+ */
+ @Override public Slider setWidth( int theValue ) {
+ super.setWidth( theValue );
+ setSliderMode( _mySliderMode );
+ return this;
+ }
+
+ /**
+ * set the height of the slider.
+ *
+ * @param theValue
+ * int
+ */
+ @Override public Slider setHeight( int theValue ) {
+ super.setHeight( theValue );
+ setSliderMode( _mySliderMode );
+ return this;
+ }
+
+ @Override public Slider setSize( int theWidth , int theHeight ) {
+ super.setWidth( theWidth );
+ setHeight( theHeight );
+ _myView = ( getWidth( ) > getHeight( ) ) ? new SliderViewH( ) : new SliderViewV( );
+ return this;
+ }
+
+ /* TODO new implementations follow: http://www.ibm.com/developerworks/java/library/j-dynui/ take
+ * interface builder as reference */
+ protected Slider setTickMarks( ) {
+ return this;
+ }
+
+ /**
+ * sets the number of tickmarks for a slider, by default tick marks are turned off.
+ *
+ * @param theNumber
+ */
+ public Slider setNumberOfTickMarks( int theNumber ) {
+ _myTickMarks.clear( );
+ if ( theNumber > 0 ) {
+ for ( int i = 0 ; i < theNumber ; i++ ) {
+ _myTickMarks.add( new TickMark( this ) );
+ }
+ showTickMarks( true );
+ snapToTickMarks( true );
+ setHandleSize( 20 );
+ } else {
+ showTickMarks( false );
+ snapToTickMarks( false );
+ setHandleSize( _myDefaultHandleSize );
+ }
+ setValue( PApplet.map( _myValue , 0 , 1 , _myMinReal , _myMaxReal ) );
+ return this;
+ }
+
+ /**
+ * returns the amount of tickmarks available for a slider
+ *
+ * @return int
+ */
+ public int getNumberOfTickMarks( ) {
+ return _myTickMarks.size( );
+ }
+
+ /**
+ * shows or hides tickmarks for a slider
+ *
+ * @param theFlag
+ * @return Slider
+ */
+ public Slider showTickMarks( boolean theFlag ) {
+ isShowTickMarks = theFlag;
+ return this;
+ }
+
+ /**
+ * enables or disables snap to tick marks.
+ *
+ * @param theFlag
+ * @return Slider
+ */
+ public Slider snapToTickMarks( boolean theFlag ) {
+ isSnapToTickMarks = theFlag;
+ return this;
+ }
+
+ /**
+ * returns an instance of a tickmark by index.
+ *
+ * @see TickMark
+ * @param theIndex
+ * @return
+ */
+ public TickMark getTickMark( int theIndex ) {
+ if ( theIndex >= 0 && theIndex < _myTickMarks.size( ) ) {
+ return _myTickMarks.get( theIndex );
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * returns an ArrayList of available tick marks for a slider.
+ *
+ * @return ArrayList
+ */
+ public ArrayList< TickMark > getTickMarks( ) {
+ return _myTickMarks;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override @ControlP5.Invisible public Slider linebreak( ) {
+ cp5.linebreak( this , true , autoWidth , autoHeight , autoSpacing );
+ return this;
+ }
+
+ /**
+ * sets the color of tick marks if enabled. by default the color is set to white.
+ *
+ * @param theColor
+ * @return Slider
+ */
+ public Slider setColorTickMark( int theColor ) {
+ _myColorTickMark = theColor;
+ return this;
+ }
+
+ public int getDirection( ) {
+ return ( _myView instanceof SliderViewH ) ? HORIZONTAL : VERTICAL;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override @ControlP5.Invisible public Slider updateDisplayMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = ( getWidth( ) > getHeight( ) ) ? new SliderViewH( ) : new SliderViewV( );
+ break;
+ case ( IMAGE ):
+ // TODO
+ break;
+ case ( SPRITE ):
+ // TODO
+ break;
+ case ( CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ private abstract class SliderView implements ControllerView< Slider > {
+
+ abstract void updateInternalEvents( PApplet theApplet );
+
+ abstract void update( );
+
+ abstract void updateUnit( );
+
+ abstract void setSnapValue( );
+
+ }
+
+ private class SliderViewV extends SliderView {
+
+ SliderViewV( ) {
+ _myCaptionLabel.align( LEFT , BOTTOM_OUTSIDE ).setPadding( 0 , Label.paddingY );
+ _myValueLabel.set(adjustValue(getValue())).align( RIGHT_OUTSIDE , TOP );
+ }
+
+ void setSnapValue( ) {
+ float n = PApplet.round( PApplet.map( _myValuePosition , 0 , getHeight( ) , 0 , _myTickMarks.size( ) - 1 ) );
+ _myValue = PApplet.map( n , 0 , _myTickMarks.size( ) - 1 , _myMin , _myMax );
+ }
+
+ void updateUnit( ) {
+ _myUnit = ( _myMax - _myMin ) / ( getHeight( ) - _myHandleSize );
+ }
+
+ void update( ) {
+ float f = _myMin + ( - ( _myControlWindow.mouseY - ( y( _myParent.getAbsolutePosition( ) ) + y( position ) ) - getHeight( ) ) ) * _myUnit;
+ setValue( PApplet.map( f , 0 , 1 , _myMinReal , _myMaxReal ) );
+ }
+
+ void updateInternalEvents( PApplet theApplet ) {
+ float f = _myMin + ( - ( _myControlWindow.mouseY - ( y( _myParent.getAbsolutePosition( ) ) + y( position ) ) - getHeight( ) ) ) * _myUnit;
+ setValue( PApplet.map( f , 0 , 1 , _myMinReal , _myMaxReal ) );
+ }
+
+ public void display( PGraphics theGraphics , Slider theController ) {
+ theGraphics.fill( getColor( ).getBackground( ) );
+ theGraphics.noStroke( );
+ if ( ( getColor( ).getBackground( ) >> 24 & 0xff ) > 0 ) {
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+ }
+ theGraphics.fill( getIsInside( ) ? getColor( ).getActive( ) : getColor( ).getForeground( ) );
+ if ( getSliderMode( ) == FIX ) {
+ theGraphics.rect( 0 , getHeight( ) , getWidth( ) , -getValuePosition( ) );
+ } else {
+ if ( isShowTickMarks ) {
+ theGraphics.triangle( getWidth( ) , getHeight( ) - getValuePosition( ) , getWidth( ) , getHeight( ) - getValuePosition( ) - getHandleSize( ) , 0 , getHeight( ) - getValuePosition( ) - getHandleSize( ) / 2 );
+ } else {
+ theGraphics.rect( 0 , getHeight( ) - getValuePosition( ) - getHandleSize( ) , getWidth( ) , getHandleSize( ) );
+ }
+ }
+
+ if ( isLabelVisible ) {
+ getCaptionLabel( ).draw( theGraphics , 0 , 0 , theController );
+ theGraphics.pushMatrix( );
+ theGraphics.translate( 0 , ( int ) PApplet.map( _myValue , _myMax , _myMin , 0 , getHeight( ) - _myValueLabel.getHeight( ) ) );
+ getValueLabel( ).draw( theGraphics , 0 , 0 , theController );
+ theGraphics.popMatrix( );
+ }
+
+ if ( isShowTickMarks ) {
+ theGraphics.pushMatrix( );
+ theGraphics.pushStyle( );
+ theGraphics.translate( -4 , ( getSliderMode( ) == FIX ) ? 0 : getHandleSize( ) / 2 );
+ theGraphics.fill( _myColorTickMark );
+ float x = ( getHeight( ) - ( ( getSliderMode( ) == FIX ) ? 0 : getHandleSize( ) ) ) / ( getTickMarks( ).size( ) - 1 );
+ for ( TickMark tm : getTickMarks( ) ) {
+ tm.draw( theGraphics , getDirection( ) );
+ theGraphics.translate( 0 , x );
+ }
+ theGraphics.popStyle( );
+ theGraphics.popMatrix( );
+ }
+ }
+ }
+
+ private class SliderViewH extends SliderView {
+
+ SliderViewH( ) {
+ _myCaptionLabel.align( RIGHT_OUTSIDE , CENTER );
+ _myValueLabel.set(adjustValue(getValue())).align( LEFT , CENTER );
+ }
+
+ void setSnapValue( ) {
+ float n = PApplet.round( PApplet.map( _myValuePosition , 0 , getWidth( ) , 0 , _myTickMarks.size( ) - 1 ) );
+ _myValue = PApplet.map( n , 0 , _myTickMarks.size( ) - 1 , _myMin , _myMax );
+ }
+
+ void updateUnit( ) {
+ _myUnit = ( _myMax - _myMin ) / ( getWidth( ) - _myHandleSize );
+ }
+
+ void update( ) {
+ float f = _myMin + ( _myControlWindow.mouseX - ( x( _myParent.getAbsolutePosition( ) ) + x( position ) ) ) * _myUnit;
+ setValue( PApplet.map( f , 0 , 1 , _myMinReal , _myMaxReal ) );
+ }
+
+ void updateInternalEvents( PApplet theApplet ) {
+ float f = _myMin + ( _myControlWindow.mouseX - ( x( _myParent.getAbsolutePosition( ) ) + x( position ) ) ) * _myUnit;
+ setValue( PApplet.map( f , 0 , 1 , _myMinReal , _myMaxReal ) );
+ }
+
+ public void display( PGraphics theGraphics , Slider theController ) {
+ theGraphics.fill( getColor( ).getBackground( ) );
+ theGraphics.noStroke( );
+ if ( ( getColor( ).getBackground( ) >> 24 & 0xff ) > 0 ) {
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+ }
+ theGraphics.fill( getIsInside( ) ? getColor( ).getActive( ) : getColor( ).getForeground( ) );
+ if ( getSliderMode( ) == FIX ) {
+ theGraphics.rect( 0 , 0 , getValuePosition( ) , getHeight( ) );
+ } else {
+ if ( isShowTickMarks ) {
+ theGraphics.triangle( getValuePosition( ) , 0 , getValuePosition( ) + getHandleSize( ) , 0 , getValuePosition( ) + _myHandleSize / 2 , getHeight( ) );
+ } else {
+ theGraphics.rect( getValuePosition( ) , 0 , getHandleSize( ) , getHeight( ) );
+ }
+
+ }
+ theGraphics.fill( 255 );
+
+ if ( isLabelVisible ) {
+ getValueLabel( ).draw( theGraphics , 0 , 0 , theController );
+ getCaptionLabel( ).draw( theGraphics , 0 , 0 , theController );
+ }
+
+ if ( isShowTickMarks ) {
+ theGraphics.pushMatrix( );
+ // theGraphics.pushStyle( );
+ theGraphics.translate( ( getSliderMode( ) == FIX ) ? 0 : getHandleSize( ) / 2 , getHeight( ) );
+ theGraphics.fill( _myColorTickMark );
+ theGraphics.noStroke( );
+ float x = ( getWidth( ) - ( ( getSliderMode( ) == FIX ) ? 0 : getHandleSize( ) ) ) / ( getTickMarks( ).size( ) - 1 );
+ for ( TickMark tm : getTickMarks( ) ) {
+ tm.draw( theGraphics , getDirection( ) );
+ theGraphics.translate( x , 0 );
+ }
+ // theGraphics.popStyle( );
+ theGraphics.popMatrix( );
+ }
+ }
+ }
+
+ @Deprecated public void setSliderBarSize( int theSize ) {
+ _myDefaultHandleSize = theSize;
+ setSliderMode( _mySliderMode );
+ }
+
+ /**
+ * @see Slider#setScrollSensitivity(float)
+ *
+ * @param theValue
+ * @return Slider
+ */
+ @Deprecated public Slider setSensitivity( float theValue ) {
+ return setScrollSensitivity( theValue );
+ }
+
+}
diff --git a/controlP5/Slider2D.java b/controlP5/Slider2D.java
new file mode 100755
index 0000000..7168440
--- /dev/null
+++ b/controlP5/Slider2D.java
@@ -0,0 +1,287 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+/**
+ * The Slider2D allows to control a handle within a 2D area. This controller returns an arrayValue
+ * with the current xy position of its handle.
+ *
+ * @author andreas schlegel
+ *
+ * @example controllers/ControlP5slider2D
+ *
+ */
+public class Slider2D extends Controller< Slider2D > {
+
+ protected int cursorWidth = 6 , cursorHeight = 6;
+ protected float cursorX , cursorY;
+ protected float _myMinX , _myMinY;
+ protected float _myMaxX , _myMaxY;
+ public boolean isCrosshairs = true;
+
+ private String _myValueLabelSeparator = ",";
+
+ /**
+ * Convenience constructor to extend Slider2D.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Slider2D( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 99 , 9 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected Slider2D( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ _myArrayValue = new float[] { 0.0f , 0.0f };
+ _myMinX = 0;
+ _myMinY = 0;
+ _myMaxX = theWidth;
+ _myMaxY = theHeight;
+ getCaptionLabel( ).setPadding( 0 , Label.paddingY ).align( LEFT , BOTTOM_OUTSIDE );
+ getValueLabel( ).setPadding( 0 , Label.paddingY ).align( RIGHT , BOTTOM_OUTSIDE );
+ }
+
+ /* (non-Javadoc)
+ *
+ * @see main.java.src2.main.java.controlP5.controlp5.Controller#updateInternalEvents(processing.core.PApplet) */
+ @ControlP5.Invisible public Slider2D updateInternalEvents( PApplet theApplet ) {
+ if ( isInside( ) ) {
+ if ( !cp5.isAltDown( ) ) {
+ float tX = PApplet.constrain( _myControlWindow.mouseX - ( x( _myParent.getAbsolutePosition( ) ) + x( position ) ) , 0 , getWidth( ) - cursorWidth );
+ float tY = PApplet.constrain( _myControlWindow.mouseY - ( y( _myParent.getAbsolutePosition( ) ) + y( position ) ) , 0 , getHeight( ) - cursorHeight );
+ if ( isMousePressed ) {
+ cursorX = tX;
+ cursorY = tY;
+ updateValue( );
+ }
+ }
+ }
+ return this;
+ }
+
+ Slider2D updateValue( ) {
+ return setValue( 0 );
+ }
+
+ public Slider2D setMinMax( float theMinX , float theMinY , float theMaxX , float theMaxY ) {
+ _myMinX = theMinX;
+ _myMinY = theMinY;
+ _myMaxX = theMaxX;
+ _myMaxY = theMaxY;
+ return setValue( _myArrayValue[ 0 ] , _myArrayValue[ 1 ] );
+ }
+
+ /**
+ * sets the minimum value for the x-axis
+ *
+ * @param theMinX
+ * @return Slider2D
+ */
+ public Slider2D setMinX( float theMinX ) {
+ _myMinX = theMinX;
+ return updateValue( );
+ }
+
+ /**
+ * sets the minimum value for the y-axis
+ *
+ * @param theMinY
+ * @return Slider2D
+ */
+ public Slider2D setMinY( float theMinY ) {
+ _myMinY = theMinY;
+ return updateValue( );
+ }
+
+ /**
+ * sets the maximum value for the x-axis
+ *
+ * @param theMaxX
+ * @return Slider2D
+ */
+ public Slider2D setMaxX( float theMaxX ) {
+ _myMaxX = theMaxX;
+ return updateValue( );
+ }
+
+ /**
+ * sets the maximum value for the y-axis
+ *
+ * @param theMaxY
+ * @return Slider2D
+ */
+ public Slider2D setMaxY( float theMaxY ) {
+ _myMaxY = theMaxY;
+ return updateValue( );
+ }
+
+ public float getMinX( ) {
+ return _myMinX;
+ }
+
+ public float getMinY( ) {
+ return _myMinY;
+ }
+
+ public float getMaxX( ) {
+ return _myMaxX;
+ }
+
+ public float getMaxY( ) {
+ return _myMaxY;
+ }
+
+ public float getCursorX( ) {
+ return cursorX;
+ }
+
+ public float getCursorY( ) {
+ return cursorY;
+ }
+
+ public float getCursorWidth( ) {
+ return cursorWidth;
+ }
+
+ public float getCursorHeight( ) {
+ return cursorHeight;
+ }
+
+ public Slider2D disableCrosshair( ) {
+ isCrosshairs = false;
+ return this;
+ }
+
+ public Slider2D enableCrosshair( ) {
+ isCrosshairs = true;
+ return this;
+ }
+
+ /* (non-Javadoc) TODO see https://forum.processing.org/topic/controlp5-slider2d-questions
+ *
+ * @see main.java.src2.main.java.controlP5.controlp5.Controller#setArrayValue(float[]) */
+ @Override public Slider2D setArrayValue( float[] theArray ) {
+ _myArrayValue = theArray;
+ float rX = ( getWidth( ) - cursorWidth ) / ( _myMaxX - _myMinX );
+ float rY = ( getHeight( ) - cursorHeight ) / ( _myMaxY - _myMinY );
+ cursorX = PApplet.constrain( theArray[ 0 ] * rX , 0 , getWidth( ) - cursorWidth );
+ cursorY = PApplet.constrain( theArray[ 1 ] * rY , 0 , getHeight( ) - cursorHeight );
+ return updateValue( );
+ }
+
+ public float[] getArrayValue( ) {
+ return _myArrayValue;
+ }
+
+ public Slider2D setCursorX( float theValue ) {
+ return setArrayValue( new float[] { theValue , getArrayValue( )[ 1 ] } );
+ }
+
+ public Slider2D setCursorY( float theValue ) {
+ return setArrayValue( new float[] { getArrayValue( )[ 0 ] , theValue } );
+ }
+
+ /* (non-Javadoc)
+ *
+ * @see main.java.src2.main.java.controlP5.controlp5.Controller#setValue(float) */
+ public Slider2D setValue( float theValue ) {
+ _myArrayValue[ 0 ] = cursorX / ( ( float ) ( getWidth( ) - cursorWidth ) / ( float ) getWidth( ) );
+ _myArrayValue[ 1 ] = cursorY / ( ( float ) ( getHeight( ) - cursorHeight ) / ( float ) getHeight( ) );
+ _myArrayValue[ 0 ] = PApplet.map( _myArrayValue[ 0 ] , 0 , getWidth( ) , _myMinX , _myMaxX );
+ _myArrayValue[ 1 ] = PApplet.map( _myArrayValue[ 1 ] , 0 , getHeight( ) , _myMinY , _myMaxY );
+ _myValueLabel.set( adjustValue( _myArrayValue[ 0 ] , 0 ) + _myValueLabelSeparator + adjustValue( _myArrayValue[ 1 ] , 0 ) );
+ broadcast( FLOAT );
+ return this;
+ }
+
+ public Slider2D setValue( float theValue1 , float theValue2 ) {
+ cursorX = PApplet.map( theValue1 , _myMinX , _myMaxX , 0 , getWidth( ) - cursorWidth );
+ cursorY = PApplet.map( theValue2 , _myMinY , _myMaxY , 0 , getHeight( ) - cursorHeight );
+ return setValue( 0 );
+ }
+
+ /**
+ * assigns a random value to the controller.
+ */
+ public Slider2D shuffle( ) {
+ float rX = ( float ) Math.random( );
+ float rY = ( float ) Math.random( );
+ _myArrayValue[ 0 ] = rX * getWidth( );
+ _myArrayValue[ 0 ] = rY * getHeight( );
+ return setValue( 0 );
+ }
+
+ public void setValueLabelSeparator( String theSeparator ) {
+ _myValueLabelSeparator = theSeparator;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override @ControlP5.Invisible public Slider2D updateDisplayMode( int theMode ) {
+ _myDisplayMode = theMode;
+ switch ( theMode ) {
+ case ( DEFAULT ):
+ _myControllerView = new Slider2DView( );
+ break;
+ case ( IMAGE ):
+ case ( SPRITE ):
+ case ( CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ class Slider2DView implements ControllerView< Slider2D > {
+
+ public void display( PGraphics theGraphics , Slider2D theController ) {
+
+ theGraphics.noStroke( );
+
+ theGraphics.fill( theController.getColor( ).getBackground( ) );
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+
+ theGraphics.fill( theController.isInside ? theController.getColor( ).getActive( ) : theController.getColor( ).getForeground( ) );
+ theGraphics.rect( ( int ) getCursorX( ) , ( int ) getCursorY( ) , ( int ) getCursorWidth( ) , ( int ) getCursorHeight( ) );
+
+ if ( isCrosshairs ) {
+ theGraphics.rect( 0 , ( int ) ( getCursorY( ) + getCursorHeight( ) / 2 ) , getWidth( ), 1 );
+ theGraphics.rect( ( int ) ( getCursorX( ) + getCursorWidth( ) / 2 ) , 0 , 1 , getHeight( ));
+ }
+
+ getCaptionLabel( ).draw( theGraphics , 0 , 0 , theController );
+ getValueLabel( ).draw( theGraphics , 0 , 0 , theController );
+ }
+
+ }
+}
diff --git a/controlP5/Spacer.java b/controlP5/Spacer.java
new file mode 100644
index 0000000..077c3ca
--- /dev/null
+++ b/controlP5/Spacer.java
@@ -0,0 +1,67 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PGraphics;
+
+public class Spacer extends Controller< Spacer > {
+
+ private int _myWeight = 1;
+
+ public Spacer( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 20 , 20 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ protected Spacer( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , float theX , float theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ _myControllerView = new SpacerView( );
+ }
+
+ public Spacer setWeight( int theWeight ) {
+ _myWeight = theWeight;
+ return this;
+ }
+
+ public Spacer setColor( int theColor ) {
+ getColor( ).setForeground( theColor );
+ return this;
+ }
+
+ private class SpacerView implements ControllerView< Spacer > {
+
+ public void display( PGraphics g , Spacer c ) {
+ g.fill( c.getColor( ).getForeground( ) );
+ g.noStroke( );
+ if ( c.getWidth( ) >= c.getHeight( ) ) {
+ g.rect( 0 , ( c.getHeight( ) / 2 ) - _myWeight / 2 , c.getWidth( ) , _myWeight );
+ } else {
+ g.rect( ( c.getWidth( ) / 2 ) - _myWeight / 2 , 0 , _myWeight , c.getHeight( ) );
+ }
+ }
+ }
+
+}
diff --git a/controlP5/TODO b/controlP5/TODO
new file mode 100755
index 0000000..af03f11
--- /dev/null
+++ b/controlP5/TODO
@@ -0,0 +1,92 @@
+2014-09-08 Andreas Schlegel
+ * add glyphicons reference to controlp5.Icon.java http://glyphicons.com
+ * add useiconic to controlp5.Icon.java https://useiconic.com/open
+
+2014-05-29 Andreas Schlegel
+ * distinguish between left,center, right mouse click events http://forum.processing.org/two/discussion/5422/controlp5-mousepressed-only-if-mousebutton-left-
+
+2014-04-22 Andreas Schlegel
+ * javascript version on hold; it is unclear which project processing.js or p5.js will become the default js framework for processing
+
+2013-09-09 Andreas Schlegel
+ * javascript version
+ * textinput on android
+ * color picker used for clicks-and-strokes
+ * rendering into pgraphics
+ * add colorwheel
+ * add ControlFrame with customizable render access
+ * spacer / separator
+
+2011-03-24 Andreas Schlegel
+ * finish info to toString conversion
+ * implement plugTo for ControllerGroups
+ * BitFontRenderer addBitFont is broken, see the ControlP5bitFont example,
+ the font is cut off at the bottom, probably something wrong with
+ the label's PImage height.
+
+2010-08-07 Andreas Schlegel
+ * fix ControlWindowCanvas.pre(), doesnt work anymore.
+
+2010-07-25 Andreas Schlegel
+ * Android support, current version conflicts with android java (ControlWindow, PAppletWindow, using Toolkit when loading bit-font, KeyEvents, etc.)
+ * CColor: alpha handling
+ * Chart: finish. a chart graph controller to display line, bar, pie and histogram charts.
+
+2010-04-02 Andreas Schlegel
+ * BitFontRenderer: \n is recognized as a not-supported-character. fix!
+ * general: processingjs port
+ * Knob: implement new version of knob
+ * Textfield: implement new version of textfield
+ * TextArea: implement new version of TextArea
+ * Label: implement modifications so that text rendering for P3D works properly
+ * picking: use an image and color-coding for picking controllers instead mouse-coordinates against rectangular boxes.
+
+
+
+* fileChooser conflicts with mouse event.
+http://processing.org/discourse/yabb2/YaBB.pl?num=1247162607/0#0
+
+
+* alt-tab causes problems with dragging functionality.
+http://processing.org/discourse/yabb2/YaBB.pl?num=1242718131/0#0
+
+* Multilist, pop out to the left.
+* ScrollList, slider on the left option.
+* ScrollList: collapse/and hide. add option to hide the scroll-list area but only keep the scrollbar.
+* add CheckBoxList
+* tab issues as addressed in this post:
+http://processing.org/discourse/yabb_beta/YaBB.cgi?board=LibraryProblems;action=display;num=1237538493;start=2#2
+ - moveTo does not work for only a String which would stanbd for the name of a tab
+ - controlP5.window(this).activateTab("myTab");
+ controlP5.tab("myTab").mousePressed();
+* ControlGroup, set Width of bar. the + - toggle is not updated visually.
+* Text -Field, -Label, -Area: customize font
+* textarea: when changing the font of the valueLabel, the scrollbar is not updated / does not show even it is required. current hack is: myTextarea.setHeight(myTextarea.valueLabel().height());
+* textarea: automatically updating the scrollbar whensetting text with setText() see email from martin froehlich 16.january 2009
+* save and load does not work for some controllers.
+* loading and saving
+* multilist, range, matrix dont load from xml file.
+* colorstyle does not save and load.
+* labels dont save properly, background color is not saved.
+* matrix needs to be redone. develop whole new concept for matrix / synthesizer.
+* multitouch support
+* controlWindow: add feedback when closing window. see email from henri 5 january 2009
+* controllerStyle: see email from johnny rodgers 30 november 2008
+* range: see email from hartmut bohnacker 27 november 2008
+* textfield: see email from henri 14 october 2008
+* save and open file dialog: see email from henri 12 october 2008
+* ControlBroadcaster suggestions: see email from aaron mayers 2 october 2008
+* pushmatrix / popMatrix : see email from florian 6 june 2008
+Lib.pre() { /*other code */ pushMatrix(); }
+PApplet.draw() { ... }
+Lib.draw() { popMatrix(); /* the lib code, untransformed */ }
+
+
+
+DONE
+* (done) add setArrayValue to Controller class.
+* (done, implemented with TickMark) Slider: snap
+* (done) add id() method to ControlEvent
+* (done, fixed) fix save/load. saving twice and loading again results in empty.
+* (done) add setTitle to ControlWindow http://processing.org/discourse/yabb2/YaBB.pl?num=1245762312/0#0
+* (done, now ListBox) redo ScrollList so that it becomes a controller? change the button management of a scrollList.
diff --git a/controlP5/Tab.java b/controlP5/Tab.java
new file mode 100755
index 0000000..42cb775
--- /dev/null
+++ b/controlP5/Tab.java
@@ -0,0 +1,228 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PGraphics;
+
+/**
+ * Tabs are used to organize controllers. Tabs are arranged horizontally from the top-left corner by
+ * default, Tab extends ControllerGroup, for more available methods see the ControllerGroup
+ * documentation. Reposition tabs with {@link ControlWindow#setPositionOfTabs(int, int)}
+ *
+ * @example controllers/ControlP5tab
+ * @nosuperclasses ControllerGroup ControllerGroup
+ */
+public class Tab extends ControllerGroup< Tab > {
+
+ protected int _myOffsetX = -1000;
+ protected int _myOffsetY = -1000;
+ protected boolean isActive = false;
+ private boolean isAlwaysActive = false;
+ protected boolean isEventActive = false;
+ protected float _myValue = 0;
+ protected String _myStringValue = "";
+ public static int padding = 4;
+ public boolean autoWidth = true;
+
+ /**
+ *
+ * @param theControlP5 ControlP5
+ * @param theControlWindow ControlWindow
+ * @param theName String
+ */
+ public Tab( ControlP5 theControlP5 , ControlWindow theControlWindow , String theName ) {
+ super( theControlP5 , null , theName , 0 , 0 );
+ position = new float[ 2 ];
+ absolutePosition = new float[ 2 ];
+ isMoveable = false;
+ isEventActive = theControlP5.isTabEventsActive;
+ _myHeight = 16;
+ _myWidth = _myLabel.getWidth( ) + padding * 2;
+ _myLabel.align( LEFT , CENTER ).setPadding( 0 , 0 );
+ }
+
+ protected void setOffset( int theValueX , int theValueY ) {
+ _myOffsetX = theValueX;
+ _myOffsetY = theValueY;
+ }
+
+ protected int height( ) {
+ return _myHeight;
+ }
+
+ protected boolean updateLabel( ) {
+ isInside = inside( );
+ return cp5.getWindow( ).getTabs( ).size( ) > 2;
+ }
+
+ protected void drawLabel( PGraphics theGraphics ) {
+ if ( autoWidth ) {
+ _myWidth = _myLabel.getWidth( ) + padding * 2;
+ }
+ theGraphics.pushMatrix( );
+ theGraphics.pushStyle( );
+ theGraphics.noStroke( );
+ theGraphics.fill( isInside ? color.getForeground( ) : color.getBackground( ) );
+ if ( isActive ) {
+ theGraphics.fill( color.getActive( ) );
+ }
+ theGraphics.translate( _myOffsetX , _myOffsetY );
+ theGraphics.rect( 0 , 0 , _myWidth - 1 , _myHeight );
+ _myLabel.draw( theGraphics , padding , 0 , this );
+ theGraphics.popStyle( );
+ theGraphics.popMatrix( );
+ }
+
+ /**
+ * set the label of the group. TODO overwriting COntrollerGroup.setLabel to set the Width of a
+ * tab after renaming. this should be temporary and fixed in the future.
+ *
+ * @param theLabel String
+ * @return Tab
+ */
+ public Tab setLabel( String theLabel ) {
+ _myLabel.set( theLabel );
+ return this;
+ }
+
+ protected int width( ) {
+ return _myWidth;
+ }
+
+ /**
+ * @param theWidth
+ * @return
+ */
+ public Tab setWidth( int theWidth ) {
+ _myWidth = theWidth + padding;
+ autoWidth = false;
+ return this;
+ }
+
+ public Tab setHeight( int theHeight ) {
+ _myHeight = theHeight;
+ return this;
+ }
+
+ protected boolean inside( ) {
+ return ( cp5.getWindow( ).mouseX > _myOffsetX && cp5.getWindow( ).mouseX < _myOffsetX + _myWidth && cp5.getWindow( ).mouseY > _myOffsetY && cp5.getWindow( ).mouseY < _myOffsetY + _myHeight );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @ControlP5.Invisible public void mousePressed( ) {
+ cp5.getWindow( ).activateTab( this );
+ if ( isEventActive ) {
+ cp5.getControlBroadcaster( ).broadcast( new ControlEvent( this ) , METHOD);
+ }
+ }
+
+ /**
+ * Activates a tab.
+ *
+ * @param theFlag boolean
+ */
+ public Tab setActive( boolean theFlag ) {
+ isActive = theFlag;
+ return this;
+ }
+
+ public Tab setAlwaysActive( boolean theFlag ) {
+ isAlwaysActive = theFlag;
+ return this;
+ }
+
+ /**
+ * checks if a tab is active.
+ *
+ * @return boolean
+ */
+ public boolean isActive( ) {
+ return isAlwaysActive || isActive;
+ }
+
+ public boolean isAlwaysActive( ) {
+ return isAlwaysActive;
+ }
+
+ @Override public Tab bringToFront( ) {
+ cp5.getWindow( ).activateTab( this );
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public Tab moveTo( ControlWindow theWindow ) {
+ cp5.getWindow( ).removeTab( this );
+ setTab( theWindow , getName( ) );
+ return this;
+ }
+
+ /**
+ * activates or deactivates the Event status of a tab, When activated a tab will send a
+ * controlEvent to the main application. By default this is disabled.
+ *
+ * @param theFlag boolean
+ * @return Tab
+ */
+ public Tab activateEvent( boolean theFlag ) {
+ isEventActive = theFlag;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public String getStringValue( ) {
+ return _myStringValue;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public float getValue( ) {
+ return _myValue;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public Tab setValue( float theValue ) {
+ _myValue = theValue;
+ return this;
+ }
+
+ @Deprecated public float value( ) {
+ return _myValue;
+ }
+
+ @Deprecated public String stringValue( ) {
+ return _myStringValue;
+ }
+
+}
diff --git a/controlP5/Textarea.java b/controlP5/Textarea.java
new file mode 100755
index 0000000..4e749eb
--- /dev/null
+++ b/controlP5/Textarea.java
@@ -0,0 +1,447 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.Arrays;
+import java.util.List;
+
+import processing.core.PApplet;
+import processing.core.PFont;
+import processing.core.PGraphics;
+
+/**
+ * a textarea can be used to leave notes, it uses the controlP5 BitFont to render text. Scrollbars
+ * will automatically be added when text extends the visible area. Textarea extends ControllerGroup,
+ * for more methods available see the ControllerGroup documentation.
+ *
+ * @example controllers/ControlP5textarea
+ */
+public class Textarea extends ControllerGroup< Textarea > implements ControlListener {
+
+ protected String _myText;
+ protected Slider _myScrollbar;
+ protected int _myColorBackground = 0x000000;
+ protected boolean isColorBackground = false;
+ protected float _myScrollValue = 0;
+ protected boolean isScrollbarVisible = true;
+ protected int _myBottomOffset = 4;
+ private final int _myScrollbarWidth = 5;
+
+ /**
+ * Convenience constructor to extend Textarea.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Textarea( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , "" , 0 , 0 , 199 , 99 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ /**
+ *
+ * @param theControlP5
+ * ControlP5
+ * @param theGroup
+ * ControllerGroup
+ * @param theName
+ * String
+ * @param theText
+ * String
+ * @param theX
+ * int
+ * @param theY
+ * int
+ * @param theW
+ * int
+ * @param theH
+ * int
+ */
+ protected Textarea( ControlP5 theControlP5 , ControllerGroup< ? > theGroup , String theName , String theText , int theX , int theY , int theW , int theH ) {
+ super( theControlP5 , theGroup , theName , theX , theY );
+ _myWidth = theW;
+ _myHeight = theH;
+ _myText = theText;
+ setup( );
+ }
+
+ /**
+ *
+ * @param theText
+ * String
+ * @param theX
+ * int
+ * @param theY
+ * int
+ */
+ public Textarea( String theText , int theX , int theY ) {
+ super( theX , theY );
+ _myText = theText;
+ setup( );
+ }
+
+ private void setup( ) {
+ _myValueLabel = new Label( cp5 , _myText );
+
+ _myValueLabel.setFont( cp5.controlFont == cp5.defaultFont ? cp5.defaultFontForText : cp5.controlFont );
+
+ _myValueLabel.setWidth(_myWidth);
+ _myValueLabel.setHeight(_myHeight);
+ _myValueLabel.setMultiline( true );
+ _myValueLabel.toUpperCase( false );
+ _myValueLabel.setColor( color.getValueLabel( ) );
+
+ _myScrollbar = new Slider( cp5 , _myParent , getName( ) + "Scroller" , 0 , 1 , 1 , _myWidth - 5 , 0 , 5 , _myHeight );
+ _myScrollbar.init( );
+ _myScrollbar.setBroadcast( false );
+ _myScrollbar.setSliderMode( Slider.FLEXIBLE );
+ _myScrollbar.isMoveable = false;
+ _myScrollbar.isLabelVisible = false;
+ _myScrollbar.setParent( this );
+ _myScrollbar.addListener( this );
+ add( _myScrollbar );
+ setWidth( _myWidth );
+ setHeight( _myHeight );
+ _myScrollbar.color.set( color );
+ _myScrollbar.setColorBackground( 0x00000000 );
+ _myScrollbar.setHandleSize( 40 );
+ }
+
+ /**
+ *
+ * @param theEvent
+ * ControlEvent
+ */
+ public void controlEvent( ControlEvent theEvent ) {
+ _myScrollValue = - ( 1 - theEvent.getValue( ) );
+ scroll( );
+ }
+
+ public Textarea hideScrollbar( ) {
+ isScrollbarVisible = false;
+ _myScrollbar.hide( );
+ return this;
+ }
+
+ public Textarea showScrollbar( ) {
+ isScrollbarVisible = true;
+ boolean isScrollbar = _myHeight < ( _myValueLabel.getTextHeight( ) + _myValueLabel.getLineHeight( ) );
+ if ( isScrollbar ) {
+ _myScrollbar.show( );
+ }
+ return this;
+ }
+
+ public boolean isScrollable( ) {
+ return _myScrollbar.isVisible( );
+ }
+
+ @Override public Textarea setColorBackground( int theColor ) {
+ _myColorBackground = theColor;
+ isColorBackground = true;
+ return this;
+ }
+
+ public Textarea disableColorBackground( ) {
+ isColorBackground = false;
+ return this;
+ }
+
+ public Textarea enableColorBackground( ) {
+ isColorBackground = true;
+ return this;
+ }
+
+ /**
+ * scroll the Textarea remotely. values must range from 0 to 1.
+ *
+ * @param theValue
+ */
+ public Textarea scroll( float theValue ) {
+ _myScrollbar.setValue( 1 - theValue );
+ return this;
+ }
+
+ /**
+ * private update method for the scrollbar.
+ */
+ private void scroll( ) {
+ _myScrollValue = PApplet.min( PApplet.max( -1 , _myScrollValue ) , 0 );
+
+ float myLen = _myValueLabel.getTextHeight( ) + _myValueLabel.getLineHeight( );
+ float myOffset = 0;
+ boolean isScrollbar = _myHeight < myLen;
+ if ( isScrollbar ) {
+ myOffset = _myScrollValue * ( myLen - _myHeight + _myBottomOffset );
+ }
+ isScrollbar = isScrollbarVisible && isScrollbar;
+ _myScrollbar.setVisible( isScrollbar );
+ _myValueLabel.setOffsetYratio( _myScrollValue );
+ }
+
+ @ControlP5.Invisible public void scrolled( int theStep ) {
+ if ( _myScrollbar.isVisible( ) ) {
+ int lines = ( _myValueLabel.getTextHeight( ) / _myValueLabel.getLineHeight( ) );
+ float step = 1.0f / lines;
+ scroll( ( 1 - getScrollPosition( ) ) + ( theStep * step ) );
+ }
+ }
+
+ @ControlP5.Invisible public float getScrollPosition( ) {
+ return _myScrollbar.getValue( );
+ }
+
+ /**
+ * set the width of the textarea.
+ *
+ * @param theValue
+ * int
+ */
+ @Override public Textarea setWidth( int theValue ) {
+ theValue = ( theValue < 10 ) ? 10 : theValue;
+ _myWidth = theValue;
+ _myValueLabel.setWidth( _myWidth - _myScrollbarWidth - 10 );
+ return this;
+ }
+
+ /**
+ * set the height of the textarea.
+ *
+ * @param theValue
+ * int
+ */
+ @Override public Textarea setHeight( int theValue ) {
+ theValue = ( theValue < 10 ) ? 10 : theValue;
+ _myHeight = theValue;
+ _myValueLabel.setHeight( _myHeight - 2 );
+ _myScrollbar.setHeight( theValue );
+ return this;
+ }
+
+ public Textarea setSize( int theWidth , int theHeight ) {
+ setWidth( theWidth );
+ setHeight( theHeight );
+ return this;
+ }
+
+ /**
+ * set the lineheight of the textarea.
+ *
+ * @param theLineHeight
+ * int
+ */
+ public Textarea setLineHeight( int theLineHeight ) {
+ _myValueLabel.setLineHeight( theLineHeight );
+ scroll( );
+ return this;
+ }
+
+ /**
+ * set the text color of the textarea.
+ *
+ * @param theColor
+ * int
+ */
+ public Textarea setColor( int theColor ) {
+ _myValueLabel.setColor( theColor , true );
+ return this;
+ }
+
+ /**
+ * returns the instance of the textarea's label.
+ *
+ * @return
+ */
+ public Label getValueLabel( ) {
+ return _myValueLabel;
+ }
+
+ /**
+ * set the text of the textarea.
+ *
+ * @param theText
+ * String
+ */
+ public Textarea setText( String theText ) {
+ _myValueLabel.set( theText );
+ _myScrollValue = ( float ) ( _myHeight ) / ( float ) ( _myValueLabel.getTextHeight( ) );
+ _myScrollbar.setHeight( _myHeight + _myValueLabel.getStyle( ).paddingTop + _myValueLabel.getStyle( ).paddingBottom );
+ return this;
+ }
+
+ public Textarea clear( ) {
+ return setText( "" );
+ }
+
+ public Textarea append( String theText ) {
+ return setText( getText( ) + theText );
+ }
+
+ public Textarea append( String theText , int max ) {
+ String str = getText( ) + theText;
+
+ if ( max == -1 ) {
+ return setText( str );
+ }
+
+ List< String > strs = Arrays.asList( str.split( "\n" ) );
+ return setText( CP.join( strs.subList( Math.max( 0 , strs.size( ) - max ) , strs.size( ) ) , "\n" ) );
+ }
+
+ /**
+ * returns the text content of the textarea.
+ *
+ * @return String
+ */
+ public String getText( ) {
+ return getStringValue( );
+ }
+
+ @Override protected void preDraw( PGraphics theGraphics ) {
+ if ( isScrollbarVisible ) {
+ _myScrollbar.setVisible( _myValueLabel.getOverflow( ) > 1 );
+ }
+ if ( _myScrollbar.isVisible( ) || isColorBackground ) {
+ float x = _myWidth - _myScrollbarWidth + _myValueLabel.getStyle( ).paddingLeft + _myValueLabel.getStyle( ).paddingRight;
+ float y = y( _myScrollbar.getPosition( ) );
+ set( _myScrollbar.getPosition( ) , x , y );
+ if ( !isColorBackground ) {
+ theGraphics.noFill( );
+ } else {
+ int a = _myColorBackground >> 24 & 0xff;
+ theGraphics.fill( _myColorBackground , a > 0 ? a : 255 );
+ }
+ int ww = _myWidth + _myValueLabel.getStyle( ).paddingLeft + _myValueLabel.getStyle( ).paddingRight;
+ int hh = _myHeight + _myValueLabel.getStyle( ).paddingTop + _myValueLabel.getStyle( ).paddingBottom;
+ theGraphics.rect( 0 , 0 , ww , hh );
+ }
+ }
+
+ // !!! add padding to the box.
+ // padding and margin doesnt work nicely with textarea yet!
+ protected boolean inside( ) {
+ return ( cp5.getWindow( ).mouseX > x( position ) + x( _myParent.absolutePosition ) && cp5.getWindow( ).mouseX < x( position ) + x( _myParent.absolutePosition ) + _myWidth
+ && cp5.getWindow( ).mouseY > y( position ) + y( _myParent.absolutePosition ) && cp5.getWindow( ).mouseY < y( position ) + y( _myParent.absolutePosition ) + _myHeight );
+ }
+
+ public String getStringValue( ) {
+ return _myValueLabel.getText( );
+ }
+
+ public Textarea setFont( ControlFont theFont ) {
+ getValueLabel( ).setFont( theFont );
+ return this;
+ }
+
+ public Textarea setFont( PFont thePFont ) {
+ getValueLabel( ).setFont( thePFont );
+ return this;
+ }
+
+ public Textarea setFont( int theFontIndex ) {
+ getValueLabel( ).setFont( theFontIndex );
+ return this;
+ }
+
+ /**
+ * @param theColor
+ * @return Textarea
+ */
+ public Textarea setScrollBackground( int theColor ) {
+ _myScrollbar.setColorBackground( theColor );
+ return this;
+ }
+
+ /**
+ * @param theColor
+ * @return Textarea
+ */
+ public Textarea setScrollForeground( int theColor ) {
+ _myScrollbar.setColorForeground( theColor );
+ return this;
+ }
+
+ /**
+ * @param theColor
+ * @return Textarea
+ */
+ public Textarea setScrollActive( int theColor ) {
+ _myScrollbar.setColorActive( theColor );
+ return this;
+ }
+
+ /**
+ * @param theColor
+ * @return Textarea
+ */
+ public Textarea setBorderColor( int theColor ) {
+ color.setBackground( theColor );
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public float getValue( ) {
+ return 0;
+ }
+
+ @Deprecated public float value( ) {
+ return 0;
+ }
+
+ @Deprecated public String stringValue( ) {
+ return getStringValue( );
+ }
+
+ @Deprecated public Label valueLabel( ) {
+ return getValueLabel( );
+ }
+
+ /**
+ * @exclude
+ * @deprecated
+ * @return
+ */
+ @Deprecated public boolean isScrollbarVisible( ) {
+ return isScrollbarVisible;
+ }
+
+ /**
+ * @deprecated
+ * @exclude
+ * @return
+ */
+ @Deprecated public String text( ) {
+ return getText( );
+ }
+}
+
+// @todo linebreaking algorithm.
+// http://www.leverkruid.eu/GKPLinebreaking/index.html
+// found at http://www.texone.org/?p=43
+
diff --git a/controlP5/Textfield.java b/controlP5/Textfield.java
new file mode 100755
index 0000000..5c7e830
--- /dev/null
+++ b/controlP5/Textfield.java
@@ -0,0 +1,484 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import main.java.src2.main.java.controlP5.controlP5.events.ReleasedOutsideListener;
+import processing.core.PApplet;
+import processing.core.PGraphics;
+import processing.event.Event;
+import processing.event.KeyEvent;
+
+
+/**
+ * A singleline input textfield, use arrow keys to go back and forth, use backspace to delete
+ * characters. Using the up and down arrows lets you cycle through the history of the textfield.
+ *
+ * This is the best you can get. Font handling, font switching, measuring, left align, right align,
+ * etc. was giving me a big headache. not perfect, i think this is a good compromise.
+ *
+ * @example controllers/ControlP5textfield
+ * @nosuperclasses Controller Controller
+ */
+public class Textfield extends Controller< Textfield > implements ReleasedOutsideListener {
+
+ /* TODO textspacing does not work properly for bitfonts sometimes first row of pixels in a
+ * bitfont texture gets cut off */
+
+ protected boolean isTexfieldActive;
+ protected boolean isKeepFocus;
+ protected StringBuffer _myTextBuffer = new StringBuffer( );
+ protected int _myTextBufferIndex = 0;
+ protected int _myTextBufferOverflow = 0;
+ protected int _myTextBufferIndexPosition = 0;
+ public static int cursorWidth = 1;
+ protected Map< Integer , TextfieldCommand > keyMapping;
+ protected InputFilter _myInputFilter = InputFilter.BITFONT;
+ protected List< Integer > ignorelist;
+ protected LinkedList< String > _myHistory;
+ protected int _myHistoryIndex;
+ protected int len = 0;
+ protected int offset = 2;
+ protected int margin = 2;
+ protected boolean isPasswordMode;
+ protected boolean autoclear = true;
+ protected int _myColorCursor = 0x88ffffff;
+ protected PGraphics buffer;
+
+ public enum InputFilter {
+ INTEGER(Arrays.asList( '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' )), FLOAT(Arrays.asList( '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '.' )), BITFONT(Arrays.asList( '\n' , '\r' , ' ' , '!' , '"' , '#' , '$' , '%' ,
+ '&' , '\'' , '(' , ')' , '*' , '+' , ',' , '-' , '.' , '/' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , ':' , ';' , '<' , '=' , '>' , '?' , '@' , 'A' , 'B' , 'C' , 'D' , 'E' , 'F' , 'G' , 'H' , 'I' , 'J' , 'K' , 'L' , 'M' ,
+ 'N' , 'O' , 'P' , 'Q' , 'R' , 'S' , 'T' , 'U' , 'V' , 'W' , 'X' , 'Y' , 'Z' , '[' , '\\' , ']' , '^' , '_' , '`' , 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' , 'u' ,
+ 'v' , 'w' , 'x' , 'y' , 'z' , '{' , '|' , '}' , '~' )), DEFAULT(new LinkedList< Character >( ));
+
+ final List< Character > allowed;
+
+ InputFilter( List< Character > theList ) {
+ allowed = theList;
+ }
+
+ private boolean apply(char theCharater) {
+ if ( allowed.isEmpty( ) ) {
+ return true;
+ } else {
+ return allowed.contains( theCharater );
+ }
+ }
+
+ }
+
+ /**
+ * Convenience constructor to extend Textfield.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Textfield( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , "" , 0 , 0 , 199 , 19 );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ public Textfield( ControlP5 theControlP5 , ControllerGroup< ? > theParent , String theName , String theDefaultValue , int theX , int theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+
+ _myCaptionLabel = new Label( cp5 , theName , 0 , 0 , color.getCaptionLabel( ) );
+ _myValueLabel.setFont( cp5.controlFont == cp5.defaultFont ? cp5.defaultFontForText : cp5.controlFont );
+ _myCaptionLabel.align(LEFT, BOTTOM_OUTSIDE);
+ _myCaptionLabel.setPaddingX( 0 );
+
+ _myBroadcastType = STRING;
+ _myValueLabel.setFixedSize( true );
+ _myValueLabel.set( "" );
+ _myValueLabel.setWidth( getWidth( ) - margin * 2 );
+ _myValueLabel.setPadding( 0 , 0 );
+ _myValueLabel.align( LEFT , CENTER );
+ _myValueLabel.setColor( color.getValueLabel( ) );
+ _myValueLabel.toUpperCase( false );
+
+ _myValueLabel.setLabeltype( _myValueLabel.new SinglelineTextfield( ) );
+
+ _myHistory = new LinkedList< String >( );
+ _myHistory.addFirst( "" );
+
+ setSize( getWidth( ) , getHeight( ) );
+
+ keyMapping = new HashMap< Integer , TextfieldCommand >( );
+ keyMapping.put( ENTER , new Enter( ) );
+ keyMapping.put( DEFAULT , new InsertCharacter( ) );
+ keyMapping.put( DELETE , new DeleteCharacter( ) );
+ keyMapping.put( BACKSPACE , new DeleteCharacter( ) );
+ keyMapping.put( LEFT , new MoveLeft( ) );
+ keyMapping.put( RIGHT , new MoveRight( ) );
+ keyMapping.put( UP , new MoveUp( ) );
+ keyMapping.put( DOWN , new MoveDown( ) );
+
+ ignorelist = new LinkedList< Integer >( );
+ ignorelist.add( SHIFT );
+ ignorelist.add( ALT );
+ ignorelist.add( CONTROL );
+ ignorelist.add( TAB );
+ ignorelist.add( COMMANDKEY );
+
+ setInputFilter( DEFAULT );
+
+ }
+
+ @Override public Textfield setWidth( int theWidth ) {
+ _myValueLabel.setWidth( theWidth );
+ return super.setWidth( theWidth );
+ }
+
+ @Override public Textfield setHeight( int theHeight ) {
+ _myValueLabel.setHeight( theHeight );
+ return super.setHeight( theHeight );
+ }
+
+ public Textfield setFocus( boolean theValue ) {
+ isTexfieldActive = isActive = theValue;
+ return this;
+ }
+
+ /**
+ * check if the textfield is active and in focus.
+ *
+ * @return boolean
+ */
+ public boolean isFocus( ) {
+ return isTexfieldActive;
+ }
+
+ public Textfield keepFocus( boolean theValue ) {
+ isKeepFocus = theValue;
+ if ( isKeepFocus ) {
+ setFocus( true );
+ }
+ return this;
+ }
+
+// public Textfield setFont( PFont thePFont ) {
+// getValueLabel( ).setFont( thePFont );
+// return this;
+// }
+//
+// public Textfield setFont( ControlFont theFont ) {
+// getValueLabel( ).setFont( theFont );
+// return this;
+// }
+
+ public Textfield setFont( int theFont ) {
+ getValueLabel( ).setFont( theFont );
+ return this;
+ }
+
+ public Textfield setPasswordMode( boolean theFlag ) {
+ isPasswordMode = theFlag;
+ return this;
+ }
+
+ public Textfield setInputFilter( int theInputType ) {
+ switch ( theInputType ) {
+ case ( INTEGER ):
+ _myInputFilter = InputFilter.INTEGER;
+ break;
+ case ( FLOAT ):
+ _myInputFilter = InputFilter.FLOAT;
+ break;
+ case ( BITFONT ):
+ _myInputFilter = InputFilter.BITFONT;
+ break;
+ default:
+ _myInputFilter = InputFilter.DEFAULT;
+ break;
+ }
+ return this;
+ }
+
+ @Override public Textfield setValue( float theValue ) {
+ // use setText(String) instead
+ return this;
+ }
+
+ @Override protected void updateFont( ControlFont theControlFont ) {
+ super.updateFont( theControlFont );
+ }
+
+ public Textfield setValue( String theText ) {
+ _myTextBuffer = new StringBuffer( theText );
+ setIndex( _myTextBuffer.length( ) );
+ return this;
+ }
+
+ public Textfield setText( String theText ) {
+ return setValue( theText );
+ }
+
+ public Textfield clear( ) {
+ // create a new text buffer
+ _myTextBuffer = new StringBuffer( );
+ // reset the buffer index
+ setIndex( 0 );
+ return this;
+ }
+
+ public Textfield setAutoClear( boolean theValue ) {
+ autoclear = theValue;
+ return this;
+ }
+
+ public boolean isAutoClear( ) {
+ return autoclear;
+ }
+
+ @Override protected void mousePressed( ) {
+ super.mousePressed();
+
+ if ( isActive ) {
+ // TODO System.out.println("adjust cursor");
+ }
+ int x = ( int ) ( getControlWindow( ).mouseX - x( getAbsolutePosition( ) ) );
+ int y = ( int ) ( getControlWindow( ).mouseY - y( getAbsolutePosition( ) ) );
+
+ // TODO System.out.println(x + ":" + y);
+ setFocus( true );
+
+
+ }
+
+ @Override public void mouseReleasedOutside( ) {
+ if (!isKeepFocus) {
+ isTexfieldActive = isActive = false;
+ }
+ }
+
+ public int getIndex( ) {
+ return _myTextBufferIndex;
+ }
+
+ public String getText( ) {
+ return _myTextBuffer.toString( );
+ }
+
+ public String[] getTextList( ) {
+ String[] s = new String[ _myHistory.size( ) ];
+ _myHistory.toArray( s );
+ return s;
+ }
+
+ public Map getKeyMapping() {
+ return keyMapping;
+ }
+
+ public Textfield setColor(int theColor ) {
+ getValueLabel( ).setColor( theColor );
+ return this;
+ }
+
+ public Textfield setColorCursor( int theColor ) {
+ _myColorCursor = theColor;
+ return this;
+ }
+
+ @Override public Textfield setSize( int theWidth , int theHeight ) {
+ super.setSize( theWidth , theHeight );
+ buffer = cp5.papplet.createGraphics( getWidth( ) , getHeight( ) );
+ return this;
+ }
+
+ @Override public void draw( PGraphics theGraphics ) {
+
+ theGraphics.pushStyle( );
+ theGraphics.fill( color.getBackground( ) );
+ theGraphics.pushMatrix( );
+ theGraphics.translate( x( position ) , y( position ) );
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+ theGraphics.noStroke( );
+
+ theGraphics.fill( _myColorCursor );
+ theGraphics.pushMatrix( );
+ theGraphics.pushStyle( );
+
+ buffer.beginDraw( );
+ buffer.background( 0 , 0 );
+ final String text = passCheck( getText( ) );
+ final int textWidth = ControlFont.getWidthFor( text.substring( 0 , _myTextBufferIndex ) , _myValueLabel , buffer );
+ final int dif = PApplet.max( textWidth - _myValueLabel.getWidth( ) , 0 );
+ final int _myTextBufferIndexPosition = ControlFont.getWidthFor( text.substring( 0 , _myTextBufferIndex ) , _myValueLabel , buffer );
+ _myValueLabel.setText( text );
+ _myValueLabel.draw( buffer , -dif , 0 , this );
+ buffer.noStroke( );
+ if ( isTexfieldActive ) {
+ if ( !cp5.papplet.keyPressed ) {
+ buffer.fill( _myColorCursor , PApplet.abs( PApplet.sin( cp5.papplet.frameCount * 0.05f )) * 255 );
+ } else {
+ buffer.fill( _myColorCursor );
+ }
+ buffer.rect( PApplet.max( 1 , PApplet.min( _myTextBufferIndexPosition , _myValueLabel.getWidth( ) - 3 ) ) , 0 , 1 , getHeight( ) );
+ }
+ buffer.endDraw( );
+ theGraphics.image( buffer , 0 , 0 );
+
+ theGraphics.popStyle( );
+ theGraphics.popMatrix( );
+
+ theGraphics.fill( isTexfieldActive ? color.getActive( ) : color.getForeground( ) );
+ theGraphics.rect( 0 , 0 , getWidth( ) , 1 );
+ theGraphics.rect( 0 , getHeight( ) - 1 , getWidth( ) , 1 );
+ theGraphics.rect( -1 , 0 , 1 , getHeight( ) );
+ theGraphics.rect( getWidth( ) , 0 , 1 , getHeight( ) );
+ _myCaptionLabel.draw( theGraphics , 0 , 0 , this );
+ theGraphics.popMatrix( );
+ theGraphics.popStyle( );
+ }
+
+ private String passCheck( String label ) {
+ if ( !isPasswordMode ) {
+ return label;
+ }
+ String newlabel = "";
+ for ( int i = 0 ; i < label.length( ) ; i++ ) {
+ newlabel += "*";
+ }
+ return newlabel;
+ }
+
+ public void keyEvent( KeyEvent theKeyEvent ) {
+ if ( isUserInteraction && isTexfieldActive && isActive && theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
+ if ( ignorelist.contains( cp5.getKeyCode( ) ) ) {
+ return;
+ }
+ if ( keyMapping.containsKey( cp5.getKeyCode( ) ) ) {
+ keyMapping.get( cp5.getKeyCode( ) ).execute( );
+ } else {
+ keyMapping.get( DEFAULT ).execute( );
+ }
+ }
+ }
+
+ /**
+ * make the controller execute a return event. submit the current content of the texfield.
+ *
+ */
+ public Textfield submit( ) {
+ keyMapping.get( ENTER ).execute( );
+ return this;
+ }
+
+
+
+ protected Textfield setIndex( int theIndex ) {
+ _myTextBufferIndex = theIndex;
+ return this;
+ }
+
+
+
+ class InsertCharacter implements TextfieldCommand {
+
+ public void execute( ) {
+ if ( ( int ) ( cp5.getKey( ) ) == 65535 ) {
+ return;
+ }
+
+ if ( _myInputFilter.apply( cp5.getKey( ) ) ) {
+ _myTextBuffer.insert( _myTextBufferIndex , cp5.getKey( ));
+ setIndex( _myTextBufferIndex + 1 );
+ }
+ }
+ }
+
+ class Enter implements TextfieldCommand {
+
+ public void execute( ) {
+ setStringValue( _myTextBuffer.toString( ) );
+ broadcast( );
+ // update current buffer with the last item inside the input history
+ _myHistory.set( _myHistory.size( ) - 1 , _myTextBuffer.toString( ) );
+ // set the history index to our last item
+ _myHistoryIndex = _myHistory.size( );
+ // add a new and empty buffer to the history
+ _myHistory.add( "" );
+ if ( autoclear ) {
+ clear( );
+ }
+ }
+ }
+
+ class DeleteCharacter implements TextfieldCommand {
+
+ public void execute( ) {
+ if ( _myTextBuffer.length( ) > 0 && _myTextBufferIndex > 0 ) {
+ _myTextBuffer.deleteCharAt( _myTextBufferIndex - 1 );
+ setIndex( _myTextBufferIndex - 1 );
+ }
+ }
+ }
+
+ class MoveLeft implements TextfieldCommand {
+
+ public void execute( ) {
+ setIndex( ( ( cp5.modifiers & Event.META ) > 0 ) ? 0 : PApplet.max( 0 , _myTextBufferIndex - 1 ) );
+ }
+ }
+
+ class MoveRight implements TextfieldCommand {
+
+ public void execute( ) {
+ setIndex( ( ( cp5.modifiers & Event.META ) > 0 ) ? _myTextBuffer.length( ) : PApplet.min( _myTextBuffer.length( ) , _myTextBufferIndex + 1 ) );
+ }
+ }
+
+ class MoveUp implements TextfieldCommand {
+
+ public void execute( ) {
+ if ( _myHistoryIndex == 0 ) {
+ return;
+ }
+ _myHistoryIndex = PApplet.max( 0 , --_myHistoryIndex );
+ _myTextBuffer = new StringBuffer( _myHistory.get( _myHistoryIndex ) );
+ setIndex( _myTextBuffer.length( ) );
+ }
+ }
+
+ class MoveDown implements TextfieldCommand {
+
+ public void execute( ) {
+ if ( _myHistoryIndex >= _myHistory.size( ) - 1 ) {
+ return;
+ }
+
+ _myHistoryIndex = PApplet.min( _myHistory.size( ) - 1 , ++_myHistoryIndex );
+ _myTextBuffer = new StringBuffer( _myHistory.get( _myHistoryIndex ) );
+ setIndex( _myTextBuffer.length( ) );
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/controlP5/TextfieldCommand.java b/controlP5/TextfieldCommand.java
new file mode 100644
index 0000000..4961a85
--- /dev/null
+++ b/controlP5/TextfieldCommand.java
@@ -0,0 +1,5 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+public interface TextfieldCommand {
+ void execute( );
+}
\ No newline at end of file
diff --git a/controlP5/Textlabel.java b/controlP5/Textlabel.java
new file mode 100755
index 0000000..add7f19
--- /dev/null
+++ b/controlP5/Textlabel.java
@@ -0,0 +1,243 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.Arrays;
+import java.util.List;
+
+import processing.core.PApplet;
+import processing.core.PFont;
+import processing.core.PGraphics;
+
+/**
+ * @example controllers/ControlP5textlabel
+ * @nosuperclasses Controller Controller Textarea
+ */
+public class Textlabel extends Controller< Textlabel > {
+
+ protected int _myLetterSpacing = 0;
+
+ private boolean disabled;
+
+ /**
+ *
+ * @param theControlP5 ControlP5
+ * @param theParent Tab
+ * @param theName String
+ * @param theValue String
+ * @param theX int
+ * @param theY int
+ */
+ protected Textlabel( final ControlP5 theControlP5 , final Tab theParent , final String theName , final String theValue , final int theX , final int theY ) {
+ super( theControlP5 , theParent , theName , theX , theY , 200 , 20 );
+ _myStringValue = theValue;
+ setup( );
+ }
+
+ /**
+ *
+ * @param theValue String
+ * @param theX int
+ * @param theY int
+ */
+ protected Textlabel( final String theValue , final int theX , final int theY ) {
+ super( "" , theX , theY );
+ _myStringValue = theValue;
+ setup( );
+ }
+
+ protected Textlabel( final String theValue , final int theX , final int theY , final int theW , final int theH , final int theColor ) {
+ super( "" , theX , theY );
+
+ _myStringValue = theValue;
+ _myValueLabel = new Label( cp5 , _myStringValue , theW , theH , theColor );
+ _myValueLabel.setFont( cp5.controlFont == cp5.defaultFont ? cp5.defaultFontForText : cp5.controlFont );
+ _myValueLabel.setMultiline( false );
+ _myValueLabel.toUpperCase( false );
+ }
+
+ public Textlabel( ControlP5 theControlP5 , final String theValue , final int theX , final int theY ) {
+ super( "" , theX , theY );
+
+ cp5 = theControlP5;
+ _myStringValue = theValue;
+ _myValueLabel = new Label( cp5 , _myStringValue , 10 , 10 , 0xffffffff );
+ _myValueLabel.setFont( cp5.controlFont == cp5.defaultFont ? cp5.defaultFontForText : cp5.controlFont );
+ _myValueLabel.set( _myStringValue );
+ _myValueLabel.setMultiline( false );
+ _myValueLabel.toUpperCase( false );
+ }
+
+ public Textlabel( ControlP5 theControlP5 , final String theValue , final int theX , final int theY , final int theW , final int theH ) {
+ super( "" , theX , theY );
+ cp5 = theControlP5;
+ _myStringValue = theValue;
+ _myValueLabel = new Label( cp5 , _myStringValue , theW , theH , 0xffffffff );
+ _myValueLabel.setFont( cp5.controlFont == cp5.defaultFont ? cp5.defaultFontForText : cp5.controlFont );
+ _myValueLabel.setMultiline( false );
+ _myValueLabel.toUpperCase( false );
+ }
+
+ protected void setup( ) {
+ _myValueLabel = new Label( cp5 , _myStringValue );
+ _myValueLabel.setFont( cp5.controlFont == cp5.defaultFont ? cp5.defaultFontForText : cp5.controlFont );
+ _myValueLabel.setMultiline( false );
+ _myValueLabel.toUpperCase( false );
+ }
+
+ @Override public Textlabel setWidth( int theValue ) {
+ _myValueLabel.setWidth( theValue );
+ return this;
+ }
+
+ public Textlabel setHeight( int theValue ) {
+ _myValueLabel.setHeight( theValue );
+ return this;
+ }
+
+ public void draw( final PApplet theApplet ) {
+ draw( theApplet.g );
+ }
+
+ @Override public void draw( final PGraphics theGraphics ) {
+ if ( !disabled ) {
+ theGraphics.pushMatrix( );
+ theGraphics.translate( x( position ) , y( position ) );
+ _myValueLabel.draw( theGraphics , 0 , 0 , this );
+ theGraphics.popMatrix( );
+ }
+ }
+
+ public void draw( ) {
+ draw( cp5.pg );
+ }
+
+ public void draw( int theX , int theY ) {
+ cp5.papplet.pushMatrix( );
+ cp5.papplet.translate( theX , theY );
+ draw( cp5.pg );
+ cp5.papplet.popMatrix( );
+ }
+
+ public Textlabel setValue( float theValue ) {
+ return this;
+ }
+
+ public Textlabel setText( final String theText ) {
+ return setValue( theText );
+ }
+
+ public Textlabel setLineHeight( int theValue ) {
+ _myValueLabel.setLineHeight( theValue );
+ return this;
+ }
+
+ public int getLineHeight( ) {
+ return _myValueLabel.getLineHeight( );
+ }
+
+ public ControllerStyle getStyle() {
+ return _myValueLabel.getStyle( );
+ }
+
+ public Textlabel append( String theText , int max ) {
+ String str = _myStringValue + theText;
+
+ if ( max == -1 ) {
+ return setText( str );
+ }
+
+ List< String > strs = Arrays.asList( str.split( "\n" ) );
+ return setText( CP.join( strs.subList( Math.max( 0 , strs.size( ) - max ) , strs.size( ) ) , "\n" ) );
+ }
+
+ @Override public Textlabel setStringValue( String theValue ) {
+ return setValue( theValue );
+ }
+
+ public Textlabel setMultiline( final boolean theFlag ) {
+ _myValueLabel.setMultiline( true );
+ return this;
+ }
+
+ /**
+ * set the text of the textlabel.
+ *
+ * @param theText String
+ */
+ public Textlabel setValue( final String theText ) {
+ _myStringValue = theText;
+ _myValueLabel.set( theText );
+ setWidth( _myValueLabel.getWidth( ) );
+ setHeight( _myValueLabel.getHeight( ) );
+ return this;
+ }
+
+ public Textlabel setColor( int theColor ) {
+ _myValueLabel.setColor( theColor , true );
+ return this;
+ }
+
+ /**
+ * set the letter spacing of the font.
+ *
+ * @param theValue int
+ * @return Textlabel
+ */
+ public Textlabel setLetterSpacing( final int theValue ) {
+ _myLetterSpacing = theValue;
+ _myValueLabel.setLetterSpacing( _myLetterSpacing );
+ return this;
+ }
+
+ public Textlabel setFont( ControlFont theControlFont ) {
+ getValueLabel( ).setFont( theControlFont );
+ return this;
+ }
+
+ public Textlabel setFont( PFont thePFont ) {
+ getValueLabel( ).setFont( thePFont );
+ return this;
+ }
+
+ protected boolean inside( ) {
+ return ( _myControlWindow.mouseX > x( position ) + x( _myParent.getAbsolutePosition( ) ) && _myControlWindow.mouseX < x( position ) + x( _myParent.getAbsolutePosition( ) ) + _myValueLabel.getWidth( )
+ && _myControlWindow.mouseY > y( position ) + y( _myParent.getAbsolutePosition( ) ) && _myControlWindow.mouseY < y( position ) + y( _myParent.getAbsolutePosition( ) ) + _myValueLabel.getHeight( ) );
+ }
+
+ public Label get( ) {
+ return _myValueLabel;
+ }
+
+ private void printConstructorError( String theValue ) {
+ ControlP5
+ .logger( )
+ .severe(
+ "The Textlabel constructor you are using has been deprecated, please use constructor\nnew Textlabel(ControlP5,String,int,int) or\nnew Textlabel(ControlP5,String,int,int,int,int) or\nnew Textlabel(ControlP5,String,int,int,int,int,int,int)\ninstead. The Textlabel with value '"
+ + theValue + "' is disabled and will not be rendered." );
+ }
+
+}
diff --git a/controlP5/TickMark.java b/controlP5/TickMark.java
new file mode 100755
index 0000000..a688efc
--- /dev/null
+++ b/controlP5/TickMark.java
@@ -0,0 +1,93 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+import processing.core.PGraphics;
+
+/**
+ * Tickmarks are used by the Slider and Knob controller.
+ */
+public class TickMark implements CDrawable {
+
+ protected Controller< ? > _myParent;
+
+ protected int _myLen = 4;
+
+ protected Label _myLabel;
+
+ protected boolean isLabel;
+
+ public TickMark( Controller< ? > theController ) {
+ _myParent = theController;
+ }
+
+ public void draw( PGraphics theGraphics ) {
+ draw( theGraphics , ControlP5Constants.HORIZONTAL );
+ }
+
+ public void draw( PGraphics theGraphics , int theDirection ) {
+ theGraphics.pushMatrix( );
+ switch ( theDirection ) {
+ case ( ControlP5Constants.HORIZONTAL ):
+ theGraphics.translate( 0 , _myLen );
+ theGraphics.rect( 0 , 0 , 1 , _myLen );
+ if ( isLabel ) {
+ _myLabel.draw( theGraphics , 0 , _myLen + 4 , _myParent );
+ }
+ break;
+ case ( ControlP5Constants.VERTICAL ):
+ theGraphics.translate( -_myLen , 0 );
+ theGraphics.rect( 0 , 0 , _myLen , 1 );
+ if ( isLabel ) {
+ _myLabel.draw( theGraphics , -_myLabel.getWidth( ) , 0 , _myParent );
+ }
+ break;
+ }
+
+ theGraphics.popMatrix( );
+ }
+
+ public void setLength( int theLength ) {
+ _myLen = theLength;
+ }
+
+ public Label setLabel( String theLabeltext ) {
+ if ( _myLabel == null ) {
+ _myLabel = new Label( _myParent.cp5 , theLabeltext );
+ isLabel = true;
+ } else {
+ _myLabel.set( theLabeltext );
+ }
+ return _myLabel;
+ }
+
+ public Label getLabel( ) {
+ if ( _myLabel == null ) {
+ setLabel( "?" );
+ }
+ return _myLabel;
+ }
+
+}
diff --git a/controlP5/Toggle.java b/controlP5/Toggle.java
new file mode 100755
index 0000000..28f4d1e
--- /dev/null
+++ b/controlP5/Toggle.java
@@ -0,0 +1,266 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import processing.core.PGraphics;
+import processing.core.PImage;
+
+/**
+ * a toggle can have two states, true and false, where true has the value 1 and false is 0.
+ *
+ * @example controllers/ControlP5toggle
+ * @nosuperclasses Controller Controller
+ */
+public class Toggle extends Controller< Toggle > {
+
+ protected int cnt;
+ protected boolean isOn = false;
+ protected float internalValue = -1;
+ public static int autoWidth = 39;
+ public static int autoHeight = 19;
+ protected float[] autoSpacing = new float[] { 10 , 20 };
+
+ /**
+ * Convenience constructor to extend Toggle.
+ *
+ * @example use/ControlP5extendController
+ * @param theControlP5
+ * @param theName
+ */
+ public Toggle( ControlP5 theControlP5 , String theName ) {
+ this( theControlP5 , theControlP5.getDefaultTab( ) , theName , 0 , 0 , 0 , autoWidth , autoHeight );
+ theControlP5.register( theControlP5.papplet , theName , this );
+ }
+
+ public Toggle( ControlP5 theControlP5 , Tab theParent , String theName , float theValue , float theX , float theY , int theWidth , int theHeight ) {
+ super( theControlP5 , theParent , theName , theX , theY , theWidth , theHeight );
+ _myValue = theValue;
+ _myCaptionLabel.align( LEFT , BOTTOM_OUTSIDE ).setPadding( 0 , Label.paddingY );
+ }
+
+ /**
+ *
+ * @param theApplet PApplet
+ */
+ @ControlP5.Invisible public void draw( PGraphics theGraphics ) {
+ theGraphics.pushMatrix( );
+ theGraphics.translate( x( position ) , y( position ) );
+ _myControllerView.display( theGraphics , this );
+ theGraphics.popMatrix( );
+ }
+
+ protected void onEnter( ) {
+ isActive = true;
+ }
+
+ protected void onLeave( ) {
+ isActive = false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @ControlP5.Invisible public void mousePressed( ) {
+ setState( !isOn );
+ isActive = false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public Toggle setValue( float theValue ) {
+ setState(theValue != 0);
+ return this;
+ }
+
+ /**
+ * @param theValue
+ */
+ public Toggle setValue( boolean theValue ) {
+ setValue( (theValue) ? 1 : 0 );
+ return this;
+ }
+
+ public boolean getBooleanValue( ) {
+ return getState( );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public Toggle update( ) {
+ return setValue( _myValue );
+ }
+
+ /**
+ * sets the state of the toggle, this can be true or false.
+ *
+ * @param theFlag boolean
+ */
+ public Toggle setState( boolean theFlag ) {
+ isOn = theFlag;
+ _myValue = (!isOn) ? 0 : 1;
+ broadcast( FLOAT );
+ return this;
+ }
+
+ public boolean getState( ) {
+ return isOn;
+ }
+
+ protected void deactivate( ) {
+ isOn = false;
+ _myValue = (!isOn) ? 0 : 1;
+ }
+
+ protected void activate( ) {
+ isOn = true;
+ _myValue = (!isOn) ? 0 : 1;
+ }
+
+ /**
+ * switch the state of a toggle.
+ */
+ public Toggle toggle( ) {
+ setState(!isOn);
+ return this;
+ }
+
+ /**
+ * set the visual mode of a Toggle. use setMode(ControlP5.DEFAULT) or setMode(ControlP5.SWITCH)
+ *
+ * @param theMode
+ */
+ public Toggle setMode( int theMode ) {
+ updateDisplayMode( theMode );
+ return this;
+ }
+
+ public int getMode( ) {
+ return _myDisplayMode;
+ }
+
+ /**
+ * by default a toggle returns 0 (for off) and 1 (for on). the internal value variable can be
+ * used to store an additional value for a toggle event.
+ *
+ * @param theInternalValue
+ */
+ @ControlP5.Invisible public void setInternalValue( float theInternalValue ) {
+ internalValue = theInternalValue;
+ }
+
+ @ControlP5.Invisible public float internalValue( ) {
+ return internalValue;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override public Toggle linebreak( ) {
+ cp5.linebreak( this , true , autoWidth , autoHeight , autoSpacing );
+ return this;
+ }
+
+ @Override public Toggle setImages( PImage ... theImages ) {
+ setImage( theImages[ 0 ] , DEFAULT );
+ setImage( theImages[ 1 ] , ACTIVE );
+ updateDisplayMode( IMAGE );
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override @ControlP5.Invisible public Toggle updateDisplayMode( int theState ) {
+ _myDisplayMode = theState;
+ switch ( theState ) {
+ case ( DEFAULT ):
+ _myControllerView = new ToggleView( );
+ break;
+ case ( IMAGE ):
+ _myControllerView = new ToggleImageView( );
+ break;
+ case ( SWITCH ):
+ _myControllerView = new ToggleSwitchView( );
+ break;
+ case ( CUSTOM ):
+ default:
+ break;
+ }
+ return this;
+ }
+
+ class ToggleView implements ControllerView< Toggle > {
+
+ public void display( PGraphics theGraphics , Toggle theController ) {
+ if ( isActive ) {
+ theGraphics.fill( isOn ? color.getActive( ) : color.getForeground( ) );
+ } else {
+ theGraphics.fill( isOn ? color.getActive( ) : color.getBackground( ) );
+ }
+
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+
+ if ( isLabelVisible ) {
+ _myCaptionLabel.draw( theGraphics , 0 , 0 , theController );
+ }
+
+ }
+ }
+
+ class ToggleImageView implements ControllerView< Toggle > {
+
+ public void display( PGraphics theGraphics , Toggle theController ) {
+
+ if ( isOn ) {
+ theGraphics.image( (availableImages[ACTIVE]) ? images[ ACTIVE ] : images[ DEFAULT ] , 0 , 0 );
+ } else {
+ theGraphics.image( images[ DEFAULT ] , 0 , 0 );
+ }
+ }
+ }
+
+ class ToggleSwitchView implements ControllerView< Toggle > {
+
+ public void display( PGraphics theGraphics , Toggle theController ) {
+
+ theGraphics.fill( color.getBackground( ) );
+ theGraphics.rect( 0 , 0 , getWidth( ) , getHeight( ) );
+ theGraphics.fill( color.getActive( ) );
+
+ if ( isOn ) {
+ theGraphics.rect( 0 , 0 , getWidth( ) / 2 , getHeight( ) );
+ } else {
+ theGraphics.rect( ( getWidth( ) % 2 == 0 ? 0 : 1 ) + getWidth( ) / 2 , 0 , getWidth( ) / 2 , getHeight( ) );
+ }
+
+ if ( isLabelVisible ) {
+ _myCaptionLabel.draw( theGraphics , 0 , 0 , theController );
+ }
+ }
+ }
+}
diff --git a/controlP5/Tooltip.java b/controlP5/Tooltip.java
new file mode 100755
index 0000000..2fec224
--- /dev/null
+++ b/controlP5/Tooltip.java
@@ -0,0 +1,390 @@
+package main.java.src2.main.java.controlP5.controlP5;
+
+/**
+ * controlP5 is a processing gui library.
+ *
+ * 2006-2015 by Andreas Schlegel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ * @author Andreas Schlegel (http://www.sojamo.de)
+ * @modified ##date##
+ * @version ##version##
+ *
+ */
+
+import java.util.HashMap;
+import java.util.Map;
+
+import processing.core.PApplet;
+import processing.core.PGraphics;
+
+/**
+ * A tooltip can be registered for individual controllers
+ * and is activated on rollover.
+ *
+ * @example controllers/ControlP5tooltip
+ *
+ */
+public class Tooltip {
+
+ private ControllerView< ? > _myView;
+ private final float[] position = new float[3];
+ private float[] currentPosition = new float[3];
+ private float[] previousPosition = new float[3];
+ private float[] offset = new float[3];
+ private Controller< ? > _myController;
+ private long startTime = 0;
+ private long _myDelayInMillis = 500;
+ private int _myMode = ControlP5.INACTIVE;
+ private int _myHeight = 20;
+ private int _myBackgroundColor = 0xffffffb4;
+ private int _myMaxAlpha = 255;
+ private final int _myAlpha = 0;
+ private final Map< Controller< ? > , String > map;
+ private Label _myLabel;
+ private boolean enabled = true;
+ private int _myBorder;
+ private final ControlP5 cp5;
+ private final int _myAlignH = ControlP5.RIGHT;
+ private int _myColor = 0x00000000;
+
+ Tooltip( ControlP5 theControlP5 ) {
+ cp5 = theControlP5;
+ position[0] = -1000;
+ position[1] = -1000;
+ currentPosition = new float[3];
+ previousPosition = new float[3];
+ offset = new float[] { 0 , 24 , 0 };
+ map = new HashMap< Controller< ? > , String >( );
+ _myLabel = new Label( cp5 , "tooltip" );
+ _myLabel.setColor( _myColor );
+ _myLabel.setPadding( 0 , 0 );
+ setView( new TooltipView( ) );
+ setBorder( 4 );
+ }
+
+ /**
+ * sets the border of the tooltip, the default border is
+ * 4px.
+ *
+ * @param theValue
+ * @return Tooltip
+ */
+ public Tooltip setBorder( int theValue ) {
+ _myBorder = theValue;
+ _myLabel.getStyle( ).setMargin( _myBorder , _myBorder , _myBorder , _myBorder );
+ return this;
+ }
+
+ /**
+ * returns the value of the border
+ *
+ * @return
+ */
+ public int getBorder( ) {
+ return _myBorder;
+ }
+
+ /**
+ * sets the transparency of the default background,
+ * default value is 200
+ *
+ * @param theValue
+ * @return Tooltip
+ */
+ public Tooltip setAlpha( int theValue ) {
+ _myMaxAlpha = theValue;
+ return this;
+ }
+
+ private void updateText( String theText ) {
+ int n = 1;
+ for ( char c : theText.toCharArray( ) ) {
+ if ( c == '\n' ) {
+ n++;
+ }
+ }
+ if ( _myLabel.getHeight( ) != _myLabel.getLineHeight( ) * n ) {
+ _myLabel.setHeight( _myLabel.getLineHeight( ) * n );
+ }
+ _myLabel.set( theText );
+ }
+
+ /**
+ * TODO see below
+ * @param theWindow
+ */
+ void draw( ControlWindow theWindow ) {
+ // TODO re-implement Tooltip
+ }
+
+ private boolean moved( ) {
+ return PApplet.abs( PApplet.dist( previousPosition[0] , previousPosition[1] , currentPosition[0] , currentPosition[1] ) ) > 1;
+ }
+
+ /**
+ * A tooltip is activated when entered by the mouse,
+ * after a given delay time the Tooltip starts to fade
+ * in. Use setDelay(long) to adjust the default delay
+ * time of 1000 millis.
+ *
+ * @param theMillis
+ * @return Tooltip
+ */
+ public Tooltip setDelay( long theMillis ) {
+ _myDelayInMillis = theMillis;
+ return this;
+ }
+
+ /**
+ * a Tooltip is activated when the mouse enters a
+ * controller.
+ *
+ * @param theController
+ */
+ protected void activate( Controller< ? > theController ) {
+ if ( map.containsKey( theController ) ) {
+ startTime = System.nanoTime( );
+ _myController = theController;
+ currentPosition[0] = theController.getControlWindow( ).mouseX;
+ currentPosition[1] = theController.getControlWindow( ).mouseY;
+ updateText( map.get( _myController ) );
+ _myMode = ControlP5.WAIT;
+ }
+ }
+
+ protected void deactivate( ) {
+ deactivate( 1 );
+ }
+
+ protected void deactivate( int theNum ) {
+ if ( theNum == 0 ) {
+ if ( _myMode >= ControlP5.IDLE ) {
+ if ( _myMode < ControlP5.FADEOUT )
+ startTime = System.nanoTime( );
+ _myMode = ControlP5.FADEOUT;
+ }
+ } else {
+ _myMode = ( _myMode >= ControlP5.IDLE ) ? ControlP5.FADEOUT : ControlP5.DONE;
+ }
+ }
+
+ /**
+ * A custom view can be set for a Tooltip. The default
+ * view class can be found at the bottom of the Tooltip
+ * source.
+ *
+ * @see ControllerView
+ * @param theDisplay
+ * @return Tooltip
+ */
+ public Tooltip setView( ControllerView< ? > theDisplay ) {
+ _myView = theDisplay;
+ return this;
+ }
+
+ /**
+ * registers a controller with the Tooltip, when
+ * activating the tooltip for a particular controller,
+ * the registered text (second parameter) will be
+ * displayed.
+ *
+ * @param theController
+ * @param theText
+ * @return Tooltip
+ */
+ public Tooltip register( Controller< ? > theController , String theText ) {
+ map.put( theController , theText );
+ theController.registerProperty( "setTooltipEnabled" , "isTooltipEnabled" );
+ return this;
+ }
+
+ public Tooltip register( String theControllerName , String theText ) {
+ Controller< ? > c = cp5.getController( theControllerName );
+ if ( c == null ) {
+ return this;
+ }
+ map.put( c , theText );
+ c.registerProperty( "setTooltipEnabled" , "isTooltipEnabled" );
+ return this;
+ }
+
+ /**
+ * removes a controller from the tooltip
+ *
+ * @param theController
+ * @return Tooltip
+ */
+ public Tooltip unregister( Controller< ? > theController ) {
+ map.remove( theController );
+ theController.removeProperty( "setTooltipEnabled" , "isTooltipEnabled" );
+ return this;
+ }
+
+ public Tooltip unregister( String theControllerName ) {
+ Controller< ? > c = cp5.getController( theControllerName );
+ if ( c == null ) {
+ return this;
+ }
+ return unregister( c );
+ }
+
+ /**
+ * with the default display, the width of the tooltip is
+ * set automatically, therefore setWidth() does not have
+ * any effect without changing the default display to a
+ * custom ControllerView.
+ *
+ * @see ControllerView
+ * @see Tooltip#setDisplay(ControllerView)
+ * @return Tooltip
+ */
+ public Tooltip setWidth( int theWidth ) {
+ // TODO
+ // _myWidth = theWidth;
+ return this;
+ }
+
+ public int getWidth( ) {
+ return _myLabel.getWidth( );
+ }
+
+ /**
+ * @see Tooltip#setWidth(int)
+ * @param theHeight
+ * @return Tooltip
+ */
+ public Tooltip setHeight( int theHeight ) {
+ ControlP5.logger( ).warning( "Tooltip.setHeight is disabled with this version" );
+ _myHeight = theHeight;
+ return this;
+ }
+
+ /**
+ * adds an offset to the position of the controller
+ * relative to the mouse cursor's position. default
+ * offset is (10,20)
+ *
+ * @param theX
+ * @param theY
+ * @return Tooltip
+ */
+ public Tooltip setPositionOffset( float theX , float theY ) {
+ offset[0] = theX;
+ offset[1] = theY;
+ return this;
+ }
+
+ /**
+ * disables the Tooltip on a global level, when
+ * disabled, tooltip will not respond to any registered
+ * controller. to disable a tooltip for aparticular
+ * controller, used unregister(Controller)
+ *
+ * @see Tooltip#unregister(Controller)
+ * @return Tooltip
+ */
+ public Tooltip disable( ) {
+ enabled = false;
+ return this;
+ }
+
+ /**
+ * in case the tooltip is disabled, use enable() to turn
+ * the tooltip back on.
+ *
+ * @return Tooltip
+ */
+ public Tooltip enable( ) {
+ enabled = true;
+ return this;
+ }
+
+ /**
+ * check if the tooltip is enabled or disabled
+ *
+ * @return boolean
+ */
+ public boolean isEnabled( ) {
+ return enabled;
+ }
+
+ /**
+ * sets the Label to a custom label and replaces the
+ * default label.
+ *
+ * @param theLabel
+ * @return Tooltip
+ */
+ public Tooltip setLabel( Label theLabel ) {
+ _myLabel = theLabel;
+ return this;
+ }
+
+ /**
+ * returns the current Label
+ *
+ * @return Label
+ */
+ public Label getLabel( ) {
+ return _myLabel;
+ }
+
+ /**
+ * sets the background color of the tooltip, the default
+ * color is a dark grey
+ *
+ * @param theColor
+ * @return Tooltip
+ */
+ public Tooltip setColorBackground( int theColor ) {
+ _myBackgroundColor = theColor;
+ return this;
+ }
+
+ /**
+ * sets the text color of the tooltip's label, the
+ * default color is a white
+ *
+ * @param theColor
+ * @return Tooltip
+ */
+ public Tooltip setColorLabel( int theColor ) {
+ _myColor = theColor;
+ _myLabel.setColor( theColor );
+ return this;
+ }
+
+ class TooltipView implements ControllerView< Controller< ? >> {
+
+ public void display( PGraphics theGraphics , Controller< ? > theController ) {
+ _myHeight = _myLabel.getHeight( );
+ theGraphics.fill( _myBackgroundColor , _myAlpha );
+ theGraphics.rect( 0 , 0 , getWidth( ) + _myBorder * 2 , _myHeight + _myBorder * 2 );
+ theGraphics.pushMatrix( );
+ if ( _myAlignH == ControlP5.RIGHT ) {
+ theGraphics.translate( 6 , 0 );
+ } else {
+ theGraphics.translate( getWidth( ) - 6 , 0 );
+ }
+ theGraphics.triangle( 0 , 0 , 4 , -4 , 8 , 0 );
+ theGraphics.popMatrix( );
+ int a = ( int ) ( PApplet.map( _myAlpha , 0 , _myMaxAlpha , 0 , 255 ) );
+ _myLabel.setColor( a << 24 | ( _myColor >> 16 ) << 16 | ( _myColor >> 8 ) << 8 | ( _myColor >> 0 ) << 0 );
+ _myLabel.draw( theGraphics , 0 , 0 , theController );
+ }
+ }
+}
diff --git a/controlP5/changeLog.txt b/controlP5/changeLog.txt
new file mode 100755
index 0000000..779d142
--- /dev/null
+++ b/controlP5/changeLog.txt
@@ -0,0 +1,867 @@
+2016-14-04 Andreas Schlegel
+
+ mostly bug fixes, see github issues
+ removed all PVector references, variables, and functions using processing.core.PVector
+
+2015-08-02 Andreas Schlegel
+
+ changes see github change log
+
+2015-03-29 Andreas Schlegel
+
+ * src controlP5.ScrollabelList:
+ fixing ArrayOutOfBounds error as reported on github under issue 3 https://github.com/sojamo/controlp5/issues/3
+
+2014-09-08 Andreas Schlegel
+
+ * src main.java.src2.main.java.controlP5.controlp5.Icon:
+ adding Icon class, acts like a button; can be used with images and font-icons
+ from "Font Awesome".
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.Button:
+ when theButton acts as a switch (setSwitch(true)), the corresponding
+ method inside a sketch should use type boolean as argument instead of float;
+ a java.lang.IllegalArgumentException will be thrown in case of a float argument
+
+
+2014-08-28 Andreas Schlegel
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.Background:
+ adding Background class, a convenience class for grouping controllers with
+ the top bar disabled by default.
+
+
+2014-07-21 Andreas Schlegel
+
+ * src main.java.src2.main.java.controlP5.controlp5.Textfield:
+ making use of a graphics buffer now, simplifies cursor position calculation and
+ prevents from throwing an ArrayIndexOutOfBoundsException which could occasionally
+ happen with previous versions.
+
+
+2014-07-17 Andreas Schlegel
+ * version 2.2.1
+
+ * removing PVector dependencies
+
+ * removing all deprecated methods
+
+ * src main.java.src2.main.java.controlP5.controlp5.ListBox, main.java.src2.main.java.controlP5.controlp5.controlp5.DropdownList:
+ Due to changes to and deprecation of DropdownList and ListBox, both share the same
+ source code as ScrollableList. Consequently some functionality got lost though this
+ should be marginal. In case of any issues occuring due to these changes, please
+ inform the author. In any case use ScrollableList instead of DropdownList and ListBox.
+ The major benefit of using a ScrollableList is that an item is now of type Map and
+ therefore is not limited (as it was the case before) to the implementation of a
+ ListBoxItem and hence is more flexible as data container.
+ Do note that ListBox, DropdownList and ScrollableList do extend Controller,
+ not ControllerGroup
+
+
+2014-04-27 Andreas Schlegel
+ * version 2.1.6
+
+ * preparing for next release.
+
+ * src main.java.src2.main.java.controlP5.controlp5.ListBox, main.java.src2.main.java.controlP5.controlp5.controlp5.DropdownList:
+ deprecated, use ScrollableList instead.
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.ControlP5Legacy:
+ repository of functions only kept for backwards compatibility but it is not encouraged
+ to use the anymore. Use ControlP5Base instead.
+
+ * src main.java.src2.main.java.controlP5.controlp5.Controller:
+ adding onEnter, onLeave, onDrag, onStartDrag, onEndDrag, onWheel, onMove, onClick,
+ onPress, onDoublePress, onRelease, onReleaseOutside, onChange to register callbacks
+ for specific events. This is not implemented for classes extending ControllerGroup.
+
+
+2013-01-23 Andreas Schlegel
+
+ * version 2.1.5
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.ControllerProperties:
+ removing XML format. adding JSON format, JSON format will be the default format instead of the Java Serialization format.
+
+
+2012-09-22 Andreas Schlegel
+
+ * version 2.1.3
+
+ * src main.java.src2.main.java.controlP5.controlp5.ListBox:
+ now extends Controller instead of ControlGroup.
+
+
+2012-09-09 Andreas Schlegel
+
+ * version 2.1.0
+
+ * starting processingjs implementation.
+ - many controllers will be included:
+ completed: Bang, Button, CheckBox, ColorPalette, Group, Knob, Label, ListBox, DropdownList, Numberbox, RadioButton,
+ Range, Slider, Slider2D, Tab, Textfield, Toggle
+ under construction: Canvas, Chart, ColorPicker, ControllerView, FrameRate, Matrix, Textarea
+ pending: ButtonBar, Pointer, TickMark, Tooltip
+ some will be missed: MutiList, Textlabel
+ and more will be missed: CColor, ControlBehavior, ControllerProperties, ControllerStyle, ControlTimer, ControlWindow
+ - the BitFont from the Java version will not be ported over to js and the default fontsize will be set to 10
+ - The automatic binding of functions and variables with the js version did not work as smooth as expected. Currently
+ only automatic function detection and binding is available. But then why not variables? See my request here:
+ https://processing-js.lighthouseapp.com/projects/41284/tickets/1972-feature-request-access-sketch-global-variables-from-library
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.Slider2D:
+ changed size of cursor, changed color handling
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.Button:
+ alignment of caption label changed to CENTER,CENTER
+
+ * adding PGraphics support instead of only rendering into PApplet directly
+
+ * fixing Annotation issue addressed here https://forum.processing.org/topic/controlp5-annotations-24-8-2012#25080000002597047
+
+
+
+2012-12-23 Andreas Schlegel
+
+ * version 2.0.4
+
+ * src main.java.src2.main.java.controlP5.controlp5.Textfield.java,main.java.src2.main.java.controlP5.controlp5.ListBox.java,
+ main.java.src2.main.java.controlP5.controlp5.controlp5.DropdownList.java,main.java.src2.main.java.controlP5.controlp5.ControlWindow.java
+ main.java.src2.main.java.controlP5.controlp5.ControlP5Base.java:
+ adjusting to processing's KeyEvent final variable name changes
+ see issue 69 https://code.google.com/p/controlp5/issues/detail?id=69 (thanks jeff)
+
+ * src main.java.src2.main.java.controlP5.controlp5.Textfield.java:
+ reimplemented password mode (thanks jeff)
+
+
+
+2012-10-19 Andreas Schlegel
+
+ * version 2.0.3
+
+ * src main.java.src2.main.java.controlP5.controlp5.Controller.java:
+ Automatic (PApplet) field recognition for Slider, Knob, Numberbox, Toggle adjusted.
+
+
+2012-09-17 Andreas Schlegel
+
+ * version 2.0.2
+
+ * major changes to controlP5's font handling. the BitFontRenderer has been removed and the BitFont class
+ has been introduced. BitFont extends PFont and is the replacement for rendering controlP5's bitfont as
+ a pfont. this makes font handling way more easier and stable. if this has caused any font rendering
+ flaws, let me know.
+
+ * src controlP5.BitFontRenderer.java:
+ removed
+
+ * src main.java.src2.main.java.controlP5.controlp5.BitFont.java:
+ added, see above.
+
+
+
+2012-09-07 Andreas Schlegel
+
+ * version 2.0.1
+
+ * processing 2.0, time to make some changes, major revision in progress.
+ The goal should be to make 2.0+ desktop and android compatible, for that java.awt dependencies
+ will be removed.
+ starting to remove deprecated methods, fields and classes
+
+ * removing all java.awt dependencies.
+ with each ControlP5 instance there will only be 1 ControlWindow since separate windows/frames have
+ been removed due to their java.awt dependency. There will be an example of how to make your own
+ separate Frame when in desktop mode.
+
+ * versions starting with 2.0.1 will not be backwards compatible with 1.5.1 and earlier
+ from this version onwards Android is supported
+
+
+ * src main.java.src2.main.java.controlP5.controlp5.Println.java:
+ new class added
+ a console logger that captures the System.out stream and displays it using a Textarea
+
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.FrameRate.java:
+ new class added
+ a Textlabel that displays the current or average framerate based on update interval
+
+
+ * src controlP5.BitFontRenderer.java:
+ using Base64 encoded bitfont source instead of loading gif textures
+
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.Knob.java:
+ adding value label, ARC is default view now.
+
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.Matrix.java:
+ adding play(), pause(), stop(), isPlaying(), trigger(int)
+
+
+ * src main.java.src2.main.java.controlP5.controlp5.Controller.java:
+ all ControllerSprite references (previously deprecated) have been removed
+
+
+ * src controlP5.ControllerSprite.java:
+ removed
+
+
+ * src controlP5.ControlP5IOHandler.java:
+ obsolete, removed, all static method transfered to main.java.src2.main.java.controlP5.controlp5.controlp5.CP.java which will handle static method
+
+
+ * src controlP5.ControlWindowKeyListener.java:
+ obsolete, removed
+
+
+ * src controlP5.PAppletWindow.java:
+ obsolete, removed, currently there is no support for separate frames other than the main window due to removing java.awt dependencies
+
+
+ * src main.java.src2.main.java.controlP5.controlp5.ControlWindow.java:
+ removed mouseWheelMoved(MouseWheelEvent e) due to removal of java.awt dependencies
+ how to use an extra window, see example extra/ControlP5frame
+
+
+ * src controlP5.ControlWindowKeyHandler.java:
+ obsolete, removed, now handled by controlP5/ControlWindow.java
+
+
+ * src controlP5.CRect.java:
+ obsolete, removed, was only used by MultiList and MultiListButton - replaced with int array.
+
+
+ * src controlP5.ControlCanvas.java:
+ obsolete, removed, use main.java.src2.main.java.controlP5.controlp5.Canvas.java instead.
+
+
+2012-09-07 Andreas Schlegel
+
+ * version 1.5.1
+
+ * This version will be the last version that is stable and fully compatible with processing 1.5.1
+ due to major changes in the processing 2.0 version, future releases of controlp5 will only be
+ compatible with the processing 2.0 and higher versions.
+ The next controlp5 release will continue with version 2.0.1
+
+
+
+2012-08-25 Andreas Schlegel
+
+ * version 0.7.6
+
+ * src main.java.src2.main.java.controlP5.controlp5.Textfield.java:
+ fixing special character issue with e.g. �,�,�,�, etc.
+ backspace, left arrow, right arrow now respond when pressed longer
+ added isFocus()
+ implemented issue 56 http://code.google.com/p/controlp5/issues/detail?id=56 , thanks jeff
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.ControllerAutomator.java:
+ fixed annotation mapping for methods
+ added list support for methods
+
+ * src main.java.src2.main.java.controlP5.controlp5.CColor.java:
+ removing alpha masking
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.MultiList.java:
+ Conflict with moving a Multilist from one to another tab
+ removed field _myChildren. MultiListButtons are now store in the Controller's sublements filed.
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.ControllerInterface.java:
+ adding getArrayValue(int), setArrayValue(int, float), setArrayValue(float[]);
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.ControlP5.java:
+ adding setBroadcast(boolean) to disable/enable broadcasting of value changes.
+
+
+
+2012-05-30 Andreas Schlegel
+
+ * version 0.7.5
+
+ * src main.java.src2.main.java.controlP5.controlp5.Controller.java:
+ adding empty methods onPress(), onClick(), onRelease(), onReleaseOutside(),
+ onScroll(int),onMove(),onDrag() for input access when extending a controller.
+
+ * adding convenience constructor to Controllers, convenient when extending a Controller.
+
+ * adding example use/ControlP5extendController
+
+
+
+2012-05-18 Andreas Schlegel
+
+ * version 0.7.3
+
+ * src main.java.src2.main.java.controlP5.controlp5.ControlEvent.java:
+ adding getArrayValue(int), returns a float value for a given index, does not check for ArrayIndexOutOfBounds
+
+ * src main.java.src2.main.java.controlP5.controlp5.Slider.java:
+ issue 47 http://code.google.com/p/controlp5/issues/detail?id=47 fixed
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.CheckBox.java, main.java.src2.main.java.controlP5.controlp5.RadioButton.java:
+ issue 41 http://code.google.com/p/controlp5/issues/detail?id=41 fixed
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.Chart.java:
+ implemented
+
+ * src main.java.src2.main.java.controlP5.controlp5.ControlFont.java:
+ issue 46 http://code.google.com/p/controlp5/issues/detail?id=46 fixed
+
+ * src main.java.src2.main.java.controlP5.controlp5.ControlWindow.java:
+ sketches using controlP5 running in the browser as Applet did not work anymore, fixed
+
+ * src main.java.src2.main.java.controlP5.controlp5.ColorPicker.java:
+ missing implementation reported in http://forum.processing.org/topic/controlp5-how-to-receive-colorpicker-controlevents fixed
+ ColorPicker example has been modified accordingly
+
+ * src main.java.src2.main.java.controlP5.controlp5.Textfield.java:
+ issue 44 http://code.google.com/p/controlp5/issues/detail?id=44 fixed
+
+ * src controlP5.ControlWindowKeyHandler.java:
+ issue 49 http://code.google.com/p/controlp5/issues/detail?id=49 fixed, keys boolean array size increased to 525 due to windows key issue
+
+
+
+2012-01-15 Andreas Schlegel
+
+ * version 0.7.0
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.ControllerInterface.java, main.java.src2.main.java.controlP5.controlp5.Controller.java,main.java.src2.main.java.controlP5.controlp5.ControllerGroup.java:
+ adding generic type declaration for object specific method chaining (fluent interface)
+
+ * src main.java.src2.main.java.controlP5.controlp5.RadioButton.java:
+ changed return type for methods addItem from Toggle to RadioButton
+ changed return type for methods setImage from PImage to RadioButton
+
+
+
+
+2011-10-14 Andreas Schlegel
+
+ * version 0.6.9
+
+ * src main.java.src2.main.java.controlP5.controlp5.controlp5.Textarea.java:
+ included isScrollable() to adapt to ListBox
+
+
+2011-10-13 Andreas Schlegel
+
+ * version 0.6.8
+
+ * src main.java.src2.main.java.controlP5.controlp5.ControllerGroup.java, main.java.src2.main.java.controlP5.controlp5.Controller.java:
+ making addition to isVisible() to check if the parent element is invisible
+ in which case the child element will return false as well although the visible
+ state might be true. this fixes an issue with mousewheel scroll being active
+ for an invisible child controller. The mouseoverlist handling was updated as well.
+
+ * src main.java.src2.main.java.controlP5.controlp5.Slider.java:
+ Slider will only broadcast when there is a change in value when pressed
+
+ * src main.java.src2.main.java.controlP5.controlp5.ControlWindow.java:
+ mouseWheelMoved() now only updates the first item in the mouseoverlist
+ and then exits the loop
+
+
+2011-10-12 Andreas Schlegel
+
+ * version 0.6.7
+
+ * examples reorganized and grouped into 3 categories,
+ controllers, use, extra
+
+
+2011-10-07 Andreas Schlegel
+
+ * version 0.6.6
+
+ * src controlP5/Textarea.java:
+ scrollbar pixel offset fixed, setPosition update fixed.
+
+
+2011-09-22 Andreas Schlegel
+
+ * version 0.6.5
+
+ * src controlP5/ControlWindow.java:
+ adding removeMouseOverFor() to remove controllers from the mouseoverlist.
+ Called when a controller or group is removed. Necessary when a controller/group is removed
+ when clicked or hovered by the mouse.
+
+
+2011-09-20 Andreas Schlegel
+
+ * version 0.6.4
+
+ * src controlP5/Textfield.java:
+ adding support for PFont
+
+ * javadoc, new design
+
+
+
+2011-08-27 Andreas Schlegel
+
+ * version 0.6.3
+
+ * src controlP5/ListBox.java, controlP5/DropdownList.java:
+ adding mouseover support.
+
+ * src controlP5/ControlP5.java:
+ adding enableMouseWheel(), disableMouseWheel(), isMouseWheel()
+ by default the mouse wheel is active for Slider, Knob, Numberbox,
+ ListBox and DropdownList. The MouseWheelListener is handled
+ by each ControlWindow individually.
+
+ * src controlP5/ControlWindow.java:
+ adding getFrame() to access the frame object of a ControlWindow.
+
+
+2011-08-25 Andreas Schlegel
+
+ * version 0.6.2
+
+ * src controlP5/ControlP5.java:
+ removing static from the papplet field, this had consequences for some internal
+ calls to papplet but do not affect any publicly available methods or constructors
+ except the Label class which requires a controlP5 instances as it's constructor's
+ first parameter.
+
+ * src controlP5/ControlP5.java:
+ field keyHandler is now non-static
+
+ * src controlP5/Label.java:
+ adding a ControlP5 parameter to all Label constructors due to changes made
+ to field controlP5.papplet
+
+ * src controlP5/Textlabel.java:
+ Constructors with the first parameter of type Component have been deprecated
+ and replaced with constructors using a reference to ControlP5 as first parameter.
+ if this affects your programs, please make changes accordingly.
+
+
+2011-08-20 Andreas Schlegel
+
+ * version 0.6.1
+
+ * ongoing internal code refactoring, adding getter and setter methods for
+ existing methods (which are deprecated accordingly)
+
+ * reference cleanup
+
+ * preparing for release
+
+ * src controlP5/ControllerSprite.java:
+ deprecated
+
+ * src controlP5/ControlCanvas.java:
+ deprecated, use ControlWindowCanvas instead
+
+ * Names of controllers now follows the OSC address pattern specs,
+ use controlP5.printControllerMap() to see the changed address space.
+ This has been added to controlP5 since controllers now can be directly
+ linked to custom objects and not only to the instance of the main program.
+ http://opensoundcontrol.org/spec-1_0-examples
+ (OSC Address Parts not included)
+
+
+
+2011-06-25 Andreas Schlegel
+
+ * version 0.6.0
+
+ * adding Annotation support, very much inspired by cp5magic by Karsten Schmidt (toxi)
+ see the ControlP5annotation example for further details
+
+ * src controlP5/ControllerAutomator.java:
+ for internal use only, handles the reflection for the annotation implementation
+
+ * src controlP5/FieldChangedListener.java:
+ for internal use only, listens for changes of variables linked to controllers
+ (needs to be anabled, disabled by default)
+
+ * src controlP5/ScrollList.java:
+ ScrollList removed, use ListBox.
+
+ * src controlP5/ControllerGroup.java:
+ moveTo(Tab) changed according to issue http://code.google.com/p/controlp5/issues/detail?id=15
+
+ * src controlP5/ListBox.java,controlP5/DropdownList.java:
+ adding mousewheel support.
+
+ * src controlP5/CallbackEvent.java, controlP5/CallbackListener.java:
+ adding new callback event and listener for controller actions such as enter, leave, pressed, released, releasedoutside.
+ how to use see the ControlP5callback example
+
+ * src controlP5/Radio.java:
+ removed, has been deprecated. Use RadioButton or CheckBox instead.
+
+ * src controlP5/ControlWindow.Pointer.java:
+ adding a pointer class which can be used as replacement for mouse activity. To make use of the Pointer,
+ disable the mouse first and then set coordinates and events such as released and pressed from your program to
+ control controllers. see example ControlP5pointer
+
+
+2011-05-08 Andreas Schlegel
+
+ * version 0.5.9
+
+ * src controlP5/ControllerInterface.java:
+ adding method float[] arrayValue()
+
+ * src controlP5/ListBox.java:
+ adding addItems(String[]), which allows to add a string array to a ListBox or a DropdownList
+ automatically resulting in a list of listBoxItems
+
+ * src controlP5/ControlEvent.java:
+ adding method isFrom(String) and isFrom(ControllerInterface) to identify the origin of a Control Event
+
+2011-05-08 Andreas Schlegel
+
+ * version 0.5.8
+
+ * src controlP5/ListBox.java:
+ Scrollbar (when visible) is now included inside the dimensions of a listbox (and its derivatives).
+
+ * src controlP5/Textfield.java:
+ Frame which surrounds a textfield is back again after being removed in version 0.5.7.
+
+ * src controlP5/ListBox.java, controlP5/DropdownList.java:
+ adding key support. up and down arrows can be used to scroll listbox or dropdownList,
+ up and down, use shift+up/down for faster scrolling, use alt+up/down to jump to the
+ top or bottom.
+
+ * shuffle
+
+2011-02-14 Andreas Schlegel
+
+ * version 0.5.7
+
+ * src controlP5/Controller.java, controlP5/ControllerGroup.java:
+ toString now prints out Type, name and value instead of all details including position, etc.
+ detailed information can now be accessed through method info().
+
+ * src controlP5/Controller.java, controlP5/ControllerGroup.java:
+ adding method info() print out details such as position, visibility, label, id, etc. of
+ a Controller or ControllerGroup.
+
+ * src controlP5/ListBox.java:
+ adding ControlListeners to ListBox, will also be inherited
+ by DropdownList.
+
+ * src controlP5/ControlWindowKeyHandler.java:
+ Key combination ALT-L and ALT-S have been removed.
+ ControlP5 setups cant be saved at this point anymore. But
+ ControllerProperties have been introduced instead to save
+ properties for single controllers - how to use ControllerProperties
+ see the examples and source code of controlP5/ControllerProperties.java
+ and controlP5/ControllerProperty.java
+
+ * src controlP5/Textfield.java:
+ Introducing a new text-cursor. Frame which surrounds a textfield has been removed.
+
+ * src controlP5/Slider.java, Slider2D.java,
+ controlP5/Knob.java, controlP5/Numberbox.java:
+ adding shuffle() command, when called, a random value will be set
+ for the controller.
+
+ * src controlP5/Knob.java:
+ Caption Label was missing, now back.
+
+ * controlP5/Slider2D.java:
+ absolute, relative positioning issue resolved.
+ see http://forum.processing.org/topic/three-problems-i-m-having-with-controlp5
+
+ * src controlP5/ControlP5IOHandler.java:
+ Loading and saving controllers in xml format has been removed due
+ to incompletness. Alternatively ControllerProperties are introduced
+ with this release, see below for more details.
+
+ * src controlP5/ControlWindow.java:
+ Adding setPositionOfTabs() to change the origin of the tab bar.
+ Use controlP5.window().setPositionOfTabs(PVector) or
+ controlP5.window().setPositionOfTabs(int,int)
+
+ * src controlP5/ControlP5Base.java:
+ Adding saveProperties(String) and loadProperties(String) to
+ save and load serialized controller properties inside a file.
+ The range of controllers implementing save/load properties is yet
+ limited to Slider, Knob, Numberbox, Toggle, Checkbox,
+ RadioButton, Textlabel, Matrix,Range, textarea, ListBox, Dropdown,
+ colorPicker. Properties are currently saved in the java serialization
+ format but xml and possibily json alternatives are being worked out.
+
+ * src controlP5/ControllerProperty.java:
+ Adding controller property. Controllers can register properties which
+ can be saved in a serialized format.
+
+ * src controlP5/Matrix.java:
+ Adding setMode(int), please refer to to the documentation which
+ constants to use - cells can be activated by row, column, many-per-row-and-colum
+
+ * src controlP5/CColor.java:
+ Fields changed from protected to private, use setter and getter
+ to change color values. CColor is serializable so that instances can
+ be saved as properties.
+
+ * src controlP5/Accordion.java:
+ Adding new class Accordion, an Accordion allows similar behavior
+ as a common UI accordion, here it combines ControlGroups where
+ one or no group can be active at a time.
+
+ * src controlP5/CVector3f.java:
+ Removed. Replaced with processing.core.PVector.
+
+ * src controlP5/ControlP5.java:
+ Removing setFilePath(), setUrlPath(), urlPath(), filePath()
+
+ * src controlP5/ControlP5XMLElement.java,
+ ControlP5/ControlP5XMLParseException:
+ removed.
+
+ * src controlP5/ControlP5.java:
+ Adding convenience method window() which returns the controlWindow
+ of the sketch, before one had to use window(PApplet)
+
+
+2010-11-07 Andreas Schlegel
+
+ * version 0.5.6
+
+ * src/controlP5/ListBox.java:
+ adding updateListBoxItems() to update color changes.
+ adding scoll() calls to color related methods to update color
+ changes for currently active listBox buttons.
+
+ * src/controlP5/ListBox.java:
+ adding item(Controller) to access a ListBoxItem by it's Button reference.
+
+ * src/controlP5/ControlWindow.java:
+ use isMouseOver(Controller), getMouseOverList() to check
+ if the mouse is inside a specific controller. This does not work for
+ groups, only for controllers.
+
+
+
+
+2010-10-07 Andreas Schlegel
+
+ * version 0.5.5
+
+ * src/controlP5/ControlP5.java:
+ enableShortcuts() and disableShortcuts() were interchanged, fixed now.
+
+
+
+2010-09-30 Andreas Schlegel
+
+ * version 0.5.4
+
+ * src/controlP5/RadioButton.java:
+ adding setNoneSelectedAllowed(true/false) default is true.
+ http://forum.processing.org/topic/controlp5-radiobutton-strange-behaviour
+
+ * src/controlP5/DropdownList.java:
+ renaming PulldownMenu to DropdownList.
+
+ * src/controlP5/Range.java
+ setMin() and setMax() bug fixed.
+
+ * src/controlP5/ControlBroadcaster.java:
+ adding addListner(), removeListener(), getListener()
+ any object that implements ControlListener can register with the ControlBroadcaster to
+ receive ControlEvents broadcasted.
+
+ * src/controlP5/BitFontRenderer.java:
+ fixed ArrayIndexOutOfBoundsException
+ only characters between ASCII 32 and 127 are supported.
+
+ * src/controlP5/ControlP5.java:
+ disabled clear() call (called from within dispose()) when in applet mode.
+ Reason: all controllers will be cleared due to dispose call
+ when switching tabs. Fix required.
+
+ * src/controlP5/Button.java:
+ colorForeground and colorActive are reveresed due to adding an active state to buttons
+ when clicked. Rollovers no display colorForeground, clicked buttons will display
+ colorActive. This also affects ListBoxItems.
+
+
+2010-08-18 Andreas Schlegel
+
+ * version 0.5.3
+
+ * src/controlP5/ListBox.java:
+ adding clear(). clears a ListBox in order to re-filling list.
+
+ * src/controlP5/ListBox.java:
+ changing behavior of a ListBox-Button.
+ a ListBox-button is clicked, it will call the Button's onLeave()
+ and setIsInside(false) function to solve problem addressed here:
+ http://forum.processing.org/topic/controlp5-listbox-loses-mouseclicks
+
+ * src/controlP5/ListBox.java:
+ adding actAsPulldownMenu() to enable/disable pulldown
+ functionality for a ListBox.
+
+ * src/controlP5/PulldownMenu.java:
+ new Controller, extends ListBox, acts as a pulldown-menu.
+
+
+2010-08-03 Andreas Schlegel
+ * version 0.5.2
+ * Slider2D: a new Controller, 2D slider control.
+ * Button, Bang, Toggle, : setImage() defines an image for DEFAULT,OVER,ACTIVE,HIGHLIGHT mode.
+ * Button, Bang, Toggle, : setImages() defines an image for DEFAULT,OVER,ACTIVE,HIGHLIGHT mode.
+ * Button: adding setSwitch() in order to use a button as a switch (makes toggle obsolete)
+ * Button: adding booleanValue() returns true or false, useful in case a button is set to be a switch.
+ * Button: adding setOn() setOff(), useful when button is a switch.
+ * Toggle: changing default look to ControlP5.SWITCH, an on/off look for toggles. use toggle.setMode(ControlP5.DEFAULT) to reset to the old default look.
+ * ControllerDisplay: adding interface ControllerDisplay to enable custom displays for a controller.
+ * Controller: setImage, allows to replace the default look of a controller with an image (PImage).
+ * Controller: setDisplay allows custom displays for controller. the custom display is called from within a controller's draw function. A custom Display implements interface ControllerDisplay
+ * Controller: adding lock(), unlock(), isLock(), setMoveable(), isMoveable(), isUserInteraction(), setUserInteraction()
+ * Controller: adding plugTo(), unplugFrom() (if this causes any problems or error message, please report)
+ * ControlP5: adding java.util.logging.Logger for logging error, debug, info messages - wrapped in ControlP5.error(), ControlP5.warning(), ControlP5.info(), ControlP5.debug()
+ * ControlP5: added registerDispose()
+ * ControlP5: adding setMoveable() and isMoveable() to disable/enable controllers to be moved around.
+ * ControlP5: adding disableShortcuts(), enableShortcuts() instead of disableKeys() and enableKeys()
+ * ControlP5: deprecating lock(), unlock(), disableKeys(), enableKeys()
+ * ControlWindow: adding begin() and end(). this allows to move controllers automatically to the main window or a separate controlWindow.
+ * Toggle: adding setValue(boolean)
+ * Matrix: mouseReleasedOutside error fixed.
+ * ControlWindow: window is now properly removed when closed, thanks henri.
+ * TextLabel: adding setControlFont()
+ * Knob: all new.
+
+2010-04-04 Andreas Schlegel
+ * version 0.5.1
+ * ControlP5: lock() and unlock() are working again.
+ * ControlEvent: added function id() to make access to the id of controller, group, tab, etc. easier
+ * ControlEvent: added function type() for easier distinguishing between the type of Controller the event was triggered from, returns ControlEvent.UNDEFINED, ControlEvent.CONTROLLER, ControlEvent.TAB, ControlEvent.GROUP
+ * ListBoxItem: adding ListBoxItem to make changes to each item of a listBox especially the color settings of a listBoxItem.
+ * CColor: now with getter and setter functions, supports changing the value of the alpha channel.
+ * ControlWindow: adding begin() and end(). this allows to move controllers automatically to the main window or a separate controlWindow.
+ * ControllerGroup: adding enableCollapse(), disableCollapse(), isCollapse() to enable/disable the collapsing and opening of a controllerGroup e.g. listBox.
+
+2010-03-26 Andreas Schlegel
+ * version 0.5.0
+ * making transition to 1.5+, no more java 1.4 support.
+ * compiling against processing 1.1
+ * ControlP5: added disableKeys() and enableKeys(), suggested in the discourse. disables and enables keyEvents such as hide/show with ALT-h.
+ * Toggle: when inactive, the color refers to colorBackground instead of colorForeground now.
+ * ControlFont: smooth related functions have been disabled and deprecated due to processing 1.1 changes.
+ * Slider: use alignValueLabel() to position the value label of a slider on TOP, CENTER, or BOTTOM
+ * example ControlP5quick: new, ControlP5quick shows how to quickly add Controllers with auto-arrangement.
+
+2010-02-16 Andreas Schlegel
+ * version 0.4.7
+ * Slider: adding TickMarks and replacing steps with snapToTickMarks().
+ * ControlWindow: adding setUndecorated(), isUndecorated(), toggleUndecorated()
+ * ControllerSprite: sprites are now clone-able and state management has been improved, thanks to c.a. church. http://processing.org/discourse/yabb2/YaBB.pl?num=1265905257
+ * Controller: adding getSprite()
+ * BitFontRenderer: adding warning for character that are not supported by the BitFontRenderer.
+
+2010-02-06 Andreas Schlegel
+ * version 0.4.6
+ * ControlWindow: imageMode was not set back to CENTER/CORNER correctly, now fixed.
+
+0.4.5
+ * ControllerGroup: adding moveTo(String). will move ControllerGroups such as e.g. Textarea to another tab.
+
+0.4.4
+ * ControlWindow: imageMode CENTER/CORNER issue fixed.
+
+0.4.3
+ * Controller.isInside is private now. use setIsInside(true/false) and getIsInside() to access this boolean field.
+ * trying to solve the problem of overlapping described here:
+ http://processing.org/discourse/yabb2/YaBB.pl?num=1259885420/0#0
+ yet not successful, but loops managing the mouseEvents have been reversed from i++ to i--
+ * CheckBox,RadioButton: adding activateAll, activate, deactivate, getState to CheckBox and RadioButton to be able to control individual items by code.
+ * CheckBox: adding toggle() to CheckBox to be able to toggle individual items of a checkBox.
+ * CheckBox,RadioButton: adding setItemHeight(), setItemWidth() to radioButton and checkBox
+ * Toggle: adding toggle()
+
+0.4.2
+-
+
+0.4.1
+ * Controller: added changeValue() to change the float value of a controller without broadcasting its change as a event.
+ * Numberbox: added setMultiplier() and multiplier() to customize the value sensitivity.
+ * Toggle: setLabelVisible() is now working.
+ * ControlWindow: adding setTitle, showCoordinates, hideCoordinates to ControlWindow. only applies to controlWindows of type PAppletWindow (external window).
+ * adding Matrix.set
+ * Controller: Controller.isInside() is public now
+ * added ControlFont. does not support textarea and textfield yet.
+
+(note: take a look at subversion changelog generator http://ch.tudelft.nl/~arthur/svn2cl/)
+
+0.3.15
+ * Texfield: textfield scrolls to the left if text is larger than display area.
+ * Knob: knob setValue issue solved.
+
+ * BitFontRenderer: removed getWidth(String theText, int theFontIndex)
+ is now getWidth(String theText, Label theLabel);
+ removed getWidth(String theText, int theFontIndex, int theLength))
+ is now getWidth(String theText, Label theLabel, int theLength));
+
+
+0.3.14
+ * ScrollList: adding void hideScrollbar()
+ adding void showScrollbar()
+ adding void showScrollbar()
+ adding void scroll(float)
+ adding boolean isScrollbarVisible()
+
+ * Textarea: adding void hideScrollbar()
+ adding void showScrollbar()
+ adding void showScrollbar()
+ adding void scroll(float)
+ adding boolean isScrollbarVisible()
+
+ * Textfield: textinput now works from a controlWindow
+
+ * Label: adding adjust() to fix the cutting off of Labels when changing fonts.
+ use e.g. mySlider.captionLabel().setFont(ControlP5.grixel).adjust();
+
+0.3.13
+ * Textfield: adding setAutoClear(true/false) prevents the textfield to be cleared after pressing RETURN.
+ adding clear(), clears the current textline
+ adding keepFocus(true/false)
+ adding getTextList()
+ adding setAutoClear(true/false)
+ adding isAutoClear()
+ adding submit()
+
+0.3.12
+ * Radio: if deactiveAll is set before the first button is added, the first button will not trigger an event.
+ * ControlGroup: added method getBackgroundHeight() to get the height of a group's background that has been set before.
+ * Textfield: fixed bug with clearing the variable myTextline too early.
+
+0.3.11
+ * Textfield: added method setText to Textfield
+ * Range: made corrections to Range, _myUnit was not set properly. now fixed. Range remains experimental.
+
+0.3.10
+ * fixed little issues with setColor, again.
+ * removed decimal point when setDecimalPrecision(0)
+
+0.3.9
+ * Range: defaultValue for min shows correct value now.
+ * Radio: added deactivateAll()
+ * TextLabel: added setWidth, setHeight
+ * setColor -Label(), -Active(), -Value(), -Foreground(), -Background(): issues resolved and tested for slider, range, button, knob, sliderlist, multilist, toggle, radio
+ * Controller: added method setDecimalPrecision(int theNum) to set the decimal precision for floats when displayed as valueLabel. the precision does not apply to the returned float value.
+ Controller.captionLabel().set("txt") is fixed.
+ * ControlP5: controlP5.setAutoDraw(true/false) issue is fixed.
+ * ControlWindow: controlWindow.post() has been deleted.
+ * Knob: issue with minimum value has been resolved.
+
+how to move a textlabel that has been created with "new" to a tab other than the default:
+Tab myTab = controlP5.addTab("new");
+Textlabel myTextlabel = new Textlabel(this,"a single textlabel.",20,100,400,200,0xffff0000,ControlP5.synt24);
+myTab.addDrawable(myTextlabel);
+
diff --git a/controlP5/events/ReleasedOutsideListener.java b/controlP5/events/ReleasedOutsideListener.java
new file mode 100644
index 0000000..eceda20
--- /dev/null
+++ b/controlP5/events/ReleasedOutsideListener.java
@@ -0,0 +1,6 @@
+package main.java.src2.main.java.controlP5.controlP5.events;
+
+public interface ReleasedOutsideListener {
+ void mouseReleasedOutside( ) ;
+
+}
diff --git a/controlP5/layout/ControllerFactory.java b/controlP5/layout/ControllerFactory.java
new file mode 100644
index 0000000..73f0eb1
--- /dev/null
+++ b/controlP5/layout/ControllerFactory.java
@@ -0,0 +1,132 @@
+package main.java.src2.main.java.controlP5.controlP5.layout;
+
+import controlP5.*;
+import main.java.src2.main.java.controlP5.controlP5.layout.lang.XMLParser;
+import processing.core.PApplet;
+
+import java.lang.reflect.Constructor;
+import java.util.*;
+
+public class ControllerFactory {
+ private final PApplet applet;
+ private final ControlP5 cp5;
+ private final Map> controlMap;
+
+
+ public ControllerFactory(PApplet applet, ControlP5 cp5) {
+ this.applet = applet;
+ this.cp5 = cp5;
+
+
+ controlMap = new HashMap<>();
+// controlMap.put("Accordion", Accordion.class);
+// controlMap.put("Background", Background.class);
+// controlMap.put("Canvas", Canvas.class);
+// controlMap.put("ChartData", ChartData.class);
+// controlMap.put("ChartDataSet", ChartDataSet.class);
+// controlMap.put("CheckBox", CheckBox.class);
+// controlMap.put("ColorPicker", ColorPicker.class);
+// controlMap.put("Group", Group.class);
+// controlMap.put("Label", Label.class);
+// controlMap.put("RadioButton", RadioButton.class);
+// controlMap.put("Textarea", Textarea.class);
+// controlMap.put("TickMark", TickMark.class);
+// controlMap.put("Tooltip", Tooltip.class);
+ controlMap.put("Bang", Bang.class);
+ controlMap.put("Button", Button.class);
+ controlMap.put("ButtonBar", ButtonBar.class);
+ controlMap.put("Chart", Chart.class);
+ controlMap.put("ColorWheel", ColorWheel.class);
+ controlMap.put("Icon", Icon.class);
+ controlMap.put("Knob", Knob.class);
+ controlMap.put("ListBox", ListBox.class);
+ controlMap.put("Matrix", Matrix.class);
+ controlMap.put("MultiList", MultiList.class);
+ controlMap.put("MultilineTextfield", MultilineTextfield.class);
+ controlMap.put("Numberbox", Numberbox.class);
+ controlMap.put("Range", Range.class);
+ controlMap.put("ScrollableList", ScrollableList.class);
+ controlMap.put("Slider", Slider.class);
+ controlMap.put("Slider2D", Slider2D.class);
+ controlMap.put("Spacer", Spacer.class);
+ controlMap.put("Textfield", Textfield.class);
+ controlMap.put("Textlabel", Textlabel.class);
+ controlMap.put("Toggle", Toggle.class);
+
+ }
+
+ /* creates a controller based on the controlName */
+ public Controller> createController(String controlName) {
+ Class extends Controller> controllerClass = controlMap.get(controlName);
+ if (controllerClass == null) {
+ throw new IllegalArgumentException("Invalid control name: " + controlName);
+ }
+
+ try {
+ //instantiate the controller
+ Constructor extends Controller> constructor = controllerClass.getConstructor(ControlP5.class,String.class);
+ return constructor.newInstance(cp5,"");
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to create control: " + controlName, e);
+ }
+ }
+
+ public Group createGroup(String groupName) {
+ return new Group(cp5, groupName);
+ };
+
+ public void configure(Controller> controller, String attrName, XMLParser.ValueContext attrValueContext) {
+ // eg. turn things like '23px' or '35%' into pixels value
+ int attrValue = getValue(attrValueContext);
+
+ switch (attrName) {
+ case "x":
+ controller.setPosition(attrValue, controller.getPosition()[1]);
+ break;
+ case "y":
+ controller.setPosition(controller.getPosition()[0], attrValue);
+ break;
+ case "width":
+ controller.setWidth(attrValue);
+ break;
+ case "height":
+ controller.setHeight(attrValue);
+ break;
+ case "color":
+ // Assuming color value is given as a hex string
+ break;
+// case "label":
+// controller.setLabel(attrValue);
+// break;
+// case "visible":
+// controller.setVisible(Boolean.parseBoolean(attrValue));
+// break;
+// case "captionLabel":
+// controller.getCaptionLabel().setText(attrValue);
+// break;
+// case "valueLabel":
+// controller.getValueLabel().setText(attrValue);
+// break;
+ default:
+ System.out.println("Unknown attribute: " + attrName);
+ }
+ }
+
+ private int getValue(XMLParser.ValueContext ctx) {
+ String unit = ctx.UNIT().getText();
+ String value = ctx.NUMBER().getText();
+
+ switch (unit) {
+ case "px":
+ return Integer.parseInt(value);
+ case "%":
+ //get tabs
+ ControllerList _myTabs = cp5.getWindow().getTabs();
+
+ return (int) (Float.parseFloat(value) / 100.0f * _myTabs.get(0).getWidth());
+
+ default:
+ throw new IllegalArgumentException("Unknown unit: " + unit);
+ }
+ }
+}
diff --git a/controlP5/layout/LayoutBuilder.java b/controlP5/layout/LayoutBuilder.java
new file mode 100644
index 0000000..790007d
--- /dev/null
+++ b/controlP5/layout/LayoutBuilder.java
@@ -0,0 +1,165 @@
+package main.java.src2.main.java.controlP5.controlP5.layout;
+
+
+import main.java.src2.main.java.controlP5.controlP5.ControlP5;
+import main.java.src2.main.java.controlP5.controlP5.layout.lang.XMLBaseVisitor;
+import main.java.src2.main.java.controlP5.controlP5.layout.lang.XMLLexer;
+import main.java.src2.main.java.controlP5.controlP5.layout.lang.XMLParser;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.tree.*;
+import org.antlr.v4.runtime.tree.ParseTreeWalker;
+import processing.core.PApplet;
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.HashMap;
+
+
+public class LayoutBuilder {
+ private final ControlP5 _cp5;
+ private final PApplet _pApplet;
+ private final Deque contextStack = new ArrayDeque<>();
+
+ public LayoutBuilder(PApplet pApplet, ControlP5 cp5) {
+ _cp5 = cp5;
+ _pApplet = pApplet;
+
+
+ }
+
+ public void parseXML(String xml) throws Exception {
+ ANTLRInputStream input = new ANTLRInputStream(xml);
+ XMLLexer lexer = new XMLLexer(input);
+ CommonTokenStream tokens = new CommonTokenStream(lexer);
+ XMLParser parser = new XMLParser(tokens);
+ ParseTree tree = parser.document();
+
+ //create walker
+ ParseTreeWalker walker = new ParseTreeWalker();
+ XMLVisitor visitor = new XMLVisitor(_pApplet, _cp5);
+ visitor.visit(tree);
+
+
+ }
+
+ private class XMLVisitor extends XMLBaseVisitor {
+
+ private final ControlP5 _cp5;
+ private final PApplet _pApplet;
+
+ public XMLVisitor(PApplet pApplet, ControlP5 cp5) {
+ _cp5 = cp5;
+ _pApplet = pApplet;
+ }
+
+
+ //visit first node
+ @Override
+ public Object visitDocument(XMLParser.DocumentContext ctx) {
+ // get width and height from the papplet
+ int parentWidth = _pApplet.width;
+ int parentHeight = _pApplet.height;
+
+
+ //visit children
+ for (int i = 0; i < ctx.children.size(); i++) {
+ contextStack.push(new ElementProps(parentWidth, parentHeight));
+ visit(ctx.children.get(i));
+ contextStack.pop();
+ }
+
+ return null;
+
+ }
+
+ @Override
+ public Object visitElement(XMLParser.ElementContext ctx) {
+ //parent props
+ ElementProps parentProps = contextStack.peek();
+ Tag tag = (Tag) visitStartTag(ctx.startTag());
+ System.out.println("im a " + tag.getName() + " and my parent has " + parentProps.width + " " + parentProps.height);
+
+
+
+ //visit children
+ for (int i = 0; i < ctx.children.size(); i++) {
+ contextStack.push(new ElementProps(parentProps.width/2, parentProps.height/2));
+ visit(ctx.children.get(i));
+ contextStack.pop();
+ }
+
+
+ return null;
+ }
+
+ @Override
+ public Object visitStartTag(XMLParser.StartTagContext ctx) {
+ HashMap> attributes = new HashMap<>();
+ for (int i = 0; i < ctx.attribute().size() ; i++) {
+ Attribute> attribute = (Attribute>) visitAttribute(ctx.attribute(i));
+ attributes.put(attribute.getName(), attribute);
+ }
+
+ Tag tag = new Tag(ctx.Name().getText(), attributes);
+ return tag;
+ }
+
+ @Override
+ public Object visitAttribute(XMLParser.AttributeContext ctx) {
+ if(ctx.value().STRING() != null){
+ String name = ctx.Name().getText();
+ String value = ctx.value().STRING().getText();
+ return new Attribute(name, value);
+ }else if(ctx.value().NUMBER() != null) {
+ String name = ctx.Name().getText();
+ int value = Integer.parseInt(ctx.value().NUMBER().getText());
+
+ return new Attribute(name, value);
+ }
+ return null;
+ }
+
+
+ }
+
+ private class ElementProps {
+ int width;
+ int height;
+
+ public ElementProps(int width, int height) {
+ this.width = width;
+ this.height = height;
+ }
+ }
+
+ private class Tag {
+ private String name;
+ private HashMap> attributes;
+
+ public Tag(String name, HashMap> attributes) {
+ this.name = name;
+ this.attributes = attributes;
+ }
+ public String getName() {
+ return name;
+ }
+ public HashMap> getAttributes() {
+ return attributes;
+ }
+ }
+
+ private class Attribute {
+ private String name;
+ private T value;
+
+ public Attribute(String name, T value) {
+ this.name = name;
+ this.value = value;
+ }
+ public String getName() {
+ return name;
+ }
+ public T getValue() {
+ return value;
+ }
+ }
+}
diff --git a/controlP5/layout/XML.g4 b/controlP5/layout/XML.g4
new file mode 100644
index 0000000..08e98a6
--- /dev/null
+++ b/controlP5/layout/XML.g4
@@ -0,0 +1,35 @@
+grammar XML;
+
+document : '' element+ '' ;
+
+element : startTag (content )? endTag
+ | SELF_CLOSING
+ ;
+
+startTag : OPEN Name attribute* CLOSE ;
+
+endTag : OPEN_SLASH Name CLOSE ;
+
+SELF_CLOSING : OPEN Name SLASH_CLOSE ;
+
+attribute : Name EQUALS value ;
+
+content : element | STRING ;
+
+value: STRING
+ | NUMBER UNIT;
+
+UNIT: 'px' | '%';
+WS : [ \t\r\n]+ -> skip;
+OPEN : '<' ;
+OPEN_SLASH: '' ;
+CLOSE : '>' ;
+SLASH_CLOSE: '/>' ;
+EQUALS : '=' ;
+
+Name : ALPHA (ALPHA | DIGIT | '.' | '-' | '_')* ;
+STRING : '"' ( ~'"' )* '"' | '\'' ( ~'\'' )* '\'' ;
+NUMBER : DIGIT+ ;
+
+fragment DIGIT : [0-9] ;
+fragment ALPHA : [a-zA-Z] ;
diff --git a/controlP5/layout/lang/XML.interp b/controlP5/layout/lang/XML.interp
new file mode 100644
index 0000000..b98a8de
--- /dev/null
+++ b/controlP5/layout/lang/XML.interp
@@ -0,0 +1,44 @@
+token literal names:
+null
+''
+''
+null
+null
+null
+'<'
+''
+'>'
+'/>'
+'='
+null
+null
+null
+
+token symbolic names:
+null
+null
+null
+SELF_CLOSING
+UNIT
+WS
+OPEN
+OPEN_SLASH
+CLOSE
+SLASH_CLOSE
+EQUALS
+Name
+STRING
+NUMBER
+
+rule names:
+document
+element
+startTag
+endTag
+attribute
+content
+value
+
+
+atn:
+[4, 1, 13, 59, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 1, 0, 1, 0, 4, 0, 17, 8, 0, 11, 0, 12, 0, 18, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 25, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 30, 8, 1, 1, 2, 1, 2, 1, 2, 5, 2, 35, 8, 2, 10, 2, 12, 2, 38, 9, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 3, 5, 52, 8, 5, 1, 6, 1, 6, 1, 6, 3, 6, 57, 8, 6, 1, 6, 0, 0, 7, 0, 2, 4, 6, 8, 10, 12, 0, 0, 57, 0, 14, 1, 0, 0, 0, 2, 29, 1, 0, 0, 0, 4, 31, 1, 0, 0, 0, 6, 41, 1, 0, 0, 0, 8, 45, 1, 0, 0, 0, 10, 51, 1, 0, 0, 0, 12, 56, 1, 0, 0, 0, 14, 16, 5, 1, 0, 0, 15, 17, 3, 2, 1, 0, 16, 15, 1, 0, 0, 0, 17, 18, 1, 0, 0, 0, 18, 16, 1, 0, 0, 0, 18, 19, 1, 0, 0, 0, 19, 20, 1, 0, 0, 0, 20, 21, 5, 2, 0, 0, 21, 1, 1, 0, 0, 0, 22, 24, 3, 4, 2, 0, 23, 25, 3, 10, 5, 0, 24, 23, 1, 0, 0, 0, 24, 25, 1, 0, 0, 0, 25, 26, 1, 0, 0, 0, 26, 27, 3, 6, 3, 0, 27, 30, 1, 0, 0, 0, 28, 30, 5, 3, 0, 0, 29, 22, 1, 0, 0, 0, 29, 28, 1, 0, 0, 0, 30, 3, 1, 0, 0, 0, 31, 32, 5, 6, 0, 0, 32, 36, 5, 11, 0, 0, 33, 35, 3, 8, 4, 0, 34, 33, 1, 0, 0, 0, 35, 38, 1, 0, 0, 0, 36, 34, 1, 0, 0, 0, 36, 37, 1, 0, 0, 0, 37, 39, 1, 0, 0, 0, 38, 36, 1, 0, 0, 0, 39, 40, 5, 8, 0, 0, 40, 5, 1, 0, 0, 0, 41, 42, 5, 7, 0, 0, 42, 43, 5, 11, 0, 0, 43, 44, 5, 8, 0, 0, 44, 7, 1, 0, 0, 0, 45, 46, 5, 11, 0, 0, 46, 47, 5, 10, 0, 0, 47, 48, 3, 12, 6, 0, 48, 9, 1, 0, 0, 0, 49, 52, 3, 2, 1, 0, 50, 52, 5, 12, 0, 0, 51, 49, 1, 0, 0, 0, 51, 50, 1, 0, 0, 0, 52, 11, 1, 0, 0, 0, 53, 57, 5, 12, 0, 0, 54, 55, 5, 13, 0, 0, 55, 57, 5, 4, 0, 0, 56, 53, 1, 0, 0, 0, 56, 54, 1, 0, 0, 0, 57, 13, 1, 0, 0, 0, 6, 18, 24, 29, 36, 51, 56]
\ No newline at end of file
diff --git a/controlP5/layout/lang/XML.tokens b/controlP5/layout/lang/XML.tokens
new file mode 100644
index 0000000..30d639a
--- /dev/null
+++ b/controlP5/layout/lang/XML.tokens
@@ -0,0 +1,20 @@
+T__0=1
+T__1=2
+SELF_CLOSING=3
+UNIT=4
+WS=5
+OPEN=6
+OPEN_SLASH=7
+CLOSE=8
+SLASH_CLOSE=9
+EQUALS=10
+Name=11
+STRING=12
+NUMBER=13
+''=1
+''=2
+'<'=6
+''=7
+'>'=8
+'/>'=9
+'='=10
diff --git a/controlP5/layout/lang/XMLBaseListener.java b/controlP5/layout/lang/XMLBaseListener.java
new file mode 100644
index 0000000..5a60161
--- /dev/null
+++ b/controlP5/layout/lang/XMLBaseListener.java
@@ -0,0 +1,124 @@
+// Generated from XML.g4 by ANTLR 4.13.0
+package main.java.src2.main.java.controlP5.controlP5.layout.lang;
+
+import org.antlr.v4.runtime.ParserRuleContext;
+import org.antlr.v4.runtime.tree.ErrorNode;
+import org.antlr.v4.runtime.tree.TerminalNode;
+
+/**
+ * This class provides an empty implementation of {@link XMLListener},
+ * which can be extended to create a listener which only needs to handle a subset
+ * of the available methods.
+ */
+@SuppressWarnings("CheckReturnValue")
+public class XMLBaseListener implements XMLListener {
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDocument(XMLParser.DocumentContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDocument(XMLParser.DocumentContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterElement(XMLParser.ElementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitElement(XMLParser.ElementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterStartTag(XMLParser.StartTagContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitStartTag(XMLParser.StartTagContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterEndTag(XMLParser.EndTagContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitEndTag(XMLParser.EndTagContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterAttribute(XMLParser.AttributeContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitAttribute(XMLParser.AttributeContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterContent(XMLParser.ContentContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitContent(XMLParser.ContentContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterValue(XMLParser.ValueContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitValue(XMLParser.ValueContext ctx) { }
+
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterEveryRule(ParserRuleContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitEveryRule(ParserRuleContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void visitTerminal(TerminalNode node) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void visitErrorNode(ErrorNode node) { }
+}
\ No newline at end of file
diff --git a/controlP5/layout/lang/XMLBaseVisitor.java b/controlP5/layout/lang/XMLBaseVisitor.java
new file mode 100644
index 0000000..fac4180
--- /dev/null
+++ b/controlP5/layout/lang/XMLBaseVisitor.java
@@ -0,0 +1,64 @@
+// Generated from XML.g4 by ANTLR 4.13.0
+package main.java.src2.main.java.controlP5.controlP5.layout.lang;
+import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
+
+/**
+ * This class provides an empty implementation of {@link XMLVisitor},
+ * which can be extended to create a visitor which only needs to handle a subset
+ * of the available methods.
+ *
+ * @param The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+@SuppressWarnings("CheckReturnValue")
+public class XMLBaseVisitor extends AbstractParseTreeVisitor implements XMLVisitor {
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDocument(XMLParser.DocumentContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitElement(XMLParser.ElementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitStartTag(XMLParser.StartTagContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitEndTag(XMLParser.EndTagContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitAttribute(XMLParser.AttributeContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitContent(XMLParser.ContentContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitValue(XMLParser.ValueContext ctx) { return visitChildren(ctx); }
+}
\ No newline at end of file
diff --git a/controlP5/layout/lang/XMLLexer.interp b/controlP5/layout/lang/XMLLexer.interp
new file mode 100644
index 0000000..5848fd8
--- /dev/null
+++ b/controlP5/layout/lang/XMLLexer.interp
@@ -0,0 +1,58 @@
+token literal names:
+null
+''
+''
+null
+null
+null
+'<'
+''
+'>'
+'/>'
+'='
+null
+null
+null
+
+token symbolic names:
+null
+null
+null
+SELF_CLOSING
+UNIT
+WS
+OPEN
+OPEN_SLASH
+CLOSE
+SLASH_CLOSE
+EQUALS
+Name
+STRING
+NUMBER
+
+rule names:
+T__0
+T__1
+SELF_CLOSING
+UNIT
+WS
+OPEN
+OPEN_SLASH
+CLOSE
+SLASH_CLOSE
+EQUALS
+Name
+STRING
+NUMBER
+DIGIT
+ALPHA
+
+channel names:
+DEFAULT_TOKEN_CHANNEL
+HIDDEN
+
+mode names:
+DEFAULT_MODE
+
+atn:
+[4, 0, 13, 114, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 3, 3, 58, 8, 3, 1, 4, 4, 4, 61, 8, 4, 11, 4, 12, 4, 62, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 5, 10, 83, 8, 10, 10, 10, 12, 10, 86, 9, 10, 1, 11, 1, 11, 5, 11, 90, 8, 11, 10, 11, 12, 11, 93, 9, 11, 1, 11, 1, 11, 1, 11, 5, 11, 98, 8, 11, 10, 11, 12, 11, 101, 9, 11, 1, 11, 3, 11, 104, 8, 11, 1, 12, 4, 12, 107, 8, 12, 11, 12, 12, 12, 108, 1, 13, 1, 13, 1, 14, 1, 14, 0, 0, 15, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 0, 29, 0, 1, 0, 6, 3, 0, 9, 10, 13, 13, 32, 32, 2, 0, 45, 46, 95, 95, 1, 0, 34, 34, 1, 0, 39, 39, 1, 0, 48, 57, 2, 0, 65, 90, 97, 122, 120, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 1, 31, 1, 0, 0, 0, 3, 40, 1, 0, 0, 0, 5, 50, 1, 0, 0, 0, 7, 57, 1, 0, 0, 0, 9, 60, 1, 0, 0, 0, 11, 66, 1, 0, 0, 0, 13, 68, 1, 0, 0, 0, 15, 71, 1, 0, 0, 0, 17, 73, 1, 0, 0, 0, 19, 76, 1, 0, 0, 0, 21, 78, 1, 0, 0, 0, 23, 103, 1, 0, 0, 0, 25, 106, 1, 0, 0, 0, 27, 110, 1, 0, 0, 0, 29, 112, 1, 0, 0, 0, 31, 32, 5, 60, 0, 0, 32, 33, 5, 87, 0, 0, 33, 34, 5, 105, 0, 0, 34, 35, 5, 110, 0, 0, 35, 36, 5, 100, 0, 0, 36, 37, 5, 111, 0, 0, 37, 38, 5, 119, 0, 0, 38, 39, 5, 62, 0, 0, 39, 2, 1, 0, 0, 0, 40, 41, 5, 60, 0, 0, 41, 42, 5, 47, 0, 0, 42, 43, 5, 87, 0, 0, 43, 44, 5, 105, 0, 0, 44, 45, 5, 110, 0, 0, 45, 46, 5, 100, 0, 0, 46, 47, 5, 111, 0, 0, 47, 48, 5, 119, 0, 0, 48, 49, 5, 62, 0, 0, 49, 4, 1, 0, 0, 0, 50, 51, 3, 11, 5, 0, 51, 52, 3, 21, 10, 0, 52, 53, 3, 17, 8, 0, 53, 6, 1, 0, 0, 0, 54, 55, 5, 112, 0, 0, 55, 58, 5, 120, 0, 0, 56, 58, 5, 37, 0, 0, 57, 54, 1, 0, 0, 0, 57, 56, 1, 0, 0, 0, 58, 8, 1, 0, 0, 0, 59, 61, 7, 0, 0, 0, 60, 59, 1, 0, 0, 0, 61, 62, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 65, 6, 4, 0, 0, 65, 10, 1, 0, 0, 0, 66, 67, 5, 60, 0, 0, 67, 12, 1, 0, 0, 0, 68, 69, 5, 60, 0, 0, 69, 70, 5, 47, 0, 0, 70, 14, 1, 0, 0, 0, 71, 72, 5, 62, 0, 0, 72, 16, 1, 0, 0, 0, 73, 74, 5, 47, 0, 0, 74, 75, 5, 62, 0, 0, 75, 18, 1, 0, 0, 0, 76, 77, 5, 61, 0, 0, 77, 20, 1, 0, 0, 0, 78, 84, 3, 29, 14, 0, 79, 83, 3, 29, 14, 0, 80, 83, 3, 27, 13, 0, 81, 83, 7, 1, 0, 0, 82, 79, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 81, 1, 0, 0, 0, 83, 86, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 84, 85, 1, 0, 0, 0, 85, 22, 1, 0, 0, 0, 86, 84, 1, 0, 0, 0, 87, 91, 5, 34, 0, 0, 88, 90, 8, 2, 0, 0, 89, 88, 1, 0, 0, 0, 90, 93, 1, 0, 0, 0, 91, 89, 1, 0, 0, 0, 91, 92, 1, 0, 0, 0, 92, 94, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0, 94, 104, 5, 34, 0, 0, 95, 99, 5, 39, 0, 0, 96, 98, 8, 3, 0, 0, 97, 96, 1, 0, 0, 0, 98, 101, 1, 0, 0, 0, 99, 97, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 102, 1, 0, 0, 0, 101, 99, 1, 0, 0, 0, 102, 104, 5, 39, 0, 0, 103, 87, 1, 0, 0, 0, 103, 95, 1, 0, 0, 0, 104, 24, 1, 0, 0, 0, 105, 107, 3, 27, 13, 0, 106, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 26, 1, 0, 0, 0, 110, 111, 7, 4, 0, 0, 111, 28, 1, 0, 0, 0, 112, 113, 7, 5, 0, 0, 113, 30, 1, 0, 0, 0, 9, 0, 57, 62, 82, 84, 91, 99, 103, 108, 1, 6, 0, 0]
\ No newline at end of file
diff --git a/controlP5/layout/lang/XMLLexer.java b/controlP5/layout/lang/XMLLexer.java
new file mode 100644
index 0000000..6b3730f
--- /dev/null
+++ b/controlP5/layout/lang/XMLLexer.java
@@ -0,0 +1,185 @@
+// Generated from XML.g4 by ANTLR 4.13.0
+package main.java.src2.main.java.controlP5.controlP5.layout.lang;
+import org.antlr.v4.runtime.Lexer;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.TokenStream;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.misc.*;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
+public class XMLLexer extends Lexer {
+ static { RuntimeMetaData.checkVersion("4.13.0", RuntimeMetaData.VERSION); }
+
+ protected static final DFA[] _decisionToDFA;
+ protected static final PredictionContextCache _sharedContextCache =
+ new PredictionContextCache();
+ public static final int
+ T__0=1, T__1=2, SELF_CLOSING=3, UNIT=4, WS=5, OPEN=6, OPEN_SLASH=7, CLOSE=8,
+ SLASH_CLOSE=9, EQUALS=10, Name=11, STRING=12, NUMBER=13;
+ public static String[] channelNames = {
+ "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
+ };
+
+ public static String[] modeNames = {
+ "DEFAULT_MODE"
+ };
+
+ private static String[] makeRuleNames() {
+ return new String[] {
+ "T__0", "T__1", "SELF_CLOSING", "UNIT", "WS", "OPEN", "OPEN_SLASH", "CLOSE",
+ "SLASH_CLOSE", "EQUALS", "Name", "STRING", "NUMBER", "DIGIT", "ALPHA"
+ };
+ }
+ public static final String[] ruleNames = makeRuleNames();
+
+ private static String[] makeLiteralNames() {
+ return new String[] {
+ null, "''", "''", null, null, null, "'<'", "''", "'>'",
+ "'/>'", "'='"
+ };
+ }
+ private static final String[] _LITERAL_NAMES = makeLiteralNames();
+ private static String[] makeSymbolicNames() {
+ return new String[] {
+ null, null, null, "SELF_CLOSING", "UNIT", "WS", "OPEN", "OPEN_SLASH",
+ "CLOSE", "SLASH_CLOSE", "EQUALS", "Name", "STRING", "NUMBER"
+ };
+ }
+ private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
+ public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+ /**
+ * @deprecated Use {@link #VOCABULARY} instead.
+ */
+ @Deprecated
+ public static final String[] tokenNames;
+ static {
+ tokenNames = new String[_SYMBOLIC_NAMES.length];
+ for (int i = 0; i < tokenNames.length; i++) {
+ tokenNames[i] = VOCABULARY.getLiteralName(i);
+ if (tokenNames[i] == null) {
+ tokenNames[i] = VOCABULARY.getSymbolicName(i);
+ }
+
+ if (tokenNames[i] == null) {
+ tokenNames[i] = "";
+ }
+ }
+ }
+
+ @Override
+ @Deprecated
+ public String[] getTokenNames() {
+ return tokenNames;
+ }
+
+ @Override
+
+ public Vocabulary getVocabulary() {
+ return VOCABULARY;
+ }
+
+
+ public XMLLexer(CharStream input) {
+ super(input);
+ _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+ }
+
+ @Override
+ public String getGrammarFileName() { return "XML.g4"; }
+
+ @Override
+ public String[] getRuleNames() { return ruleNames; }
+
+ @Override
+ public String getSerializedATN() { return _serializedATN; }
+
+ @Override
+ public String[] getChannelNames() { return channelNames; }
+
+ @Override
+ public String[] getModeNames() { return modeNames; }
+
+ @Override
+ public ATN getATN() { return _ATN; }
+
+ public static final String _serializedATN =
+ "\u0004\u0000\rr\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+
+ "\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+
+ "\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+
+ "\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+
+ "\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0001"+
+ "\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001"+
+ "\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+
+ "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+
+ "\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001"+
+ "\u0003\u0001\u0003\u0003\u0003:\b\u0003\u0001\u0004\u0004\u0004=\b\u0004"+
+ "\u000b\u0004\f\u0004>\u0001\u0004\u0001\u0004\u0001\u0005\u0001\u0005"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0007\u0001\u0007\u0001\b\u0001"+
+ "\b\u0001\b\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\n\u0005\nS\b"+
+ "\n\n\n\f\nV\t\n\u0001\u000b\u0001\u000b\u0005\u000bZ\b\u000b\n\u000b\f"+
+ "\u000b]\t\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0005\u000bb\b\u000b"+
+ "\n\u000b\f\u000be\t\u000b\u0001\u000b\u0003\u000bh\b\u000b\u0001\f\u0004"+
+ "\fk\b\f\u000b\f\f\fl\u0001\r\u0001\r\u0001\u000e\u0001\u000e\u0000\u0000"+
+ "\u000f\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t\u0005\u000b\u0006"+
+ "\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f\u0019\r\u001b\u0000"+
+ "\u001d\u0000\u0001\u0000\u0006\u0003\u0000\t\n\r\r \u0002\u0000-.__\u0001"+
+ "\u0000\"\"\u0001\u0000\'\'\u0001\u000009\u0002\u0000AZazx\u0000\u0001"+
+ "\u0001\u0000\u0000\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005"+
+ "\u0001\u0000\u0000\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001"+
+ "\u0000\u0000\u0000\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000"+
+ "\u0000\u0000\u0000\u000f\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000"+
+ "\u0000\u0000\u0000\u0013\u0001\u0000\u0000\u0000\u0000\u0015\u0001\u0000"+
+ "\u0000\u0000\u0000\u0017\u0001\u0000\u0000\u0000\u0000\u0019\u0001\u0000"+
+ "\u0000\u0000\u0001\u001f\u0001\u0000\u0000\u0000\u0003(\u0001\u0000\u0000"+
+ "\u0000\u00052\u0001\u0000\u0000\u0000\u00079\u0001\u0000\u0000\u0000\t"+
+ "<\u0001\u0000\u0000\u0000\u000bB\u0001\u0000\u0000\u0000\rD\u0001\u0000"+
+ "\u0000\u0000\u000fG\u0001\u0000\u0000\u0000\u0011I\u0001\u0000\u0000\u0000"+
+ "\u0013L\u0001\u0000\u0000\u0000\u0015N\u0001\u0000\u0000\u0000\u0017g"+
+ "\u0001\u0000\u0000\u0000\u0019j\u0001\u0000\u0000\u0000\u001bn\u0001\u0000"+
+ "\u0000\u0000\u001dp\u0001\u0000\u0000\u0000\u001f \u0005<\u0000\u0000"+
+ " !\u0005W\u0000\u0000!\"\u0005i\u0000\u0000\"#\u0005n\u0000\u0000#$\u0005"+
+ "d\u0000\u0000$%\u0005o\u0000\u0000%&\u0005w\u0000\u0000&\'\u0005>\u0000"+
+ "\u0000\'\u0002\u0001\u0000\u0000\u0000()\u0005<\u0000\u0000)*\u0005/\u0000"+
+ "\u0000*+\u0005W\u0000\u0000+,\u0005i\u0000\u0000,-\u0005n\u0000\u0000"+
+ "-.\u0005d\u0000\u0000./\u0005o\u0000\u0000/0\u0005w\u0000\u000001\u0005"+
+ ">\u0000\u00001\u0004\u0001\u0000\u0000\u000023\u0003\u000b\u0005\u0000"+
+ "34\u0003\u0015\n\u000045\u0003\u0011\b\u00005\u0006\u0001\u0000\u0000"+
+ "\u000067\u0005p\u0000\u00007:\u0005x\u0000\u00008:\u0005%\u0000\u0000"+
+ "96\u0001\u0000\u0000\u000098\u0001\u0000\u0000\u0000:\b\u0001\u0000\u0000"+
+ "\u0000;=\u0007\u0000\u0000\u0000<;\u0001\u0000\u0000\u0000=>\u0001\u0000"+
+ "\u0000\u0000><\u0001\u0000\u0000\u0000>?\u0001\u0000\u0000\u0000?@\u0001"+
+ "\u0000\u0000\u0000@A\u0006\u0004\u0000\u0000A\n\u0001\u0000\u0000\u0000"+
+ "BC\u0005<\u0000\u0000C\f\u0001\u0000\u0000\u0000DE\u0005<\u0000\u0000"+
+ "EF\u0005/\u0000\u0000F\u000e\u0001\u0000\u0000\u0000GH\u0005>\u0000\u0000"+
+ "H\u0010\u0001\u0000\u0000\u0000IJ\u0005/\u0000\u0000JK\u0005>\u0000\u0000"+
+ "K\u0012\u0001\u0000\u0000\u0000LM\u0005=\u0000\u0000M\u0014\u0001\u0000"+
+ "\u0000\u0000NT\u0003\u001d\u000e\u0000OS\u0003\u001d\u000e\u0000PS\u0003"+
+ "\u001b\r\u0000QS\u0007\u0001\u0000\u0000RO\u0001\u0000\u0000\u0000RP\u0001"+
+ "\u0000\u0000\u0000RQ\u0001\u0000\u0000\u0000SV\u0001\u0000\u0000\u0000"+
+ "TR\u0001\u0000\u0000\u0000TU\u0001\u0000\u0000\u0000U\u0016\u0001\u0000"+
+ "\u0000\u0000VT\u0001\u0000\u0000\u0000W[\u0005\"\u0000\u0000XZ\b\u0002"+
+ "\u0000\u0000YX\u0001\u0000\u0000\u0000Z]\u0001\u0000\u0000\u0000[Y\u0001"+
+ "\u0000\u0000\u0000[\\\u0001\u0000\u0000\u0000\\^\u0001\u0000\u0000\u0000"+
+ "][\u0001\u0000\u0000\u0000^h\u0005\"\u0000\u0000_c\u0005\'\u0000\u0000"+
+ "`b\b\u0003\u0000\u0000a`\u0001\u0000\u0000\u0000be\u0001\u0000\u0000\u0000"+
+ "ca\u0001\u0000\u0000\u0000cd\u0001\u0000\u0000\u0000df\u0001\u0000\u0000"+
+ "\u0000ec\u0001\u0000\u0000\u0000fh\u0005\'\u0000\u0000gW\u0001\u0000\u0000"+
+ "\u0000g_\u0001\u0000\u0000\u0000h\u0018\u0001\u0000\u0000\u0000ik\u0003"+
+ "\u001b\r\u0000ji\u0001\u0000\u0000\u0000kl\u0001\u0000\u0000\u0000lj\u0001"+
+ "\u0000\u0000\u0000lm\u0001\u0000\u0000\u0000m\u001a\u0001\u0000\u0000"+
+ "\u0000no\u0007\u0004\u0000\u0000o\u001c\u0001\u0000\u0000\u0000pq\u0007"+
+ "\u0005\u0000\u0000q\u001e\u0001\u0000\u0000\u0000\t\u00009>RT[cgl\u0001"+
+ "\u0006\u0000\u0000";
+ public static final ATN _ATN =
+ new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+ static {
+ _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+ for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+ _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/controlP5/layout/lang/XMLLexer.tokens b/controlP5/layout/lang/XMLLexer.tokens
new file mode 100644
index 0000000..30d639a
--- /dev/null
+++ b/controlP5/layout/lang/XMLLexer.tokens
@@ -0,0 +1,20 @@
+T__0=1
+T__1=2
+SELF_CLOSING=3
+UNIT=4
+WS=5
+OPEN=6
+OPEN_SLASH=7
+CLOSE=8
+SLASH_CLOSE=9
+EQUALS=10
+Name=11
+STRING=12
+NUMBER=13
+''=1
+''=2
+'<'=6
+''=7
+'>'=8
+'/>'=9
+'='=10
diff --git a/controlP5/layout/lang/XMLListener.java b/controlP5/layout/lang/XMLListener.java
new file mode 100644
index 0000000..eba2d07
--- /dev/null
+++ b/controlP5/layout/lang/XMLListener.java
@@ -0,0 +1,80 @@
+// Generated from XML.g4 by ANTLR 4.13.0
+package main.java.src2.main.java.controlP5.controlP5.layout.lang;
+import org.antlr.v4.runtime.tree.ParseTreeListener;
+
+/**
+ * This interface defines a complete listener for a parse tree produced by
+ * {@link XMLParser}.
+ */
+public interface XMLListener extends ParseTreeListener {
+ /**
+ * Enter a parse tree produced by {@link XMLParser#document}.
+ * @param ctx the parse tree
+ */
+ void enterDocument(XMLParser.DocumentContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#document}.
+ * @param ctx the parse tree
+ */
+ void exitDocument(XMLParser.DocumentContext ctx);
+ /**
+ * Enter a parse tree produced by {@link XMLParser#element}.
+ * @param ctx the parse tree
+ */
+ void enterElement(XMLParser.ElementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#element}.
+ * @param ctx the parse tree
+ */
+ void exitElement(XMLParser.ElementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link XMLParser#startTag}.
+ * @param ctx the parse tree
+ */
+ void enterStartTag(XMLParser.StartTagContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#startTag}.
+ * @param ctx the parse tree
+ */
+ void exitStartTag(XMLParser.StartTagContext ctx);
+ /**
+ * Enter a parse tree produced by {@link XMLParser#endTag}.
+ * @param ctx the parse tree
+ */
+ void enterEndTag(XMLParser.EndTagContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#endTag}.
+ * @param ctx the parse tree
+ */
+ void exitEndTag(XMLParser.EndTagContext ctx);
+ /**
+ * Enter a parse tree produced by {@link XMLParser#attribute}.
+ * @param ctx the parse tree
+ */
+ void enterAttribute(XMLParser.AttributeContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#attribute}.
+ * @param ctx the parse tree
+ */
+ void exitAttribute(XMLParser.AttributeContext ctx);
+ /**
+ * Enter a parse tree produced by {@link XMLParser#content}.
+ * @param ctx the parse tree
+ */
+ void enterContent(XMLParser.ContentContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#content}.
+ * @param ctx the parse tree
+ */
+ void exitContent(XMLParser.ContentContext ctx);
+ /**
+ * Enter a parse tree produced by {@link XMLParser#value}.
+ * @param ctx the parse tree
+ */
+ void enterValue(XMLParser.ValueContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#value}.
+ * @param ctx the parse tree
+ */
+ void exitValue(XMLParser.ValueContext ctx);
+}
\ No newline at end of file
diff --git a/controlP5/layout/lang/XMLParser.java b/controlP5/layout/lang/XMLParser.java
new file mode 100644
index 0000000..8adabd8
--- /dev/null
+++ b/controlP5/layout/lang/XMLParser.java
@@ -0,0 +1,578 @@
+// Generated from XML.g4 by ANTLR 4.13.0
+package main.java.src2.main.java.controlP5.controlP5.layout.lang;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.tree.*;
+import java.util.List;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
+public class XMLParser extends Parser {
+ static { RuntimeMetaData.checkVersion("4.13.0", RuntimeMetaData.VERSION); }
+
+ protected static final DFA[] _decisionToDFA;
+ protected static final PredictionContextCache _sharedContextCache =
+ new PredictionContextCache();
+ public static final int
+ T__0=1, T__1=2, SELF_CLOSING=3, UNIT=4, WS=5, OPEN=6, OPEN_SLASH=7, CLOSE=8,
+ SLASH_CLOSE=9, EQUALS=10, Name=11, STRING=12, NUMBER=13;
+ public static final int
+ RULE_document = 0, RULE_element = 1, RULE_startTag = 2, RULE_endTag = 3,
+ RULE_attribute = 4, RULE_content = 5, RULE_value = 6;
+ private static String[] makeRuleNames() {
+ return new String[] {
+ "document", "element", "startTag", "endTag", "attribute", "content",
+ "value"
+ };
+ }
+ public static final String[] ruleNames = makeRuleNames();
+
+ private static String[] makeLiteralNames() {
+ return new String[] {
+ null, "''", "''", null, null, null, "'<'", "''", "'>'",
+ "'/>'", "'='"
+ };
+ }
+ private static final String[] _LITERAL_NAMES = makeLiteralNames();
+ private static String[] makeSymbolicNames() {
+ return new String[] {
+ null, null, null, "SELF_CLOSING", "UNIT", "WS", "OPEN", "OPEN_SLASH",
+ "CLOSE", "SLASH_CLOSE", "EQUALS", "Name", "STRING", "NUMBER"
+ };
+ }
+ private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
+ public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+ /**
+ * @deprecated Use {@link #VOCABULARY} instead.
+ */
+ @Deprecated
+ public static final String[] tokenNames;
+ static {
+ tokenNames = new String[_SYMBOLIC_NAMES.length];
+ for (int i = 0; i < tokenNames.length; i++) {
+ tokenNames[i] = VOCABULARY.getLiteralName(i);
+ if (tokenNames[i] == null) {
+ tokenNames[i] = VOCABULARY.getSymbolicName(i);
+ }
+
+ if (tokenNames[i] == null) {
+ tokenNames[i] = "";
+ }
+ }
+ }
+
+ @Override
+ @Deprecated
+ public String[] getTokenNames() {
+ return tokenNames;
+ }
+
+ @Override
+
+ public Vocabulary getVocabulary() {
+ return VOCABULARY;
+ }
+
+ @Override
+ public String getGrammarFileName() { return "XML.g4"; }
+
+ @Override
+ public String[] getRuleNames() { return ruleNames; }
+
+ @Override
+ public String getSerializedATN() { return _serializedATN; }
+
+ @Override
+ public ATN getATN() { return _ATN; }
+
+ public XMLParser(TokenStream input) {
+ super(input);
+ _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DocumentContext extends ParserRuleContext {
+ public List element() {
+ return getRuleContexts(ElementContext.class);
+ }
+ public ElementContext element(int i) {
+ return getRuleContext(ElementContext.class,i);
+ }
+ public DocumentContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_document; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterDocument(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitDocument(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitDocument(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DocumentContext document() throws RecognitionException {
+ DocumentContext _localctx = new DocumentContext(_ctx, getState());
+ enterRule(_localctx, 0, RULE_document);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(14);
+ match(T__0);
+ setState(16);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ do {
+ {
+ {
+ setState(15);
+ element();
+ }
+ }
+ setState(18);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ } while ( _la==SELF_CLOSING || _la==OPEN );
+ setState(20);
+ match(T__1);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ElementContext extends ParserRuleContext {
+ public StartTagContext startTag() {
+ return getRuleContext(StartTagContext.class,0);
+ }
+ public EndTagContext endTag() {
+ return getRuleContext(EndTagContext.class,0);
+ }
+ public ContentContext content() {
+ return getRuleContext(ContentContext.class,0);
+ }
+ public TerminalNode SELF_CLOSING() { return getToken(XMLParser.SELF_CLOSING, 0); }
+ public ElementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_element; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterElement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitElement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitElement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ElementContext element() throws RecognitionException {
+ ElementContext _localctx = new ElementContext(_ctx, getState());
+ enterRule(_localctx, 2, RULE_element);
+ int _la;
+ try {
+ setState(29);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case OPEN:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(22);
+ startTag();
+ setState(24);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4168L) != 0)) {
+ {
+ setState(23);
+ content();
+ }
+ }
+
+ setState(26);
+ endTag();
+ }
+ break;
+ case SELF_CLOSING:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(28);
+ match(SELF_CLOSING);
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class StartTagContext extends ParserRuleContext {
+ public TerminalNode OPEN() { return getToken(XMLParser.OPEN, 0); }
+ public TerminalNode Name() { return getToken(XMLParser.Name, 0); }
+ public TerminalNode CLOSE() { return getToken(XMLParser.CLOSE, 0); }
+ public List attribute() {
+ return getRuleContexts(AttributeContext.class);
+ }
+ public AttributeContext attribute(int i) {
+ return getRuleContext(AttributeContext.class,i);
+ }
+ public StartTagContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_startTag; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterStartTag(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitStartTag(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitStartTag(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final StartTagContext startTag() throws RecognitionException {
+ StartTagContext _localctx = new StartTagContext(_ctx, getState());
+ enterRule(_localctx, 4, RULE_startTag);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(31);
+ match(OPEN);
+ setState(32);
+ match(Name);
+ setState(36);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while (_la==Name) {
+ {
+ {
+ setState(33);
+ attribute();
+ }
+ }
+ setState(38);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ setState(39);
+ match(CLOSE);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class EndTagContext extends ParserRuleContext {
+ public TerminalNode OPEN_SLASH() { return getToken(XMLParser.OPEN_SLASH, 0); }
+ public TerminalNode Name() { return getToken(XMLParser.Name, 0); }
+ public TerminalNode CLOSE() { return getToken(XMLParser.CLOSE, 0); }
+ public EndTagContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_endTag; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterEndTag(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitEndTag(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitEndTag(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final EndTagContext endTag() throws RecognitionException {
+ EndTagContext _localctx = new EndTagContext(_ctx, getState());
+ enterRule(_localctx, 6, RULE_endTag);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(41);
+ match(OPEN_SLASH);
+ setState(42);
+ match(Name);
+ setState(43);
+ match(CLOSE);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class AttributeContext extends ParserRuleContext {
+ public TerminalNode Name() { return getToken(XMLParser.Name, 0); }
+ public TerminalNode EQUALS() { return getToken(XMLParser.EQUALS, 0); }
+ public ValueContext value() {
+ return getRuleContext(ValueContext.class,0);
+ }
+ public AttributeContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_attribute; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterAttribute(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitAttribute(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitAttribute(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final AttributeContext attribute() throws RecognitionException {
+ AttributeContext _localctx = new AttributeContext(_ctx, getState());
+ enterRule(_localctx, 8, RULE_attribute);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(45);
+ match(Name);
+ setState(46);
+ match(EQUALS);
+ setState(47);
+ value();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ContentContext extends ParserRuleContext {
+ public ElementContext element() {
+ return getRuleContext(ElementContext.class,0);
+ }
+ public TerminalNode STRING() { return getToken(XMLParser.STRING, 0); }
+ public ContentContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_content; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterContent(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitContent(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitContent(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ContentContext content() throws RecognitionException {
+ ContentContext _localctx = new ContentContext(_ctx, getState());
+ enterRule(_localctx, 10, RULE_content);
+ try {
+ setState(51);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case SELF_CLOSING:
+ case OPEN:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(49);
+ element();
+ }
+ break;
+ case STRING:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(50);
+ match(STRING);
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ValueContext extends ParserRuleContext {
+ public TerminalNode STRING() { return getToken(XMLParser.STRING, 0); }
+ public TerminalNode NUMBER() { return getToken(XMLParser.NUMBER, 0); }
+ public TerminalNode UNIT() { return getToken(XMLParser.UNIT, 0); }
+ public ValueContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_value; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterValue(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitValue(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitValue(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ValueContext value() throws RecognitionException {
+ ValueContext _localctx = new ValueContext(_ctx, getState());
+ enterRule(_localctx, 12, RULE_value);
+ try {
+ setState(56);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case STRING:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(53);
+ match(STRING);
+ }
+ break;
+ case NUMBER:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(54);
+ match(NUMBER);
+ setState(55);
+ match(UNIT);
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static final String _serializedATN =
+ "\u0004\u0001\r;\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+
+ "\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"+
+ "\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0001\u0000\u0001\u0000\u0004"+
+ "\u0000\u0011\b\u0000\u000b\u0000\f\u0000\u0012\u0001\u0000\u0001\u0000"+
+ "\u0001\u0001\u0001\u0001\u0003\u0001\u0019\b\u0001\u0001\u0001\u0001\u0001"+
+ "\u0001\u0001\u0003\u0001\u001e\b\u0001\u0001\u0002\u0001\u0002\u0001\u0002"+
+ "\u0005\u0002#\b\u0002\n\u0002\f\u0002&\t\u0002\u0001\u0002\u0001\u0002"+
+ "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004"+
+ "\u0001\u0004\u0001\u0004\u0001\u0005\u0001\u0005\u0003\u00054\b\u0005"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0003\u00069\b\u0006\u0001\u0006"+
+ "\u0000\u0000\u0007\u0000\u0002\u0004\u0006\b\n\f\u0000\u00009\u0000\u000e"+
+ "\u0001\u0000\u0000\u0000\u0002\u001d\u0001\u0000\u0000\u0000\u0004\u001f"+
+ "\u0001\u0000\u0000\u0000\u0006)\u0001\u0000\u0000\u0000\b-\u0001\u0000"+
+ "\u0000\u0000\n3\u0001\u0000\u0000\u0000\f8\u0001\u0000\u0000\u0000\u000e"+
+ "\u0010\u0005\u0001\u0000\u0000\u000f\u0011\u0003\u0002\u0001\u0000\u0010"+
+ "\u000f\u0001\u0000\u0000\u0000\u0011\u0012\u0001\u0000\u0000\u0000\u0012"+
+ "\u0010\u0001\u0000\u0000\u0000\u0012\u0013\u0001\u0000\u0000\u0000\u0013"+
+ "\u0014\u0001\u0000\u0000\u0000\u0014\u0015\u0005\u0002\u0000\u0000\u0015"+
+ "\u0001\u0001\u0000\u0000\u0000\u0016\u0018\u0003\u0004\u0002\u0000\u0017"+
+ "\u0019\u0003\n\u0005\u0000\u0018\u0017\u0001\u0000\u0000\u0000\u0018\u0019"+
+ "\u0001\u0000\u0000\u0000\u0019\u001a\u0001\u0000\u0000\u0000\u001a\u001b"+
+ "\u0003\u0006\u0003\u0000\u001b\u001e\u0001\u0000\u0000\u0000\u001c\u001e"+
+ "\u0005\u0003\u0000\u0000\u001d\u0016\u0001\u0000\u0000\u0000\u001d\u001c"+
+ "\u0001\u0000\u0000\u0000\u001e\u0003\u0001\u0000\u0000\u0000\u001f \u0005"+
+ "\u0006\u0000\u0000 $\u0005\u000b\u0000\u0000!#\u0003\b\u0004\u0000\"!"+
+ "\u0001\u0000\u0000\u0000#&\u0001\u0000\u0000\u0000$\"\u0001\u0000\u0000"+
+ "\u0000$%\u0001\u0000\u0000\u0000%\'\u0001\u0000\u0000\u0000&$\u0001\u0000"+
+ "\u0000\u0000\'(\u0005\b\u0000\u0000(\u0005\u0001\u0000\u0000\u0000)*\u0005"+
+ "\u0007\u0000\u0000*+\u0005\u000b\u0000\u0000+,\u0005\b\u0000\u0000,\u0007"+
+ "\u0001\u0000\u0000\u0000-.\u0005\u000b\u0000\u0000./\u0005\n\u0000\u0000"+
+ "/0\u0003\f\u0006\u00000\t\u0001\u0000\u0000\u000014\u0003\u0002\u0001"+
+ "\u000024\u0005\f\u0000\u000031\u0001\u0000\u0000\u000032\u0001\u0000\u0000"+
+ "\u00004\u000b\u0001\u0000\u0000\u000059\u0005\f\u0000\u000067\u0005\r"+
+ "\u0000\u000079\u0005\u0004\u0000\u000085\u0001\u0000\u0000\u000086\u0001"+
+ "\u0000\u0000\u00009\r\u0001\u0000\u0000\u0000\u0006\u0012\u0018\u001d"+
+ "$38";
+ public static final ATN _ATN =
+ new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+ static {
+ _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+ for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+ _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/controlP5/layout/lang/XMLVisitor.java b/controlP5/layout/lang/XMLVisitor.java
new file mode 100644
index 0000000..6305671
--- /dev/null
+++ b/controlP5/layout/lang/XMLVisitor.java
@@ -0,0 +1,55 @@
+// Generated from XML.g4 by ANTLR 4.13.0
+package main.java.src2.main.java.controlP5.controlP5.layout.lang;
+import org.antlr.v4.runtime.tree.ParseTreeVisitor;
+
+/**
+ * This interface defines a complete generic visitor for a parse tree produced
+ * by {@link XMLParser}.
+ *
+ * @param The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+public interface XMLVisitor extends ParseTreeVisitor {
+ /**
+ * Visit a parse tree produced by {@link XMLParser#document}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDocument(XMLParser.DocumentContext ctx);
+ /**
+ * Visit a parse tree produced by {@link XMLParser#element}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitElement(XMLParser.ElementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link XMLParser#startTag}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitStartTag(XMLParser.StartTagContext ctx);
+ /**
+ * Visit a parse tree produced by {@link XMLParser#endTag}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitEndTag(XMLParser.EndTagContext ctx);
+ /**
+ * Visit a parse tree produced by {@link XMLParser#attribute}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitAttribute(XMLParser.AttributeContext ctx);
+ /**
+ * Visit a parse tree produced by {@link XMLParser#content}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitContent(XMLParser.ContentContext ctx);
+ /**
+ * Visit a parse tree produced by {@link XMLParser#value}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitValue(XMLParser.ValueContext ctx);
+}
\ No newline at end of file
diff --git a/controlP5/package.html b/controlP5/package.html
new file mode 100755
index 0000000..132bc08
--- /dev/null
+++ b/controlP5/package.html
@@ -0,0 +1,16 @@
+
+
+
+controlP5 documentation
+
+
+
+ControlP5
+ControlP5 (www.sojamo.de/libraries/controlP5) is a library written by Andreas Schlegel for the programming environment processing. ControlP5 is a GUI and controller library for processing that can be used in authoring, application mode. Controllers including Sliders, Buttons, Toggles, Knobs, Textfields, RadioButtons, Checkboxes amongst others can be easily added to a processing sketch and can be arranged in separate control windows, or can be organized in tabs or groups. The controlP5 source code repository is available on github at github.com/sojamo/controlp5.
+
+Javascript
+Currently there is no javascript version of ControlP5, though I had started implementing a slimmed down version for processing.js but since it is currently unclear which javascript version, processing.js or p5.js, will become the default js version of processing, controlP5.js is on hold.
+
+
+
diff --git a/controlp5.iml b/controlp5.iml
new file mode 100644
index 0000000..abe781f
--- /dev/null
+++ b/controlp5.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/controllers/ControlP5ButtonBar/ControlP5ButtonBar.pde b/examples/controllers/ControlP5ButtonBar/ControlP5ButtonBar.pde
index 8b9f07a..7eef9e4 100644
--- a/examples/controllers/ControlP5ButtonBar/ControlP5ButtonBar.pde
+++ b/examples/controllers/ControlP5ButtonBar/ControlP5ButtonBar.pde
@@ -53,150 +53,150 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ButtonBar : ButtonBar addItem(String, Object)
-controlP5.ButtonBar : ButtonBar addItems(List)
-controlP5.ButtonBar : ButtonBar addItems(Map)
-controlP5.ButtonBar : ButtonBar addItems(String[])
-controlP5.ButtonBar : ButtonBar clear()
-controlP5.ButtonBar : ButtonBar removeItem(String)
-controlP5.ButtonBar : ButtonBar removeItems(List)
-controlP5.ButtonBar : ButtonBar setItems(List)
-controlP5.ButtonBar : ButtonBar setItems(Map)
-controlP5.ButtonBar : ButtonBar setItems(String[])
-controlP5.ButtonBar : List getItems()
-controlP5.ButtonBar : Map getItem(String)
-controlP5.ButtonBar : int hover()
-controlP5.ButtonBar : void changeItem(String, String, Object)
-controlP5.ButtonBar : void onClick()
-controlP5.Controller : ButtonBar addCallback(CallbackListener)
-controlP5.Controller : ButtonBar addListener(ControlListener)
-controlP5.Controller : ButtonBar addListenerFor(int, CallbackListener)
-controlP5.Controller : ButtonBar align(int, int, int, int)
-controlP5.Controller : ButtonBar bringToFront()
-controlP5.Controller : ButtonBar bringToFront(ControllerInterface)
-controlP5.Controller : ButtonBar hide()
-controlP5.Controller : ButtonBar linebreak()
-controlP5.Controller : ButtonBar listen(boolean)
-controlP5.Controller : ButtonBar lock()
-controlP5.Controller : ButtonBar onChange(CallbackListener)
-controlP5.Controller : ButtonBar onClick(CallbackListener)
-controlP5.Controller : ButtonBar onDoublePress(CallbackListener)
-controlP5.Controller : ButtonBar onDrag(CallbackListener)
-controlP5.Controller : ButtonBar onDraw(ControllerView)
-controlP5.Controller : ButtonBar onEndDrag(CallbackListener)
-controlP5.Controller : ButtonBar onEnter(CallbackListener)
-controlP5.Controller : ButtonBar onLeave(CallbackListener)
-controlP5.Controller : ButtonBar onMove(CallbackListener)
-controlP5.Controller : ButtonBar onPress(CallbackListener)
-controlP5.Controller : ButtonBar onRelease(CallbackListener)
-controlP5.Controller : ButtonBar onReleaseOutside(CallbackListener)
-controlP5.Controller : ButtonBar onStartDrag(CallbackListener)
-controlP5.Controller : ButtonBar onWheel(CallbackListener)
-controlP5.Controller : ButtonBar plugTo(Object)
-controlP5.Controller : ButtonBar plugTo(Object, String)
-controlP5.Controller : ButtonBar plugTo(Object[])
-controlP5.Controller : ButtonBar plugTo(Object[], String)
-controlP5.Controller : ButtonBar registerProperty(String)
-controlP5.Controller : ButtonBar registerProperty(String, String)
-controlP5.Controller : ButtonBar registerTooltip(String)
-controlP5.Controller : ButtonBar removeBehavior()
-controlP5.Controller : ButtonBar removeCallback()
-controlP5.Controller : ButtonBar removeCallback(CallbackListener)
-controlP5.Controller : ButtonBar removeListener(ControlListener)
-controlP5.Controller : ButtonBar removeListenerFor(int, CallbackListener)
-controlP5.Controller : ButtonBar removeListenersFor(int)
-controlP5.Controller : ButtonBar removeProperty(String)
-controlP5.Controller : ButtonBar removeProperty(String, String)
-controlP5.Controller : ButtonBar setArrayValue(float[])
-controlP5.Controller : ButtonBar setArrayValue(int, float)
-controlP5.Controller : ButtonBar setBehavior(ControlBehavior)
-controlP5.Controller : ButtonBar setBroadcast(boolean)
-controlP5.Controller : ButtonBar setCaptionLabel(String)
-controlP5.Controller : ButtonBar setColor(CColor)
-controlP5.Controller : ButtonBar setColorActive(int)
-controlP5.Controller : ButtonBar setColorBackground(int)
-controlP5.Controller : ButtonBar setColorCaptionLabel(int)
-controlP5.Controller : ButtonBar setColorForeground(int)
-controlP5.Controller : ButtonBar setColorLabel(int)
-controlP5.Controller : ButtonBar setColorValue(int)
-controlP5.Controller : ButtonBar setColorValueLabel(int)
-controlP5.Controller : ButtonBar setDecimalPrecision(int)
-controlP5.Controller : ButtonBar setDefaultValue(float)
-controlP5.Controller : ButtonBar setHeight(int)
-controlP5.Controller : ButtonBar setId(int)
-controlP5.Controller : ButtonBar setImage(PImage)
-controlP5.Controller : ButtonBar setImage(PImage, int)
-controlP5.Controller : ButtonBar setImages(PImage, PImage, PImage)
-controlP5.Controller : ButtonBar setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : ButtonBar setLabel(String)
-controlP5.Controller : ButtonBar setLabelVisible(boolean)
-controlP5.Controller : ButtonBar setLock(boolean)
-controlP5.Controller : ButtonBar setMax(float)
-controlP5.Controller : ButtonBar setMin(float)
-controlP5.Controller : ButtonBar setMouseOver(boolean)
-controlP5.Controller : ButtonBar setMoveable(boolean)
-controlP5.Controller : ButtonBar setPosition(float, float)
-controlP5.Controller : ButtonBar setPosition(float[])
-controlP5.Controller : ButtonBar setSize(PImage)
-controlP5.Controller : ButtonBar setSize(int, int)
-controlP5.Controller : ButtonBar setStringValue(String)
-controlP5.Controller : ButtonBar setUpdate(boolean)
-controlP5.Controller : ButtonBar setValue(float)
-controlP5.Controller : ButtonBar setValueLabel(String)
-controlP5.Controller : ButtonBar setValueSelf(float)
-controlP5.Controller : ButtonBar setView(ControllerView)
-controlP5.Controller : ButtonBar setVisible(boolean)
-controlP5.Controller : ButtonBar setWidth(int)
-controlP5.Controller : ButtonBar show()
-controlP5.Controller : ButtonBar unlock()
-controlP5.Controller : ButtonBar unplugFrom(Object)
-controlP5.Controller : ButtonBar unplugFrom(Object[])
-controlP5.Controller : ButtonBar unregisterTooltip()
-controlP5.Controller : ButtonBar update()
-controlP5.Controller : ButtonBar updateSize()
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
+main.java.controlp5.ButtonBar : ButtonBar addItem(String, Object)
+main.java.controlp5.ButtonBar : ButtonBar addItems(List)
+main.java.controlp5.ButtonBar : ButtonBar addItems(Map)
+main.java.controlp5.ButtonBar : ButtonBar addItems(String[])
+main.java.controlp5.ButtonBar : ButtonBar clear()
+main.java.controlp5.ButtonBar : ButtonBar removeItem(String)
+main.java.controlp5.ButtonBar : ButtonBar removeItems(List)
+main.java.controlp5.ButtonBar : ButtonBar setItems(List)
+main.java.controlp5.ButtonBar : ButtonBar setItems(Map)
+main.java.controlp5.ButtonBar : ButtonBar setItems(String[])
+main.java.controlp5.ButtonBar : List getItems()
+main.java.controlp5.ButtonBar : Map getItem(String)
+main.java.controlp5.ButtonBar : int hover()
+main.java.controlp5.ButtonBar : void changeItem(String, String, Object)
+main.java.controlp5.ButtonBar : void onClick()
+main.java.controlp5.Controller : ButtonBar addCallback(CallbackListener)
+main.java.controlp5.Controller : ButtonBar addListener(ControlListener)
+main.java.controlp5.Controller : ButtonBar addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : ButtonBar align(int, int, int, int)
+main.java.controlp5.Controller : ButtonBar bringToFront()
+main.java.controlp5.Controller : ButtonBar bringToFront(ControllerInterface)
+main.java.controlp5.Controller : ButtonBar hide()
+main.java.controlp5.Controller : ButtonBar linebreak()
+main.java.controlp5.Controller : ButtonBar listen(boolean)
+main.java.controlp5.Controller : ButtonBar lock()
+main.java.controlp5.Controller : ButtonBar onChange(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onClick(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onDoublePress(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onDrag(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onDraw(ControllerView)
+main.java.controlp5.Controller : ButtonBar onEndDrag(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onEnter(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onLeave(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onMove(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onPress(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onRelease(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onStartDrag(CallbackListener)
+main.java.controlp5.Controller : ButtonBar onWheel(CallbackListener)
+main.java.controlp5.Controller : ButtonBar plugTo(Object)
+main.java.controlp5.Controller : ButtonBar plugTo(Object, String)
+main.java.controlp5.Controller : ButtonBar plugTo(Object[])
+main.java.controlp5.Controller : ButtonBar plugTo(Object[], String)
+main.java.controlp5.Controller : ButtonBar registerProperty(String)
+main.java.controlp5.Controller : ButtonBar registerProperty(String, String)
+main.java.controlp5.Controller : ButtonBar registerTooltip(String)
+main.java.controlp5.Controller : ButtonBar removeBehavior()
+main.java.controlp5.Controller : ButtonBar removeCallback()
+main.java.controlp5.Controller : ButtonBar removeCallback(CallbackListener)
+main.java.controlp5.Controller : ButtonBar removeListener(ControlListener)
+main.java.controlp5.Controller : ButtonBar removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : ButtonBar removeListenersFor(int)
+main.java.controlp5.Controller : ButtonBar removeProperty(String)
+main.java.controlp5.Controller : ButtonBar removeProperty(String, String)
+main.java.controlp5.Controller : ButtonBar setArrayValue(float[])
+main.java.controlp5.Controller : ButtonBar setArrayValue(int, float)
+main.java.controlp5.Controller : ButtonBar setBehavior(ControlBehavior)
+main.java.controlp5.Controller : ButtonBar setBroadcast(boolean)
+main.java.controlp5.Controller : ButtonBar setCaptionLabel(String)
+main.java.controlp5.Controller : ButtonBar setColor(CColor)
+main.java.controlp5.Controller : ButtonBar setColorActive(int)
+main.java.controlp5.Controller : ButtonBar setColorBackground(int)
+main.java.controlp5.Controller : ButtonBar setColorCaptionLabel(int)
+main.java.controlp5.Controller : ButtonBar setColorForeground(int)
+main.java.controlp5.Controller : ButtonBar setColorLabel(int)
+main.java.controlp5.Controller : ButtonBar setColorValue(int)
+main.java.controlp5.Controller : ButtonBar setColorValueLabel(int)
+main.java.controlp5.Controller : ButtonBar setDecimalPrecision(int)
+main.java.controlp5.Controller : ButtonBar setDefaultValue(float)
+main.java.controlp5.Controller : ButtonBar setHeight(int)
+main.java.controlp5.Controller : ButtonBar setId(int)
+main.java.controlp5.Controller : ButtonBar setImage(PImage)
+main.java.controlp5.Controller : ButtonBar setImage(PImage, int)
+main.java.controlp5.Controller : ButtonBar setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : ButtonBar setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : ButtonBar setLabel(String)
+main.java.controlp5.Controller : ButtonBar setLabelVisible(boolean)
+main.java.controlp5.Controller : ButtonBar setLock(boolean)
+main.java.controlp5.Controller : ButtonBar setMax(float)
+main.java.controlp5.Controller : ButtonBar setMin(float)
+main.java.controlp5.Controller : ButtonBar setMouseOver(boolean)
+main.java.controlp5.Controller : ButtonBar setMoveable(boolean)
+main.java.controlp5.Controller : ButtonBar setPosition(float, float)
+main.java.controlp5.Controller : ButtonBar setPosition(float[])
+main.java.controlp5.Controller : ButtonBar setSize(PImage)
+main.java.controlp5.Controller : ButtonBar setSize(int, int)
+main.java.controlp5.Controller : ButtonBar setStringValue(String)
+main.java.controlp5.Controller : ButtonBar setUpdate(boolean)
+main.java.controlp5.Controller : ButtonBar setValue(float)
+main.java.controlp5.Controller : ButtonBar setValueLabel(String)
+main.java.controlp5.Controller : ButtonBar setValueSelf(float)
+main.java.controlp5.Controller : ButtonBar setView(ControllerView)
+main.java.controlp5.Controller : ButtonBar setVisible(boolean)
+main.java.controlp5.Controller : ButtonBar setWidth(int)
+main.java.controlp5.Controller : ButtonBar show()
+main.java.controlp5.Controller : ButtonBar unlock()
+main.java.controlp5.Controller : ButtonBar unplugFrom(Object)
+main.java.controlp5.Controller : ButtonBar unplugFrom(Object[])
+main.java.controlp5.Controller : ButtonBar unregisterTooltip()
+main.java.controlp5.Controller : ButtonBar update()
+main.java.controlp5.Controller : ButtonBar updateSize()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5ColorWheel/ControlP5ColorWheel.pde b/examples/controllers/ControlP5ColorWheel/ControlP5ColorWheel.pde
index b802311..5889574 100644
--- a/examples/controllers/ControlP5ColorWheel/ControlP5ColorWheel.pde
+++ b/examples/controllers/ControlP5ColorWheel/ControlP5ColorWheel.pde
@@ -41,158 +41,158 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ColorWheel : ColorWheel scrolled(int)
-controlP5.ColorWheel : ColorWheel setAlpha(int)
-controlP5.ColorWheel : ColorWheel setHSL(double, double, double)
-controlP5.ColorWheel : ColorWheel setRGB(int)
-controlP5.ColorWheel : double[] RGBtoHSL(int)
-controlP5.ColorWheel : double[] RGBtoHSL(int, int, int)
-controlP5.ColorWheel : int HSLtoRGB(double, double, double)
-controlP5.ColorWheel : int HSLtoRGB(double[])
-controlP5.ColorWheel : int HSVtoRGB(double, double, double)
-controlP5.ColorWheel : int HSVtoRGB(double[])
-controlP5.ColorWheel : int a()
-controlP5.ColorWheel : int b()
-controlP5.ColorWheel : int g()
-controlP5.ColorWheel : int getRGB()
-controlP5.ColorWheel : int r()
-controlP5.ColorWheel : void onDrag()
-controlP5.ColorWheel : void onEndDrag()
-controlP5.ColorWheel : void onPress()
-controlP5.ColorWheel : void onRelease()
-controlP5.ColorWheel : void onStartDrag()
-controlP5.ColorWheel : void setHue(double)
-controlP5.ColorWheel : void setLightness(double)
-controlP5.ColorWheel : void setSaturation(double)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ColorWheel addCallback(CallbackListener)
-controlP5.Controller : ColorWheel addListener(ControlListener)
-controlP5.Controller : ColorWheel addListenerFor(int, CallbackListener)
-controlP5.Controller : ColorWheel align(int, int, int, int)
-controlP5.Controller : ColorWheel bringToFront()
-controlP5.Controller : ColorWheel bringToFront(ControllerInterface)
-controlP5.Controller : ColorWheel hide()
-controlP5.Controller : ColorWheel linebreak()
-controlP5.Controller : ColorWheel listen(boolean)
-controlP5.Controller : ColorWheel lock()
-controlP5.Controller : ColorWheel onChange(CallbackListener)
-controlP5.Controller : ColorWheel onClick(CallbackListener)
-controlP5.Controller : ColorWheel onDoublePress(CallbackListener)
-controlP5.Controller : ColorWheel onDrag(CallbackListener)
-controlP5.Controller : ColorWheel onDraw(ControllerView)
-controlP5.Controller : ColorWheel onEndDrag(CallbackListener)
-controlP5.Controller : ColorWheel onEnter(CallbackListener)
-controlP5.Controller : ColorWheel onLeave(CallbackListener)
-controlP5.Controller : ColorWheel onMove(CallbackListener)
-controlP5.Controller : ColorWheel onPress(CallbackListener)
-controlP5.Controller : ColorWheel onRelease(CallbackListener)
-controlP5.Controller : ColorWheel onReleaseOutside(CallbackListener)
-controlP5.Controller : ColorWheel onStartDrag(CallbackListener)
-controlP5.Controller : ColorWheel onWheel(CallbackListener)
-controlP5.Controller : ColorWheel plugTo(Object)
-controlP5.Controller : ColorWheel plugTo(Object, String)
-controlP5.Controller : ColorWheel plugTo(Object[])
-controlP5.Controller : ColorWheel plugTo(Object[], String)
-controlP5.Controller : ColorWheel registerProperty(String)
-controlP5.Controller : ColorWheel registerProperty(String, String)
-controlP5.Controller : ColorWheel registerTooltip(String)
-controlP5.Controller : ColorWheel removeBehavior()
-controlP5.Controller : ColorWheel removeCallback()
-controlP5.Controller : ColorWheel removeCallback(CallbackListener)
-controlP5.Controller : ColorWheel removeListener(ControlListener)
-controlP5.Controller : ColorWheel removeListenerFor(int, CallbackListener)
-controlP5.Controller : ColorWheel removeListenersFor(int)
-controlP5.Controller : ColorWheel removeProperty(String)
-controlP5.Controller : ColorWheel removeProperty(String, String)
-controlP5.Controller : ColorWheel setArrayValue(float[])
-controlP5.Controller : ColorWheel setArrayValue(int, float)
-controlP5.Controller : ColorWheel setBehavior(ControlBehavior)
-controlP5.Controller : ColorWheel setBroadcast(boolean)
-controlP5.Controller : ColorWheel setCaptionLabel(String)
-controlP5.Controller : ColorWheel setColor(CColor)
-controlP5.Controller : ColorWheel setColorActive(int)
-controlP5.Controller : ColorWheel setColorBackground(int)
-controlP5.Controller : ColorWheel setColorCaptionLabel(int)
-controlP5.Controller : ColorWheel setColorForeground(int)
-controlP5.Controller : ColorWheel setColorLabel(int)
-controlP5.Controller : ColorWheel setColorValue(int)
-controlP5.Controller : ColorWheel setColorValueLabel(int)
-controlP5.Controller : ColorWheel setDecimalPrecision(int)
-controlP5.Controller : ColorWheel setDefaultValue(float)
-controlP5.Controller : ColorWheel setHeight(int)
-controlP5.Controller : ColorWheel setId(int)
-controlP5.Controller : ColorWheel setImage(PImage)
-controlP5.Controller : ColorWheel setImage(PImage, int)
-controlP5.Controller : ColorWheel setImages(PImage, PImage, PImage)
-controlP5.Controller : ColorWheel setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : ColorWheel setLabel(String)
-controlP5.Controller : ColorWheel setLabelVisible(boolean)
-controlP5.Controller : ColorWheel setLock(boolean)
-controlP5.Controller : ColorWheel setMax(float)
-controlP5.Controller : ColorWheel setMin(float)
-controlP5.Controller : ColorWheel setMouseOver(boolean)
-controlP5.Controller : ColorWheel setMoveable(boolean)
-controlP5.Controller : ColorWheel setPosition(float, float)
-controlP5.Controller : ColorWheel setPosition(float[])
-controlP5.Controller : ColorWheel setSize(PImage)
-controlP5.Controller : ColorWheel setSize(int, int)
-controlP5.Controller : ColorWheel setStringValue(String)
-controlP5.Controller : ColorWheel setUpdate(boolean)
-controlP5.Controller : ColorWheel setValue(float)
-controlP5.Controller : ColorWheel setValueLabel(String)
-controlP5.Controller : ColorWheel setValueSelf(float)
-controlP5.Controller : ColorWheel setView(ControllerView)
-controlP5.Controller : ColorWheel setVisible(boolean)
-controlP5.Controller : ColorWheel setWidth(int)
-controlP5.Controller : ColorWheel show()
-controlP5.Controller : ColorWheel unlock()
-controlP5.Controller : ColorWheel unplugFrom(Object)
-controlP5.Controller : ColorWheel unplugFrom(Object[])
-controlP5.Controller : ColorWheel unregisterTooltip()
-controlP5.Controller : ColorWheel update()
-controlP5.Controller : ColorWheel updateSize()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
+main.java.controlp5.ColorWheel : ColorWheel scrolled(int)
+main.java.controlp5.ColorWheel : ColorWheel setAlpha(int)
+main.java.controlp5.ColorWheel : ColorWheel setHSL(double, double, double)
+main.java.controlp5.ColorWheel : ColorWheel setRGB(int)
+main.java.controlp5.ColorWheel : double[] RGBtoHSL(int)
+main.java.controlp5.ColorWheel : double[] RGBtoHSL(int, int, int)
+main.java.controlp5.ColorWheel : int HSLtoRGB(double, double, double)
+main.java.controlp5.ColorWheel : int HSLtoRGB(double[])
+main.java.controlp5.ColorWheel : int HSVtoRGB(double, double, double)
+main.java.controlp5.ColorWheel : int HSVtoRGB(double[])
+main.java.controlp5.ColorWheel : int a()
+main.java.controlp5.ColorWheel : int b()
+main.java.controlp5.ColorWheel : int g()
+main.java.controlp5.ColorWheel : int getRGB()
+main.java.controlp5.ColorWheel : int r()
+main.java.controlp5.ColorWheel : void onDrag()
+main.java.controlp5.ColorWheel : void onEndDrag()
+main.java.controlp5.ColorWheel : void onPress()
+main.java.controlp5.ColorWheel : void onRelease()
+main.java.controlp5.ColorWheel : void onStartDrag()
+main.java.controlp5.ColorWheel : void setHue(double)
+main.java.controlp5.ColorWheel : void setLightness(double)
+main.java.controlp5.ColorWheel : void setSaturation(double)
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ColorWheel addCallback(CallbackListener)
+main.java.controlp5.Controller : ColorWheel addListener(ControlListener)
+main.java.controlp5.Controller : ColorWheel addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : ColorWheel align(int, int, int, int)
+main.java.controlp5.Controller : ColorWheel bringToFront()
+main.java.controlp5.Controller : ColorWheel bringToFront(ControllerInterface)
+main.java.controlp5.Controller : ColorWheel hide()
+main.java.controlp5.Controller : ColorWheel linebreak()
+main.java.controlp5.Controller : ColorWheel listen(boolean)
+main.java.controlp5.Controller : ColorWheel lock()
+main.java.controlp5.Controller : ColorWheel onChange(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onClick(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onDoublePress(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onDrag(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onDraw(ControllerView)
+main.java.controlp5.Controller : ColorWheel onEndDrag(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onEnter(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onLeave(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onMove(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onPress(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onRelease(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onStartDrag(CallbackListener)
+main.java.controlp5.Controller : ColorWheel onWheel(CallbackListener)
+main.java.controlp5.Controller : ColorWheel plugTo(Object)
+main.java.controlp5.Controller : ColorWheel plugTo(Object, String)
+main.java.controlp5.Controller : ColorWheel plugTo(Object[])
+main.java.controlp5.Controller : ColorWheel plugTo(Object[], String)
+main.java.controlp5.Controller : ColorWheel registerProperty(String)
+main.java.controlp5.Controller : ColorWheel registerProperty(String, String)
+main.java.controlp5.Controller : ColorWheel registerTooltip(String)
+main.java.controlp5.Controller : ColorWheel removeBehavior()
+main.java.controlp5.Controller : ColorWheel removeCallback()
+main.java.controlp5.Controller : ColorWheel removeCallback(CallbackListener)
+main.java.controlp5.Controller : ColorWheel removeListener(ControlListener)
+main.java.controlp5.Controller : ColorWheel removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : ColorWheel removeListenersFor(int)
+main.java.controlp5.Controller : ColorWheel removeProperty(String)
+main.java.controlp5.Controller : ColorWheel removeProperty(String, String)
+main.java.controlp5.Controller : ColorWheel setArrayValue(float[])
+main.java.controlp5.Controller : ColorWheel setArrayValue(int, float)
+main.java.controlp5.Controller : ColorWheel setBehavior(ControlBehavior)
+main.java.controlp5.Controller : ColorWheel setBroadcast(boolean)
+main.java.controlp5.Controller : ColorWheel setCaptionLabel(String)
+main.java.controlp5.Controller : ColorWheel setColor(CColor)
+main.java.controlp5.Controller : ColorWheel setColorActive(int)
+main.java.controlp5.Controller : ColorWheel setColorBackground(int)
+main.java.controlp5.Controller : ColorWheel setColorCaptionLabel(int)
+main.java.controlp5.Controller : ColorWheel setColorForeground(int)
+main.java.controlp5.Controller : ColorWheel setColorLabel(int)
+main.java.controlp5.Controller : ColorWheel setColorValue(int)
+main.java.controlp5.Controller : ColorWheel setColorValueLabel(int)
+main.java.controlp5.Controller : ColorWheel setDecimalPrecision(int)
+main.java.controlp5.Controller : ColorWheel setDefaultValue(float)
+main.java.controlp5.Controller : ColorWheel setHeight(int)
+main.java.controlp5.Controller : ColorWheel setId(int)
+main.java.controlp5.Controller : ColorWheel setImage(PImage)
+main.java.controlp5.Controller : ColorWheel setImage(PImage, int)
+main.java.controlp5.Controller : ColorWheel setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : ColorWheel setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : ColorWheel setLabel(String)
+main.java.controlp5.Controller : ColorWheel setLabelVisible(boolean)
+main.java.controlp5.Controller : ColorWheel setLock(boolean)
+main.java.controlp5.Controller : ColorWheel setMax(float)
+main.java.controlp5.Controller : ColorWheel setMin(float)
+main.java.controlp5.Controller : ColorWheel setMouseOver(boolean)
+main.java.controlp5.Controller : ColorWheel setMoveable(boolean)
+main.java.controlp5.Controller : ColorWheel setPosition(float, float)
+main.java.controlp5.Controller : ColorWheel setPosition(float[])
+main.java.controlp5.Controller : ColorWheel setSize(PImage)
+main.java.controlp5.Controller : ColorWheel setSize(int, int)
+main.java.controlp5.Controller : ColorWheel setStringValue(String)
+main.java.controlp5.Controller : ColorWheel setUpdate(boolean)
+main.java.controlp5.Controller : ColorWheel setValue(float)
+main.java.controlp5.Controller : ColorWheel setValueLabel(String)
+main.java.controlp5.Controller : ColorWheel setValueSelf(float)
+main.java.controlp5.Controller : ColorWheel setView(ControllerView)
+main.java.controlp5.Controller : ColorWheel setVisible(boolean)
+main.java.controlp5.Controller : ColorWheel setWidth(int)
+main.java.controlp5.Controller : ColorWheel show()
+main.java.controlp5.Controller : ColorWheel unlock()
+main.java.controlp5.Controller : ColorWheel unplugFrom(Object)
+main.java.controlp5.Controller : ColorWheel unplugFrom(Object[])
+main.java.controlp5.Controller : ColorWheel unregisterTooltip()
+main.java.controlp5.Controller : ColorWheel update()
+main.java.controlp5.Controller : ColorWheel updateSize()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5accordion/ControlP5accordion.pde b/examples/controllers/ControlP5accordion/ControlP5accordion.pde
index 81d395d..2e3d67c 100644
--- a/examples/controllers/ControlP5accordion/ControlP5accordion.pde
+++ b/examples/controllers/ControlP5accordion/ControlP5accordion.pde
@@ -168,114 +168,114 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Accordion : Accordion addItem(ControlGroup)
-controlP5.Accordion : Accordion close()
-controlP5.Accordion : Accordion open()
-controlP5.Accordion : Accordion remove(ControllerInterface)
-controlP5.Accordion : Accordion removeItem(ControlGroup)
-controlP5.Accordion : Accordion setCollapseMode(int)
-controlP5.Accordion : Accordion setItemHeight(int)
-controlP5.Accordion : Accordion setMinItemHeight(int)
-controlP5.Accordion : Accordion setWidth(int)
-controlP5.Accordion : Accordion updateItems()
-controlP5.Accordion : int getItemHeight()
-controlP5.Accordion : int getMinItemHeight()
-controlP5.ControlGroup : Accordion activateEvent(boolean)
-controlP5.ControlGroup : Accordion addListener(ControlListener)
-controlP5.ControlGroup : Accordion removeListener(ControlListener)
-controlP5.ControlGroup : Accordion setBackgroundColor(int)
-controlP5.ControlGroup : Accordion setBackgroundHeight(int)
-controlP5.ControlGroup : Accordion setBarHeight(int)
-controlP5.ControlGroup : Accordion setSize(int, int)
-controlP5.ControlGroup : Accordion updateInternalEvents(PApplet)
-controlP5.ControlGroup : String getInfo()
-controlP5.ControlGroup : String toString()
-controlP5.ControlGroup : int getBackgroundHeight()
-controlP5.ControlGroup : int getBarHeight()
-controlP5.ControlGroup : int listenerSize()
-controlP5.ControllerGroup : Accordion add(ControllerInterface)
-controlP5.ControllerGroup : Accordion addListener(ControlListener)
-controlP5.ControllerGroup : Accordion bringToFront()
-controlP5.ControllerGroup : Accordion bringToFront(ControllerInterface)
-controlP5.ControllerGroup : Accordion close()
-controlP5.ControllerGroup : Accordion disableCollapse()
-controlP5.ControllerGroup : Accordion enableCollapse()
-controlP5.ControllerGroup : Accordion hide()
-controlP5.ControllerGroup : Accordion hideArrow()
-controlP5.ControllerGroup : Accordion hideBar()
-controlP5.ControllerGroup : Accordion moveTo(ControlWindow)
-controlP5.ControllerGroup : Accordion moveTo(PApplet)
-controlP5.ControllerGroup : Accordion open()
-controlP5.ControllerGroup : Accordion registerProperty(String)
-controlP5.ControllerGroup : Accordion registerProperty(String, String)
-controlP5.ControllerGroup : Accordion remove(CDrawable)
-controlP5.ControllerGroup : Accordion remove(ControllerInterface)
-controlP5.ControllerGroup : Accordion removeCanvas(Canvas)
-controlP5.ControllerGroup : Accordion removeListener(ControlListener)
-controlP5.ControllerGroup : Accordion removeProperty(String)
-controlP5.ControllerGroup : Accordion removeProperty(String, String)
-controlP5.ControllerGroup : Accordion setAddress(String)
-controlP5.ControllerGroup : Accordion setArrayValue(float[])
-controlP5.ControllerGroup : Accordion setArrayValue(int, float)
-controlP5.ControllerGroup : Accordion setCaptionLabel(String)
-controlP5.ControllerGroup : Accordion setColor(CColor)
-controlP5.ControllerGroup : Accordion setColorActive(int)
-controlP5.ControllerGroup : Accordion setColorBackground(int)
-controlP5.ControllerGroup : Accordion setColorForeground(int)
-controlP5.ControllerGroup : Accordion setColorLabel(int)
-controlP5.ControllerGroup : Accordion setColorValue(int)
-controlP5.ControllerGroup : Accordion setHeight(int)
-controlP5.ControllerGroup : Accordion setId(int)
-controlP5.ControllerGroup : Accordion setLabel(String)
-controlP5.ControllerGroup : Accordion setMouseOver(boolean)
-controlP5.ControllerGroup : Accordion setMoveable(boolean)
-controlP5.ControllerGroup : Accordion setOpen(boolean)
-controlP5.ControllerGroup : Accordion setPosition(float, float)
-controlP5.ControllerGroup : Accordion setPosition(float[])
-controlP5.ControllerGroup : Accordion setSize(int, int)
-controlP5.ControllerGroup : Accordion setStringValue(String)
-controlP5.ControllerGroup : Accordion setTitle(String)
-controlP5.ControllerGroup : Accordion setUpdate(boolean)
-controlP5.ControllerGroup : Accordion setValue(float)
-controlP5.ControllerGroup : Accordion setVisible(boolean)
-controlP5.ControllerGroup : Accordion setWidth(int)
-controlP5.ControllerGroup : Accordion show()
-controlP5.ControllerGroup : Accordion showArrow()
-controlP5.ControllerGroup : Accordion showBar()
-controlP5.ControllerGroup : Accordion update()
-controlP5.ControllerGroup : Accordion updateAbsolutePosition()
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : Canvas addCanvas(Canvas)
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : boolean isBarVisible()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getArrayValue(int)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : float[] getPosition()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : int listenerSize()
-controlP5.ControllerGroup : void controlEvent(ControlEvent)
-controlP5.ControllerGroup : void remove()
+main.java.controlp5.Accordion : Accordion addItem(ControlGroup)
+main.java.controlp5.Accordion : Accordion close()
+main.java.controlp5.Accordion : Accordion open()
+main.java.controlp5.Accordion : Accordion remove(ControllerInterface)
+main.java.controlp5.Accordion : Accordion removeItem(ControlGroup)
+main.java.controlp5.Accordion : Accordion setCollapseMode(int)
+main.java.controlp5.Accordion : Accordion setItemHeight(int)
+main.java.controlp5.Accordion : Accordion setMinItemHeight(int)
+main.java.controlp5.Accordion : Accordion setWidth(int)
+main.java.controlp5.Accordion : Accordion updateItems()
+main.java.controlp5.Accordion : int getItemHeight()
+main.java.controlp5.Accordion : int getMinItemHeight()
+main.java.controlp5.ControlGroup : Accordion activateEvent(boolean)
+main.java.controlp5.ControlGroup : Accordion addListener(ControlListener)
+main.java.controlp5.ControlGroup : Accordion removeListener(ControlListener)
+main.java.controlp5.ControlGroup : Accordion setBackgroundColor(int)
+main.java.controlp5.ControlGroup : Accordion setBackgroundHeight(int)
+main.java.controlp5.ControlGroup : Accordion setBarHeight(int)
+main.java.controlp5.ControlGroup : Accordion setSize(int, int)
+main.java.controlp5.ControlGroup : Accordion updateInternalEvents(PApplet)
+main.java.controlp5.ControlGroup : String getInfo()
+main.java.controlp5.ControlGroup : String toString()
+main.java.controlp5.ControlGroup : int getBackgroundHeight()
+main.java.controlp5.ControlGroup : int getBarHeight()
+main.java.controlp5.ControlGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : Accordion add(ControllerInterface)
+main.java.controlp5.ControllerGroup : Accordion addListener(ControlListener)
+main.java.controlp5.ControllerGroup : Accordion bringToFront()
+main.java.controlp5.ControllerGroup : Accordion bringToFront(ControllerInterface)
+main.java.controlp5.ControllerGroup : Accordion close()
+main.java.controlp5.ControllerGroup : Accordion disableCollapse()
+main.java.controlp5.ControllerGroup : Accordion enableCollapse()
+main.java.controlp5.ControllerGroup : Accordion hide()
+main.java.controlp5.ControllerGroup : Accordion hideArrow()
+main.java.controlp5.ControllerGroup : Accordion hideBar()
+main.java.controlp5.ControllerGroup : Accordion moveTo(ControlWindow)
+main.java.controlp5.ControllerGroup : Accordion moveTo(PApplet)
+main.java.controlp5.ControllerGroup : Accordion open()
+main.java.controlp5.ControllerGroup : Accordion registerProperty(String)
+main.java.controlp5.ControllerGroup : Accordion registerProperty(String, String)
+main.java.controlp5.ControllerGroup : Accordion remove(CDrawable)
+main.java.controlp5.ControllerGroup : Accordion remove(ControllerInterface)
+main.java.controlp5.ControllerGroup : Accordion removeCanvas(Canvas)
+main.java.controlp5.ControllerGroup : Accordion removeListener(ControlListener)
+main.java.controlp5.ControllerGroup : Accordion removeProperty(String)
+main.java.controlp5.ControllerGroup : Accordion removeProperty(String, String)
+main.java.controlp5.ControllerGroup : Accordion setAddress(String)
+main.java.controlp5.ControllerGroup : Accordion setArrayValue(float[])
+main.java.controlp5.ControllerGroup : Accordion setArrayValue(int, float)
+main.java.controlp5.ControllerGroup : Accordion setCaptionLabel(String)
+main.java.controlp5.ControllerGroup : Accordion setColor(CColor)
+main.java.controlp5.ControllerGroup : Accordion setColorActive(int)
+main.java.controlp5.ControllerGroup : Accordion setColorBackground(int)
+main.java.controlp5.ControllerGroup : Accordion setColorForeground(int)
+main.java.controlp5.ControllerGroup : Accordion setColorLabel(int)
+main.java.controlp5.ControllerGroup : Accordion setColorValue(int)
+main.java.controlp5.ControllerGroup : Accordion setHeight(int)
+main.java.controlp5.ControllerGroup : Accordion setId(int)
+main.java.controlp5.ControllerGroup : Accordion setLabel(String)
+main.java.controlp5.ControllerGroup : Accordion setMouseOver(boolean)
+main.java.controlp5.ControllerGroup : Accordion setMoveable(boolean)
+main.java.controlp5.ControllerGroup : Accordion setOpen(boolean)
+main.java.controlp5.ControllerGroup : Accordion setPosition(float, float)
+main.java.controlp5.ControllerGroup : Accordion setPosition(float[])
+main.java.controlp5.ControllerGroup : Accordion setSize(int, int)
+main.java.controlp5.ControllerGroup : Accordion setStringValue(String)
+main.java.controlp5.ControllerGroup : Accordion setTitle(String)
+main.java.controlp5.ControllerGroup : Accordion setUpdate(boolean)
+main.java.controlp5.ControllerGroup : Accordion setValue(float)
+main.java.controlp5.ControllerGroup : Accordion setVisible(boolean)
+main.java.controlp5.ControllerGroup : Accordion setWidth(int)
+main.java.controlp5.ControllerGroup : Accordion show()
+main.java.controlp5.ControllerGroup : Accordion showArrow()
+main.java.controlp5.ControllerGroup : Accordion showBar()
+main.java.controlp5.ControllerGroup : Accordion update()
+main.java.controlp5.ControllerGroup : Accordion updateAbsolutePosition()
+main.java.controlp5.ControllerGroup : CColor getColor()
+main.java.controlp5.ControllerGroup : Canvas addCanvas(Canvas)
+main.java.controlp5.ControllerGroup : ControlWindow getWindow()
+main.java.controlp5.ControllerGroup : Controller getController(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String, String)
+main.java.controlp5.ControllerGroup : Label getCaptionLabel()
+main.java.controlp5.ControllerGroup : Label getValueLabel()
+main.java.controlp5.ControllerGroup : String getAddress()
+main.java.controlp5.ControllerGroup : String getInfo()
+main.java.controlp5.ControllerGroup : String getName()
+main.java.controlp5.ControllerGroup : String getStringValue()
+main.java.controlp5.ControllerGroup : String toString()
+main.java.controlp5.ControllerGroup : Tab getTab()
+main.java.controlp5.ControllerGroup : boolean isBarVisible()
+main.java.controlp5.ControllerGroup : boolean isCollapse()
+main.java.controlp5.ControllerGroup : boolean isMouseOver()
+main.java.controlp5.ControllerGroup : boolean isMoveable()
+main.java.controlp5.ControllerGroup : boolean isOpen()
+main.java.controlp5.ControllerGroup : boolean isUpdate()
+main.java.controlp5.ControllerGroup : boolean isVisible()
+main.java.controlp5.ControllerGroup : boolean setMousePressed(boolean)
+main.java.controlp5.ControllerGroup : float getArrayValue(int)
+main.java.controlp5.ControllerGroup : float getValue()
+main.java.controlp5.ControllerGroup : float[] getArrayValue()
+main.java.controlp5.ControllerGroup : float[] getPosition()
+main.java.controlp5.ControllerGroup : int getHeight()
+main.java.controlp5.ControllerGroup : int getId()
+main.java.controlp5.ControllerGroup : int getWidth()
+main.java.controlp5.ControllerGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : void controlEvent(ControlEvent)
+main.java.controlp5.ControllerGroup : void remove()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5background/ControlP5background.pde b/examples/controllers/ControlP5background/ControlP5background.pde
index 11a974c..18428ee 100644
--- a/examples/controllers/ControlP5background/ControlP5background.pde
+++ b/examples/controllers/ControlP5background/ControlP5background.pde
@@ -82,102 +82,102 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControlGroup : Background activateEvent(boolean)
-controlP5.ControlGroup : Background addListener(ControlListener)
-controlP5.ControlGroup : Background removeListener(ControlListener)
-controlP5.ControlGroup : Background setBackgroundColor(int)
-controlP5.ControlGroup : Background setBackgroundHeight(int)
-controlP5.ControlGroup : Background setBarHeight(int)
-controlP5.ControlGroup : Background setSize(int, int)
-controlP5.ControlGroup : Background updateInternalEvents(PApplet)
-controlP5.ControlGroup : String getInfo()
-controlP5.ControlGroup : String toString()
-controlP5.ControlGroup : int getBackgroundHeight()
-controlP5.ControlGroup : int getBarHeight()
-controlP5.ControlGroup : int listenerSize()
-controlP5.ControllerGroup : Background add(ControllerInterface)
-controlP5.ControllerGroup : Background addListener(ControlListener)
-controlP5.ControllerGroup : Background bringToFront()
-controlP5.ControllerGroup : Background bringToFront(ControllerInterface)
-controlP5.ControllerGroup : Background close()
-controlP5.ControllerGroup : Background disableCollapse()
-controlP5.ControllerGroup : Background enableCollapse()
-controlP5.ControllerGroup : Background hide()
-controlP5.ControllerGroup : Background hideArrow()
-controlP5.ControllerGroup : Background hideBar()
-controlP5.ControllerGroup : Background moveTo(ControlWindow)
-controlP5.ControllerGroup : Background moveTo(PApplet)
-controlP5.ControllerGroup : Background open()
-controlP5.ControllerGroup : Background registerProperty(String)
-controlP5.ControllerGroup : Background registerProperty(String, String)
-controlP5.ControllerGroup : Background remove(CDrawable)
-controlP5.ControllerGroup : Background remove(ControllerInterface)
-controlP5.ControllerGroup : Background removeCanvas(Canvas)
-controlP5.ControllerGroup : Background removeListener(ControlListener)
-controlP5.ControllerGroup : Background removeProperty(String)
-controlP5.ControllerGroup : Background removeProperty(String, String)
-controlP5.ControllerGroup : Background setAddress(String)
-controlP5.ControllerGroup : Background setArrayValue(float[])
-controlP5.ControllerGroup : Background setArrayValue(int, float)
-controlP5.ControllerGroup : Background setCaptionLabel(String)
-controlP5.ControllerGroup : Background setColor(CColor)
-controlP5.ControllerGroup : Background setColorActive(int)
-controlP5.ControllerGroup : Background setColorBackground(int)
-controlP5.ControllerGroup : Background setColorForeground(int)
-controlP5.ControllerGroup : Background setColorLabel(int)
-controlP5.ControllerGroup : Background setColorValue(int)
-controlP5.ControllerGroup : Background setHeight(int)
-controlP5.ControllerGroup : Background setId(int)
-controlP5.ControllerGroup : Background setLabel(String)
-controlP5.ControllerGroup : Background setMouseOver(boolean)
-controlP5.ControllerGroup : Background setMoveable(boolean)
-controlP5.ControllerGroup : Background setOpen(boolean)
-controlP5.ControllerGroup : Background setPosition(float, float)
-controlP5.ControllerGroup : Background setPosition(float[])
-controlP5.ControllerGroup : Background setSize(int, int)
-controlP5.ControllerGroup : Background setStringValue(String)
-controlP5.ControllerGroup : Background setTitle(String)
-controlP5.ControllerGroup : Background setUpdate(boolean)
-controlP5.ControllerGroup : Background setValue(float)
-controlP5.ControllerGroup : Background setVisible(boolean)
-controlP5.ControllerGroup : Background setWidth(int)
-controlP5.ControllerGroup : Background show()
-controlP5.ControllerGroup : Background showArrow()
-controlP5.ControllerGroup : Background showBar()
-controlP5.ControllerGroup : Background update()
-controlP5.ControllerGroup : Background updateAbsolutePosition()
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : Canvas addCanvas(Canvas)
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : boolean isBarVisible()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getArrayValue(int)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : float[] getPosition()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : int listenerSize()
-controlP5.ControllerGroup : void controlEvent(ControlEvent)
-controlP5.ControllerGroup : void remove()
+main.java.controlp5.ControlGroup : Background activateEvent(boolean)
+main.java.controlp5.ControlGroup : Background addListener(ControlListener)
+main.java.controlp5.ControlGroup : Background removeListener(ControlListener)
+main.java.controlp5.ControlGroup : Background setBackgroundColor(int)
+main.java.controlp5.ControlGroup : Background setBackgroundHeight(int)
+main.java.controlp5.ControlGroup : Background setBarHeight(int)
+main.java.controlp5.ControlGroup : Background setSize(int, int)
+main.java.controlp5.ControlGroup : Background updateInternalEvents(PApplet)
+main.java.controlp5.ControlGroup : String getInfo()
+main.java.controlp5.ControlGroup : String toString()
+main.java.controlp5.ControlGroup : int getBackgroundHeight()
+main.java.controlp5.ControlGroup : int getBarHeight()
+main.java.controlp5.ControlGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : Background add(ControllerInterface)
+main.java.controlp5.ControllerGroup : Background addListener(ControlListener)
+main.java.controlp5.ControllerGroup : Background bringToFront()
+main.java.controlp5.ControllerGroup : Background bringToFront(ControllerInterface)
+main.java.controlp5.ControllerGroup : Background close()
+main.java.controlp5.ControllerGroup : Background disableCollapse()
+main.java.controlp5.ControllerGroup : Background enableCollapse()
+main.java.controlp5.ControllerGroup : Background hide()
+main.java.controlp5.ControllerGroup : Background hideArrow()
+main.java.controlp5.ControllerGroup : Background hideBar()
+main.java.controlp5.ControllerGroup : Background moveTo(ControlWindow)
+main.java.controlp5.ControllerGroup : Background moveTo(PApplet)
+main.java.controlp5.ControllerGroup : Background open()
+main.java.controlp5.ControllerGroup : Background registerProperty(String)
+main.java.controlp5.ControllerGroup : Background registerProperty(String, String)
+main.java.controlp5.ControllerGroup : Background remove(CDrawable)
+main.java.controlp5.ControllerGroup : Background remove(ControllerInterface)
+main.java.controlp5.ControllerGroup : Background removeCanvas(Canvas)
+main.java.controlp5.ControllerGroup : Background removeListener(ControlListener)
+main.java.controlp5.ControllerGroup : Background removeProperty(String)
+main.java.controlp5.ControllerGroup : Background removeProperty(String, String)
+main.java.controlp5.ControllerGroup : Background setAddress(String)
+main.java.controlp5.ControllerGroup : Background setArrayValue(float[])
+main.java.controlp5.ControllerGroup : Background setArrayValue(int, float)
+main.java.controlp5.ControllerGroup : Background setCaptionLabel(String)
+main.java.controlp5.ControllerGroup : Background setColor(CColor)
+main.java.controlp5.ControllerGroup : Background setColorActive(int)
+main.java.controlp5.ControllerGroup : Background setColorBackground(int)
+main.java.controlp5.ControllerGroup : Background setColorForeground(int)
+main.java.controlp5.ControllerGroup : Background setColorLabel(int)
+main.java.controlp5.ControllerGroup : Background setColorValue(int)
+main.java.controlp5.ControllerGroup : Background setHeight(int)
+main.java.controlp5.ControllerGroup : Background setId(int)
+main.java.controlp5.ControllerGroup : Background setLabel(String)
+main.java.controlp5.ControllerGroup : Background setMouseOver(boolean)
+main.java.controlp5.ControllerGroup : Background setMoveable(boolean)
+main.java.controlp5.ControllerGroup : Background setOpen(boolean)
+main.java.controlp5.ControllerGroup : Background setPosition(float, float)
+main.java.controlp5.ControllerGroup : Background setPosition(float[])
+main.java.controlp5.ControllerGroup : Background setSize(int, int)
+main.java.controlp5.ControllerGroup : Background setStringValue(String)
+main.java.controlp5.ControllerGroup : Background setTitle(String)
+main.java.controlp5.ControllerGroup : Background setUpdate(boolean)
+main.java.controlp5.ControllerGroup : Background setValue(float)
+main.java.controlp5.ControllerGroup : Background setVisible(boolean)
+main.java.controlp5.ControllerGroup : Background setWidth(int)
+main.java.controlp5.ControllerGroup : Background show()
+main.java.controlp5.ControllerGroup : Background showArrow()
+main.java.controlp5.ControllerGroup : Background showBar()
+main.java.controlp5.ControllerGroup : Background update()
+main.java.controlp5.ControllerGroup : Background updateAbsolutePosition()
+main.java.controlp5.ControllerGroup : CColor getColor()
+main.java.controlp5.ControllerGroup : Canvas addCanvas(Canvas)
+main.java.controlp5.ControllerGroup : ControlWindow getWindow()
+main.java.controlp5.ControllerGroup : Controller getController(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String, String)
+main.java.controlp5.ControllerGroup : Label getCaptionLabel()
+main.java.controlp5.ControllerGroup : Label getValueLabel()
+main.java.controlp5.ControllerGroup : String getAddress()
+main.java.controlp5.ControllerGroup : String getInfo()
+main.java.controlp5.ControllerGroup : String getName()
+main.java.controlp5.ControllerGroup : String getStringValue()
+main.java.controlp5.ControllerGroup : String toString()
+main.java.controlp5.ControllerGroup : Tab getTab()
+main.java.controlp5.ControllerGroup : boolean isBarVisible()
+main.java.controlp5.ControllerGroup : boolean isCollapse()
+main.java.controlp5.ControllerGroup : boolean isMouseOver()
+main.java.controlp5.ControllerGroup : boolean isMoveable()
+main.java.controlp5.ControllerGroup : boolean isOpen()
+main.java.controlp5.ControllerGroup : boolean isUpdate()
+main.java.controlp5.ControllerGroup : boolean isVisible()
+main.java.controlp5.ControllerGroup : boolean setMousePressed(boolean)
+main.java.controlp5.ControllerGroup : float getArrayValue(int)
+main.java.controlp5.ControllerGroup : float getValue()
+main.java.controlp5.ControllerGroup : float[] getArrayValue()
+main.java.controlp5.ControllerGroup : float[] getPosition()
+main.java.controlp5.ControllerGroup : int getHeight()
+main.java.controlp5.ControllerGroup : int getId()
+main.java.controlp5.ControllerGroup : int getWidth()
+main.java.controlp5.ControllerGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : void controlEvent(ControlEvent)
+main.java.controlp5.ControllerGroup : void remove()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5bang/ControlP5bang.pde b/examples/controllers/ControlP5bang/ControlP5bang.pde
index c84e786..0eea9eb 100644
--- a/examples/controllers/ControlP5bang/ControlP5bang.pde
+++ b/examples/controllers/ControlP5bang/ControlP5bang.pde
@@ -86,141 +86,141 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Bang : Bang setTriggerEvent(int)
-controlP5.Bang : Bang setValue(float)
-controlP5.Bang : Bang update()
-controlP5.Bang : String getInfo()
-controlP5.Bang : String toString()
-controlP5.Bang : int getTriggerEvent()
-controlP5.Controller : Bang addCallback(CallbackListener)
-controlP5.Controller : Bang addListener(ControlListener)
-controlP5.Controller : Bang addListenerFor(int, CallbackListener)
-controlP5.Controller : Bang align(int, int, int, int)
-controlP5.Controller : Bang bringToFront()
-controlP5.Controller : Bang bringToFront(ControllerInterface)
-controlP5.Controller : Bang hide()
-controlP5.Controller : Bang linebreak()
-controlP5.Controller : Bang listen(boolean)
-controlP5.Controller : Bang lock()
-controlP5.Controller : Bang onChange(CallbackListener)
-controlP5.Controller : Bang onClick(CallbackListener)
-controlP5.Controller : Bang onDoublePress(CallbackListener)
-controlP5.Controller : Bang onDrag(CallbackListener)
-controlP5.Controller : Bang onDraw(ControllerView)
-controlP5.Controller : Bang onEndDrag(CallbackListener)
-controlP5.Controller : Bang onEnter(CallbackListener)
-controlP5.Controller : Bang onLeave(CallbackListener)
-controlP5.Controller : Bang onMove(CallbackListener)
-controlP5.Controller : Bang onPress(CallbackListener)
-controlP5.Controller : Bang onRelease(CallbackListener)
-controlP5.Controller : Bang onReleaseOutside(CallbackListener)
-controlP5.Controller : Bang onStartDrag(CallbackListener)
-controlP5.Controller : Bang onWheel(CallbackListener)
-controlP5.Controller : Bang plugTo(Object)
-controlP5.Controller : Bang plugTo(Object, String)
-controlP5.Controller : Bang plugTo(Object[])
-controlP5.Controller : Bang plugTo(Object[], String)
-controlP5.Controller : Bang registerProperty(String)
-controlP5.Controller : Bang registerProperty(String, String)
-controlP5.Controller : Bang registerTooltip(String)
-controlP5.Controller : Bang removeBehavior()
-controlP5.Controller : Bang removeCallback()
-controlP5.Controller : Bang removeCallback(CallbackListener)
-controlP5.Controller : Bang removeListener(ControlListener)
-controlP5.Controller : Bang removeListenerFor(int, CallbackListener)
-controlP5.Controller : Bang removeListenersFor(int)
-controlP5.Controller : Bang removeProperty(String)
-controlP5.Controller : Bang removeProperty(String, String)
-controlP5.Controller : Bang setArrayValue(float[])
-controlP5.Controller : Bang setArrayValue(int, float)
-controlP5.Controller : Bang setBehavior(ControlBehavior)
-controlP5.Controller : Bang setBroadcast(boolean)
-controlP5.Controller : Bang setCaptionLabel(String)
-controlP5.Controller : Bang setColor(CColor)
-controlP5.Controller : Bang setColorActive(int)
-controlP5.Controller : Bang setColorBackground(int)
-controlP5.Controller : Bang setColorCaptionLabel(int)
-controlP5.Controller : Bang setColorForeground(int)
-controlP5.Controller : Bang setColorLabel(int)
-controlP5.Controller : Bang setColorValue(int)
-controlP5.Controller : Bang setColorValueLabel(int)
-controlP5.Controller : Bang setDecimalPrecision(int)
-controlP5.Controller : Bang setDefaultValue(float)
-controlP5.Controller : Bang setHeight(int)
-controlP5.Controller : Bang setId(int)
-controlP5.Controller : Bang setImage(PImage)
-controlP5.Controller : Bang setImage(PImage, int)
-controlP5.Controller : Bang setImages(PImage, PImage, PImage)
-controlP5.Controller : Bang setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Bang setLabel(String)
-controlP5.Controller : Bang setLabelVisible(boolean)
-controlP5.Controller : Bang setLock(boolean)
-controlP5.Controller : Bang setMax(float)
-controlP5.Controller : Bang setMin(float)
-controlP5.Controller : Bang setMouseOver(boolean)
-controlP5.Controller : Bang setMoveable(boolean)
-controlP5.Controller : Bang setPosition(float, float)
-controlP5.Controller : Bang setPosition(float[])
-controlP5.Controller : Bang setSize(PImage)
-controlP5.Controller : Bang setSize(int, int)
-controlP5.Controller : Bang setStringValue(String)
-controlP5.Controller : Bang setUpdate(boolean)
-controlP5.Controller : Bang setValue(float)
-controlP5.Controller : Bang setValueLabel(String)
-controlP5.Controller : Bang setValueSelf(float)
-controlP5.Controller : Bang setView(ControllerView)
-controlP5.Controller : Bang setVisible(boolean)
-controlP5.Controller : Bang setWidth(int)
-controlP5.Controller : Bang show()
-controlP5.Controller : Bang unlock()
-controlP5.Controller : Bang unplugFrom(Object)
-controlP5.Controller : Bang unplugFrom(Object[])
-controlP5.Controller : Bang unregisterTooltip()
-controlP5.Controller : Bang update()
-controlP5.Controller : Bang updateSize()
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Bang : Bang setTriggerEvent(int)
+main.java.controlp5.Bang : Bang setValue(float)
+main.java.controlp5.Bang : Bang update()
+main.java.controlp5.Bang : String getInfo()
+main.java.controlp5.Bang : String toString()
+main.java.controlp5.Bang : int getTriggerEvent()
+main.java.controlp5.Controller : Bang addCallback(CallbackListener)
+main.java.controlp5.Controller : Bang addListener(ControlListener)
+main.java.controlp5.Controller : Bang addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Bang align(int, int, int, int)
+main.java.controlp5.Controller : Bang bringToFront()
+main.java.controlp5.Controller : Bang bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Bang hide()
+main.java.controlp5.Controller : Bang linebreak()
+main.java.controlp5.Controller : Bang listen(boolean)
+main.java.controlp5.Controller : Bang lock()
+main.java.controlp5.Controller : Bang onChange(CallbackListener)
+main.java.controlp5.Controller : Bang onClick(CallbackListener)
+main.java.controlp5.Controller : Bang onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Bang onDrag(CallbackListener)
+main.java.controlp5.Controller : Bang onDraw(ControllerView)
+main.java.controlp5.Controller : Bang onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Bang onEnter(CallbackListener)
+main.java.controlp5.Controller : Bang onLeave(CallbackListener)
+main.java.controlp5.Controller : Bang onMove(CallbackListener)
+main.java.controlp5.Controller : Bang onPress(CallbackListener)
+main.java.controlp5.Controller : Bang onRelease(CallbackListener)
+main.java.controlp5.Controller : Bang onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Bang onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Bang onWheel(CallbackListener)
+main.java.controlp5.Controller : Bang plugTo(Object)
+main.java.controlp5.Controller : Bang plugTo(Object, String)
+main.java.controlp5.Controller : Bang plugTo(Object[])
+main.java.controlp5.Controller : Bang plugTo(Object[], String)
+main.java.controlp5.Controller : Bang registerProperty(String)
+main.java.controlp5.Controller : Bang registerProperty(String, String)
+main.java.controlp5.Controller : Bang registerTooltip(String)
+main.java.controlp5.Controller : Bang removeBehavior()
+main.java.controlp5.Controller : Bang removeCallback()
+main.java.controlp5.Controller : Bang removeCallback(CallbackListener)
+main.java.controlp5.Controller : Bang removeListener(ControlListener)
+main.java.controlp5.Controller : Bang removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Bang removeListenersFor(int)
+main.java.controlp5.Controller : Bang removeProperty(String)
+main.java.controlp5.Controller : Bang removeProperty(String, String)
+main.java.controlp5.Controller : Bang setArrayValue(float[])
+main.java.controlp5.Controller : Bang setArrayValue(int, float)
+main.java.controlp5.Controller : Bang setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Bang setBroadcast(boolean)
+main.java.controlp5.Controller : Bang setCaptionLabel(String)
+main.java.controlp5.Controller : Bang setColor(CColor)
+main.java.controlp5.Controller : Bang setColorActive(int)
+main.java.controlp5.Controller : Bang setColorBackground(int)
+main.java.controlp5.Controller : Bang setColorCaptionLabel(int)
+main.java.controlp5.Controller : Bang setColorForeground(int)
+main.java.controlp5.Controller : Bang setColorLabel(int)
+main.java.controlp5.Controller : Bang setColorValue(int)
+main.java.controlp5.Controller : Bang setColorValueLabel(int)
+main.java.controlp5.Controller : Bang setDecimalPrecision(int)
+main.java.controlp5.Controller : Bang setDefaultValue(float)
+main.java.controlp5.Controller : Bang setHeight(int)
+main.java.controlp5.Controller : Bang setId(int)
+main.java.controlp5.Controller : Bang setImage(PImage)
+main.java.controlp5.Controller : Bang setImage(PImage, int)
+main.java.controlp5.Controller : Bang setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Bang setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Bang setLabel(String)
+main.java.controlp5.Controller : Bang setLabelVisible(boolean)
+main.java.controlp5.Controller : Bang setLock(boolean)
+main.java.controlp5.Controller : Bang setMax(float)
+main.java.controlp5.Controller : Bang setMin(float)
+main.java.controlp5.Controller : Bang setMouseOver(boolean)
+main.java.controlp5.Controller : Bang setMoveable(boolean)
+main.java.controlp5.Controller : Bang setPosition(float, float)
+main.java.controlp5.Controller : Bang setPosition(float[])
+main.java.controlp5.Controller : Bang setSize(PImage)
+main.java.controlp5.Controller : Bang setSize(int, int)
+main.java.controlp5.Controller : Bang setStringValue(String)
+main.java.controlp5.Controller : Bang setUpdate(boolean)
+main.java.controlp5.Controller : Bang setValue(float)
+main.java.controlp5.Controller : Bang setValueLabel(String)
+main.java.controlp5.Controller : Bang setValueSelf(float)
+main.java.controlp5.Controller : Bang setView(ControllerView)
+main.java.controlp5.Controller : Bang setVisible(boolean)
+main.java.controlp5.Controller : Bang setWidth(int)
+main.java.controlp5.Controller : Bang show()
+main.java.controlp5.Controller : Bang unlock()
+main.java.controlp5.Controller : Bang unplugFrom(Object)
+main.java.controlp5.Controller : Bang unplugFrom(Object[])
+main.java.controlp5.Controller : Bang unregisterTooltip()
+main.java.controlp5.Controller : Bang update()
+main.java.controlp5.Controller : Bang updateSize()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5button/ControlP5button.pde b/examples/controllers/ControlP5button/ControlP5button.pde
index 08f1d3f..7116978 100644
--- a/examples/controllers/ControlP5button/ControlP5button.pde
+++ b/examples/controllers/ControlP5button/ControlP5button.pde
@@ -116,147 +116,147 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Button : Button activateBy(int)
-controlP5.Button : Button setOff()
-controlP5.Button : Button setOn()
-controlP5.Button : Button setSwitch(boolean)
-controlP5.Button : Button setValue(float)
-controlP5.Button : Button update()
-controlP5.Button : String getInfo()
-controlP5.Button : String toString()
-controlP5.Button : boolean getBooleanValue()
-controlP5.Button : boolean isOn()
-controlP5.Button : boolean isPressed()
-controlP5.Button : boolean isSwitch()
-controlP5.Controller : Button addCallback(CallbackListener)
-controlP5.Controller : Button addListener(ControlListener)
-controlP5.Controller : Button addListenerFor(int, CallbackListener)
-controlP5.Controller : Button align(int, int, int, int)
-controlP5.Controller : Button bringToFront()
-controlP5.Controller : Button bringToFront(ControllerInterface)
-controlP5.Controller : Button hide()
-controlP5.Controller : Button linebreak()
-controlP5.Controller : Button listen(boolean)
-controlP5.Controller : Button lock()
-controlP5.Controller : Button onChange(CallbackListener)
-controlP5.Controller : Button onClick(CallbackListener)
-controlP5.Controller : Button onDoublePress(CallbackListener)
-controlP5.Controller : Button onDrag(CallbackListener)
-controlP5.Controller : Button onDraw(ControllerView)
-controlP5.Controller : Button onEndDrag(CallbackListener)
-controlP5.Controller : Button onEnter(CallbackListener)
-controlP5.Controller : Button onLeave(CallbackListener)
-controlP5.Controller : Button onMove(CallbackListener)
-controlP5.Controller : Button onPress(CallbackListener)
-controlP5.Controller : Button onRelease(CallbackListener)
-controlP5.Controller : Button onReleaseOutside(CallbackListener)
-controlP5.Controller : Button onStartDrag(CallbackListener)
-controlP5.Controller : Button onWheel(CallbackListener)
-controlP5.Controller : Button plugTo(Object)
-controlP5.Controller : Button plugTo(Object, String)
-controlP5.Controller : Button plugTo(Object[])
-controlP5.Controller : Button plugTo(Object[], String)
-controlP5.Controller : Button registerProperty(String)
-controlP5.Controller : Button registerProperty(String, String)
-controlP5.Controller : Button registerTooltip(String)
-controlP5.Controller : Button removeBehavior()
-controlP5.Controller : Button removeCallback()
-controlP5.Controller : Button removeCallback(CallbackListener)
-controlP5.Controller : Button removeListener(ControlListener)
-controlP5.Controller : Button removeListenerFor(int, CallbackListener)
-controlP5.Controller : Button removeListenersFor(int)
-controlP5.Controller : Button removeProperty(String)
-controlP5.Controller : Button removeProperty(String, String)
-controlP5.Controller : Button setArrayValue(float[])
-controlP5.Controller : Button setArrayValue(int, float)
-controlP5.Controller : Button setBehavior(ControlBehavior)
-controlP5.Controller : Button setBroadcast(boolean)
-controlP5.Controller : Button setCaptionLabel(String)
-controlP5.Controller : Button setColor(CColor)
-controlP5.Controller : Button setColorActive(int)
-controlP5.Controller : Button setColorBackground(int)
-controlP5.Controller : Button setColorCaptionLabel(int)
-controlP5.Controller : Button setColorForeground(int)
-controlP5.Controller : Button setColorLabel(int)
-controlP5.Controller : Button setColorValue(int)
-controlP5.Controller : Button setColorValueLabel(int)
-controlP5.Controller : Button setDecimalPrecision(int)
-controlP5.Controller : Button setDefaultValue(float)
-controlP5.Controller : Button setHeight(int)
-controlP5.Controller : Button setId(int)
-controlP5.Controller : Button setImage(PImage)
-controlP5.Controller : Button setImage(PImage, int)
-controlP5.Controller : Button setImages(PImage, PImage, PImage)
-controlP5.Controller : Button setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Button setLabel(String)
-controlP5.Controller : Button setLabelVisible(boolean)
-controlP5.Controller : Button setLock(boolean)
-controlP5.Controller : Button setMax(float)
-controlP5.Controller : Button setMin(float)
-controlP5.Controller : Button setMouseOver(boolean)
-controlP5.Controller : Button setMoveable(boolean)
-controlP5.Controller : Button setPosition(float, float)
-controlP5.Controller : Button setPosition(float[])
-controlP5.Controller : Button setSize(PImage)
-controlP5.Controller : Button setSize(int, int)
-controlP5.Controller : Button setStringValue(String)
-controlP5.Controller : Button setUpdate(boolean)
-controlP5.Controller : Button setValue(float)
-controlP5.Controller : Button setValueLabel(String)
-controlP5.Controller : Button setValueSelf(float)
-controlP5.Controller : Button setView(ControllerView)
-controlP5.Controller : Button setVisible(boolean)
-controlP5.Controller : Button setWidth(int)
-controlP5.Controller : Button show()
-controlP5.Controller : Button unlock()
-controlP5.Controller : Button unplugFrom(Object)
-controlP5.Controller : Button unplugFrom(Object[])
-controlP5.Controller : Button unregisterTooltip()
-controlP5.Controller : Button update()
-controlP5.Controller : Button updateSize()
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Button : Button activateBy(int)
+main.java.controlp5.Button : Button setOff()
+main.java.controlp5.Button : Button setOn()
+main.java.controlp5.Button : Button setSwitch(boolean)
+main.java.controlp5.Button : Button setValue(float)
+main.java.controlp5.Button : Button update()
+main.java.controlp5.Button : String getInfo()
+main.java.controlp5.Button : String toString()
+main.java.controlp5.Button : boolean getBooleanValue()
+main.java.controlp5.Button : boolean isOn()
+main.java.controlp5.Button : boolean isPressed()
+main.java.controlp5.Button : boolean isSwitch()
+main.java.controlp5.Controller : Button addCallback(CallbackListener)
+main.java.controlp5.Controller : Button addListener(ControlListener)
+main.java.controlp5.Controller : Button addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Button align(int, int, int, int)
+main.java.controlp5.Controller : Button bringToFront()
+main.java.controlp5.Controller : Button bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Button hide()
+main.java.controlp5.Controller : Button linebreak()
+main.java.controlp5.Controller : Button listen(boolean)
+main.java.controlp5.Controller : Button lock()
+main.java.controlp5.Controller : Button onChange(CallbackListener)
+main.java.controlp5.Controller : Button onClick(CallbackListener)
+main.java.controlp5.Controller : Button onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Button onDrag(CallbackListener)
+main.java.controlp5.Controller : Button onDraw(ControllerView)
+main.java.controlp5.Controller : Button onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Button onEnter(CallbackListener)
+main.java.controlp5.Controller : Button onLeave(CallbackListener)
+main.java.controlp5.Controller : Button onMove(CallbackListener)
+main.java.controlp5.Controller : Button onPress(CallbackListener)
+main.java.controlp5.Controller : Button onRelease(CallbackListener)
+main.java.controlp5.Controller : Button onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Button onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Button onWheel(CallbackListener)
+main.java.controlp5.Controller : Button plugTo(Object)
+main.java.controlp5.Controller : Button plugTo(Object, String)
+main.java.controlp5.Controller : Button plugTo(Object[])
+main.java.controlp5.Controller : Button plugTo(Object[], String)
+main.java.controlp5.Controller : Button registerProperty(String)
+main.java.controlp5.Controller : Button registerProperty(String, String)
+main.java.controlp5.Controller : Button registerTooltip(String)
+main.java.controlp5.Controller : Button removeBehavior()
+main.java.controlp5.Controller : Button removeCallback()
+main.java.controlp5.Controller : Button removeCallback(CallbackListener)
+main.java.controlp5.Controller : Button removeListener(ControlListener)
+main.java.controlp5.Controller : Button removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Button removeListenersFor(int)
+main.java.controlp5.Controller : Button removeProperty(String)
+main.java.controlp5.Controller : Button removeProperty(String, String)
+main.java.controlp5.Controller : Button setArrayValue(float[])
+main.java.controlp5.Controller : Button setArrayValue(int, float)
+main.java.controlp5.Controller : Button setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Button setBroadcast(boolean)
+main.java.controlp5.Controller : Button setCaptionLabel(String)
+main.java.controlp5.Controller : Button setColor(CColor)
+main.java.controlp5.Controller : Button setColorActive(int)
+main.java.controlp5.Controller : Button setColorBackground(int)
+main.java.controlp5.Controller : Button setColorCaptionLabel(int)
+main.java.controlp5.Controller : Button setColorForeground(int)
+main.java.controlp5.Controller : Button setColorLabel(int)
+main.java.controlp5.Controller : Button setColorValue(int)
+main.java.controlp5.Controller : Button setColorValueLabel(int)
+main.java.controlp5.Controller : Button setDecimalPrecision(int)
+main.java.controlp5.Controller : Button setDefaultValue(float)
+main.java.controlp5.Controller : Button setHeight(int)
+main.java.controlp5.Controller : Button setId(int)
+main.java.controlp5.Controller : Button setImage(PImage)
+main.java.controlp5.Controller : Button setImage(PImage, int)
+main.java.controlp5.Controller : Button setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Button setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Button setLabel(String)
+main.java.controlp5.Controller : Button setLabelVisible(boolean)
+main.java.controlp5.Controller : Button setLock(boolean)
+main.java.controlp5.Controller : Button setMax(float)
+main.java.controlp5.Controller : Button setMin(float)
+main.java.controlp5.Controller : Button setMouseOver(boolean)
+main.java.controlp5.Controller : Button setMoveable(boolean)
+main.java.controlp5.Controller : Button setPosition(float, float)
+main.java.controlp5.Controller : Button setPosition(float[])
+main.java.controlp5.Controller : Button setSize(PImage)
+main.java.controlp5.Controller : Button setSize(int, int)
+main.java.controlp5.Controller : Button setStringValue(String)
+main.java.controlp5.Controller : Button setUpdate(boolean)
+main.java.controlp5.Controller : Button setValue(float)
+main.java.controlp5.Controller : Button setValueLabel(String)
+main.java.controlp5.Controller : Button setValueSelf(float)
+main.java.controlp5.Controller : Button setView(ControllerView)
+main.java.controlp5.Controller : Button setVisible(boolean)
+main.java.controlp5.Controller : Button setWidth(int)
+main.java.controlp5.Controller : Button show()
+main.java.controlp5.Controller : Button unlock()
+main.java.controlp5.Controller : Button unplugFrom(Object)
+main.java.controlp5.Controller : Button unplugFrom(Object[])
+main.java.controlp5.Controller : Button unregisterTooltip()
+main.java.controlp5.Controller : Button update()
+main.java.controlp5.Controller : Button updateSize()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5canvas/ControlP5canvas.pde b/examples/controllers/ControlP5canvas/ControlP5canvas.pde
index 7bfa71b..69e8043 100644
--- a/examples/controllers/ControlP5canvas/ControlP5canvas.pde
+++ b/examples/controllers/ControlP5canvas/ControlP5canvas.pde
@@ -76,9 +76,9 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Canvas : void moveTo(ControlWindow)
-controlP5.Canvas : void setup(PGraphics)
-controlP5.Canvas : void update(PApplet)
+main.java.controlp5.Canvas : void moveTo(ControlWindow)
+main.java.controlp5.Canvas : void setup(PGraphics)
+main.java.controlp5.Canvas : void update(PApplet)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5chart/ControlP5chart.pde b/examples/controllers/ControlP5chart/ControlP5chart.pde
index 7d97672..c91a5f3 100644
--- a/examples/controllers/ControlP5chart/ControlP5chart.pde
+++ b/examples/controllers/ControlP5chart/ControlP5chart.pde
@@ -61,178 +61,178 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Chart : Chart addData(ChartData)
-controlP5.Chart : Chart addData(ChartDataSet, float)
-controlP5.Chart : Chart addData(String, ChartData)
-controlP5.Chart : Chart addData(String, float)
-controlP5.Chart : Chart addData(float)
-controlP5.Chart : Chart addDataSet(String)
-controlP5.Chart : Chart addFirst(String, float)
-controlP5.Chart : Chart addFirst(float)
-controlP5.Chart : Chart addLast(String, float)
-controlP5.Chart : Chart addLast(float)
-controlP5.Chart : Chart push(String, float)
-controlP5.Chart : Chart push(float)
-controlP5.Chart : Chart removeData(ChartData)
-controlP5.Chart : Chart removeData(String, ChartData)
-controlP5.Chart : Chart removeData(String, int)
-controlP5.Chart : Chart removeData(int)
-controlP5.Chart : Chart removeDataSet(String)
-controlP5.Chart : Chart removeFirst()
-controlP5.Chart : Chart removeFirst(String)
-controlP5.Chart : Chart removeLast()
-controlP5.Chart : Chart removeLast(String)
-controlP5.Chart : Chart setData(String, int, ChartData)
-controlP5.Chart : Chart setData(int, ChartData)
-controlP5.Chart : Chart setDataSet(ChartDataSet)
-controlP5.Chart : Chart setDataSet(String, ChartDataSet)
-controlP5.Chart : Chart setRange(float, float)
-controlP5.Chart : Chart setResolution(int)
-controlP5.Chart : Chart setStrokeWeight(float)
-controlP5.Chart : Chart setValue(float)
-controlP5.Chart : Chart setView(int)
-controlP5.Chart : Chart unshift(String, float)
-controlP5.Chart : Chart unshift(float)
-controlP5.Chart : ChartData getData(String, int)
-controlP5.Chart : ChartDataSet getDataSet(String)
-controlP5.Chart : LinkedHashMap getDataSet()
-controlP5.Chart : String getInfo()
-controlP5.Chart : String toString()
-controlP5.Chart : float getStrokeWeight()
-controlP5.Chart : float[] getValuesFrom(String)
-controlP5.Chart : int getResolution()
-controlP5.Chart : int size()
-controlP5.Chart : void onEnter()
-controlP5.Chart : void onLeave()
-controlP5.Controller : CColor getColor()
-controlP5.Controller : Chart addCallback(CallbackListener)
-controlP5.Controller : Chart addListener(ControlListener)
-controlP5.Controller : Chart addListenerFor(int, CallbackListener)
-controlP5.Controller : Chart align(int, int, int, int)
-controlP5.Controller : Chart bringToFront()
-controlP5.Controller : Chart bringToFront(ControllerInterface)
-controlP5.Controller : Chart hide()
-controlP5.Controller : Chart linebreak()
-controlP5.Controller : Chart listen(boolean)
-controlP5.Controller : Chart lock()
-controlP5.Controller : Chart onChange(CallbackListener)
-controlP5.Controller : Chart onClick(CallbackListener)
-controlP5.Controller : Chart onDoublePress(CallbackListener)
-controlP5.Controller : Chart onDrag(CallbackListener)
-controlP5.Controller : Chart onDraw(ControllerView)
-controlP5.Controller : Chart onEndDrag(CallbackListener)
-controlP5.Controller : Chart onEnter(CallbackListener)
-controlP5.Controller : Chart onLeave(CallbackListener)
-controlP5.Controller : Chart onMove(CallbackListener)
-controlP5.Controller : Chart onPress(CallbackListener)
-controlP5.Controller : Chart onRelease(CallbackListener)
-controlP5.Controller : Chart onReleaseOutside(CallbackListener)
-controlP5.Controller : Chart onStartDrag(CallbackListener)
-controlP5.Controller : Chart onWheel(CallbackListener)
-controlP5.Controller : Chart plugTo(Object)
-controlP5.Controller : Chart plugTo(Object, String)
-controlP5.Controller : Chart plugTo(Object[])
-controlP5.Controller : Chart plugTo(Object[], String)
-controlP5.Controller : Chart registerProperty(String)
-controlP5.Controller : Chart registerProperty(String, String)
-controlP5.Controller : Chart registerTooltip(String)
-controlP5.Controller : Chart removeBehavior()
-controlP5.Controller : Chart removeCallback()
-controlP5.Controller : Chart removeCallback(CallbackListener)
-controlP5.Controller : Chart removeListener(ControlListener)
-controlP5.Controller : Chart removeListenerFor(int, CallbackListener)
-controlP5.Controller : Chart removeListenersFor(int)
-controlP5.Controller : Chart removeProperty(String)
-controlP5.Controller : Chart removeProperty(String, String)
-controlP5.Controller : Chart setArrayValue(float[])
-controlP5.Controller : Chart setArrayValue(int, float)
-controlP5.Controller : Chart setBehavior(ControlBehavior)
-controlP5.Controller : Chart setBroadcast(boolean)
-controlP5.Controller : Chart setCaptionLabel(String)
-controlP5.Controller : Chart setColor(CColor)
-controlP5.Controller : Chart setColorActive(int)
-controlP5.Controller : Chart setColorBackground(int)
-controlP5.Controller : Chart setColorCaptionLabel(int)
-controlP5.Controller : Chart setColorForeground(int)
-controlP5.Controller : Chart setColorLabel(int)
-controlP5.Controller : Chart setColorValue(int)
-controlP5.Controller : Chart setColorValueLabel(int)
-controlP5.Controller : Chart setDecimalPrecision(int)
-controlP5.Controller : Chart setDefaultValue(float)
-controlP5.Controller : Chart setHeight(int)
-controlP5.Controller : Chart setId(int)
-controlP5.Controller : Chart setImage(PImage)
-controlP5.Controller : Chart setImage(PImage, int)
-controlP5.Controller : Chart setImages(PImage, PImage, PImage)
-controlP5.Controller : Chart setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Chart setLabel(String)
-controlP5.Controller : Chart setLabelVisible(boolean)
-controlP5.Controller : Chart setLock(boolean)
-controlP5.Controller : Chart setMax(float)
-controlP5.Controller : Chart setMin(float)
-controlP5.Controller : Chart setMouseOver(boolean)
-controlP5.Controller : Chart setMoveable(boolean)
-controlP5.Controller : Chart setPosition(float, float)
-controlP5.Controller : Chart setPosition(float[])
-controlP5.Controller : Chart setSize(PImage)
-controlP5.Controller : Chart setSize(int, int)
-controlP5.Controller : Chart setStringValue(String)
-controlP5.Controller : Chart setUpdate(boolean)
-controlP5.Controller : Chart setValue(float)
-controlP5.Controller : Chart setValueLabel(String)
-controlP5.Controller : Chart setValueSelf(float)
-controlP5.Controller : Chart setView(ControllerView)
-controlP5.Controller : Chart setVisible(boolean)
-controlP5.Controller : Chart setWidth(int)
-controlP5.Controller : Chart show()
-controlP5.Controller : Chart unlock()
-controlP5.Controller : Chart unplugFrom(Object)
-controlP5.Controller : Chart unplugFrom(Object[])
-controlP5.Controller : Chart unregisterTooltip()
-controlP5.Controller : Chart update()
-controlP5.Controller : Chart updateSize()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Chart : Chart addData(ChartData)
+main.java.controlp5.Chart : Chart addData(ChartDataSet, float)
+main.java.controlp5.Chart : Chart addData(String, ChartData)
+main.java.controlp5.Chart : Chart addData(String, float)
+main.java.controlp5.Chart : Chart addData(float)
+main.java.controlp5.Chart : Chart addDataSet(String)
+main.java.controlp5.Chart : Chart addFirst(String, float)
+main.java.controlp5.Chart : Chart addFirst(float)
+main.java.controlp5.Chart : Chart addLast(String, float)
+main.java.controlp5.Chart : Chart addLast(float)
+main.java.controlp5.Chart : Chart push(String, float)
+main.java.controlp5.Chart : Chart push(float)
+main.java.controlp5.Chart : Chart removeData(ChartData)
+main.java.controlp5.Chart : Chart removeData(String, ChartData)
+main.java.controlp5.Chart : Chart removeData(String, int)
+main.java.controlp5.Chart : Chart removeData(int)
+main.java.controlp5.Chart : Chart removeDataSet(String)
+main.java.controlp5.Chart : Chart removeFirst()
+main.java.controlp5.Chart : Chart removeFirst(String)
+main.java.controlp5.Chart : Chart removeLast()
+main.java.controlp5.Chart : Chart removeLast(String)
+main.java.controlp5.Chart : Chart setData(String, int, ChartData)
+main.java.controlp5.Chart : Chart setData(int, ChartData)
+main.java.controlp5.Chart : Chart setDataSet(ChartDataSet)
+main.java.controlp5.Chart : Chart setDataSet(String, ChartDataSet)
+main.java.controlp5.Chart : Chart setRange(float, float)
+main.java.controlp5.Chart : Chart setResolution(int)
+main.java.controlp5.Chart : Chart setStrokeWeight(float)
+main.java.controlp5.Chart : Chart setValue(float)
+main.java.controlp5.Chart : Chart setView(int)
+main.java.controlp5.Chart : Chart unshift(String, float)
+main.java.controlp5.Chart : Chart unshift(float)
+main.java.controlp5.Chart : ChartData getData(String, int)
+main.java.controlp5.Chart : ChartDataSet getDataSet(String)
+main.java.controlp5.Chart : LinkedHashMap getDataSet()
+main.java.controlp5.Chart : String getInfo()
+main.java.controlp5.Chart : String toString()
+main.java.controlp5.Chart : float getStrokeWeight()
+main.java.controlp5.Chart : float[] getValuesFrom(String)
+main.java.controlp5.Chart : int getResolution()
+main.java.controlp5.Chart : int size()
+main.java.controlp5.Chart : void onEnter()
+main.java.controlp5.Chart : void onLeave()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : Chart addCallback(CallbackListener)
+main.java.controlp5.Controller : Chart addListener(ControlListener)
+main.java.controlp5.Controller : Chart addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Chart align(int, int, int, int)
+main.java.controlp5.Controller : Chart bringToFront()
+main.java.controlp5.Controller : Chart bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Chart hide()
+main.java.controlp5.Controller : Chart linebreak()
+main.java.controlp5.Controller : Chart listen(boolean)
+main.java.controlp5.Controller : Chart lock()
+main.java.controlp5.Controller : Chart onChange(CallbackListener)
+main.java.controlp5.Controller : Chart onClick(CallbackListener)
+main.java.controlp5.Controller : Chart onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Chart onDrag(CallbackListener)
+main.java.controlp5.Controller : Chart onDraw(ControllerView)
+main.java.controlp5.Controller : Chart onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Chart onEnter(CallbackListener)
+main.java.controlp5.Controller : Chart onLeave(CallbackListener)
+main.java.controlp5.Controller : Chart onMove(CallbackListener)
+main.java.controlp5.Controller : Chart onPress(CallbackListener)
+main.java.controlp5.Controller : Chart onRelease(CallbackListener)
+main.java.controlp5.Controller : Chart onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Chart onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Chart onWheel(CallbackListener)
+main.java.controlp5.Controller : Chart plugTo(Object)
+main.java.controlp5.Controller : Chart plugTo(Object, String)
+main.java.controlp5.Controller : Chart plugTo(Object[])
+main.java.controlp5.Controller : Chart plugTo(Object[], String)
+main.java.controlp5.Controller : Chart registerProperty(String)
+main.java.controlp5.Controller : Chart registerProperty(String, String)
+main.java.controlp5.Controller : Chart registerTooltip(String)
+main.java.controlp5.Controller : Chart removeBehavior()
+main.java.controlp5.Controller : Chart removeCallback()
+main.java.controlp5.Controller : Chart removeCallback(CallbackListener)
+main.java.controlp5.Controller : Chart removeListener(ControlListener)
+main.java.controlp5.Controller : Chart removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Chart removeListenersFor(int)
+main.java.controlp5.Controller : Chart removeProperty(String)
+main.java.controlp5.Controller : Chart removeProperty(String, String)
+main.java.controlp5.Controller : Chart setArrayValue(float[])
+main.java.controlp5.Controller : Chart setArrayValue(int, float)
+main.java.controlp5.Controller : Chart setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Chart setBroadcast(boolean)
+main.java.controlp5.Controller : Chart setCaptionLabel(String)
+main.java.controlp5.Controller : Chart setColor(CColor)
+main.java.controlp5.Controller : Chart setColorActive(int)
+main.java.controlp5.Controller : Chart setColorBackground(int)
+main.java.controlp5.Controller : Chart setColorCaptionLabel(int)
+main.java.controlp5.Controller : Chart setColorForeground(int)
+main.java.controlp5.Controller : Chart setColorLabel(int)
+main.java.controlp5.Controller : Chart setColorValue(int)
+main.java.controlp5.Controller : Chart setColorValueLabel(int)
+main.java.controlp5.Controller : Chart setDecimalPrecision(int)
+main.java.controlp5.Controller : Chart setDefaultValue(float)
+main.java.controlp5.Controller : Chart setHeight(int)
+main.java.controlp5.Controller : Chart setId(int)
+main.java.controlp5.Controller : Chart setImage(PImage)
+main.java.controlp5.Controller : Chart setImage(PImage, int)
+main.java.controlp5.Controller : Chart setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Chart setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Chart setLabel(String)
+main.java.controlp5.Controller : Chart setLabelVisible(boolean)
+main.java.controlp5.Controller : Chart setLock(boolean)
+main.java.controlp5.Controller : Chart setMax(float)
+main.java.controlp5.Controller : Chart setMin(float)
+main.java.controlp5.Controller : Chart setMouseOver(boolean)
+main.java.controlp5.Controller : Chart setMoveable(boolean)
+main.java.controlp5.Controller : Chart setPosition(float, float)
+main.java.controlp5.Controller : Chart setPosition(float[])
+main.java.controlp5.Controller : Chart setSize(PImage)
+main.java.controlp5.Controller : Chart setSize(int, int)
+main.java.controlp5.Controller : Chart setStringValue(String)
+main.java.controlp5.Controller : Chart setUpdate(boolean)
+main.java.controlp5.Controller : Chart setValue(float)
+main.java.controlp5.Controller : Chart setValueLabel(String)
+main.java.controlp5.Controller : Chart setValueSelf(float)
+main.java.controlp5.Controller : Chart setView(ControllerView)
+main.java.controlp5.Controller : Chart setVisible(boolean)
+main.java.controlp5.Controller : Chart setWidth(int)
+main.java.controlp5.Controller : Chart show()
+main.java.controlp5.Controller : Chart unlock()
+main.java.controlp5.Controller : Chart unplugFrom(Object)
+main.java.controlp5.Controller : Chart unplugFrom(Object[])
+main.java.controlp5.Controller : Chart unregisterTooltip()
+main.java.controlp5.Controller : Chart update()
+main.java.controlp5.Controller : Chart updateSize()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5checkBox/ControlP5checkBox.pde b/examples/controllers/ControlP5checkBox/ControlP5checkBox.pde
index e29e710..1914270 100644
--- a/examples/controllers/ControlP5checkBox/ControlP5checkBox.pde
+++ b/examples/controllers/ControlP5checkBox/ControlP5checkBox.pde
@@ -107,131 +107,131 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.CheckBox : CheckBox addItem(String, float)
-controlP5.CheckBox : CheckBox addItem(Toggle, float)
-controlP5.CheckBox : CheckBox deactivateAll()
-controlP5.CheckBox : CheckBox hideLabels()
-controlP5.CheckBox : CheckBox plugTo(Object)
-controlP5.CheckBox : CheckBox plugTo(Object, String)
-controlP5.CheckBox : CheckBox removeItem(String)
-controlP5.CheckBox : CheckBox setArrayValue(float[])
-controlP5.CheckBox : CheckBox setColorLabels(int)
-controlP5.CheckBox : CheckBox setImage(PImage)
-controlP5.CheckBox : CheckBox setImage(PImage, int)
-controlP5.CheckBox : CheckBox setImages(PImage, PImage, PImage)
-controlP5.CheckBox : CheckBox setItemHeight(int)
-controlP5.CheckBox : CheckBox setItemWidth(int)
-controlP5.CheckBox : CheckBox setItemsPerRow(int)
-controlP5.CheckBox : CheckBox setNoneSelectedAllowed(boolean)
-controlP5.CheckBox : CheckBox setSize(PImage)
-controlP5.CheckBox : CheckBox setSize(int, int)
-controlP5.CheckBox : CheckBox setSpacingColumn(int)
-controlP5.CheckBox : CheckBox setSpacingRow(int)
-controlP5.CheckBox : CheckBox showLabels()
-controlP5.CheckBox : CheckBox toUpperCase(boolean)
-controlP5.CheckBox : List getItems()
-controlP5.CheckBox : String getInfo()
-controlP5.CheckBox : String toString()
-controlP5.CheckBox : Toggle getItem(int)
-controlP5.CheckBox : boolean getState(String)
-controlP5.CheckBox : boolean getState(int)
-controlP5.CheckBox : void updateLayout()
-controlP5.ControlGroup : CheckBox activateEvent(boolean)
-controlP5.ControlGroup : CheckBox addListener(ControlListener)
-controlP5.ControlGroup : CheckBox removeListener(ControlListener)
-controlP5.ControlGroup : CheckBox setBackgroundColor(int)
-controlP5.ControlGroup : CheckBox setBackgroundHeight(int)
-controlP5.ControlGroup : CheckBox setBarHeight(int)
-controlP5.ControlGroup : CheckBox setSize(int, int)
-controlP5.ControlGroup : CheckBox updateInternalEvents(PApplet)
-controlP5.ControlGroup : String getInfo()
-controlP5.ControlGroup : String toString()
-controlP5.ControlGroup : int getBackgroundHeight()
-controlP5.ControlGroup : int getBarHeight()
-controlP5.ControlGroup : int listenerSize()
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : Canvas addCanvas(Canvas)
-controlP5.ControllerGroup : CheckBox add(ControllerInterface)
-controlP5.ControllerGroup : CheckBox addListener(ControlListener)
-controlP5.ControllerGroup : CheckBox bringToFront()
-controlP5.ControllerGroup : CheckBox bringToFront(ControllerInterface)
-controlP5.ControllerGroup : CheckBox close()
-controlP5.ControllerGroup : CheckBox disableCollapse()
-controlP5.ControllerGroup : CheckBox enableCollapse()
-controlP5.ControllerGroup : CheckBox hide()
-controlP5.ControllerGroup : CheckBox hideArrow()
-controlP5.ControllerGroup : CheckBox hideBar()
-controlP5.ControllerGroup : CheckBox moveTo(ControlWindow)
-controlP5.ControllerGroup : CheckBox moveTo(PApplet)
-controlP5.ControllerGroup : CheckBox open()
-controlP5.ControllerGroup : CheckBox registerProperty(String)
-controlP5.ControllerGroup : CheckBox registerProperty(String, String)
-controlP5.ControllerGroup : CheckBox remove(CDrawable)
-controlP5.ControllerGroup : CheckBox remove(ControllerInterface)
-controlP5.ControllerGroup : CheckBox removeCanvas(Canvas)
-controlP5.ControllerGroup : CheckBox removeListener(ControlListener)
-controlP5.ControllerGroup : CheckBox removeProperty(String)
-controlP5.ControllerGroup : CheckBox removeProperty(String, String)
-controlP5.ControllerGroup : CheckBox setAddress(String)
-controlP5.ControllerGroup : CheckBox setArrayValue(float[])
-controlP5.ControllerGroup : CheckBox setArrayValue(int, float)
-controlP5.ControllerGroup : CheckBox setCaptionLabel(String)
-controlP5.ControllerGroup : CheckBox setColor(CColor)
-controlP5.ControllerGroup : CheckBox setColorActive(int)
-controlP5.ControllerGroup : CheckBox setColorBackground(int)
-controlP5.ControllerGroup : CheckBox setColorForeground(int)
-controlP5.ControllerGroup : CheckBox setColorLabel(int)
-controlP5.ControllerGroup : CheckBox setColorValue(int)
-controlP5.ControllerGroup : CheckBox setHeight(int)
-controlP5.ControllerGroup : CheckBox setId(int)
-controlP5.ControllerGroup : CheckBox setLabel(String)
-controlP5.ControllerGroup : CheckBox setMouseOver(boolean)
-controlP5.ControllerGroup : CheckBox setMoveable(boolean)
-controlP5.ControllerGroup : CheckBox setOpen(boolean)
-controlP5.ControllerGroup : CheckBox setPosition(float, float)
-controlP5.ControllerGroup : CheckBox setPosition(float[])
-controlP5.ControllerGroup : CheckBox setSize(int, int)
-controlP5.ControllerGroup : CheckBox setStringValue(String)
-controlP5.ControllerGroup : CheckBox setTitle(String)
-controlP5.ControllerGroup : CheckBox setUpdate(boolean)
-controlP5.ControllerGroup : CheckBox setValue(float)
-controlP5.ControllerGroup : CheckBox setVisible(boolean)
-controlP5.ControllerGroup : CheckBox setWidth(int)
-controlP5.ControllerGroup : CheckBox show()
-controlP5.ControllerGroup : CheckBox showArrow()
-controlP5.ControllerGroup : CheckBox showBar()
-controlP5.ControllerGroup : CheckBox update()
-controlP5.ControllerGroup : CheckBox updateAbsolutePosition()
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : boolean isBarVisible()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getArrayValue(int)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : float[] getPosition()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : int listenerSize()
-controlP5.ControllerGroup : void controlEvent(ControlEvent)
-controlP5.ControllerGroup : void remove()
+main.java.controlp5.CheckBox : CheckBox addItem(String, float)
+main.java.controlp5.CheckBox : CheckBox addItem(Toggle, float)
+main.java.controlp5.CheckBox : CheckBox deactivateAll()
+main.java.controlp5.CheckBox : CheckBox hideLabels()
+main.java.controlp5.CheckBox : CheckBox plugTo(Object)
+main.java.controlp5.CheckBox : CheckBox plugTo(Object, String)
+main.java.controlp5.CheckBox : CheckBox removeItem(String)
+main.java.controlp5.CheckBox : CheckBox setArrayValue(float[])
+main.java.controlp5.CheckBox : CheckBox setColorLabels(int)
+main.java.controlp5.CheckBox : CheckBox setImage(PImage)
+main.java.controlp5.CheckBox : CheckBox setImage(PImage, int)
+main.java.controlp5.CheckBox : CheckBox setImages(PImage, PImage, PImage)
+main.java.controlp5.CheckBox : CheckBox setItemHeight(int)
+main.java.controlp5.CheckBox : CheckBox setItemWidth(int)
+main.java.controlp5.CheckBox : CheckBox setItemsPerRow(int)
+main.java.controlp5.CheckBox : CheckBox setNoneSelectedAllowed(boolean)
+main.java.controlp5.CheckBox : CheckBox setSize(PImage)
+main.java.controlp5.CheckBox : CheckBox setSize(int, int)
+main.java.controlp5.CheckBox : CheckBox setSpacingColumn(int)
+main.java.controlp5.CheckBox : CheckBox setSpacingRow(int)
+main.java.controlp5.CheckBox : CheckBox showLabels()
+main.java.controlp5.CheckBox : CheckBox toUpperCase(boolean)
+main.java.controlp5.CheckBox : List getItems()
+main.java.controlp5.CheckBox : String getInfo()
+main.java.controlp5.CheckBox : String toString()
+main.java.controlp5.CheckBox : Toggle getItem(int)
+main.java.controlp5.CheckBox : boolean getState(String)
+main.java.controlp5.CheckBox : boolean getState(int)
+main.java.controlp5.CheckBox : void updateLayout()
+main.java.controlp5.ControlGroup : CheckBox activateEvent(boolean)
+main.java.controlp5.ControlGroup : CheckBox addListener(ControlListener)
+main.java.controlp5.ControlGroup : CheckBox removeListener(ControlListener)
+main.java.controlp5.ControlGroup : CheckBox setBackgroundColor(int)
+main.java.controlp5.ControlGroup : CheckBox setBackgroundHeight(int)
+main.java.controlp5.ControlGroup : CheckBox setBarHeight(int)
+main.java.controlp5.ControlGroup : CheckBox setSize(int, int)
+main.java.controlp5.ControlGroup : CheckBox updateInternalEvents(PApplet)
+main.java.controlp5.ControlGroup : String getInfo()
+main.java.controlp5.ControlGroup : String toString()
+main.java.controlp5.ControlGroup : int getBackgroundHeight()
+main.java.controlp5.ControlGroup : int getBarHeight()
+main.java.controlp5.ControlGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : CColor getColor()
+main.java.controlp5.ControllerGroup : Canvas addCanvas(Canvas)
+main.java.controlp5.ControllerGroup : CheckBox add(ControllerInterface)
+main.java.controlp5.ControllerGroup : CheckBox addListener(ControlListener)
+main.java.controlp5.ControllerGroup : CheckBox bringToFront()
+main.java.controlp5.ControllerGroup : CheckBox bringToFront(ControllerInterface)
+main.java.controlp5.ControllerGroup : CheckBox close()
+main.java.controlp5.ControllerGroup : CheckBox disableCollapse()
+main.java.controlp5.ControllerGroup : CheckBox enableCollapse()
+main.java.controlp5.ControllerGroup : CheckBox hide()
+main.java.controlp5.ControllerGroup : CheckBox hideArrow()
+main.java.controlp5.ControllerGroup : CheckBox hideBar()
+main.java.controlp5.ControllerGroup : CheckBox moveTo(ControlWindow)
+main.java.controlp5.ControllerGroup : CheckBox moveTo(PApplet)
+main.java.controlp5.ControllerGroup : CheckBox open()
+main.java.controlp5.ControllerGroup : CheckBox registerProperty(String)
+main.java.controlp5.ControllerGroup : CheckBox registerProperty(String, String)
+main.java.controlp5.ControllerGroup : CheckBox remove(CDrawable)
+main.java.controlp5.ControllerGroup : CheckBox remove(ControllerInterface)
+main.java.controlp5.ControllerGroup : CheckBox removeCanvas(Canvas)
+main.java.controlp5.ControllerGroup : CheckBox removeListener(ControlListener)
+main.java.controlp5.ControllerGroup : CheckBox removeProperty(String)
+main.java.controlp5.ControllerGroup : CheckBox removeProperty(String, String)
+main.java.controlp5.ControllerGroup : CheckBox setAddress(String)
+main.java.controlp5.ControllerGroup : CheckBox setArrayValue(float[])
+main.java.controlp5.ControllerGroup : CheckBox setArrayValue(int, float)
+main.java.controlp5.ControllerGroup : CheckBox setCaptionLabel(String)
+main.java.controlp5.ControllerGroup : CheckBox setColor(CColor)
+main.java.controlp5.ControllerGroup : CheckBox setColorActive(int)
+main.java.controlp5.ControllerGroup : CheckBox setColorBackground(int)
+main.java.controlp5.ControllerGroup : CheckBox setColorForeground(int)
+main.java.controlp5.ControllerGroup : CheckBox setColorLabel(int)
+main.java.controlp5.ControllerGroup : CheckBox setColorValue(int)
+main.java.controlp5.ControllerGroup : CheckBox setHeight(int)
+main.java.controlp5.ControllerGroup : CheckBox setId(int)
+main.java.controlp5.ControllerGroup : CheckBox setLabel(String)
+main.java.controlp5.ControllerGroup : CheckBox setMouseOver(boolean)
+main.java.controlp5.ControllerGroup : CheckBox setMoveable(boolean)
+main.java.controlp5.ControllerGroup : CheckBox setOpen(boolean)
+main.java.controlp5.ControllerGroup : CheckBox setPosition(float, float)
+main.java.controlp5.ControllerGroup : CheckBox setPosition(float[])
+main.java.controlp5.ControllerGroup : CheckBox setSize(int, int)
+main.java.controlp5.ControllerGroup : CheckBox setStringValue(String)
+main.java.controlp5.ControllerGroup : CheckBox setTitle(String)
+main.java.controlp5.ControllerGroup : CheckBox setUpdate(boolean)
+main.java.controlp5.ControllerGroup : CheckBox setValue(float)
+main.java.controlp5.ControllerGroup : CheckBox setVisible(boolean)
+main.java.controlp5.ControllerGroup : CheckBox setWidth(int)
+main.java.controlp5.ControllerGroup : CheckBox show()
+main.java.controlp5.ControllerGroup : CheckBox showArrow()
+main.java.controlp5.ControllerGroup : CheckBox showBar()
+main.java.controlp5.ControllerGroup : CheckBox update()
+main.java.controlp5.ControllerGroup : CheckBox updateAbsolutePosition()
+main.java.controlp5.ControllerGroup : ControlWindow getWindow()
+main.java.controlp5.ControllerGroup : Controller getController(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String, String)
+main.java.controlp5.ControllerGroup : Label getCaptionLabel()
+main.java.controlp5.ControllerGroup : Label getValueLabel()
+main.java.controlp5.ControllerGroup : String getAddress()
+main.java.controlp5.ControllerGroup : String getInfo()
+main.java.controlp5.ControllerGroup : String getName()
+main.java.controlp5.ControllerGroup : String getStringValue()
+main.java.controlp5.ControllerGroup : String toString()
+main.java.controlp5.ControllerGroup : Tab getTab()
+main.java.controlp5.ControllerGroup : boolean isBarVisible()
+main.java.controlp5.ControllerGroup : boolean isCollapse()
+main.java.controlp5.ControllerGroup : boolean isMouseOver()
+main.java.controlp5.ControllerGroup : boolean isMoveable()
+main.java.controlp5.ControllerGroup : boolean isOpen()
+main.java.controlp5.ControllerGroup : boolean isUpdate()
+main.java.controlp5.ControllerGroup : boolean isVisible()
+main.java.controlp5.ControllerGroup : boolean setMousePressed(boolean)
+main.java.controlp5.ControllerGroup : float getArrayValue(int)
+main.java.controlp5.ControllerGroup : float getValue()
+main.java.controlp5.ControllerGroup : float[] getArrayValue()
+main.java.controlp5.ControllerGroup : float[] getPosition()
+main.java.controlp5.ControllerGroup : int getHeight()
+main.java.controlp5.ControllerGroup : int getId()
+main.java.controlp5.ControllerGroup : int getWidth()
+main.java.controlp5.ControllerGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : void controlEvent(ControlEvent)
+main.java.controlp5.ControllerGroup : void remove()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5colorPicker/ControlP5colorPicker.pde b/examples/controllers/ControlP5colorPicker/ControlP5colorPicker.pde
index 8545134..a4165e7 100644
--- a/examples/controllers/ControlP5colorPicker/ControlP5colorPicker.pde
+++ b/examples/controllers/ControlP5colorPicker/ControlP5colorPicker.pde
@@ -76,108 +76,108 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ColorPicker : ColorPicker plugTo(Object)
-controlP5.ColorPicker : ColorPicker plugTo(Object, String)
-controlP5.ColorPicker : ColorPicker setArrayValue(float[])
-controlP5.ColorPicker : ColorPicker setColorValue(int)
-controlP5.ColorPicker : String getInfo()
-controlP5.ColorPicker : int getColorValue()
-controlP5.ControlGroup : ColorPicker activateEvent(boolean)
-controlP5.ControlGroup : ColorPicker addListener(ControlListener)
-controlP5.ControlGroup : ColorPicker removeListener(ControlListener)
-controlP5.ControlGroup : ColorPicker setBackgroundColor(int)
-controlP5.ControlGroup : ColorPicker setBackgroundHeight(int)
-controlP5.ControlGroup : ColorPicker setBarHeight(int)
-controlP5.ControlGroup : ColorPicker setSize(int, int)
-controlP5.ControlGroup : ColorPicker updateInternalEvents(PApplet)
-controlP5.ControlGroup : String getInfo()
-controlP5.ControlGroup : String toString()
-controlP5.ControlGroup : int getBackgroundHeight()
-controlP5.ControlGroup : int getBarHeight()
-controlP5.ControlGroup : int listenerSize()
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : Canvas addCanvas(Canvas)
-controlP5.ControllerGroup : ColorPicker add(ControllerInterface)
-controlP5.ControllerGroup : ColorPicker addListener(ControlListener)
-controlP5.ControllerGroup : ColorPicker bringToFront()
-controlP5.ControllerGroup : ColorPicker bringToFront(ControllerInterface)
-controlP5.ControllerGroup : ColorPicker close()
-controlP5.ControllerGroup : ColorPicker disableCollapse()
-controlP5.ControllerGroup : ColorPicker enableCollapse()
-controlP5.ControllerGroup : ColorPicker hide()
-controlP5.ControllerGroup : ColorPicker hideArrow()
-controlP5.ControllerGroup : ColorPicker hideBar()
-controlP5.ControllerGroup : ColorPicker moveTo(ControlWindow)
-controlP5.ControllerGroup : ColorPicker moveTo(PApplet)
-controlP5.ControllerGroup : ColorPicker open()
-controlP5.ControllerGroup : ColorPicker registerProperty(String)
-controlP5.ControllerGroup : ColorPicker registerProperty(String, String)
-controlP5.ControllerGroup : ColorPicker remove(CDrawable)
-controlP5.ControllerGroup : ColorPicker remove(ControllerInterface)
-controlP5.ControllerGroup : ColorPicker removeCanvas(Canvas)
-controlP5.ControllerGroup : ColorPicker removeListener(ControlListener)
-controlP5.ControllerGroup : ColorPicker removeProperty(String)
-controlP5.ControllerGroup : ColorPicker removeProperty(String, String)
-controlP5.ControllerGroup : ColorPicker setAddress(String)
-controlP5.ControllerGroup : ColorPicker setArrayValue(float[])
-controlP5.ControllerGroup : ColorPicker setArrayValue(int, float)
-controlP5.ControllerGroup : ColorPicker setCaptionLabel(String)
-controlP5.ControllerGroup : ColorPicker setColor(CColor)
-controlP5.ControllerGroup : ColorPicker setColorActive(int)
-controlP5.ControllerGroup : ColorPicker setColorBackground(int)
-controlP5.ControllerGroup : ColorPicker setColorForeground(int)
-controlP5.ControllerGroup : ColorPicker setColorLabel(int)
-controlP5.ControllerGroup : ColorPicker setColorValue(int)
-controlP5.ControllerGroup : ColorPicker setHeight(int)
-controlP5.ControllerGroup : ColorPicker setId(int)
-controlP5.ControllerGroup : ColorPicker setLabel(String)
-controlP5.ControllerGroup : ColorPicker setMouseOver(boolean)
-controlP5.ControllerGroup : ColorPicker setMoveable(boolean)
-controlP5.ControllerGroup : ColorPicker setOpen(boolean)
-controlP5.ControllerGroup : ColorPicker setPosition(float, float)
-controlP5.ControllerGroup : ColorPicker setPosition(float[])
-controlP5.ControllerGroup : ColorPicker setSize(int, int)
-controlP5.ControllerGroup : ColorPicker setStringValue(String)
-controlP5.ControllerGroup : ColorPicker setTitle(String)
-controlP5.ControllerGroup : ColorPicker setUpdate(boolean)
-controlP5.ControllerGroup : ColorPicker setValue(float)
-controlP5.ControllerGroup : ColorPicker setVisible(boolean)
-controlP5.ControllerGroup : ColorPicker setWidth(int)
-controlP5.ControllerGroup : ColorPicker show()
-controlP5.ControllerGroup : ColorPicker showArrow()
-controlP5.ControllerGroup : ColorPicker showBar()
-controlP5.ControllerGroup : ColorPicker update()
-controlP5.ControllerGroup : ColorPicker updateAbsolutePosition()
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : boolean isBarVisible()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getArrayValue(int)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : float[] getPosition()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : int listenerSize()
-controlP5.ControllerGroup : void controlEvent(ControlEvent)
-controlP5.ControllerGroup : void remove()
+main.java.controlp5.ColorPicker : ColorPicker plugTo(Object)
+main.java.controlp5.ColorPicker : ColorPicker plugTo(Object, String)
+main.java.controlp5.ColorPicker : ColorPicker setArrayValue(float[])
+main.java.controlp5.ColorPicker : ColorPicker setColorValue(int)
+main.java.controlp5.ColorPicker : String getInfo()
+main.java.controlp5.ColorPicker : int getColorValue()
+main.java.controlp5.ControlGroup : ColorPicker activateEvent(boolean)
+main.java.controlp5.ControlGroup : ColorPicker addListener(ControlListener)
+main.java.controlp5.ControlGroup : ColorPicker removeListener(ControlListener)
+main.java.controlp5.ControlGroup : ColorPicker setBackgroundColor(int)
+main.java.controlp5.ControlGroup : ColorPicker setBackgroundHeight(int)
+main.java.controlp5.ControlGroup : ColorPicker setBarHeight(int)
+main.java.controlp5.ControlGroup : ColorPicker setSize(int, int)
+main.java.controlp5.ControlGroup : ColorPicker updateInternalEvents(PApplet)
+main.java.controlp5.ControlGroup : String getInfo()
+main.java.controlp5.ControlGroup : String toString()
+main.java.controlp5.ControlGroup : int getBackgroundHeight()
+main.java.controlp5.ControlGroup : int getBarHeight()
+main.java.controlp5.ControlGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : CColor getColor()
+main.java.controlp5.ControllerGroup : Canvas addCanvas(Canvas)
+main.java.controlp5.ControllerGroup : ColorPicker add(ControllerInterface)
+main.java.controlp5.ControllerGroup : ColorPicker addListener(ControlListener)
+main.java.controlp5.ControllerGroup : ColorPicker bringToFront()
+main.java.controlp5.ControllerGroup : ColorPicker bringToFront(ControllerInterface)
+main.java.controlp5.ControllerGroup : ColorPicker close()
+main.java.controlp5.ControllerGroup : ColorPicker disableCollapse()
+main.java.controlp5.ControllerGroup : ColorPicker enableCollapse()
+main.java.controlp5.ControllerGroup : ColorPicker hide()
+main.java.controlp5.ControllerGroup : ColorPicker hideArrow()
+main.java.controlp5.ControllerGroup : ColorPicker hideBar()
+main.java.controlp5.ControllerGroup : ColorPicker moveTo(ControlWindow)
+main.java.controlp5.ControllerGroup : ColorPicker moveTo(PApplet)
+main.java.controlp5.ControllerGroup : ColorPicker open()
+main.java.controlp5.ControllerGroup : ColorPicker registerProperty(String)
+main.java.controlp5.ControllerGroup : ColorPicker registerProperty(String, String)
+main.java.controlp5.ControllerGroup : ColorPicker remove(CDrawable)
+main.java.controlp5.ControllerGroup : ColorPicker remove(ControllerInterface)
+main.java.controlp5.ControllerGroup : ColorPicker removeCanvas(Canvas)
+main.java.controlp5.ControllerGroup : ColorPicker removeListener(ControlListener)
+main.java.controlp5.ControllerGroup : ColorPicker removeProperty(String)
+main.java.controlp5.ControllerGroup : ColorPicker removeProperty(String, String)
+main.java.controlp5.ControllerGroup : ColorPicker setAddress(String)
+main.java.controlp5.ControllerGroup : ColorPicker setArrayValue(float[])
+main.java.controlp5.ControllerGroup : ColorPicker setArrayValue(int, float)
+main.java.controlp5.ControllerGroup : ColorPicker setCaptionLabel(String)
+main.java.controlp5.ControllerGroup : ColorPicker setColor(CColor)
+main.java.controlp5.ControllerGroup : ColorPicker setColorActive(int)
+main.java.controlp5.ControllerGroup : ColorPicker setColorBackground(int)
+main.java.controlp5.ControllerGroup : ColorPicker setColorForeground(int)
+main.java.controlp5.ControllerGroup : ColorPicker setColorLabel(int)
+main.java.controlp5.ControllerGroup : ColorPicker setColorValue(int)
+main.java.controlp5.ControllerGroup : ColorPicker setHeight(int)
+main.java.controlp5.ControllerGroup : ColorPicker setId(int)
+main.java.controlp5.ControllerGroup : ColorPicker setLabel(String)
+main.java.controlp5.ControllerGroup : ColorPicker setMouseOver(boolean)
+main.java.controlp5.ControllerGroup : ColorPicker setMoveable(boolean)
+main.java.controlp5.ControllerGroup : ColorPicker setOpen(boolean)
+main.java.controlp5.ControllerGroup : ColorPicker setPosition(float, float)
+main.java.controlp5.ControllerGroup : ColorPicker setPosition(float[])
+main.java.controlp5.ControllerGroup : ColorPicker setSize(int, int)
+main.java.controlp5.ControllerGroup : ColorPicker setStringValue(String)
+main.java.controlp5.ControllerGroup : ColorPicker setTitle(String)
+main.java.controlp5.ControllerGroup : ColorPicker setUpdate(boolean)
+main.java.controlp5.ControllerGroup : ColorPicker setValue(float)
+main.java.controlp5.ControllerGroup : ColorPicker setVisible(boolean)
+main.java.controlp5.ControllerGroup : ColorPicker setWidth(int)
+main.java.controlp5.ControllerGroup : ColorPicker show()
+main.java.controlp5.ControllerGroup : ColorPicker showArrow()
+main.java.controlp5.ControllerGroup : ColorPicker showBar()
+main.java.controlp5.ControllerGroup : ColorPicker update()
+main.java.controlp5.ControllerGroup : ColorPicker updateAbsolutePosition()
+main.java.controlp5.ControllerGroup : ControlWindow getWindow()
+main.java.controlp5.ControllerGroup : Controller getController(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String, String)
+main.java.controlp5.ControllerGroup : Label getCaptionLabel()
+main.java.controlp5.ControllerGroup : Label getValueLabel()
+main.java.controlp5.ControllerGroup : String getAddress()
+main.java.controlp5.ControllerGroup : String getInfo()
+main.java.controlp5.ControllerGroup : String getName()
+main.java.controlp5.ControllerGroup : String getStringValue()
+main.java.controlp5.ControllerGroup : String toString()
+main.java.controlp5.ControllerGroup : Tab getTab()
+main.java.controlp5.ControllerGroup : boolean isBarVisible()
+main.java.controlp5.ControllerGroup : boolean isCollapse()
+main.java.controlp5.ControllerGroup : boolean isMouseOver()
+main.java.controlp5.ControllerGroup : boolean isMoveable()
+main.java.controlp5.ControllerGroup : boolean isOpen()
+main.java.controlp5.ControllerGroup : boolean isUpdate()
+main.java.controlp5.ControllerGroup : boolean isVisible()
+main.java.controlp5.ControllerGroup : boolean setMousePressed(boolean)
+main.java.controlp5.ControllerGroup : float getArrayValue(int)
+main.java.controlp5.ControllerGroup : float getValue()
+main.java.controlp5.ControllerGroup : float[] getArrayValue()
+main.java.controlp5.ControllerGroup : float[] getPosition()
+main.java.controlp5.ControllerGroup : int getHeight()
+main.java.controlp5.ControllerGroup : int getId()
+main.java.controlp5.ControllerGroup : int getWidth()
+main.java.controlp5.ControllerGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : void controlEvent(ControlEvent)
+main.java.controlp5.ControllerGroup : void remove()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5controlTimer/ControlP5controlTimer.pde b/examples/controllers/ControlP5controlTimer/ControlP5controlTimer.pde
index 7f4c583..0ac5a14 100644
--- a/examples/controllers/ControlP5controlTimer/ControlP5controlTimer.pde
+++ b/examples/controllers/ControlP5controlTimer/ControlP5controlTimer.pde
@@ -43,16 +43,16 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControlTimer : String toString()
-controlP5.ControlTimer : int day()
-controlP5.ControlTimer : int hour()
-controlP5.ControlTimer : int millis()
-controlP5.ControlTimer : int minute()
-controlP5.ControlTimer : int second()
-controlP5.ControlTimer : long time()
-controlP5.ControlTimer : void reset()
-controlP5.ControlTimer : void setSpeedOfTime(float)
-controlP5.ControlTimer : void update()
+main.java.controlp5.ControlTimer : String toString()
+main.java.controlp5.ControlTimer : int day()
+main.java.controlp5.ControlTimer : int hour()
+main.java.controlp5.ControlTimer : int millis()
+main.java.controlp5.ControlTimer : int minute()
+main.java.controlp5.ControlTimer : int second()
+main.java.controlp5.ControlTimer : long time()
+main.java.controlp5.ControlTimer : void reset()
+main.java.controlp5.ControlTimer : void setSpeedOfTime(float)
+main.java.controlp5.ControlTimer : void update()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5controllerProperties/ControlP5controllerProperties.pde b/examples/controllers/ControlP5controllerProperties/ControlP5controllerProperties.pde
index b6e293c..a04fa3b 100644
--- a/examples/controllers/ControlP5controllerProperties/ControlP5controllerProperties.pde
+++ b/examples/controllers/ControlP5controllerProperties/ControlP5controllerProperties.pde
@@ -125,36 +125,36 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControllerProperties : ArrayList getSnapshotIndices()
-controlP5.ControllerProperties : ControllerProperties addSet(String)
-controlP5.ControllerProperties : ControllerProperties delete(ControllerProperty)
-controlP5.ControllerProperties : ControllerProperties getSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties move(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperties move(ControllerProperty, String, String)
-controlP5.ControllerProperties : ControllerProperties only(ControllerProperty, String)
-controlP5.ControllerProperties : ControllerProperties print()
-controlP5.ControllerProperties : ControllerProperties register(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperties removeSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties saveSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties saveSnapshotAs(String, String)
-controlP5.ControllerProperties : ControllerProperties setSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties updateSnapshot(String)
-controlP5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperty register(ControllerInterface, String, String)
-controlP5.ControllerProperties : HashSet getPropertySet(ControllerInterface)
-controlP5.ControllerProperties : List get(ControllerInterface)
-controlP5.ControllerProperties : Map get()
-controlP5.ControllerProperties : String toString()
-controlP5.ControllerProperties : boolean load()
-controlP5.ControllerProperties : boolean load(String)
-controlP5.ControllerProperties : boolean save()
-controlP5.ControllerProperties : boolean saveAs(String)
-controlP5.ControllerProperties : void setFormat(PropertiesStorageFormat)
-controlP5.ControllerProperties : void setFormat(String)
+main.java.controlp5.ControllerProperties : ArrayList getSnapshotIndices()
+main.java.controlp5.ControllerProperties : ControllerProperties addSet(String)
+main.java.controlp5.ControllerProperties : ControllerProperties delete(ControllerProperty)
+main.java.controlp5.ControllerProperties : ControllerProperties getSnapshot(String)
+main.java.controlp5.ControllerProperties : ControllerProperties move(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : ControllerProperties move(ControllerProperty, String, String)
+main.java.controlp5.ControllerProperties : ControllerProperties only(ControllerProperty, String)
+main.java.controlp5.ControllerProperties : ControllerProperties print()
+main.java.controlp5.ControllerProperties : ControllerProperties register(ControllerInterface, String)
+main.java.controlp5.ControllerProperties : ControllerProperties remove(ControllerInterface)
+main.java.controlp5.ControllerProperties : ControllerProperties remove(ControllerInterface, String)
+main.java.controlp5.ControllerProperties : ControllerProperties remove(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : ControllerProperties removeSnapshot(String)
+main.java.controlp5.ControllerProperties : ControllerProperties saveSnapshot(String)
+main.java.controlp5.ControllerProperties : ControllerProperties saveSnapshotAs(String, String)
+main.java.controlp5.ControllerProperties : ControllerProperties setSnapshot(String)
+main.java.controlp5.ControllerProperties : ControllerProperties updateSnapshot(String)
+main.java.controlp5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String)
+main.java.controlp5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : ControllerProperty register(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : HashSet getPropertySet(ControllerInterface)
+main.java.controlp5.ControllerProperties : List get(ControllerInterface)
+main.java.controlp5.ControllerProperties : Map get()
+main.java.controlp5.ControllerProperties : String toString()
+main.java.controlp5.ControllerProperties : boolean load()
+main.java.controlp5.ControllerProperties : boolean load(String)
+main.java.controlp5.ControllerProperties : boolean save()
+main.java.controlp5.ControllerProperties : boolean saveAs(String)
+main.java.controlp5.ControllerProperties : void setFormat(PropertiesStorageFormat)
+main.java.controlp5.ControllerProperties : void setFormat(String)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5dropdownList/ControlP5dropdownList.pde b/examples/controllers/ControlP5dropdownList/ControlP5dropdownList.pde
index 73e644a..02f60fa 100644
--- a/examples/controllers/ControlP5dropdownList/ControlP5dropdownList.pde
+++ b/examples/controllers/ControlP5dropdownList/ControlP5dropdownList.pde
@@ -141,166 +141,166 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : DropdownList addCallback(CallbackListener)
-controlP5.Controller : DropdownList addListener(ControlListener)
-controlP5.Controller : DropdownList addListenerFor(int, CallbackListener)
-controlP5.Controller : DropdownList align(int, int, int, int)
-controlP5.Controller : DropdownList bringToFront()
-controlP5.Controller : DropdownList bringToFront(ControllerInterface)
-controlP5.Controller : DropdownList hide()
-controlP5.Controller : DropdownList linebreak()
-controlP5.Controller : DropdownList listen(boolean)
-controlP5.Controller : DropdownList lock()
-controlP5.Controller : DropdownList onChange(CallbackListener)
-controlP5.Controller : DropdownList onClick(CallbackListener)
-controlP5.Controller : DropdownList onDoublePress(CallbackListener)
-controlP5.Controller : DropdownList onDrag(CallbackListener)
-controlP5.Controller : DropdownList onDraw(ControllerView)
-controlP5.Controller : DropdownList onEndDrag(CallbackListener)
-controlP5.Controller : DropdownList onEnter(CallbackListener)
-controlP5.Controller : DropdownList onLeave(CallbackListener)
-controlP5.Controller : DropdownList onMove(CallbackListener)
-controlP5.Controller : DropdownList onPress(CallbackListener)
-controlP5.Controller : DropdownList onRelease(CallbackListener)
-controlP5.Controller : DropdownList onReleaseOutside(CallbackListener)
-controlP5.Controller : DropdownList onStartDrag(CallbackListener)
-controlP5.Controller : DropdownList onWheel(CallbackListener)
-controlP5.Controller : DropdownList plugTo(Object)
-controlP5.Controller : DropdownList plugTo(Object, String)
-controlP5.Controller : DropdownList plugTo(Object[])
-controlP5.Controller : DropdownList plugTo(Object[], String)
-controlP5.Controller : DropdownList registerProperty(String)
-controlP5.Controller : DropdownList registerProperty(String, String)
-controlP5.Controller : DropdownList registerTooltip(String)
-controlP5.Controller : DropdownList removeBehavior()
-controlP5.Controller : DropdownList removeCallback()
-controlP5.Controller : DropdownList removeCallback(CallbackListener)
-controlP5.Controller : DropdownList removeListener(ControlListener)
-controlP5.Controller : DropdownList removeListenerFor(int, CallbackListener)
-controlP5.Controller : DropdownList removeListenersFor(int)
-controlP5.Controller : DropdownList removeProperty(String)
-controlP5.Controller : DropdownList removeProperty(String, String)
-controlP5.Controller : DropdownList setArrayValue(float[])
-controlP5.Controller : DropdownList setArrayValue(int, float)
-controlP5.Controller : DropdownList setBehavior(ControlBehavior)
-controlP5.Controller : DropdownList setBroadcast(boolean)
-controlP5.Controller : DropdownList setCaptionLabel(String)
-controlP5.Controller : DropdownList setColor(CColor)
-controlP5.Controller : DropdownList setColorActive(int)
-controlP5.Controller : DropdownList setColorBackground(int)
-controlP5.Controller : DropdownList setColorCaptionLabel(int)
-controlP5.Controller : DropdownList setColorForeground(int)
-controlP5.Controller : DropdownList setColorLabel(int)
-controlP5.Controller : DropdownList setColorValue(int)
-controlP5.Controller : DropdownList setColorValueLabel(int)
-controlP5.Controller : DropdownList setDecimalPrecision(int)
-controlP5.Controller : DropdownList setDefaultValue(float)
-controlP5.Controller : DropdownList setHeight(int)
-controlP5.Controller : DropdownList setId(int)
-controlP5.Controller : DropdownList setImage(PImage)
-controlP5.Controller : DropdownList setImage(PImage, int)
-controlP5.Controller : DropdownList setImages(PImage, PImage, PImage)
-controlP5.Controller : DropdownList setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : DropdownList setLabel(String)
-controlP5.Controller : DropdownList setLabelVisible(boolean)
-controlP5.Controller : DropdownList setLock(boolean)
-controlP5.Controller : DropdownList setMax(float)
-controlP5.Controller : DropdownList setMin(float)
-controlP5.Controller : DropdownList setMouseOver(boolean)
-controlP5.Controller : DropdownList setMoveable(boolean)
-controlP5.Controller : DropdownList setPosition(float, float)
-controlP5.Controller : DropdownList setPosition(float[])
-controlP5.Controller : DropdownList setSize(PImage)
-controlP5.Controller : DropdownList setSize(int, int)
-controlP5.Controller : DropdownList setStringValue(String)
-controlP5.Controller : DropdownList setUpdate(boolean)
-controlP5.Controller : DropdownList setValue(float)
-controlP5.Controller : DropdownList setValueLabel(String)
-controlP5.Controller : DropdownList setValueSelf(float)
-controlP5.Controller : DropdownList setView(ControllerView)
-controlP5.Controller : DropdownList setVisible(boolean)
-controlP5.Controller : DropdownList setWidth(int)
-controlP5.Controller : DropdownList show()
-controlP5.Controller : DropdownList unlock()
-controlP5.Controller : DropdownList unplugFrom(Object)
-controlP5.Controller : DropdownList unplugFrom(Object[])
-controlP5.Controller : DropdownList unregisterTooltip()
-controlP5.Controller : DropdownList update()
-controlP5.Controller : DropdownList updateSize()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.DropdownList : DropdownList addItem(String, Object)
-controlP5.DropdownList : DropdownList addItems(List)
-controlP5.DropdownList : DropdownList addItems(Map)
-controlP5.DropdownList : DropdownList addItems(String[])
-controlP5.DropdownList : DropdownList clear()
-controlP5.DropdownList : DropdownList close()
-controlP5.DropdownList : DropdownList open()
-controlP5.DropdownList : DropdownList removeItem(String)
-controlP5.DropdownList : DropdownList removeItems(List)
-controlP5.DropdownList : DropdownList setBackgroundColor(int)
-controlP5.DropdownList : DropdownList setBarHeight(int)
-controlP5.DropdownList : DropdownList setBarVisible(boolean)
-controlP5.DropdownList : DropdownList setItemHeight(int)
-controlP5.DropdownList : DropdownList setItems(List)
-controlP5.DropdownList : DropdownList setItems(Map)
-controlP5.DropdownList : DropdownList setItems(String[])
-controlP5.DropdownList : DropdownList setOpen(boolean)
-controlP5.DropdownList : DropdownList setScrollSensitivity(float)
-controlP5.DropdownList : DropdownList setType(int)
-controlP5.DropdownList : List getItems()
-controlP5.DropdownList : Map getItem(String)
-controlP5.DropdownList : Map getItem(int)
-controlP5.DropdownList : boolean isBarVisible()
-controlP5.DropdownList : boolean isOpen()
-controlP5.DropdownList : int getBackgroundColor()
-controlP5.DropdownList : int getBarHeight()
-controlP5.DropdownList : int getHeight()
-controlP5.DropdownList : void controlEvent(ControlEvent)
-controlP5.DropdownList : void keyEvent(KeyEvent)
-controlP5.DropdownList : void setDirection(int)
-controlP5.DropdownList : void updateItemIndexOffset()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : DropdownList addCallback(CallbackListener)
+main.java.controlp5.Controller : DropdownList addListener(ControlListener)
+main.java.controlp5.Controller : DropdownList addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : DropdownList align(int, int, int, int)
+main.java.controlp5.Controller : DropdownList bringToFront()
+main.java.controlp5.Controller : DropdownList bringToFront(ControllerInterface)
+main.java.controlp5.Controller : DropdownList hide()
+main.java.controlp5.Controller : DropdownList linebreak()
+main.java.controlp5.Controller : DropdownList listen(boolean)
+main.java.controlp5.Controller : DropdownList lock()
+main.java.controlp5.Controller : DropdownList onChange(CallbackListener)
+main.java.controlp5.Controller : DropdownList onClick(CallbackListener)
+main.java.controlp5.Controller : DropdownList onDoublePress(CallbackListener)
+main.java.controlp5.Controller : DropdownList onDrag(CallbackListener)
+main.java.controlp5.Controller : DropdownList onDraw(ControllerView)
+main.java.controlp5.Controller : DropdownList onEndDrag(CallbackListener)
+main.java.controlp5.Controller : DropdownList onEnter(CallbackListener)
+main.java.controlp5.Controller : DropdownList onLeave(CallbackListener)
+main.java.controlp5.Controller : DropdownList onMove(CallbackListener)
+main.java.controlp5.Controller : DropdownList onPress(CallbackListener)
+main.java.controlp5.Controller : DropdownList onRelease(CallbackListener)
+main.java.controlp5.Controller : DropdownList onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : DropdownList onStartDrag(CallbackListener)
+main.java.controlp5.Controller : DropdownList onWheel(CallbackListener)
+main.java.controlp5.Controller : DropdownList plugTo(Object)
+main.java.controlp5.Controller : DropdownList plugTo(Object, String)
+main.java.controlp5.Controller : DropdownList plugTo(Object[])
+main.java.controlp5.Controller : DropdownList plugTo(Object[], String)
+main.java.controlp5.Controller : DropdownList registerProperty(String)
+main.java.controlp5.Controller : DropdownList registerProperty(String, String)
+main.java.controlp5.Controller : DropdownList registerTooltip(String)
+main.java.controlp5.Controller : DropdownList removeBehavior()
+main.java.controlp5.Controller : DropdownList removeCallback()
+main.java.controlp5.Controller : DropdownList removeCallback(CallbackListener)
+main.java.controlp5.Controller : DropdownList removeListener(ControlListener)
+main.java.controlp5.Controller : DropdownList removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : DropdownList removeListenersFor(int)
+main.java.controlp5.Controller : DropdownList removeProperty(String)
+main.java.controlp5.Controller : DropdownList removeProperty(String, String)
+main.java.controlp5.Controller : DropdownList setArrayValue(float[])
+main.java.controlp5.Controller : DropdownList setArrayValue(int, float)
+main.java.controlp5.Controller : DropdownList setBehavior(ControlBehavior)
+main.java.controlp5.Controller : DropdownList setBroadcast(boolean)
+main.java.controlp5.Controller : DropdownList setCaptionLabel(String)
+main.java.controlp5.Controller : DropdownList setColor(CColor)
+main.java.controlp5.Controller : DropdownList setColorActive(int)
+main.java.controlp5.Controller : DropdownList setColorBackground(int)
+main.java.controlp5.Controller : DropdownList setColorCaptionLabel(int)
+main.java.controlp5.Controller : DropdownList setColorForeground(int)
+main.java.controlp5.Controller : DropdownList setColorLabel(int)
+main.java.controlp5.Controller : DropdownList setColorValue(int)
+main.java.controlp5.Controller : DropdownList setColorValueLabel(int)
+main.java.controlp5.Controller : DropdownList setDecimalPrecision(int)
+main.java.controlp5.Controller : DropdownList setDefaultValue(float)
+main.java.controlp5.Controller : DropdownList setHeight(int)
+main.java.controlp5.Controller : DropdownList setId(int)
+main.java.controlp5.Controller : DropdownList setImage(PImage)
+main.java.controlp5.Controller : DropdownList setImage(PImage, int)
+main.java.controlp5.Controller : DropdownList setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : DropdownList setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : DropdownList setLabel(String)
+main.java.controlp5.Controller : DropdownList setLabelVisible(boolean)
+main.java.controlp5.Controller : DropdownList setLock(boolean)
+main.java.controlp5.Controller : DropdownList setMax(float)
+main.java.controlp5.Controller : DropdownList setMin(float)
+main.java.controlp5.Controller : DropdownList setMouseOver(boolean)
+main.java.controlp5.Controller : DropdownList setMoveable(boolean)
+main.java.controlp5.Controller : DropdownList setPosition(float, float)
+main.java.controlp5.Controller : DropdownList setPosition(float[])
+main.java.controlp5.Controller : DropdownList setSize(PImage)
+main.java.controlp5.Controller : DropdownList setSize(int, int)
+main.java.controlp5.Controller : DropdownList setStringValue(String)
+main.java.controlp5.Controller : DropdownList setUpdate(boolean)
+main.java.controlp5.Controller : DropdownList setValue(float)
+main.java.controlp5.Controller : DropdownList setValueLabel(String)
+main.java.controlp5.Controller : DropdownList setValueSelf(float)
+main.java.controlp5.Controller : DropdownList setView(ControllerView)
+main.java.controlp5.Controller : DropdownList setVisible(boolean)
+main.java.controlp5.Controller : DropdownList setWidth(int)
+main.java.controlp5.Controller : DropdownList show()
+main.java.controlp5.Controller : DropdownList unlock()
+main.java.controlp5.Controller : DropdownList unplugFrom(Object)
+main.java.controlp5.Controller : DropdownList unplugFrom(Object[])
+main.java.controlp5.Controller : DropdownList unregisterTooltip()
+main.java.controlp5.Controller : DropdownList update()
+main.java.controlp5.Controller : DropdownList updateSize()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.DropdownList : DropdownList addItem(String, Object)
+main.java.controlp5.DropdownList : DropdownList addItems(List)
+main.java.controlp5.DropdownList : DropdownList addItems(Map)
+main.java.controlp5.DropdownList : DropdownList addItems(String[])
+main.java.controlp5.DropdownList : DropdownList clear()
+main.java.controlp5.DropdownList : DropdownList close()
+main.java.controlp5.DropdownList : DropdownList open()
+main.java.controlp5.DropdownList : DropdownList removeItem(String)
+main.java.controlp5.DropdownList : DropdownList removeItems(List)
+main.java.controlp5.DropdownList : DropdownList setBackgroundColor(int)
+main.java.controlp5.DropdownList : DropdownList setBarHeight(int)
+main.java.controlp5.DropdownList : DropdownList setBarVisible(boolean)
+main.java.controlp5.DropdownList : DropdownList setItemHeight(int)
+main.java.controlp5.DropdownList : DropdownList setItems(List)
+main.java.controlp5.DropdownList : DropdownList setItems(Map)
+main.java.controlp5.DropdownList : DropdownList setItems(String[])
+main.java.controlp5.DropdownList : DropdownList setOpen(boolean)
+main.java.controlp5.DropdownList : DropdownList setScrollSensitivity(float)
+main.java.controlp5.DropdownList : DropdownList setType(int)
+main.java.controlp5.DropdownList : List getItems()
+main.java.controlp5.DropdownList : Map getItem(String)
+main.java.controlp5.DropdownList : Map getItem(int)
+main.java.controlp5.DropdownList : boolean isBarVisible()
+main.java.controlp5.DropdownList : boolean isOpen()
+main.java.controlp5.DropdownList : int getBackgroundColor()
+main.java.controlp5.DropdownList : int getBarHeight()
+main.java.controlp5.DropdownList : int getHeight()
+main.java.controlp5.DropdownList : void controlEvent(ControlEvent)
+main.java.controlp5.DropdownList : void keyEvent(KeyEvent)
+main.java.controlp5.DropdownList : void setDirection(int)
+main.java.controlp5.DropdownList : void updateItemIndexOffset()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5group/ControlP5group.pde b/examples/controllers/ControlP5group/ControlP5group.pde
index bdece31..c245580 100644
--- a/examples/controllers/ControlP5group/ControlP5group.pde
+++ b/examples/controllers/ControlP5group/ControlP5group.pde
@@ -129,102 +129,102 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControlGroup : Group activateEvent(boolean)
-controlP5.ControlGroup : Group addListener(ControlListener)
-controlP5.ControlGroup : Group removeListener(ControlListener)
-controlP5.ControlGroup : Group setBackgroundColor(int)
-controlP5.ControlGroup : Group setBackgroundHeight(int)
-controlP5.ControlGroup : Group setBarHeight(int)
-controlP5.ControlGroup : Group setSize(int, int)
-controlP5.ControlGroup : Group updateInternalEvents(PApplet)
-controlP5.ControlGroup : String getInfo()
-controlP5.ControlGroup : String toString()
-controlP5.ControlGroup : int getBackgroundHeight()
-controlP5.ControlGroup : int getBarHeight()
-controlP5.ControlGroup : int listenerSize()
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : Canvas addCanvas(Canvas)
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Group add(ControllerInterface)
-controlP5.ControllerGroup : Group addListener(ControlListener)
-controlP5.ControllerGroup : Group bringToFront()
-controlP5.ControllerGroup : Group bringToFront(ControllerInterface)
-controlP5.ControllerGroup : Group close()
-controlP5.ControllerGroup : Group disableCollapse()
-controlP5.ControllerGroup : Group enableCollapse()
-controlP5.ControllerGroup : Group hide()
-controlP5.ControllerGroup : Group hideArrow()
-controlP5.ControllerGroup : Group hideBar()
-controlP5.ControllerGroup : Group moveTo(ControlWindow)
-controlP5.ControllerGroup : Group moveTo(PApplet)
-controlP5.ControllerGroup : Group open()
-controlP5.ControllerGroup : Group registerProperty(String)
-controlP5.ControllerGroup : Group registerProperty(String, String)
-controlP5.ControllerGroup : Group remove(CDrawable)
-controlP5.ControllerGroup : Group remove(ControllerInterface)
-controlP5.ControllerGroup : Group removeCanvas(Canvas)
-controlP5.ControllerGroup : Group removeListener(ControlListener)
-controlP5.ControllerGroup : Group removeProperty(String)
-controlP5.ControllerGroup : Group removeProperty(String, String)
-controlP5.ControllerGroup : Group setAddress(String)
-controlP5.ControllerGroup : Group setArrayValue(float[])
-controlP5.ControllerGroup : Group setArrayValue(int, float)
-controlP5.ControllerGroup : Group setCaptionLabel(String)
-controlP5.ControllerGroup : Group setColor(CColor)
-controlP5.ControllerGroup : Group setColorActive(int)
-controlP5.ControllerGroup : Group setColorBackground(int)
-controlP5.ControllerGroup : Group setColorForeground(int)
-controlP5.ControllerGroup : Group setColorLabel(int)
-controlP5.ControllerGroup : Group setColorValue(int)
-controlP5.ControllerGroup : Group setHeight(int)
-controlP5.ControllerGroup : Group setId(int)
-controlP5.ControllerGroup : Group setLabel(String)
-controlP5.ControllerGroup : Group setMouseOver(boolean)
-controlP5.ControllerGroup : Group setMoveable(boolean)
-controlP5.ControllerGroup : Group setOpen(boolean)
-controlP5.ControllerGroup : Group setPosition(float, float)
-controlP5.ControllerGroup : Group setPosition(float[])
-controlP5.ControllerGroup : Group setSize(int, int)
-controlP5.ControllerGroup : Group setStringValue(String)
-controlP5.ControllerGroup : Group setTitle(String)
-controlP5.ControllerGroup : Group setUpdate(boolean)
-controlP5.ControllerGroup : Group setValue(float)
-controlP5.ControllerGroup : Group setVisible(boolean)
-controlP5.ControllerGroup : Group setWidth(int)
-controlP5.ControllerGroup : Group show()
-controlP5.ControllerGroup : Group showArrow()
-controlP5.ControllerGroup : Group showBar()
-controlP5.ControllerGroup : Group update()
-controlP5.ControllerGroup : Group updateAbsolutePosition()
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : boolean isBarVisible()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getArrayValue(int)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : float[] getPosition()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : int listenerSize()
-controlP5.ControllerGroup : void controlEvent(ControlEvent)
-controlP5.ControllerGroup : void remove()
+main.java.controlp5.ControlGroup : Group activateEvent(boolean)
+main.java.controlp5.ControlGroup : Group addListener(ControlListener)
+main.java.controlp5.ControlGroup : Group removeListener(ControlListener)
+main.java.controlp5.ControlGroup : Group setBackgroundColor(int)
+main.java.controlp5.ControlGroup : Group setBackgroundHeight(int)
+main.java.controlp5.ControlGroup : Group setBarHeight(int)
+main.java.controlp5.ControlGroup : Group setSize(int, int)
+main.java.controlp5.ControlGroup : Group updateInternalEvents(PApplet)
+main.java.controlp5.ControlGroup : String getInfo()
+main.java.controlp5.ControlGroup : String toString()
+main.java.controlp5.ControlGroup : int getBackgroundHeight()
+main.java.controlp5.ControlGroup : int getBarHeight()
+main.java.controlp5.ControlGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : CColor getColor()
+main.java.controlp5.ControllerGroup : Canvas addCanvas(Canvas)
+main.java.controlp5.ControllerGroup : ControlWindow getWindow()
+main.java.controlp5.ControllerGroup : Controller getController(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String, String)
+main.java.controlp5.ControllerGroup : Group add(ControllerInterface)
+main.java.controlp5.ControllerGroup : Group addListener(ControlListener)
+main.java.controlp5.ControllerGroup : Group bringToFront()
+main.java.controlp5.ControllerGroup : Group bringToFront(ControllerInterface)
+main.java.controlp5.ControllerGroup : Group close()
+main.java.controlp5.ControllerGroup : Group disableCollapse()
+main.java.controlp5.ControllerGroup : Group enableCollapse()
+main.java.controlp5.ControllerGroup : Group hide()
+main.java.controlp5.ControllerGroup : Group hideArrow()
+main.java.controlp5.ControllerGroup : Group hideBar()
+main.java.controlp5.ControllerGroup : Group moveTo(ControlWindow)
+main.java.controlp5.ControllerGroup : Group moveTo(PApplet)
+main.java.controlp5.ControllerGroup : Group open()
+main.java.controlp5.ControllerGroup : Group registerProperty(String)
+main.java.controlp5.ControllerGroup : Group registerProperty(String, String)
+main.java.controlp5.ControllerGroup : Group remove(CDrawable)
+main.java.controlp5.ControllerGroup : Group remove(ControllerInterface)
+main.java.controlp5.ControllerGroup : Group removeCanvas(Canvas)
+main.java.controlp5.ControllerGroup : Group removeListener(ControlListener)
+main.java.controlp5.ControllerGroup : Group removeProperty(String)
+main.java.controlp5.ControllerGroup : Group removeProperty(String, String)
+main.java.controlp5.ControllerGroup : Group setAddress(String)
+main.java.controlp5.ControllerGroup : Group setArrayValue(float[])
+main.java.controlp5.ControllerGroup : Group setArrayValue(int, float)
+main.java.controlp5.ControllerGroup : Group setCaptionLabel(String)
+main.java.controlp5.ControllerGroup : Group setColor(CColor)
+main.java.controlp5.ControllerGroup : Group setColorActive(int)
+main.java.controlp5.ControllerGroup : Group setColorBackground(int)
+main.java.controlp5.ControllerGroup : Group setColorForeground(int)
+main.java.controlp5.ControllerGroup : Group setColorLabel(int)
+main.java.controlp5.ControllerGroup : Group setColorValue(int)
+main.java.controlp5.ControllerGroup : Group setHeight(int)
+main.java.controlp5.ControllerGroup : Group setId(int)
+main.java.controlp5.ControllerGroup : Group setLabel(String)
+main.java.controlp5.ControllerGroup : Group setMouseOver(boolean)
+main.java.controlp5.ControllerGroup : Group setMoveable(boolean)
+main.java.controlp5.ControllerGroup : Group setOpen(boolean)
+main.java.controlp5.ControllerGroup : Group setPosition(float, float)
+main.java.controlp5.ControllerGroup : Group setPosition(float[])
+main.java.controlp5.ControllerGroup : Group setSize(int, int)
+main.java.controlp5.ControllerGroup : Group setStringValue(String)
+main.java.controlp5.ControllerGroup : Group setTitle(String)
+main.java.controlp5.ControllerGroup : Group setUpdate(boolean)
+main.java.controlp5.ControllerGroup : Group setValue(float)
+main.java.controlp5.ControllerGroup : Group setVisible(boolean)
+main.java.controlp5.ControllerGroup : Group setWidth(int)
+main.java.controlp5.ControllerGroup : Group show()
+main.java.controlp5.ControllerGroup : Group showArrow()
+main.java.controlp5.ControllerGroup : Group showBar()
+main.java.controlp5.ControllerGroup : Group update()
+main.java.controlp5.ControllerGroup : Group updateAbsolutePosition()
+main.java.controlp5.ControllerGroup : Label getCaptionLabel()
+main.java.controlp5.ControllerGroup : Label getValueLabel()
+main.java.controlp5.ControllerGroup : String getAddress()
+main.java.controlp5.ControllerGroup : String getInfo()
+main.java.controlp5.ControllerGroup : String getName()
+main.java.controlp5.ControllerGroup : String getStringValue()
+main.java.controlp5.ControllerGroup : String toString()
+main.java.controlp5.ControllerGroup : Tab getTab()
+main.java.controlp5.ControllerGroup : boolean isBarVisible()
+main.java.controlp5.ControllerGroup : boolean isCollapse()
+main.java.controlp5.ControllerGroup : boolean isMouseOver()
+main.java.controlp5.ControllerGroup : boolean isMoveable()
+main.java.controlp5.ControllerGroup : boolean isOpen()
+main.java.controlp5.ControllerGroup : boolean isUpdate()
+main.java.controlp5.ControllerGroup : boolean isVisible()
+main.java.controlp5.ControllerGroup : boolean setMousePressed(boolean)
+main.java.controlp5.ControllerGroup : float getArrayValue(int)
+main.java.controlp5.ControllerGroup : float getValue()
+main.java.controlp5.ControllerGroup : float[] getArrayValue()
+main.java.controlp5.ControllerGroup : float[] getPosition()
+main.java.controlp5.ControllerGroup : int getHeight()
+main.java.controlp5.ControllerGroup : int getId()
+main.java.controlp5.ControllerGroup : int getWidth()
+main.java.controlp5.ControllerGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : void controlEvent(ControlEvent)
+main.java.controlp5.ControllerGroup : void remove()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5icon/ControlP5icon.pde b/examples/controllers/ControlP5icon/ControlP5icon.pde
index ad686a6..ce8d4ef 100644
--- a/examples/controllers/ControlP5icon/ControlP5icon.pde
+++ b/examples/controllers/ControlP5icon/ControlP5icon.pde
@@ -50,164 +50,164 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Icon addCallback(CallbackListener)
-controlP5.Controller : Icon addListener(ControlListener)
-controlP5.Controller : Icon addListenerFor(int, CallbackListener)
-controlP5.Controller : Icon align(int, int, int, int)
-controlP5.Controller : Icon bringToFront()
-controlP5.Controller : Icon bringToFront(ControllerInterface)
-controlP5.Controller : Icon hide()
-controlP5.Controller : Icon linebreak()
-controlP5.Controller : Icon listen(boolean)
-controlP5.Controller : Icon lock()
-controlP5.Controller : Icon onChange(CallbackListener)
-controlP5.Controller : Icon onClick(CallbackListener)
-controlP5.Controller : Icon onDoublePress(CallbackListener)
-controlP5.Controller : Icon onDrag(CallbackListener)
-controlP5.Controller : Icon onDraw(ControllerView)
-controlP5.Controller : Icon onEndDrag(CallbackListener)
-controlP5.Controller : Icon onEnter(CallbackListener)
-controlP5.Controller : Icon onLeave(CallbackListener)
-controlP5.Controller : Icon onMove(CallbackListener)
-controlP5.Controller : Icon onPress(CallbackListener)
-controlP5.Controller : Icon onRelease(CallbackListener)
-controlP5.Controller : Icon onReleaseOutside(CallbackListener)
-controlP5.Controller : Icon onStartDrag(CallbackListener)
-controlP5.Controller : Icon onWheel(CallbackListener)
-controlP5.Controller : Icon plugTo(Object)
-controlP5.Controller : Icon plugTo(Object, String)
-controlP5.Controller : Icon plugTo(Object[])
-controlP5.Controller : Icon plugTo(Object[], String)
-controlP5.Controller : Icon registerProperty(String)
-controlP5.Controller : Icon registerProperty(String, String)
-controlP5.Controller : Icon registerTooltip(String)
-controlP5.Controller : Icon removeBehavior()
-controlP5.Controller : Icon removeCallback()
-controlP5.Controller : Icon removeCallback(CallbackListener)
-controlP5.Controller : Icon removeListener(ControlListener)
-controlP5.Controller : Icon removeListenerFor(int, CallbackListener)
-controlP5.Controller : Icon removeListenersFor(int)
-controlP5.Controller : Icon removeProperty(String)
-controlP5.Controller : Icon removeProperty(String, String)
-controlP5.Controller : Icon setArrayValue(float[])
-controlP5.Controller : Icon setArrayValue(int, float)
-controlP5.Controller : Icon setBehavior(ControlBehavior)
-controlP5.Controller : Icon setBroadcast(boolean)
-controlP5.Controller : Icon setCaptionLabel(String)
-controlP5.Controller : Icon setColor(CColor)
-controlP5.Controller : Icon setColorActive(int)
-controlP5.Controller : Icon setColorBackground(int)
-controlP5.Controller : Icon setColorCaptionLabel(int)
-controlP5.Controller : Icon setColorForeground(int)
-controlP5.Controller : Icon setColorLabel(int)
-controlP5.Controller : Icon setColorValue(int)
-controlP5.Controller : Icon setColorValueLabel(int)
-controlP5.Controller : Icon setDecimalPrecision(int)
-controlP5.Controller : Icon setDefaultValue(float)
-controlP5.Controller : Icon setHeight(int)
-controlP5.Controller : Icon setId(int)
-controlP5.Controller : Icon setImage(PImage)
-controlP5.Controller : Icon setImage(PImage, int)
-controlP5.Controller : Icon setImages(PImage, PImage, PImage)
-controlP5.Controller : Icon setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Icon setLabel(String)
-controlP5.Controller : Icon setLabelVisible(boolean)
-controlP5.Controller : Icon setLock(boolean)
-controlP5.Controller : Icon setMax(float)
-controlP5.Controller : Icon setMin(float)
-controlP5.Controller : Icon setMouseOver(boolean)
-controlP5.Controller : Icon setMoveable(boolean)
-controlP5.Controller : Icon setPosition(float, float)
-controlP5.Controller : Icon setPosition(float[])
-controlP5.Controller : Icon setSize(PImage)
-controlP5.Controller : Icon setSize(int, int)
-controlP5.Controller : Icon setStringValue(String)
-controlP5.Controller : Icon setUpdate(boolean)
-controlP5.Controller : Icon setValue(float)
-controlP5.Controller : Icon setValueLabel(String)
-controlP5.Controller : Icon setValueSelf(float)
-controlP5.Controller : Icon setView(ControllerView)
-controlP5.Controller : Icon setVisible(boolean)
-controlP5.Controller : Icon setWidth(int)
-controlP5.Controller : Icon show()
-controlP5.Controller : Icon unlock()
-controlP5.Controller : Icon unplugFrom(Object)
-controlP5.Controller : Icon unplugFrom(Object[])
-controlP5.Controller : Icon unregisterTooltip()
-controlP5.Controller : Icon update()
-controlP5.Controller : Icon updateSize()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.Icon : Icon activateBy(int)
-controlP5.Icon : Icon hideBackground()
-controlP5.Icon : Icon setFill(boolean)
-controlP5.Icon : Icon setFont(PFont)
-controlP5.Icon : Icon setFont(PFont, int)
-controlP5.Icon : Icon setFontIcon(int)
-controlP5.Icon : Icon setFontIcon(int, int)
-controlP5.Icon : Icon setFontIconOff(int)
-controlP5.Icon : Icon setFontIconOn(int)
-controlP5.Icon : Icon setFontIconSize(int)
-controlP5.Icon : Icon setFontIcons(int, int)
-controlP5.Icon : Icon setFontIndex(int)
-controlP5.Icon : Icon setOff()
-controlP5.Icon : Icon setOn()
-controlP5.Icon : Icon setRoundedCorners(int)
-controlP5.Icon : Icon setScale(float, float)
-controlP5.Icon : Icon setStroke(boolean)
-controlP5.Icon : Icon setStrokeWeight(float)
-controlP5.Icon : Icon setSwitch(boolean)
-controlP5.Icon : Icon setValue(float)
-controlP5.Icon : Icon showBackground()
-controlP5.Icon : Icon update()
-controlP5.Icon : String getInfo()
-controlP5.Icon : String toString()
-controlP5.Icon : boolean getBooleanValue()
-controlP5.Icon : boolean isOn()
-controlP5.Icon : boolean isPressed()
-controlP5.Icon : boolean isSwitch()
-controlP5.Icon : int getFontIcon(int)
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Icon addCallback(CallbackListener)
+main.java.controlp5.Controller : Icon addListener(ControlListener)
+main.java.controlp5.Controller : Icon addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Icon align(int, int, int, int)
+main.java.controlp5.Controller : Icon bringToFront()
+main.java.controlp5.Controller : Icon bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Icon hide()
+main.java.controlp5.Controller : Icon linebreak()
+main.java.controlp5.Controller : Icon listen(boolean)
+main.java.controlp5.Controller : Icon lock()
+main.java.controlp5.Controller : Icon onChange(CallbackListener)
+main.java.controlp5.Controller : Icon onClick(CallbackListener)
+main.java.controlp5.Controller : Icon onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Icon onDrag(CallbackListener)
+main.java.controlp5.Controller : Icon onDraw(ControllerView)
+main.java.controlp5.Controller : Icon onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Icon onEnter(CallbackListener)
+main.java.controlp5.Controller : Icon onLeave(CallbackListener)
+main.java.controlp5.Controller : Icon onMove(CallbackListener)
+main.java.controlp5.Controller : Icon onPress(CallbackListener)
+main.java.controlp5.Controller : Icon onRelease(CallbackListener)
+main.java.controlp5.Controller : Icon onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Icon onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Icon onWheel(CallbackListener)
+main.java.controlp5.Controller : Icon plugTo(Object)
+main.java.controlp5.Controller : Icon plugTo(Object, String)
+main.java.controlp5.Controller : Icon plugTo(Object[])
+main.java.controlp5.Controller : Icon plugTo(Object[], String)
+main.java.controlp5.Controller : Icon registerProperty(String)
+main.java.controlp5.Controller : Icon registerProperty(String, String)
+main.java.controlp5.Controller : Icon registerTooltip(String)
+main.java.controlp5.Controller : Icon removeBehavior()
+main.java.controlp5.Controller : Icon removeCallback()
+main.java.controlp5.Controller : Icon removeCallback(CallbackListener)
+main.java.controlp5.Controller : Icon removeListener(ControlListener)
+main.java.controlp5.Controller : Icon removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Icon removeListenersFor(int)
+main.java.controlp5.Controller : Icon removeProperty(String)
+main.java.controlp5.Controller : Icon removeProperty(String, String)
+main.java.controlp5.Controller : Icon setArrayValue(float[])
+main.java.controlp5.Controller : Icon setArrayValue(int, float)
+main.java.controlp5.Controller : Icon setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Icon setBroadcast(boolean)
+main.java.controlp5.Controller : Icon setCaptionLabel(String)
+main.java.controlp5.Controller : Icon setColor(CColor)
+main.java.controlp5.Controller : Icon setColorActive(int)
+main.java.controlp5.Controller : Icon setColorBackground(int)
+main.java.controlp5.Controller : Icon setColorCaptionLabel(int)
+main.java.controlp5.Controller : Icon setColorForeground(int)
+main.java.controlp5.Controller : Icon setColorLabel(int)
+main.java.controlp5.Controller : Icon setColorValue(int)
+main.java.controlp5.Controller : Icon setColorValueLabel(int)
+main.java.controlp5.Controller : Icon setDecimalPrecision(int)
+main.java.controlp5.Controller : Icon setDefaultValue(float)
+main.java.controlp5.Controller : Icon setHeight(int)
+main.java.controlp5.Controller : Icon setId(int)
+main.java.controlp5.Controller : Icon setImage(PImage)
+main.java.controlp5.Controller : Icon setImage(PImage, int)
+main.java.controlp5.Controller : Icon setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Icon setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Icon setLabel(String)
+main.java.controlp5.Controller : Icon setLabelVisible(boolean)
+main.java.controlp5.Controller : Icon setLock(boolean)
+main.java.controlp5.Controller : Icon setMax(float)
+main.java.controlp5.Controller : Icon setMin(float)
+main.java.controlp5.Controller : Icon setMouseOver(boolean)
+main.java.controlp5.Controller : Icon setMoveable(boolean)
+main.java.controlp5.Controller : Icon setPosition(float, float)
+main.java.controlp5.Controller : Icon setPosition(float[])
+main.java.controlp5.Controller : Icon setSize(PImage)
+main.java.controlp5.Controller : Icon setSize(int, int)
+main.java.controlp5.Controller : Icon setStringValue(String)
+main.java.controlp5.Controller : Icon setUpdate(boolean)
+main.java.controlp5.Controller : Icon setValue(float)
+main.java.controlp5.Controller : Icon setValueLabel(String)
+main.java.controlp5.Controller : Icon setValueSelf(float)
+main.java.controlp5.Controller : Icon setView(ControllerView)
+main.java.controlp5.Controller : Icon setVisible(boolean)
+main.java.controlp5.Controller : Icon setWidth(int)
+main.java.controlp5.Controller : Icon show()
+main.java.controlp5.Controller : Icon unlock()
+main.java.controlp5.Controller : Icon unplugFrom(Object)
+main.java.controlp5.Controller : Icon unplugFrom(Object[])
+main.java.controlp5.Controller : Icon unregisterTooltip()
+main.java.controlp5.Controller : Icon update()
+main.java.controlp5.Controller : Icon updateSize()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Icon : Icon activateBy(int)
+main.java.controlp5.Icon : Icon hideBackground()
+main.java.controlp5.Icon : Icon setFill(boolean)
+main.java.controlp5.Icon : Icon setFont(PFont)
+main.java.controlp5.Icon : Icon setFont(PFont, int)
+main.java.controlp5.Icon : Icon setFontIcon(int)
+main.java.controlp5.Icon : Icon setFontIcon(int, int)
+main.java.controlp5.Icon : Icon setFontIconOff(int)
+main.java.controlp5.Icon : Icon setFontIconOn(int)
+main.java.controlp5.Icon : Icon setFontIconSize(int)
+main.java.controlp5.Icon : Icon setFontIcons(int, int)
+main.java.controlp5.Icon : Icon setFontIndex(int)
+main.java.controlp5.Icon : Icon setOff()
+main.java.controlp5.Icon : Icon setOn()
+main.java.controlp5.Icon : Icon setRoundedCorners(int)
+main.java.controlp5.Icon : Icon setScale(float, float)
+main.java.controlp5.Icon : Icon setStroke(boolean)
+main.java.controlp5.Icon : Icon setStrokeWeight(float)
+main.java.controlp5.Icon : Icon setSwitch(boolean)
+main.java.controlp5.Icon : Icon setValue(float)
+main.java.controlp5.Icon : Icon showBackground()
+main.java.controlp5.Icon : Icon update()
+main.java.controlp5.Icon : String getInfo()
+main.java.controlp5.Icon : String toString()
+main.java.controlp5.Icon : boolean getBooleanValue()
+main.java.controlp5.Icon : boolean isOn()
+main.java.controlp5.Icon : boolean isPressed()
+main.java.controlp5.Icon : boolean isSwitch()
+main.java.controlp5.Icon : int getFontIcon(int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5knob/ControlP5knob.pde b/examples/controllers/ControlP5knob/ControlP5knob.pde
index d7578f5..610823f 100644
--- a/examples/controllers/ControlP5knob/ControlP5knob.pde
+++ b/examples/controllers/ControlP5knob/ControlP5knob.pde
@@ -86,170 +86,170 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Knob addCallback(CallbackListener)
-controlP5.Controller : Knob addListener(ControlListener)
-controlP5.Controller : Knob addListenerFor(int, CallbackListener)
-controlP5.Controller : Knob align(int, int, int, int)
-controlP5.Controller : Knob bringToFront()
-controlP5.Controller : Knob bringToFront(ControllerInterface)
-controlP5.Controller : Knob hide()
-controlP5.Controller : Knob linebreak()
-controlP5.Controller : Knob listen(boolean)
-controlP5.Controller : Knob lock()
-controlP5.Controller : Knob onChange(CallbackListener)
-controlP5.Controller : Knob onClick(CallbackListener)
-controlP5.Controller : Knob onDoublePress(CallbackListener)
-controlP5.Controller : Knob onDrag(CallbackListener)
-controlP5.Controller : Knob onDraw(ControllerView)
-controlP5.Controller : Knob onEndDrag(CallbackListener)
-controlP5.Controller : Knob onEnter(CallbackListener)
-controlP5.Controller : Knob onLeave(CallbackListener)
-controlP5.Controller : Knob onMove(CallbackListener)
-controlP5.Controller : Knob onPress(CallbackListener)
-controlP5.Controller : Knob onRelease(CallbackListener)
-controlP5.Controller : Knob onReleaseOutside(CallbackListener)
-controlP5.Controller : Knob onStartDrag(CallbackListener)
-controlP5.Controller : Knob onWheel(CallbackListener)
-controlP5.Controller : Knob plugTo(Object)
-controlP5.Controller : Knob plugTo(Object, String)
-controlP5.Controller : Knob plugTo(Object[])
-controlP5.Controller : Knob plugTo(Object[], String)
-controlP5.Controller : Knob registerProperty(String)
-controlP5.Controller : Knob registerProperty(String, String)
-controlP5.Controller : Knob registerTooltip(String)
-controlP5.Controller : Knob removeBehavior()
-controlP5.Controller : Knob removeCallback()
-controlP5.Controller : Knob removeCallback(CallbackListener)
-controlP5.Controller : Knob removeListener(ControlListener)
-controlP5.Controller : Knob removeListenerFor(int, CallbackListener)
-controlP5.Controller : Knob removeListenersFor(int)
-controlP5.Controller : Knob removeProperty(String)
-controlP5.Controller : Knob removeProperty(String, String)
-controlP5.Controller : Knob setArrayValue(float[])
-controlP5.Controller : Knob setArrayValue(int, float)
-controlP5.Controller : Knob setBehavior(ControlBehavior)
-controlP5.Controller : Knob setBroadcast(boolean)
-controlP5.Controller : Knob setCaptionLabel(String)
-controlP5.Controller : Knob setColor(CColor)
-controlP5.Controller : Knob setColorActive(int)
-controlP5.Controller : Knob setColorBackground(int)
-controlP5.Controller : Knob setColorCaptionLabel(int)
-controlP5.Controller : Knob setColorForeground(int)
-controlP5.Controller : Knob setColorLabel(int)
-controlP5.Controller : Knob setColorValue(int)
-controlP5.Controller : Knob setColorValueLabel(int)
-controlP5.Controller : Knob setDecimalPrecision(int)
-controlP5.Controller : Knob setDefaultValue(float)
-controlP5.Controller : Knob setHeight(int)
-controlP5.Controller : Knob setId(int)
-controlP5.Controller : Knob setImage(PImage)
-controlP5.Controller : Knob setImage(PImage, int)
-controlP5.Controller : Knob setImages(PImage, PImage, PImage)
-controlP5.Controller : Knob setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Knob setLabel(String)
-controlP5.Controller : Knob setLabelVisible(boolean)
-controlP5.Controller : Knob setLock(boolean)
-controlP5.Controller : Knob setMax(float)
-controlP5.Controller : Knob setMin(float)
-controlP5.Controller : Knob setMouseOver(boolean)
-controlP5.Controller : Knob setMoveable(boolean)
-controlP5.Controller : Knob setPosition(float, float)
-controlP5.Controller : Knob setPosition(float[])
-controlP5.Controller : Knob setSize(PImage)
-controlP5.Controller : Knob setSize(int, int)
-controlP5.Controller : Knob setStringValue(String)
-controlP5.Controller : Knob setUpdate(boolean)
-controlP5.Controller : Knob setValue(float)
-controlP5.Controller : Knob setValueLabel(String)
-controlP5.Controller : Knob setValueSelf(float)
-controlP5.Controller : Knob setView(ControllerView)
-controlP5.Controller : Knob setVisible(boolean)
-controlP5.Controller : Knob setWidth(int)
-controlP5.Controller : Knob show()
-controlP5.Controller : Knob unlock()
-controlP5.Controller : Knob unplugFrom(Object)
-controlP5.Controller : Knob unplugFrom(Object[])
-controlP5.Controller : Knob unregisterTooltip()
-controlP5.Controller : Knob update()
-controlP5.Controller : Knob updateSize()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.Knob : Knob hideTickMarks()
-controlP5.Knob : Knob setAngleRange(float)
-controlP5.Knob : Knob setConstrained(boolean)
-controlP5.Knob : Knob setDragDirection(int)
-controlP5.Knob : Knob setMax(float)
-controlP5.Knob : Knob setMin(float)
-controlP5.Knob : Knob setNumberOfTickMarks(int)
-controlP5.Knob : Knob setRadius(float)
-controlP5.Knob : Knob setRange(float, float)
-controlP5.Knob : Knob setResolution(float)
-controlP5.Knob : Knob setScrollSensitivity(float)
-controlP5.Knob : Knob setShowAngleRange(boolean)
-controlP5.Knob : Knob setSize(int, int)
-controlP5.Knob : Knob setStartAngle(float)
-controlP5.Knob : Knob setTickMarkLength(int)
-controlP5.Knob : Knob setTickMarkWeight(float)
-controlP5.Knob : Knob setValue(float)
-controlP5.Knob : Knob setViewStyle(int)
-controlP5.Knob : Knob showTickMarks()
-controlP5.Knob : Knob shuffle()
-controlP5.Knob : Knob snapToTickMarks(boolean)
-controlP5.Knob : boolean isConstrained()
-controlP5.Knob : boolean isShowAngleRange()
-controlP5.Knob : boolean isShowTickMarks()
-controlP5.Knob : float getAngle()
-controlP5.Knob : float getAngleRange()
-controlP5.Knob : float getRadius()
-controlP5.Knob : float getResolution()
-controlP5.Knob : float getStartAngle()
-controlP5.Knob : float getTickMarkWeight()
-controlP5.Knob : float getValue()
-controlP5.Knob : int getDragDirection()
-controlP5.Knob : int getNumberOfTickMarks()
-controlP5.Knob : int getTickMarkLength()
-controlP5.Knob : int getViewStyle()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Knob addCallback(CallbackListener)
+main.java.controlp5.Controller : Knob addListener(ControlListener)
+main.java.controlp5.Controller : Knob addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Knob align(int, int, int, int)
+main.java.controlp5.Controller : Knob bringToFront()
+main.java.controlp5.Controller : Knob bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Knob hide()
+main.java.controlp5.Controller : Knob linebreak()
+main.java.controlp5.Controller : Knob listen(boolean)
+main.java.controlp5.Controller : Knob lock()
+main.java.controlp5.Controller : Knob onChange(CallbackListener)
+main.java.controlp5.Controller : Knob onClick(CallbackListener)
+main.java.controlp5.Controller : Knob onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Knob onDrag(CallbackListener)
+main.java.controlp5.Controller : Knob onDraw(ControllerView)
+main.java.controlp5.Controller : Knob onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Knob onEnter(CallbackListener)
+main.java.controlp5.Controller : Knob onLeave(CallbackListener)
+main.java.controlp5.Controller : Knob onMove(CallbackListener)
+main.java.controlp5.Controller : Knob onPress(CallbackListener)
+main.java.controlp5.Controller : Knob onRelease(CallbackListener)
+main.java.controlp5.Controller : Knob onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Knob onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Knob onWheel(CallbackListener)
+main.java.controlp5.Controller : Knob plugTo(Object)
+main.java.controlp5.Controller : Knob plugTo(Object, String)
+main.java.controlp5.Controller : Knob plugTo(Object[])
+main.java.controlp5.Controller : Knob plugTo(Object[], String)
+main.java.controlp5.Controller : Knob registerProperty(String)
+main.java.controlp5.Controller : Knob registerProperty(String, String)
+main.java.controlp5.Controller : Knob registerTooltip(String)
+main.java.controlp5.Controller : Knob removeBehavior()
+main.java.controlp5.Controller : Knob removeCallback()
+main.java.controlp5.Controller : Knob removeCallback(CallbackListener)
+main.java.controlp5.Controller : Knob removeListener(ControlListener)
+main.java.controlp5.Controller : Knob removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Knob removeListenersFor(int)
+main.java.controlp5.Controller : Knob removeProperty(String)
+main.java.controlp5.Controller : Knob removeProperty(String, String)
+main.java.controlp5.Controller : Knob setArrayValue(float[])
+main.java.controlp5.Controller : Knob setArrayValue(int, float)
+main.java.controlp5.Controller : Knob setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Knob setBroadcast(boolean)
+main.java.controlp5.Controller : Knob setCaptionLabel(String)
+main.java.controlp5.Controller : Knob setColor(CColor)
+main.java.controlp5.Controller : Knob setColorActive(int)
+main.java.controlp5.Controller : Knob setColorBackground(int)
+main.java.controlp5.Controller : Knob setColorCaptionLabel(int)
+main.java.controlp5.Controller : Knob setColorForeground(int)
+main.java.controlp5.Controller : Knob setColorLabel(int)
+main.java.controlp5.Controller : Knob setColorValue(int)
+main.java.controlp5.Controller : Knob setColorValueLabel(int)
+main.java.controlp5.Controller : Knob setDecimalPrecision(int)
+main.java.controlp5.Controller : Knob setDefaultValue(float)
+main.java.controlp5.Controller : Knob setHeight(int)
+main.java.controlp5.Controller : Knob setId(int)
+main.java.controlp5.Controller : Knob setImage(PImage)
+main.java.controlp5.Controller : Knob setImage(PImage, int)
+main.java.controlp5.Controller : Knob setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Knob setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Knob setLabel(String)
+main.java.controlp5.Controller : Knob setLabelVisible(boolean)
+main.java.controlp5.Controller : Knob setLock(boolean)
+main.java.controlp5.Controller : Knob setMax(float)
+main.java.controlp5.Controller : Knob setMin(float)
+main.java.controlp5.Controller : Knob setMouseOver(boolean)
+main.java.controlp5.Controller : Knob setMoveable(boolean)
+main.java.controlp5.Controller : Knob setPosition(float, float)
+main.java.controlp5.Controller : Knob setPosition(float[])
+main.java.controlp5.Controller : Knob setSize(PImage)
+main.java.controlp5.Controller : Knob setSize(int, int)
+main.java.controlp5.Controller : Knob setStringValue(String)
+main.java.controlp5.Controller : Knob setUpdate(boolean)
+main.java.controlp5.Controller : Knob setValue(float)
+main.java.controlp5.Controller : Knob setValueLabel(String)
+main.java.controlp5.Controller : Knob setValueSelf(float)
+main.java.controlp5.Controller : Knob setView(ControllerView)
+main.java.controlp5.Controller : Knob setVisible(boolean)
+main.java.controlp5.Controller : Knob setWidth(int)
+main.java.controlp5.Controller : Knob show()
+main.java.controlp5.Controller : Knob unlock()
+main.java.controlp5.Controller : Knob unplugFrom(Object)
+main.java.controlp5.Controller : Knob unplugFrom(Object[])
+main.java.controlp5.Controller : Knob unregisterTooltip()
+main.java.controlp5.Controller : Knob update()
+main.java.controlp5.Controller : Knob updateSize()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Knob : Knob hideTickMarks()
+main.java.controlp5.Knob : Knob setAngleRange(float)
+main.java.controlp5.Knob : Knob setConstrained(boolean)
+main.java.controlp5.Knob : Knob setDragDirection(int)
+main.java.controlp5.Knob : Knob setMax(float)
+main.java.controlp5.Knob : Knob setMin(float)
+main.java.controlp5.Knob : Knob setNumberOfTickMarks(int)
+main.java.controlp5.Knob : Knob setRadius(float)
+main.java.controlp5.Knob : Knob setRange(float, float)
+main.java.controlp5.Knob : Knob setResolution(float)
+main.java.controlp5.Knob : Knob setScrollSensitivity(float)
+main.java.controlp5.Knob : Knob setShowAngleRange(boolean)
+main.java.controlp5.Knob : Knob setSize(int, int)
+main.java.controlp5.Knob : Knob setStartAngle(float)
+main.java.controlp5.Knob : Knob setTickMarkLength(int)
+main.java.controlp5.Knob : Knob setTickMarkWeight(float)
+main.java.controlp5.Knob : Knob setValue(float)
+main.java.controlp5.Knob : Knob setViewStyle(int)
+main.java.controlp5.Knob : Knob showTickMarks()
+main.java.controlp5.Knob : Knob shuffle()
+main.java.controlp5.Knob : Knob snapToTickMarks(boolean)
+main.java.controlp5.Knob : boolean isConstrained()
+main.java.controlp5.Knob : boolean isShowAngleRange()
+main.java.controlp5.Knob : boolean isShowTickMarks()
+main.java.controlp5.Knob : float getAngle()
+main.java.controlp5.Knob : float getAngleRange()
+main.java.controlp5.Knob : float getRadius()
+main.java.controlp5.Knob : float getResolution()
+main.java.controlp5.Knob : float getStartAngle()
+main.java.controlp5.Knob : float getTickMarkWeight()
+main.java.controlp5.Knob : float getValue()
+main.java.controlp5.Knob : int getDragDirection()
+main.java.controlp5.Knob : int getNumberOfTickMarks()
+main.java.controlp5.Knob : int getTickMarkLength()
+main.java.controlp5.Knob : int getViewStyle()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5listBox/ControlP5listBox.pde b/examples/controllers/ControlP5listBox/ControlP5listBox.pde
index f3cc80a..d719cd7 100644
--- a/examples/controllers/ControlP5listBox/ControlP5listBox.pde
+++ b/examples/controllers/ControlP5listBox/ControlP5listBox.pde
@@ -149,166 +149,166 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : ListBox addCallback(CallbackListener)
-controlP5.Controller : ListBox addListener(ControlListener)
-controlP5.Controller : ListBox addListenerFor(int, CallbackListener)
-controlP5.Controller : ListBox align(int, int, int, int)
-controlP5.Controller : ListBox bringToFront()
-controlP5.Controller : ListBox bringToFront(ControllerInterface)
-controlP5.Controller : ListBox hide()
-controlP5.Controller : ListBox linebreak()
-controlP5.Controller : ListBox listen(boolean)
-controlP5.Controller : ListBox lock()
-controlP5.Controller : ListBox onChange(CallbackListener)
-controlP5.Controller : ListBox onClick(CallbackListener)
-controlP5.Controller : ListBox onDoublePress(CallbackListener)
-controlP5.Controller : ListBox onDrag(CallbackListener)
-controlP5.Controller : ListBox onDraw(ControllerView)
-controlP5.Controller : ListBox onEndDrag(CallbackListener)
-controlP5.Controller : ListBox onEnter(CallbackListener)
-controlP5.Controller : ListBox onLeave(CallbackListener)
-controlP5.Controller : ListBox onMove(CallbackListener)
-controlP5.Controller : ListBox onPress(CallbackListener)
-controlP5.Controller : ListBox onRelease(CallbackListener)
-controlP5.Controller : ListBox onReleaseOutside(CallbackListener)
-controlP5.Controller : ListBox onStartDrag(CallbackListener)
-controlP5.Controller : ListBox onWheel(CallbackListener)
-controlP5.Controller : ListBox plugTo(Object)
-controlP5.Controller : ListBox plugTo(Object, String)
-controlP5.Controller : ListBox plugTo(Object[])
-controlP5.Controller : ListBox plugTo(Object[], String)
-controlP5.Controller : ListBox registerProperty(String)
-controlP5.Controller : ListBox registerProperty(String, String)
-controlP5.Controller : ListBox registerTooltip(String)
-controlP5.Controller : ListBox removeBehavior()
-controlP5.Controller : ListBox removeCallback()
-controlP5.Controller : ListBox removeCallback(CallbackListener)
-controlP5.Controller : ListBox removeListener(ControlListener)
-controlP5.Controller : ListBox removeListenerFor(int, CallbackListener)
-controlP5.Controller : ListBox removeListenersFor(int)
-controlP5.Controller : ListBox removeProperty(String)
-controlP5.Controller : ListBox removeProperty(String, String)
-controlP5.Controller : ListBox setArrayValue(float[])
-controlP5.Controller : ListBox setArrayValue(int, float)
-controlP5.Controller : ListBox setBehavior(ControlBehavior)
-controlP5.Controller : ListBox setBroadcast(boolean)
-controlP5.Controller : ListBox setCaptionLabel(String)
-controlP5.Controller : ListBox setColor(CColor)
-controlP5.Controller : ListBox setColorActive(int)
-controlP5.Controller : ListBox setColorBackground(int)
-controlP5.Controller : ListBox setColorCaptionLabel(int)
-controlP5.Controller : ListBox setColorForeground(int)
-controlP5.Controller : ListBox setColorLabel(int)
-controlP5.Controller : ListBox setColorValue(int)
-controlP5.Controller : ListBox setColorValueLabel(int)
-controlP5.Controller : ListBox setDecimalPrecision(int)
-controlP5.Controller : ListBox setDefaultValue(float)
-controlP5.Controller : ListBox setHeight(int)
-controlP5.Controller : ListBox setId(int)
-controlP5.Controller : ListBox setImage(PImage)
-controlP5.Controller : ListBox setImage(PImage, int)
-controlP5.Controller : ListBox setImages(PImage, PImage, PImage)
-controlP5.Controller : ListBox setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : ListBox setLabel(String)
-controlP5.Controller : ListBox setLabelVisible(boolean)
-controlP5.Controller : ListBox setLock(boolean)
-controlP5.Controller : ListBox setMax(float)
-controlP5.Controller : ListBox setMin(float)
-controlP5.Controller : ListBox setMouseOver(boolean)
-controlP5.Controller : ListBox setMoveable(boolean)
-controlP5.Controller : ListBox setPosition(float, float)
-controlP5.Controller : ListBox setPosition(float[])
-controlP5.Controller : ListBox setSize(PImage)
-controlP5.Controller : ListBox setSize(int, int)
-controlP5.Controller : ListBox setStringValue(String)
-controlP5.Controller : ListBox setUpdate(boolean)
-controlP5.Controller : ListBox setValue(float)
-controlP5.Controller : ListBox setValueLabel(String)
-controlP5.Controller : ListBox setValueSelf(float)
-controlP5.Controller : ListBox setView(ControllerView)
-controlP5.Controller : ListBox setVisible(boolean)
-controlP5.Controller : ListBox setWidth(int)
-controlP5.Controller : ListBox show()
-controlP5.Controller : ListBox unlock()
-controlP5.Controller : ListBox unplugFrom(Object)
-controlP5.Controller : ListBox unplugFrom(Object[])
-controlP5.Controller : ListBox unregisterTooltip()
-controlP5.Controller : ListBox update()
-controlP5.Controller : ListBox updateSize()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.ListBox : List getItems()
-controlP5.ListBox : ListBox addItem(String, Object)
-controlP5.ListBox : ListBox addItems(List)
-controlP5.ListBox : ListBox addItems(Map)
-controlP5.ListBox : ListBox addItems(String[])
-controlP5.ListBox : ListBox clear()
-controlP5.ListBox : ListBox close()
-controlP5.ListBox : ListBox open()
-controlP5.ListBox : ListBox removeItem(String)
-controlP5.ListBox : ListBox removeItems(List)
-controlP5.ListBox : ListBox setBackgroundColor(int)
-controlP5.ListBox : ListBox setBarHeight(int)
-controlP5.ListBox : ListBox setBarVisible(boolean)
-controlP5.ListBox : ListBox setItemHeight(int)
-controlP5.ListBox : ListBox setItems(List)
-controlP5.ListBox : ListBox setItems(Map)
-controlP5.ListBox : ListBox setItems(String[])
-controlP5.ListBox : ListBox setOpen(boolean)
-controlP5.ListBox : ListBox setScrollSensitivity(float)
-controlP5.ListBox : ListBox setType(int)
-controlP5.ListBox : Map getItem(String)
-controlP5.ListBox : Map getItem(int)
-controlP5.ListBox : boolean isBarVisible()
-controlP5.ListBox : boolean isOpen()
-controlP5.ListBox : int getBackgroundColor()
-controlP5.ListBox : int getBarHeight()
-controlP5.ListBox : int getHeight()
-controlP5.ListBox : void controlEvent(ControlEvent)
-controlP5.ListBox : void keyEvent(KeyEvent)
-controlP5.ListBox : void setDirection(int)
-controlP5.ListBox : void updateItemIndexOffset()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : ListBox addCallback(CallbackListener)
+main.java.controlp5.Controller : ListBox addListener(ControlListener)
+main.java.controlp5.Controller : ListBox addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : ListBox align(int, int, int, int)
+main.java.controlp5.Controller : ListBox bringToFront()
+main.java.controlp5.Controller : ListBox bringToFront(ControllerInterface)
+main.java.controlp5.Controller : ListBox hide()
+main.java.controlp5.Controller : ListBox linebreak()
+main.java.controlp5.Controller : ListBox listen(boolean)
+main.java.controlp5.Controller : ListBox lock()
+main.java.controlp5.Controller : ListBox onChange(CallbackListener)
+main.java.controlp5.Controller : ListBox onClick(CallbackListener)
+main.java.controlp5.Controller : ListBox onDoublePress(CallbackListener)
+main.java.controlp5.Controller : ListBox onDrag(CallbackListener)
+main.java.controlp5.Controller : ListBox onDraw(ControllerView)
+main.java.controlp5.Controller : ListBox onEndDrag(CallbackListener)
+main.java.controlp5.Controller : ListBox onEnter(CallbackListener)
+main.java.controlp5.Controller : ListBox onLeave(CallbackListener)
+main.java.controlp5.Controller : ListBox onMove(CallbackListener)
+main.java.controlp5.Controller : ListBox onPress(CallbackListener)
+main.java.controlp5.Controller : ListBox onRelease(CallbackListener)
+main.java.controlp5.Controller : ListBox onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : ListBox onStartDrag(CallbackListener)
+main.java.controlp5.Controller : ListBox onWheel(CallbackListener)
+main.java.controlp5.Controller : ListBox plugTo(Object)
+main.java.controlp5.Controller : ListBox plugTo(Object, String)
+main.java.controlp5.Controller : ListBox plugTo(Object[])
+main.java.controlp5.Controller : ListBox plugTo(Object[], String)
+main.java.controlp5.Controller : ListBox registerProperty(String)
+main.java.controlp5.Controller : ListBox registerProperty(String, String)
+main.java.controlp5.Controller : ListBox registerTooltip(String)
+main.java.controlp5.Controller : ListBox removeBehavior()
+main.java.controlp5.Controller : ListBox removeCallback()
+main.java.controlp5.Controller : ListBox removeCallback(CallbackListener)
+main.java.controlp5.Controller : ListBox removeListener(ControlListener)
+main.java.controlp5.Controller : ListBox removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : ListBox removeListenersFor(int)
+main.java.controlp5.Controller : ListBox removeProperty(String)
+main.java.controlp5.Controller : ListBox removeProperty(String, String)
+main.java.controlp5.Controller : ListBox setArrayValue(float[])
+main.java.controlp5.Controller : ListBox setArrayValue(int, float)
+main.java.controlp5.Controller : ListBox setBehavior(ControlBehavior)
+main.java.controlp5.Controller : ListBox setBroadcast(boolean)
+main.java.controlp5.Controller : ListBox setCaptionLabel(String)
+main.java.controlp5.Controller : ListBox setColor(CColor)
+main.java.controlp5.Controller : ListBox setColorActive(int)
+main.java.controlp5.Controller : ListBox setColorBackground(int)
+main.java.controlp5.Controller : ListBox setColorCaptionLabel(int)
+main.java.controlp5.Controller : ListBox setColorForeground(int)
+main.java.controlp5.Controller : ListBox setColorLabel(int)
+main.java.controlp5.Controller : ListBox setColorValue(int)
+main.java.controlp5.Controller : ListBox setColorValueLabel(int)
+main.java.controlp5.Controller : ListBox setDecimalPrecision(int)
+main.java.controlp5.Controller : ListBox setDefaultValue(float)
+main.java.controlp5.Controller : ListBox setHeight(int)
+main.java.controlp5.Controller : ListBox setId(int)
+main.java.controlp5.Controller : ListBox setImage(PImage)
+main.java.controlp5.Controller : ListBox setImage(PImage, int)
+main.java.controlp5.Controller : ListBox setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : ListBox setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : ListBox setLabel(String)
+main.java.controlp5.Controller : ListBox setLabelVisible(boolean)
+main.java.controlp5.Controller : ListBox setLock(boolean)
+main.java.controlp5.Controller : ListBox setMax(float)
+main.java.controlp5.Controller : ListBox setMin(float)
+main.java.controlp5.Controller : ListBox setMouseOver(boolean)
+main.java.controlp5.Controller : ListBox setMoveable(boolean)
+main.java.controlp5.Controller : ListBox setPosition(float, float)
+main.java.controlp5.Controller : ListBox setPosition(float[])
+main.java.controlp5.Controller : ListBox setSize(PImage)
+main.java.controlp5.Controller : ListBox setSize(int, int)
+main.java.controlp5.Controller : ListBox setStringValue(String)
+main.java.controlp5.Controller : ListBox setUpdate(boolean)
+main.java.controlp5.Controller : ListBox setValue(float)
+main.java.controlp5.Controller : ListBox setValueLabel(String)
+main.java.controlp5.Controller : ListBox setValueSelf(float)
+main.java.controlp5.Controller : ListBox setView(ControllerView)
+main.java.controlp5.Controller : ListBox setVisible(boolean)
+main.java.controlp5.Controller : ListBox setWidth(int)
+main.java.controlp5.Controller : ListBox show()
+main.java.controlp5.Controller : ListBox unlock()
+main.java.controlp5.Controller : ListBox unplugFrom(Object)
+main.java.controlp5.Controller : ListBox unplugFrom(Object[])
+main.java.controlp5.Controller : ListBox unregisterTooltip()
+main.java.controlp5.Controller : ListBox update()
+main.java.controlp5.Controller : ListBox updateSize()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.ListBox : List getItems()
+main.java.controlp5.ListBox : ListBox addItem(String, Object)
+main.java.controlp5.ListBox : ListBox addItems(List)
+main.java.controlp5.ListBox : ListBox addItems(Map)
+main.java.controlp5.ListBox : ListBox addItems(String[])
+main.java.controlp5.ListBox : ListBox clear()
+main.java.controlp5.ListBox : ListBox close()
+main.java.controlp5.ListBox : ListBox open()
+main.java.controlp5.ListBox : ListBox removeItem(String)
+main.java.controlp5.ListBox : ListBox removeItems(List)
+main.java.controlp5.ListBox : ListBox setBackgroundColor(int)
+main.java.controlp5.ListBox : ListBox setBarHeight(int)
+main.java.controlp5.ListBox : ListBox setBarVisible(boolean)
+main.java.controlp5.ListBox : ListBox setItemHeight(int)
+main.java.controlp5.ListBox : ListBox setItems(List)
+main.java.controlp5.ListBox : ListBox setItems(Map)
+main.java.controlp5.ListBox : ListBox setItems(String[])
+main.java.controlp5.ListBox : ListBox setOpen(boolean)
+main.java.controlp5.ListBox : ListBox setScrollSensitivity(float)
+main.java.controlp5.ListBox : ListBox setType(int)
+main.java.controlp5.ListBox : Map getItem(String)
+main.java.controlp5.ListBox : Map getItem(int)
+main.java.controlp5.ListBox : boolean isBarVisible()
+main.java.controlp5.ListBox : boolean isOpen()
+main.java.controlp5.ListBox : int getBackgroundColor()
+main.java.controlp5.ListBox : int getBarHeight()
+main.java.controlp5.ListBox : int getHeight()
+main.java.controlp5.ListBox : void controlEvent(ControlEvent)
+main.java.controlp5.ListBox : void keyEvent(KeyEvent)
+main.java.controlp5.ListBox : void setDirection(int)
+main.java.controlp5.ListBox : void updateItemIndexOffset()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5matrix/ControlP5matrix.pde b/examples/controllers/ControlP5matrix/ControlP5matrix.pde
index cdd0628..1448763 100644
--- a/examples/controllers/ControlP5matrix/ControlP5matrix.pde
+++ b/examples/controllers/ControlP5matrix/ControlP5matrix.pde
@@ -135,157 +135,157 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Matrix addCallback(CallbackListener)
-controlP5.Controller : Matrix addListener(ControlListener)
-controlP5.Controller : Matrix addListenerFor(int, CallbackListener)
-controlP5.Controller : Matrix align(int, int, int, int)
-controlP5.Controller : Matrix bringToFront()
-controlP5.Controller : Matrix bringToFront(ControllerInterface)
-controlP5.Controller : Matrix hide()
-controlP5.Controller : Matrix linebreak()
-controlP5.Controller : Matrix listen(boolean)
-controlP5.Controller : Matrix lock()
-controlP5.Controller : Matrix onChange(CallbackListener)
-controlP5.Controller : Matrix onClick(CallbackListener)
-controlP5.Controller : Matrix onDoublePress(CallbackListener)
-controlP5.Controller : Matrix onDrag(CallbackListener)
-controlP5.Controller : Matrix onDraw(ControllerView)
-controlP5.Controller : Matrix onEndDrag(CallbackListener)
-controlP5.Controller : Matrix onEnter(CallbackListener)
-controlP5.Controller : Matrix onLeave(CallbackListener)
-controlP5.Controller : Matrix onMove(CallbackListener)
-controlP5.Controller : Matrix onPress(CallbackListener)
-controlP5.Controller : Matrix onRelease(CallbackListener)
-controlP5.Controller : Matrix onReleaseOutside(CallbackListener)
-controlP5.Controller : Matrix onStartDrag(CallbackListener)
-controlP5.Controller : Matrix onWheel(CallbackListener)
-controlP5.Controller : Matrix plugTo(Object)
-controlP5.Controller : Matrix plugTo(Object, String)
-controlP5.Controller : Matrix plugTo(Object[])
-controlP5.Controller : Matrix plugTo(Object[], String)
-controlP5.Controller : Matrix registerProperty(String)
-controlP5.Controller : Matrix registerProperty(String, String)
-controlP5.Controller : Matrix registerTooltip(String)
-controlP5.Controller : Matrix removeBehavior()
-controlP5.Controller : Matrix removeCallback()
-controlP5.Controller : Matrix removeCallback(CallbackListener)
-controlP5.Controller : Matrix removeListener(ControlListener)
-controlP5.Controller : Matrix removeListenerFor(int, CallbackListener)
-controlP5.Controller : Matrix removeListenersFor(int)
-controlP5.Controller : Matrix removeProperty(String)
-controlP5.Controller : Matrix removeProperty(String, String)
-controlP5.Controller : Matrix setArrayValue(float[])
-controlP5.Controller : Matrix setArrayValue(int, float)
-controlP5.Controller : Matrix setBehavior(ControlBehavior)
-controlP5.Controller : Matrix setBroadcast(boolean)
-controlP5.Controller : Matrix setCaptionLabel(String)
-controlP5.Controller : Matrix setColor(CColor)
-controlP5.Controller : Matrix setColorActive(int)
-controlP5.Controller : Matrix setColorBackground(int)
-controlP5.Controller : Matrix setColorCaptionLabel(int)
-controlP5.Controller : Matrix setColorForeground(int)
-controlP5.Controller : Matrix setColorLabel(int)
-controlP5.Controller : Matrix setColorValue(int)
-controlP5.Controller : Matrix setColorValueLabel(int)
-controlP5.Controller : Matrix setDecimalPrecision(int)
-controlP5.Controller : Matrix setDefaultValue(float)
-controlP5.Controller : Matrix setHeight(int)
-controlP5.Controller : Matrix setId(int)
-controlP5.Controller : Matrix setImage(PImage)
-controlP5.Controller : Matrix setImage(PImage, int)
-controlP5.Controller : Matrix setImages(PImage, PImage, PImage)
-controlP5.Controller : Matrix setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Matrix setLabel(String)
-controlP5.Controller : Matrix setLabelVisible(boolean)
-controlP5.Controller : Matrix setLock(boolean)
-controlP5.Controller : Matrix setMax(float)
-controlP5.Controller : Matrix setMin(float)
-controlP5.Controller : Matrix setMouseOver(boolean)
-controlP5.Controller : Matrix setMoveable(boolean)
-controlP5.Controller : Matrix setPosition(float, float)
-controlP5.Controller : Matrix setPosition(float[])
-controlP5.Controller : Matrix setSize(PImage)
-controlP5.Controller : Matrix setSize(int, int)
-controlP5.Controller : Matrix setStringValue(String)
-controlP5.Controller : Matrix setUpdate(boolean)
-controlP5.Controller : Matrix setValue(float)
-controlP5.Controller : Matrix setValueLabel(String)
-controlP5.Controller : Matrix setValueSelf(float)
-controlP5.Controller : Matrix setView(ControllerView)
-controlP5.Controller : Matrix setVisible(boolean)
-controlP5.Controller : Matrix setWidth(int)
-controlP5.Controller : Matrix show()
-controlP5.Controller : Matrix unlock()
-controlP5.Controller : Matrix unplugFrom(Object)
-controlP5.Controller : Matrix unplugFrom(Object[])
-controlP5.Controller : Matrix unregisterTooltip()
-controlP5.Controller : Matrix update()
-controlP5.Controller : Matrix updateSize()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.Matrix : Matrix clear()
-controlP5.Matrix : Matrix pause()
-controlP5.Matrix : Matrix play()
-controlP5.Matrix : Matrix plugTo(Object)
-controlP5.Matrix : Matrix plugTo(Object, String)
-controlP5.Matrix : Matrix set(int, int, boolean)
-controlP5.Matrix : Matrix setBackground(int)
-controlP5.Matrix : Matrix setCells(int[][])
-controlP5.Matrix : Matrix setGap(int, int)
-controlP5.Matrix : Matrix setGrid(int, int)
-controlP5.Matrix : Matrix setInterval(int)
-controlP5.Matrix : Matrix setMode(int)
-controlP5.Matrix : Matrix setValue(float)
-controlP5.Matrix : Matrix stop()
-controlP5.Matrix : Matrix trigger(int)
-controlP5.Matrix : Matrix update()
-controlP5.Matrix : boolean get(int, int)
-controlP5.Matrix : boolean isPlaying()
-controlP5.Matrix : int getInterval()
-controlP5.Matrix : int getMode()
-controlP5.Matrix : int[][] getCells()
-controlP5.Matrix : void remove()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Matrix addCallback(CallbackListener)
+main.java.controlp5.Controller : Matrix addListener(ControlListener)
+main.java.controlp5.Controller : Matrix addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Matrix align(int, int, int, int)
+main.java.controlp5.Controller : Matrix bringToFront()
+main.java.controlp5.Controller : Matrix bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Matrix hide()
+main.java.controlp5.Controller : Matrix linebreak()
+main.java.controlp5.Controller : Matrix listen(boolean)
+main.java.controlp5.Controller : Matrix lock()
+main.java.controlp5.Controller : Matrix onChange(CallbackListener)
+main.java.controlp5.Controller : Matrix onClick(CallbackListener)
+main.java.controlp5.Controller : Matrix onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Matrix onDrag(CallbackListener)
+main.java.controlp5.Controller : Matrix onDraw(ControllerView)
+main.java.controlp5.Controller : Matrix onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Matrix onEnter(CallbackListener)
+main.java.controlp5.Controller : Matrix onLeave(CallbackListener)
+main.java.controlp5.Controller : Matrix onMove(CallbackListener)
+main.java.controlp5.Controller : Matrix onPress(CallbackListener)
+main.java.controlp5.Controller : Matrix onRelease(CallbackListener)
+main.java.controlp5.Controller : Matrix onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Matrix onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Matrix onWheel(CallbackListener)
+main.java.controlp5.Controller : Matrix plugTo(Object)
+main.java.controlp5.Controller : Matrix plugTo(Object, String)
+main.java.controlp5.Controller : Matrix plugTo(Object[])
+main.java.controlp5.Controller : Matrix plugTo(Object[], String)
+main.java.controlp5.Controller : Matrix registerProperty(String)
+main.java.controlp5.Controller : Matrix registerProperty(String, String)
+main.java.controlp5.Controller : Matrix registerTooltip(String)
+main.java.controlp5.Controller : Matrix removeBehavior()
+main.java.controlp5.Controller : Matrix removeCallback()
+main.java.controlp5.Controller : Matrix removeCallback(CallbackListener)
+main.java.controlp5.Controller : Matrix removeListener(ControlListener)
+main.java.controlp5.Controller : Matrix removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Matrix removeListenersFor(int)
+main.java.controlp5.Controller : Matrix removeProperty(String)
+main.java.controlp5.Controller : Matrix removeProperty(String, String)
+main.java.controlp5.Controller : Matrix setArrayValue(float[])
+main.java.controlp5.Controller : Matrix setArrayValue(int, float)
+main.java.controlp5.Controller : Matrix setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Matrix setBroadcast(boolean)
+main.java.controlp5.Controller : Matrix setCaptionLabel(String)
+main.java.controlp5.Controller : Matrix setColor(CColor)
+main.java.controlp5.Controller : Matrix setColorActive(int)
+main.java.controlp5.Controller : Matrix setColorBackground(int)
+main.java.controlp5.Controller : Matrix setColorCaptionLabel(int)
+main.java.controlp5.Controller : Matrix setColorForeground(int)
+main.java.controlp5.Controller : Matrix setColorLabel(int)
+main.java.controlp5.Controller : Matrix setColorValue(int)
+main.java.controlp5.Controller : Matrix setColorValueLabel(int)
+main.java.controlp5.Controller : Matrix setDecimalPrecision(int)
+main.java.controlp5.Controller : Matrix setDefaultValue(float)
+main.java.controlp5.Controller : Matrix setHeight(int)
+main.java.controlp5.Controller : Matrix setId(int)
+main.java.controlp5.Controller : Matrix setImage(PImage)
+main.java.controlp5.Controller : Matrix setImage(PImage, int)
+main.java.controlp5.Controller : Matrix setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Matrix setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Matrix setLabel(String)
+main.java.controlp5.Controller : Matrix setLabelVisible(boolean)
+main.java.controlp5.Controller : Matrix setLock(boolean)
+main.java.controlp5.Controller : Matrix setMax(float)
+main.java.controlp5.Controller : Matrix setMin(float)
+main.java.controlp5.Controller : Matrix setMouseOver(boolean)
+main.java.controlp5.Controller : Matrix setMoveable(boolean)
+main.java.controlp5.Controller : Matrix setPosition(float, float)
+main.java.controlp5.Controller : Matrix setPosition(float[])
+main.java.controlp5.Controller : Matrix setSize(PImage)
+main.java.controlp5.Controller : Matrix setSize(int, int)
+main.java.controlp5.Controller : Matrix setStringValue(String)
+main.java.controlp5.Controller : Matrix setUpdate(boolean)
+main.java.controlp5.Controller : Matrix setValue(float)
+main.java.controlp5.Controller : Matrix setValueLabel(String)
+main.java.controlp5.Controller : Matrix setValueSelf(float)
+main.java.controlp5.Controller : Matrix setView(ControllerView)
+main.java.controlp5.Controller : Matrix setVisible(boolean)
+main.java.controlp5.Controller : Matrix setWidth(int)
+main.java.controlp5.Controller : Matrix show()
+main.java.controlp5.Controller : Matrix unlock()
+main.java.controlp5.Controller : Matrix unplugFrom(Object)
+main.java.controlp5.Controller : Matrix unplugFrom(Object[])
+main.java.controlp5.Controller : Matrix unregisterTooltip()
+main.java.controlp5.Controller : Matrix update()
+main.java.controlp5.Controller : Matrix updateSize()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Matrix : Matrix clear()
+main.java.controlp5.Matrix : Matrix pause()
+main.java.controlp5.Matrix : Matrix play()
+main.java.controlp5.Matrix : Matrix plugTo(Object)
+main.java.controlp5.Matrix : Matrix plugTo(Object, String)
+main.java.controlp5.Matrix : Matrix set(int, int, boolean)
+main.java.controlp5.Matrix : Matrix setBackground(int)
+main.java.controlp5.Matrix : Matrix setCells(int[][])
+main.java.controlp5.Matrix : Matrix setGap(int, int)
+main.java.controlp5.Matrix : Matrix setGrid(int, int)
+main.java.controlp5.Matrix : Matrix setInterval(int)
+main.java.controlp5.Matrix : Matrix setMode(int)
+main.java.controlp5.Matrix : Matrix setValue(float)
+main.java.controlp5.Matrix : Matrix stop()
+main.java.controlp5.Matrix : Matrix trigger(int)
+main.java.controlp5.Matrix : Matrix update()
+main.java.controlp5.Matrix : boolean get(int, int)
+main.java.controlp5.Matrix : boolean isPlaying()
+main.java.controlp5.Matrix : int getInterval()
+main.java.controlp5.Matrix : int getMode()
+main.java.controlp5.Matrix : int[][] getCells()
+main.java.controlp5.Matrix : void remove()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5numberbox/ControlP5numberbox.pde b/examples/controllers/ControlP5numberbox/ControlP5numberbox.pde
index cc84d09..82cc3a1 100644
--- a/examples/controllers/ControlP5numberbox/ControlP5numberbox.pde
+++ b/examples/controllers/ControlP5numberbox/ControlP5numberbox.pde
@@ -66,144 +66,144 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Numberbox addCallback(CallbackListener)
-controlP5.Controller : Numberbox addListener(ControlListener)
-controlP5.Controller : Numberbox addListenerFor(int, CallbackListener)
-controlP5.Controller : Numberbox align(int, int, int, int)
-controlP5.Controller : Numberbox bringToFront()
-controlP5.Controller : Numberbox bringToFront(ControllerInterface)
-controlP5.Controller : Numberbox hide()
-controlP5.Controller : Numberbox linebreak()
-controlP5.Controller : Numberbox listen(boolean)
-controlP5.Controller : Numberbox lock()
-controlP5.Controller : Numberbox onChange(CallbackListener)
-controlP5.Controller : Numberbox onClick(CallbackListener)
-controlP5.Controller : Numberbox onDoublePress(CallbackListener)
-controlP5.Controller : Numberbox onDrag(CallbackListener)
-controlP5.Controller : Numberbox onDraw(ControllerView)
-controlP5.Controller : Numberbox onEndDrag(CallbackListener)
-controlP5.Controller : Numberbox onEnter(CallbackListener)
-controlP5.Controller : Numberbox onLeave(CallbackListener)
-controlP5.Controller : Numberbox onMove(CallbackListener)
-controlP5.Controller : Numberbox onPress(CallbackListener)
-controlP5.Controller : Numberbox onRelease(CallbackListener)
-controlP5.Controller : Numberbox onReleaseOutside(CallbackListener)
-controlP5.Controller : Numberbox onStartDrag(CallbackListener)
-controlP5.Controller : Numberbox onWheel(CallbackListener)
-controlP5.Controller : Numberbox plugTo(Object)
-controlP5.Controller : Numberbox plugTo(Object, String)
-controlP5.Controller : Numberbox plugTo(Object[])
-controlP5.Controller : Numberbox plugTo(Object[], String)
-controlP5.Controller : Numberbox registerProperty(String)
-controlP5.Controller : Numberbox registerProperty(String, String)
-controlP5.Controller : Numberbox registerTooltip(String)
-controlP5.Controller : Numberbox removeBehavior()
-controlP5.Controller : Numberbox removeCallback()
-controlP5.Controller : Numberbox removeCallback(CallbackListener)
-controlP5.Controller : Numberbox removeListener(ControlListener)
-controlP5.Controller : Numberbox removeListenerFor(int, CallbackListener)
-controlP5.Controller : Numberbox removeListenersFor(int)
-controlP5.Controller : Numberbox removeProperty(String)
-controlP5.Controller : Numberbox removeProperty(String, String)
-controlP5.Controller : Numberbox setArrayValue(float[])
-controlP5.Controller : Numberbox setArrayValue(int, float)
-controlP5.Controller : Numberbox setBehavior(ControlBehavior)
-controlP5.Controller : Numberbox setBroadcast(boolean)
-controlP5.Controller : Numberbox setCaptionLabel(String)
-controlP5.Controller : Numberbox setColor(CColor)
-controlP5.Controller : Numberbox setColorActive(int)
-controlP5.Controller : Numberbox setColorBackground(int)
-controlP5.Controller : Numberbox setColorCaptionLabel(int)
-controlP5.Controller : Numberbox setColorForeground(int)
-controlP5.Controller : Numberbox setColorLabel(int)
-controlP5.Controller : Numberbox setColorValue(int)
-controlP5.Controller : Numberbox setColorValueLabel(int)
-controlP5.Controller : Numberbox setDecimalPrecision(int)
-controlP5.Controller : Numberbox setDefaultValue(float)
-controlP5.Controller : Numberbox setHeight(int)
-controlP5.Controller : Numberbox setId(int)
-controlP5.Controller : Numberbox setImage(PImage)
-controlP5.Controller : Numberbox setImage(PImage, int)
-controlP5.Controller : Numberbox setImages(PImage, PImage, PImage)
-controlP5.Controller : Numberbox setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Numberbox setLabel(String)
-controlP5.Controller : Numberbox setLabelVisible(boolean)
-controlP5.Controller : Numberbox setLock(boolean)
-controlP5.Controller : Numberbox setMax(float)
-controlP5.Controller : Numberbox setMin(float)
-controlP5.Controller : Numberbox setMouseOver(boolean)
-controlP5.Controller : Numberbox setMoveable(boolean)
-controlP5.Controller : Numberbox setPosition(float, float)
-controlP5.Controller : Numberbox setPosition(float[])
-controlP5.Controller : Numberbox setSize(PImage)
-controlP5.Controller : Numberbox setSize(int, int)
-controlP5.Controller : Numberbox setStringValue(String)
-controlP5.Controller : Numberbox setUpdate(boolean)
-controlP5.Controller : Numberbox setValue(float)
-controlP5.Controller : Numberbox setValueLabel(String)
-controlP5.Controller : Numberbox setValueSelf(float)
-controlP5.Controller : Numberbox setView(ControllerView)
-controlP5.Controller : Numberbox setVisible(boolean)
-controlP5.Controller : Numberbox setWidth(int)
-controlP5.Controller : Numberbox show()
-controlP5.Controller : Numberbox unlock()
-controlP5.Controller : Numberbox unplugFrom(Object)
-controlP5.Controller : Numberbox unplugFrom(Object[])
-controlP5.Controller : Numberbox unregisterTooltip()
-controlP5.Controller : Numberbox update()
-controlP5.Controller : Numberbox updateSize()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.Numberbox : Numberbox linebreak()
-controlP5.Numberbox : Numberbox setDirection(int)
-controlP5.Numberbox : Numberbox setMultiplier(float)
-controlP5.Numberbox : Numberbox setRange(float, float)
-controlP5.Numberbox : Numberbox setScrollSensitivity(float)
-controlP5.Numberbox : Numberbox setValue(float)
-controlP5.Numberbox : Numberbox shuffle()
-controlP5.Numberbox : Numberbox update()
-controlP5.Numberbox : float getMultiplier()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Numberbox addCallback(CallbackListener)
+main.java.controlp5.Controller : Numberbox addListener(ControlListener)
+main.java.controlp5.Controller : Numberbox addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Numberbox align(int, int, int, int)
+main.java.controlp5.Controller : Numberbox bringToFront()
+main.java.controlp5.Controller : Numberbox bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Numberbox hide()
+main.java.controlp5.Controller : Numberbox linebreak()
+main.java.controlp5.Controller : Numberbox listen(boolean)
+main.java.controlp5.Controller : Numberbox lock()
+main.java.controlp5.Controller : Numberbox onChange(CallbackListener)
+main.java.controlp5.Controller : Numberbox onClick(CallbackListener)
+main.java.controlp5.Controller : Numberbox onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Numberbox onDrag(CallbackListener)
+main.java.controlp5.Controller : Numberbox onDraw(ControllerView)
+main.java.controlp5.Controller : Numberbox onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Numberbox onEnter(CallbackListener)
+main.java.controlp5.Controller : Numberbox onLeave(CallbackListener)
+main.java.controlp5.Controller : Numberbox onMove(CallbackListener)
+main.java.controlp5.Controller : Numberbox onPress(CallbackListener)
+main.java.controlp5.Controller : Numberbox onRelease(CallbackListener)
+main.java.controlp5.Controller : Numberbox onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Numberbox onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Numberbox onWheel(CallbackListener)
+main.java.controlp5.Controller : Numberbox plugTo(Object)
+main.java.controlp5.Controller : Numberbox plugTo(Object, String)
+main.java.controlp5.Controller : Numberbox plugTo(Object[])
+main.java.controlp5.Controller : Numberbox plugTo(Object[], String)
+main.java.controlp5.Controller : Numberbox registerProperty(String)
+main.java.controlp5.Controller : Numberbox registerProperty(String, String)
+main.java.controlp5.Controller : Numberbox registerTooltip(String)
+main.java.controlp5.Controller : Numberbox removeBehavior()
+main.java.controlp5.Controller : Numberbox removeCallback()
+main.java.controlp5.Controller : Numberbox removeCallback(CallbackListener)
+main.java.controlp5.Controller : Numberbox removeListener(ControlListener)
+main.java.controlp5.Controller : Numberbox removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Numberbox removeListenersFor(int)
+main.java.controlp5.Controller : Numberbox removeProperty(String)
+main.java.controlp5.Controller : Numberbox removeProperty(String, String)
+main.java.controlp5.Controller : Numberbox setArrayValue(float[])
+main.java.controlp5.Controller : Numberbox setArrayValue(int, float)
+main.java.controlp5.Controller : Numberbox setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Numberbox setBroadcast(boolean)
+main.java.controlp5.Controller : Numberbox setCaptionLabel(String)
+main.java.controlp5.Controller : Numberbox setColor(CColor)
+main.java.controlp5.Controller : Numberbox setColorActive(int)
+main.java.controlp5.Controller : Numberbox setColorBackground(int)
+main.java.controlp5.Controller : Numberbox setColorCaptionLabel(int)
+main.java.controlp5.Controller : Numberbox setColorForeground(int)
+main.java.controlp5.Controller : Numberbox setColorLabel(int)
+main.java.controlp5.Controller : Numberbox setColorValue(int)
+main.java.controlp5.Controller : Numberbox setColorValueLabel(int)
+main.java.controlp5.Controller : Numberbox setDecimalPrecision(int)
+main.java.controlp5.Controller : Numberbox setDefaultValue(float)
+main.java.controlp5.Controller : Numberbox setHeight(int)
+main.java.controlp5.Controller : Numberbox setId(int)
+main.java.controlp5.Controller : Numberbox setImage(PImage)
+main.java.controlp5.Controller : Numberbox setImage(PImage, int)
+main.java.controlp5.Controller : Numberbox setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Numberbox setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Numberbox setLabel(String)
+main.java.controlp5.Controller : Numberbox setLabelVisible(boolean)
+main.java.controlp5.Controller : Numberbox setLock(boolean)
+main.java.controlp5.Controller : Numberbox setMax(float)
+main.java.controlp5.Controller : Numberbox setMin(float)
+main.java.controlp5.Controller : Numberbox setMouseOver(boolean)
+main.java.controlp5.Controller : Numberbox setMoveable(boolean)
+main.java.controlp5.Controller : Numberbox setPosition(float, float)
+main.java.controlp5.Controller : Numberbox setPosition(float[])
+main.java.controlp5.Controller : Numberbox setSize(PImage)
+main.java.controlp5.Controller : Numberbox setSize(int, int)
+main.java.controlp5.Controller : Numberbox setStringValue(String)
+main.java.controlp5.Controller : Numberbox setUpdate(boolean)
+main.java.controlp5.Controller : Numberbox setValue(float)
+main.java.controlp5.Controller : Numberbox setValueLabel(String)
+main.java.controlp5.Controller : Numberbox setValueSelf(float)
+main.java.controlp5.Controller : Numberbox setView(ControllerView)
+main.java.controlp5.Controller : Numberbox setVisible(boolean)
+main.java.controlp5.Controller : Numberbox setWidth(int)
+main.java.controlp5.Controller : Numberbox show()
+main.java.controlp5.Controller : Numberbox unlock()
+main.java.controlp5.Controller : Numberbox unplugFrom(Object)
+main.java.controlp5.Controller : Numberbox unplugFrom(Object[])
+main.java.controlp5.Controller : Numberbox unregisterTooltip()
+main.java.controlp5.Controller : Numberbox update()
+main.java.controlp5.Controller : Numberbox updateSize()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Numberbox : Numberbox linebreak()
+main.java.controlp5.Numberbox : Numberbox setDirection(int)
+main.java.controlp5.Numberbox : Numberbox setMultiplier(float)
+main.java.controlp5.Numberbox : Numberbox setRange(float, float)
+main.java.controlp5.Numberbox : Numberbox setScrollSensitivity(float)
+main.java.controlp5.Numberbox : Numberbox setValue(float)
+main.java.controlp5.Numberbox : Numberbox shuffle()
+main.java.controlp5.Numberbox : Numberbox update()
+main.java.controlp5.Numberbox : float getMultiplier()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5radioButton/ControlP5radioButton.pde b/examples/controllers/ControlP5radioButton/ControlP5radioButton.pde
index 9777072..2458f17 100644
--- a/examples/controllers/ControlP5radioButton/ControlP5radioButton.pde
+++ b/examples/controllers/ControlP5radioButton/ControlP5radioButton.pde
@@ -92,142 +92,142 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControlGroup : RadioButton activateEvent(boolean)
-controlP5.ControlGroup : RadioButton addListener(ControlListener)
-controlP5.ControlGroup : RadioButton removeListener(ControlListener)
-controlP5.ControlGroup : RadioButton setBackgroundColor(int)
-controlP5.ControlGroup : RadioButton setBackgroundHeight(int)
-controlP5.ControlGroup : RadioButton setBarHeight(int)
-controlP5.ControlGroup : RadioButton setSize(int, int)
-controlP5.ControlGroup : RadioButton updateInternalEvents(PApplet)
-controlP5.ControlGroup : String getInfo()
-controlP5.ControlGroup : String toString()
-controlP5.ControlGroup : int getBackgroundHeight()
-controlP5.ControlGroup : int getBarHeight()
-controlP5.ControlGroup : int listenerSize()
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : Canvas addCanvas(Canvas)
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : RadioButton add(ControllerInterface)
-controlP5.ControllerGroup : RadioButton addListener(ControlListener)
-controlP5.ControllerGroup : RadioButton bringToFront()
-controlP5.ControllerGroup : RadioButton bringToFront(ControllerInterface)
-controlP5.ControllerGroup : RadioButton close()
-controlP5.ControllerGroup : RadioButton disableCollapse()
-controlP5.ControllerGroup : RadioButton enableCollapse()
-controlP5.ControllerGroup : RadioButton hide()
-controlP5.ControllerGroup : RadioButton hideArrow()
-controlP5.ControllerGroup : RadioButton hideBar()
-controlP5.ControllerGroup : RadioButton moveTo(ControlWindow)
-controlP5.ControllerGroup : RadioButton moveTo(PApplet)
-controlP5.ControllerGroup : RadioButton open()
-controlP5.ControllerGroup : RadioButton registerProperty(String)
-controlP5.ControllerGroup : RadioButton registerProperty(String, String)
-controlP5.ControllerGroup : RadioButton remove(CDrawable)
-controlP5.ControllerGroup : RadioButton remove(ControllerInterface)
-controlP5.ControllerGroup : RadioButton removeCanvas(Canvas)
-controlP5.ControllerGroup : RadioButton removeListener(ControlListener)
-controlP5.ControllerGroup : RadioButton removeProperty(String)
-controlP5.ControllerGroup : RadioButton removeProperty(String, String)
-controlP5.ControllerGroup : RadioButton setAddress(String)
-controlP5.ControllerGroup : RadioButton setArrayValue(float[])
-controlP5.ControllerGroup : RadioButton setArrayValue(int, float)
-controlP5.ControllerGroup : RadioButton setCaptionLabel(String)
-controlP5.ControllerGroup : RadioButton setColor(CColor)
-controlP5.ControllerGroup : RadioButton setColorActive(int)
-controlP5.ControllerGroup : RadioButton setColorBackground(int)
-controlP5.ControllerGroup : RadioButton setColorForeground(int)
-controlP5.ControllerGroup : RadioButton setColorLabel(int)
-controlP5.ControllerGroup : RadioButton setColorValue(int)
-controlP5.ControllerGroup : RadioButton setHeight(int)
-controlP5.ControllerGroup : RadioButton setId(int)
-controlP5.ControllerGroup : RadioButton setLabel(String)
-controlP5.ControllerGroup : RadioButton setMouseOver(boolean)
-controlP5.ControllerGroup : RadioButton setMoveable(boolean)
-controlP5.ControllerGroup : RadioButton setOpen(boolean)
-controlP5.ControllerGroup : RadioButton setPosition(float, float)
-controlP5.ControllerGroup : RadioButton setPosition(float[])
-controlP5.ControllerGroup : RadioButton setSize(int, int)
-controlP5.ControllerGroup : RadioButton setStringValue(String)
-controlP5.ControllerGroup : RadioButton setTitle(String)
-controlP5.ControllerGroup : RadioButton setUpdate(boolean)
-controlP5.ControllerGroup : RadioButton setValue(float)
-controlP5.ControllerGroup : RadioButton setVisible(boolean)
-controlP5.ControllerGroup : RadioButton setWidth(int)
-controlP5.ControllerGroup : RadioButton show()
-controlP5.ControllerGroup : RadioButton showArrow()
-controlP5.ControllerGroup : RadioButton showBar()
-controlP5.ControllerGroup : RadioButton update()
-controlP5.ControllerGroup : RadioButton updateAbsolutePosition()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : boolean isBarVisible()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getArrayValue(int)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : float[] getPosition()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : int listenerSize()
-controlP5.ControllerGroup : void controlEvent(ControlEvent)
-controlP5.ControllerGroup : void remove()
-controlP5.RadioButton : List getItems()
-controlP5.RadioButton : RadioButton activate(String)
-controlP5.RadioButton : RadioButton activate(int)
-controlP5.RadioButton : RadioButton addItem(String, float)
-controlP5.RadioButton : RadioButton addItem(Toggle, float)
-controlP5.RadioButton : RadioButton align(int, int)
-controlP5.RadioButton : RadioButton align(int[])
-controlP5.RadioButton : RadioButton alignX(int)
-controlP5.RadioButton : RadioButton alignY(int)
-controlP5.RadioButton : RadioButton deactivate(String)
-controlP5.RadioButton : RadioButton deactivate(int)
-controlP5.RadioButton : RadioButton deactivateAll()
-controlP5.RadioButton : RadioButton hideLabels()
-controlP5.RadioButton : RadioButton plugTo(Object)
-controlP5.RadioButton : RadioButton plugTo(Object, String)
-controlP5.RadioButton : RadioButton removeItem(String)
-controlP5.RadioButton : RadioButton setArrayValue(float[])
-controlP5.RadioButton : RadioButton setColorLabels(int)
-controlP5.RadioButton : RadioButton setImage(PImage)
-controlP5.RadioButton : RadioButton setImage(PImage, int)
-controlP5.RadioButton : RadioButton setImages(PImage, PImage, PImage)
-controlP5.RadioButton : RadioButton setItemHeight(int)
-controlP5.RadioButton : RadioButton setItemWidth(int)
-controlP5.RadioButton : RadioButton setItemsPerRow(int)
-controlP5.RadioButton : RadioButton setLabelPadding(int, int)
-controlP5.RadioButton : RadioButton setNoneSelectedAllowed(boolean)
-controlP5.RadioButton : RadioButton setSize(PImage)
-controlP5.RadioButton : RadioButton setSize(int, int)
-controlP5.RadioButton : RadioButton setSpacingColumn(int)
-controlP5.RadioButton : RadioButton setSpacingRow(int)
-controlP5.RadioButton : RadioButton showLabels()
-controlP5.RadioButton : RadioButton toUpperCase(boolean)
-controlP5.RadioButton : RadioButton toggle(int)
-controlP5.RadioButton : String getInfo()
-controlP5.RadioButton : Toggle getItem(String)
-controlP5.RadioButton : Toggle getItem(int)
-controlP5.RadioButton : boolean getState(String)
-controlP5.RadioButton : boolean getState(int)
-controlP5.RadioButton : int[] getAlign()
-controlP5.RadioButton : void updateLayout()
+main.java.controlp5.ControlGroup : RadioButton activateEvent(boolean)
+main.java.controlp5.ControlGroup : RadioButton addListener(ControlListener)
+main.java.controlp5.ControlGroup : RadioButton removeListener(ControlListener)
+main.java.controlp5.ControlGroup : RadioButton setBackgroundColor(int)
+main.java.controlp5.ControlGroup : RadioButton setBackgroundHeight(int)
+main.java.controlp5.ControlGroup : RadioButton setBarHeight(int)
+main.java.controlp5.ControlGroup : RadioButton setSize(int, int)
+main.java.controlp5.ControlGroup : RadioButton updateInternalEvents(PApplet)
+main.java.controlp5.ControlGroup : String getInfo()
+main.java.controlp5.ControlGroup : String toString()
+main.java.controlp5.ControlGroup : int getBackgroundHeight()
+main.java.controlp5.ControlGroup : int getBarHeight()
+main.java.controlp5.ControlGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : CColor getColor()
+main.java.controlp5.ControllerGroup : Canvas addCanvas(Canvas)
+main.java.controlp5.ControllerGroup : ControlWindow getWindow()
+main.java.controlp5.ControllerGroup : Controller getController(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String, String)
+main.java.controlp5.ControllerGroup : Label getCaptionLabel()
+main.java.controlp5.ControllerGroup : Label getValueLabel()
+main.java.controlp5.ControllerGroup : RadioButton add(ControllerInterface)
+main.java.controlp5.ControllerGroup : RadioButton addListener(ControlListener)
+main.java.controlp5.ControllerGroup : RadioButton bringToFront()
+main.java.controlp5.ControllerGroup : RadioButton bringToFront(ControllerInterface)
+main.java.controlp5.ControllerGroup : RadioButton close()
+main.java.controlp5.ControllerGroup : RadioButton disableCollapse()
+main.java.controlp5.ControllerGroup : RadioButton enableCollapse()
+main.java.controlp5.ControllerGroup : RadioButton hide()
+main.java.controlp5.ControllerGroup : RadioButton hideArrow()
+main.java.controlp5.ControllerGroup : RadioButton hideBar()
+main.java.controlp5.ControllerGroup : RadioButton moveTo(ControlWindow)
+main.java.controlp5.ControllerGroup : RadioButton moveTo(PApplet)
+main.java.controlp5.ControllerGroup : RadioButton open()
+main.java.controlp5.ControllerGroup : RadioButton registerProperty(String)
+main.java.controlp5.ControllerGroup : RadioButton registerProperty(String, String)
+main.java.controlp5.ControllerGroup : RadioButton remove(CDrawable)
+main.java.controlp5.ControllerGroup : RadioButton remove(ControllerInterface)
+main.java.controlp5.ControllerGroup : RadioButton removeCanvas(Canvas)
+main.java.controlp5.ControllerGroup : RadioButton removeListener(ControlListener)
+main.java.controlp5.ControllerGroup : RadioButton removeProperty(String)
+main.java.controlp5.ControllerGroup : RadioButton removeProperty(String, String)
+main.java.controlp5.ControllerGroup : RadioButton setAddress(String)
+main.java.controlp5.ControllerGroup : RadioButton setArrayValue(float[])
+main.java.controlp5.ControllerGroup : RadioButton setArrayValue(int, float)
+main.java.controlp5.ControllerGroup : RadioButton setCaptionLabel(String)
+main.java.controlp5.ControllerGroup : RadioButton setColor(CColor)
+main.java.controlp5.ControllerGroup : RadioButton setColorActive(int)
+main.java.controlp5.ControllerGroup : RadioButton setColorBackground(int)
+main.java.controlp5.ControllerGroup : RadioButton setColorForeground(int)
+main.java.controlp5.ControllerGroup : RadioButton setColorLabel(int)
+main.java.controlp5.ControllerGroup : RadioButton setColorValue(int)
+main.java.controlp5.ControllerGroup : RadioButton setHeight(int)
+main.java.controlp5.ControllerGroup : RadioButton setId(int)
+main.java.controlp5.ControllerGroup : RadioButton setLabel(String)
+main.java.controlp5.ControllerGroup : RadioButton setMouseOver(boolean)
+main.java.controlp5.ControllerGroup : RadioButton setMoveable(boolean)
+main.java.controlp5.ControllerGroup : RadioButton setOpen(boolean)
+main.java.controlp5.ControllerGroup : RadioButton setPosition(float, float)
+main.java.controlp5.ControllerGroup : RadioButton setPosition(float[])
+main.java.controlp5.ControllerGroup : RadioButton setSize(int, int)
+main.java.controlp5.ControllerGroup : RadioButton setStringValue(String)
+main.java.controlp5.ControllerGroup : RadioButton setTitle(String)
+main.java.controlp5.ControllerGroup : RadioButton setUpdate(boolean)
+main.java.controlp5.ControllerGroup : RadioButton setValue(float)
+main.java.controlp5.ControllerGroup : RadioButton setVisible(boolean)
+main.java.controlp5.ControllerGroup : RadioButton setWidth(int)
+main.java.controlp5.ControllerGroup : RadioButton show()
+main.java.controlp5.ControllerGroup : RadioButton showArrow()
+main.java.controlp5.ControllerGroup : RadioButton showBar()
+main.java.controlp5.ControllerGroup : RadioButton update()
+main.java.controlp5.ControllerGroup : RadioButton updateAbsolutePosition()
+main.java.controlp5.ControllerGroup : String getAddress()
+main.java.controlp5.ControllerGroup : String getInfo()
+main.java.controlp5.ControllerGroup : String getName()
+main.java.controlp5.ControllerGroup : String getStringValue()
+main.java.controlp5.ControllerGroup : String toString()
+main.java.controlp5.ControllerGroup : Tab getTab()
+main.java.controlp5.ControllerGroup : boolean isBarVisible()
+main.java.controlp5.ControllerGroup : boolean isCollapse()
+main.java.controlp5.ControllerGroup : boolean isMouseOver()
+main.java.controlp5.ControllerGroup : boolean isMoveable()
+main.java.controlp5.ControllerGroup : boolean isOpen()
+main.java.controlp5.ControllerGroup : boolean isUpdate()
+main.java.controlp5.ControllerGroup : boolean isVisible()
+main.java.controlp5.ControllerGroup : boolean setMousePressed(boolean)
+main.java.controlp5.ControllerGroup : float getArrayValue(int)
+main.java.controlp5.ControllerGroup : float getValue()
+main.java.controlp5.ControllerGroup : float[] getArrayValue()
+main.java.controlp5.ControllerGroup : float[] getPosition()
+main.java.controlp5.ControllerGroup : int getHeight()
+main.java.controlp5.ControllerGroup : int getId()
+main.java.controlp5.ControllerGroup : int getWidth()
+main.java.controlp5.ControllerGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : void controlEvent(ControlEvent)
+main.java.controlp5.ControllerGroup : void remove()
+main.java.controlp5.RadioButton : List getItems()
+main.java.controlp5.RadioButton : RadioButton activate(String)
+main.java.controlp5.RadioButton : RadioButton activate(int)
+main.java.controlp5.RadioButton : RadioButton addItem(String, float)
+main.java.controlp5.RadioButton : RadioButton addItem(Toggle, float)
+main.java.controlp5.RadioButton : RadioButton align(int, int)
+main.java.controlp5.RadioButton : RadioButton align(int[])
+main.java.controlp5.RadioButton : RadioButton alignX(int)
+main.java.controlp5.RadioButton : RadioButton alignY(int)
+main.java.controlp5.RadioButton : RadioButton deactivate(String)
+main.java.controlp5.RadioButton : RadioButton deactivate(int)
+main.java.controlp5.RadioButton : RadioButton deactivateAll()
+main.java.controlp5.RadioButton : RadioButton hideLabels()
+main.java.controlp5.RadioButton : RadioButton plugTo(Object)
+main.java.controlp5.RadioButton : RadioButton plugTo(Object, String)
+main.java.controlp5.RadioButton : RadioButton removeItem(String)
+main.java.controlp5.RadioButton : RadioButton setArrayValue(float[])
+main.java.controlp5.RadioButton : RadioButton setColorLabels(int)
+main.java.controlp5.RadioButton : RadioButton setImage(PImage)
+main.java.controlp5.RadioButton : RadioButton setImage(PImage, int)
+main.java.controlp5.RadioButton : RadioButton setImages(PImage, PImage, PImage)
+main.java.controlp5.RadioButton : RadioButton setItemHeight(int)
+main.java.controlp5.RadioButton : RadioButton setItemWidth(int)
+main.java.controlp5.RadioButton : RadioButton setItemsPerRow(int)
+main.java.controlp5.RadioButton : RadioButton setLabelPadding(int, int)
+main.java.controlp5.RadioButton : RadioButton setNoneSelectedAllowed(boolean)
+main.java.controlp5.RadioButton : RadioButton setSize(PImage)
+main.java.controlp5.RadioButton : RadioButton setSize(int, int)
+main.java.controlp5.RadioButton : RadioButton setSpacingColumn(int)
+main.java.controlp5.RadioButton : RadioButton setSpacingRow(int)
+main.java.controlp5.RadioButton : RadioButton showLabels()
+main.java.controlp5.RadioButton : RadioButton toUpperCase(boolean)
+main.java.controlp5.RadioButton : RadioButton toggle(int)
+main.java.controlp5.RadioButton : String getInfo()
+main.java.controlp5.RadioButton : Toggle getItem(String)
+main.java.controlp5.RadioButton : Toggle getItem(int)
+main.java.controlp5.RadioButton : boolean getState(String)
+main.java.controlp5.RadioButton : boolean getState(int)
+main.java.controlp5.RadioButton : int[] getAlign()
+main.java.controlp5.RadioButton : void updateLayout()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5range/ControlP5range.pde b/examples/controllers/ControlP5range/ControlP5range.pde
index 9f4ee2a..206b264 100644
--- a/examples/controllers/ControlP5range/ControlP5range.pde
+++ b/examples/controllers/ControlP5range/ControlP5range.pde
@@ -83,157 +83,157 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : Range addCallback(CallbackListener)
-controlP5.Controller : Range addListener(ControlListener)
-controlP5.Controller : Range addListenerFor(int, CallbackListener)
-controlP5.Controller : Range align(int, int, int, int)
-controlP5.Controller : Range bringToFront()
-controlP5.Controller : Range bringToFront(ControllerInterface)
-controlP5.Controller : Range hide()
-controlP5.Controller : Range linebreak()
-controlP5.Controller : Range listen(boolean)
-controlP5.Controller : Range lock()
-controlP5.Controller : Range onChange(CallbackListener)
-controlP5.Controller : Range onClick(CallbackListener)
-controlP5.Controller : Range onDoublePress(CallbackListener)
-controlP5.Controller : Range onDrag(CallbackListener)
-controlP5.Controller : Range onDraw(ControllerView)
-controlP5.Controller : Range onEndDrag(CallbackListener)
-controlP5.Controller : Range onEnter(CallbackListener)
-controlP5.Controller : Range onLeave(CallbackListener)
-controlP5.Controller : Range onMove(CallbackListener)
-controlP5.Controller : Range onPress(CallbackListener)
-controlP5.Controller : Range onRelease(CallbackListener)
-controlP5.Controller : Range onReleaseOutside(CallbackListener)
-controlP5.Controller : Range onStartDrag(CallbackListener)
-controlP5.Controller : Range onWheel(CallbackListener)
-controlP5.Controller : Range plugTo(Object)
-controlP5.Controller : Range plugTo(Object, String)
-controlP5.Controller : Range plugTo(Object[])
-controlP5.Controller : Range plugTo(Object[], String)
-controlP5.Controller : Range registerProperty(String)
-controlP5.Controller : Range registerProperty(String, String)
-controlP5.Controller : Range registerTooltip(String)
-controlP5.Controller : Range removeBehavior()
-controlP5.Controller : Range removeCallback()
-controlP5.Controller : Range removeCallback(CallbackListener)
-controlP5.Controller : Range removeListener(ControlListener)
-controlP5.Controller : Range removeListenerFor(int, CallbackListener)
-controlP5.Controller : Range removeListenersFor(int)
-controlP5.Controller : Range removeProperty(String)
-controlP5.Controller : Range removeProperty(String, String)
-controlP5.Controller : Range setArrayValue(float[])
-controlP5.Controller : Range setArrayValue(int, float)
-controlP5.Controller : Range setBehavior(ControlBehavior)
-controlP5.Controller : Range setBroadcast(boolean)
-controlP5.Controller : Range setCaptionLabel(String)
-controlP5.Controller : Range setColor(CColor)
-controlP5.Controller : Range setColorActive(int)
-controlP5.Controller : Range setColorBackground(int)
-controlP5.Controller : Range setColorCaptionLabel(int)
-controlP5.Controller : Range setColorForeground(int)
-controlP5.Controller : Range setColorLabel(int)
-controlP5.Controller : Range setColorValue(int)
-controlP5.Controller : Range setColorValueLabel(int)
-controlP5.Controller : Range setDecimalPrecision(int)
-controlP5.Controller : Range setDefaultValue(float)
-controlP5.Controller : Range setHeight(int)
-controlP5.Controller : Range setId(int)
-controlP5.Controller : Range setImage(PImage)
-controlP5.Controller : Range setImage(PImage, int)
-controlP5.Controller : Range setImages(PImage, PImage, PImage)
-controlP5.Controller : Range setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Range setLabel(String)
-controlP5.Controller : Range setLabelVisible(boolean)
-controlP5.Controller : Range setLock(boolean)
-controlP5.Controller : Range setMax(float)
-controlP5.Controller : Range setMin(float)
-controlP5.Controller : Range setMouseOver(boolean)
-controlP5.Controller : Range setMoveable(boolean)
-controlP5.Controller : Range setPosition(float, float)
-controlP5.Controller : Range setPosition(float[])
-controlP5.Controller : Range setSize(PImage)
-controlP5.Controller : Range setSize(int, int)
-controlP5.Controller : Range setStringValue(String)
-controlP5.Controller : Range setUpdate(boolean)
-controlP5.Controller : Range setValue(float)
-controlP5.Controller : Range setValueLabel(String)
-controlP5.Controller : Range setValueSelf(float)
-controlP5.Controller : Range setView(ControllerView)
-controlP5.Controller : Range setVisible(boolean)
-controlP5.Controller : Range setWidth(int)
-controlP5.Controller : Range show()
-controlP5.Controller : Range unlock()
-controlP5.Controller : Range unplugFrom(Object)
-controlP5.Controller : Range unplugFrom(Object[])
-controlP5.Controller : Range unregisterTooltip()
-controlP5.Controller : Range update()
-controlP5.Controller : Range updateSize()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.Range : ArrayList getTickMarks()
-controlP5.Range : Range setArrayValue(float[])
-controlP5.Range : Range setColorCaptionLabel(int)
-controlP5.Range : Range setColorTickMark(int)
-controlP5.Range : Range setColorValueLabel(int)
-controlP5.Range : Range setHandleSize(int)
-controlP5.Range : Range setHeight(int)
-controlP5.Range : Range setHighValue(float)
-controlP5.Range : Range setHighValueLabel(String)
-controlP5.Range : Range setLowValue(float)
-controlP5.Range : Range setLowValueLabel(String)
-controlP5.Range : Range setMax(float)
-controlP5.Range : Range setMin(float)
-controlP5.Range : Range setNumberOfTickMarks(int)
-controlP5.Range : Range setRange(float, float)
-controlP5.Range : Range setRangeValues(float, float)
-controlP5.Range : Range setWidth(int)
-controlP5.Range : Range showTickMarks(boolean)
-controlP5.Range : Range snapToTickMarks(boolean)
-controlP5.Range : float getHighValue()
-controlP5.Range : float getLowValue()
-controlP5.Range : float[] getArrayValue()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : Range addCallback(CallbackListener)
+main.java.controlp5.Controller : Range addListener(ControlListener)
+main.java.controlp5.Controller : Range addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Range align(int, int, int, int)
+main.java.controlp5.Controller : Range bringToFront()
+main.java.controlp5.Controller : Range bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Range hide()
+main.java.controlp5.Controller : Range linebreak()
+main.java.controlp5.Controller : Range listen(boolean)
+main.java.controlp5.Controller : Range lock()
+main.java.controlp5.Controller : Range onChange(CallbackListener)
+main.java.controlp5.Controller : Range onClick(CallbackListener)
+main.java.controlp5.Controller : Range onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Range onDrag(CallbackListener)
+main.java.controlp5.Controller : Range onDraw(ControllerView)
+main.java.controlp5.Controller : Range onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Range onEnter(CallbackListener)
+main.java.controlp5.Controller : Range onLeave(CallbackListener)
+main.java.controlp5.Controller : Range onMove(CallbackListener)
+main.java.controlp5.Controller : Range onPress(CallbackListener)
+main.java.controlp5.Controller : Range onRelease(CallbackListener)
+main.java.controlp5.Controller : Range onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Range onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Range onWheel(CallbackListener)
+main.java.controlp5.Controller : Range plugTo(Object)
+main.java.controlp5.Controller : Range plugTo(Object, String)
+main.java.controlp5.Controller : Range plugTo(Object[])
+main.java.controlp5.Controller : Range plugTo(Object[], String)
+main.java.controlp5.Controller : Range registerProperty(String)
+main.java.controlp5.Controller : Range registerProperty(String, String)
+main.java.controlp5.Controller : Range registerTooltip(String)
+main.java.controlp5.Controller : Range removeBehavior()
+main.java.controlp5.Controller : Range removeCallback()
+main.java.controlp5.Controller : Range removeCallback(CallbackListener)
+main.java.controlp5.Controller : Range removeListener(ControlListener)
+main.java.controlp5.Controller : Range removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Range removeListenersFor(int)
+main.java.controlp5.Controller : Range removeProperty(String)
+main.java.controlp5.Controller : Range removeProperty(String, String)
+main.java.controlp5.Controller : Range setArrayValue(float[])
+main.java.controlp5.Controller : Range setArrayValue(int, float)
+main.java.controlp5.Controller : Range setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Range setBroadcast(boolean)
+main.java.controlp5.Controller : Range setCaptionLabel(String)
+main.java.controlp5.Controller : Range setColor(CColor)
+main.java.controlp5.Controller : Range setColorActive(int)
+main.java.controlp5.Controller : Range setColorBackground(int)
+main.java.controlp5.Controller : Range setColorCaptionLabel(int)
+main.java.controlp5.Controller : Range setColorForeground(int)
+main.java.controlp5.Controller : Range setColorLabel(int)
+main.java.controlp5.Controller : Range setColorValue(int)
+main.java.controlp5.Controller : Range setColorValueLabel(int)
+main.java.controlp5.Controller : Range setDecimalPrecision(int)
+main.java.controlp5.Controller : Range setDefaultValue(float)
+main.java.controlp5.Controller : Range setHeight(int)
+main.java.controlp5.Controller : Range setId(int)
+main.java.controlp5.Controller : Range setImage(PImage)
+main.java.controlp5.Controller : Range setImage(PImage, int)
+main.java.controlp5.Controller : Range setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Range setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Range setLabel(String)
+main.java.controlp5.Controller : Range setLabelVisible(boolean)
+main.java.controlp5.Controller : Range setLock(boolean)
+main.java.controlp5.Controller : Range setMax(float)
+main.java.controlp5.Controller : Range setMin(float)
+main.java.controlp5.Controller : Range setMouseOver(boolean)
+main.java.controlp5.Controller : Range setMoveable(boolean)
+main.java.controlp5.Controller : Range setPosition(float, float)
+main.java.controlp5.Controller : Range setPosition(float[])
+main.java.controlp5.Controller : Range setSize(PImage)
+main.java.controlp5.Controller : Range setSize(int, int)
+main.java.controlp5.Controller : Range setStringValue(String)
+main.java.controlp5.Controller : Range setUpdate(boolean)
+main.java.controlp5.Controller : Range setValue(float)
+main.java.controlp5.Controller : Range setValueLabel(String)
+main.java.controlp5.Controller : Range setValueSelf(float)
+main.java.controlp5.Controller : Range setView(ControllerView)
+main.java.controlp5.Controller : Range setVisible(boolean)
+main.java.controlp5.Controller : Range setWidth(int)
+main.java.controlp5.Controller : Range show()
+main.java.controlp5.Controller : Range unlock()
+main.java.controlp5.Controller : Range unplugFrom(Object)
+main.java.controlp5.Controller : Range unplugFrom(Object[])
+main.java.controlp5.Controller : Range unregisterTooltip()
+main.java.controlp5.Controller : Range update()
+main.java.controlp5.Controller : Range updateSize()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Range : ArrayList getTickMarks()
+main.java.controlp5.Range : Range setArrayValue(float[])
+main.java.controlp5.Range : Range setColorCaptionLabel(int)
+main.java.controlp5.Range : Range setColorTickMark(int)
+main.java.controlp5.Range : Range setColorValueLabel(int)
+main.java.controlp5.Range : Range setHandleSize(int)
+main.java.controlp5.Range : Range setHeight(int)
+main.java.controlp5.Range : Range setHighValue(float)
+main.java.controlp5.Range : Range setHighValueLabel(String)
+main.java.controlp5.Range : Range setLowValue(float)
+main.java.controlp5.Range : Range setLowValueLabel(String)
+main.java.controlp5.Range : Range setMax(float)
+main.java.controlp5.Range : Range setMin(float)
+main.java.controlp5.Range : Range setNumberOfTickMarks(int)
+main.java.controlp5.Range : Range setRange(float, float)
+main.java.controlp5.Range : Range setRangeValues(float, float)
+main.java.controlp5.Range : Range setWidth(int)
+main.java.controlp5.Range : Range showTickMarks(boolean)
+main.java.controlp5.Range : Range snapToTickMarks(boolean)
+main.java.controlp5.Range : float getHighValue()
+main.java.controlp5.Range : float getLowValue()
+main.java.controlp5.Range : float[] getArrayValue()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5scrollableList/ControlP5scrollableList.pde b/examples/controllers/ControlP5scrollableList/ControlP5scrollableList.pde
index 6f132a4..58555af 100644
--- a/examples/controllers/ControlP5scrollableList/ControlP5scrollableList.pde
+++ b/examples/controllers/ControlP5scrollableList/ControlP5scrollableList.pde
@@ -91,166 +91,166 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : ScrollableList addCallback(CallbackListener)
-controlP5.Controller : ScrollableList addListener(ControlListener)
-controlP5.Controller : ScrollableList addListenerFor(int, CallbackListener)
-controlP5.Controller : ScrollableList align(int, int, int, int)
-controlP5.Controller : ScrollableList bringToFront()
-controlP5.Controller : ScrollableList bringToFront(ControllerInterface)
-controlP5.Controller : ScrollableList hide()
-controlP5.Controller : ScrollableList linebreak()
-controlP5.Controller : ScrollableList listen(boolean)
-controlP5.Controller : ScrollableList lock()
-controlP5.Controller : ScrollableList onChange(CallbackListener)
-controlP5.Controller : ScrollableList onClick(CallbackListener)
-controlP5.Controller : ScrollableList onDoublePress(CallbackListener)
-controlP5.Controller : ScrollableList onDrag(CallbackListener)
-controlP5.Controller : ScrollableList onDraw(ControllerView)
-controlP5.Controller : ScrollableList onEndDrag(CallbackListener)
-controlP5.Controller : ScrollableList onEnter(CallbackListener)
-controlP5.Controller : ScrollableList onLeave(CallbackListener)
-controlP5.Controller : ScrollableList onMove(CallbackListener)
-controlP5.Controller : ScrollableList onPress(CallbackListener)
-controlP5.Controller : ScrollableList onRelease(CallbackListener)
-controlP5.Controller : ScrollableList onReleaseOutside(CallbackListener)
-controlP5.Controller : ScrollableList onStartDrag(CallbackListener)
-controlP5.Controller : ScrollableList onWheel(CallbackListener)
-controlP5.Controller : ScrollableList plugTo(Object)
-controlP5.Controller : ScrollableList plugTo(Object, String)
-controlP5.Controller : ScrollableList plugTo(Object[])
-controlP5.Controller : ScrollableList plugTo(Object[], String)
-controlP5.Controller : ScrollableList registerProperty(String)
-controlP5.Controller : ScrollableList registerProperty(String, String)
-controlP5.Controller : ScrollableList registerTooltip(String)
-controlP5.Controller : ScrollableList removeBehavior()
-controlP5.Controller : ScrollableList removeCallback()
-controlP5.Controller : ScrollableList removeCallback(CallbackListener)
-controlP5.Controller : ScrollableList removeListener(ControlListener)
-controlP5.Controller : ScrollableList removeListenerFor(int, CallbackListener)
-controlP5.Controller : ScrollableList removeListenersFor(int)
-controlP5.Controller : ScrollableList removeProperty(String)
-controlP5.Controller : ScrollableList removeProperty(String, String)
-controlP5.Controller : ScrollableList setArrayValue(float[])
-controlP5.Controller : ScrollableList setArrayValue(int, float)
-controlP5.Controller : ScrollableList setBehavior(ControlBehavior)
-controlP5.Controller : ScrollableList setBroadcast(boolean)
-controlP5.Controller : ScrollableList setCaptionLabel(String)
-controlP5.Controller : ScrollableList setColor(CColor)
-controlP5.Controller : ScrollableList setColorActive(int)
-controlP5.Controller : ScrollableList setColorBackground(int)
-controlP5.Controller : ScrollableList setColorCaptionLabel(int)
-controlP5.Controller : ScrollableList setColorForeground(int)
-controlP5.Controller : ScrollableList setColorLabel(int)
-controlP5.Controller : ScrollableList setColorValue(int)
-controlP5.Controller : ScrollableList setColorValueLabel(int)
-controlP5.Controller : ScrollableList setDecimalPrecision(int)
-controlP5.Controller : ScrollableList setDefaultValue(float)
-controlP5.Controller : ScrollableList setHeight(int)
-controlP5.Controller : ScrollableList setId(int)
-controlP5.Controller : ScrollableList setImage(PImage)
-controlP5.Controller : ScrollableList setImage(PImage, int)
-controlP5.Controller : ScrollableList setImages(PImage, PImage, PImage)
-controlP5.Controller : ScrollableList setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : ScrollableList setLabel(String)
-controlP5.Controller : ScrollableList setLabelVisible(boolean)
-controlP5.Controller : ScrollableList setLock(boolean)
-controlP5.Controller : ScrollableList setMax(float)
-controlP5.Controller : ScrollableList setMin(float)
-controlP5.Controller : ScrollableList setMouseOver(boolean)
-controlP5.Controller : ScrollableList setMoveable(boolean)
-controlP5.Controller : ScrollableList setPosition(float, float)
-controlP5.Controller : ScrollableList setPosition(float[])
-controlP5.Controller : ScrollableList setSize(PImage)
-controlP5.Controller : ScrollableList setSize(int, int)
-controlP5.Controller : ScrollableList setStringValue(String)
-controlP5.Controller : ScrollableList setUpdate(boolean)
-controlP5.Controller : ScrollableList setValue(float)
-controlP5.Controller : ScrollableList setValueLabel(String)
-controlP5.Controller : ScrollableList setValueSelf(float)
-controlP5.Controller : ScrollableList setView(ControllerView)
-controlP5.Controller : ScrollableList setVisible(boolean)
-controlP5.Controller : ScrollableList setWidth(int)
-controlP5.Controller : ScrollableList show()
-controlP5.Controller : ScrollableList unlock()
-controlP5.Controller : ScrollableList unplugFrom(Object)
-controlP5.Controller : ScrollableList unplugFrom(Object[])
-controlP5.Controller : ScrollableList unregisterTooltip()
-controlP5.Controller : ScrollableList update()
-controlP5.Controller : ScrollableList updateSize()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.ScrollableList : List getItems()
-controlP5.ScrollableList : Map getItem(String)
-controlP5.ScrollableList : Map getItem(int)
-controlP5.ScrollableList : ScrollableList addItem(String, Object)
-controlP5.ScrollableList : ScrollableList addItems(List)
-controlP5.ScrollableList : ScrollableList addItems(Map)
-controlP5.ScrollableList : ScrollableList addItems(String[])
-controlP5.ScrollableList : ScrollableList clear()
-controlP5.ScrollableList : ScrollableList close()
-controlP5.ScrollableList : ScrollableList open()
-controlP5.ScrollableList : ScrollableList removeItem(String)
-controlP5.ScrollableList : ScrollableList removeItems(List)
-controlP5.ScrollableList : ScrollableList setBackgroundColor(int)
-controlP5.ScrollableList : ScrollableList setBarHeight(int)
-controlP5.ScrollableList : ScrollableList setBarVisible(boolean)
-controlP5.ScrollableList : ScrollableList setItemHeight(int)
-controlP5.ScrollableList : ScrollableList setItems(List)
-controlP5.ScrollableList : ScrollableList setItems(Map)
-controlP5.ScrollableList : ScrollableList setItems(String[])
-controlP5.ScrollableList : ScrollableList setOpen(boolean)
-controlP5.ScrollableList : ScrollableList setScrollSensitivity(float)
-controlP5.ScrollableList : ScrollableList setType(int)
-controlP5.ScrollableList : boolean isBarVisible()
-controlP5.ScrollableList : boolean isOpen()
-controlP5.ScrollableList : int getBackgroundColor()
-controlP5.ScrollableList : int getBarHeight()
-controlP5.ScrollableList : int getHeight()
-controlP5.ScrollableList : void controlEvent(ControlEvent)
-controlP5.ScrollableList : void keyEvent(KeyEvent)
-controlP5.ScrollableList : void setDirection(int)
-controlP5.ScrollableList : void updateItemIndexOffset()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : ScrollableList addCallback(CallbackListener)
+main.java.controlp5.Controller : ScrollableList addListener(ControlListener)
+main.java.controlp5.Controller : ScrollableList addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : ScrollableList align(int, int, int, int)
+main.java.controlp5.Controller : ScrollableList bringToFront()
+main.java.controlp5.Controller : ScrollableList bringToFront(ControllerInterface)
+main.java.controlp5.Controller : ScrollableList hide()
+main.java.controlp5.Controller : ScrollableList linebreak()
+main.java.controlp5.Controller : ScrollableList listen(boolean)
+main.java.controlp5.Controller : ScrollableList lock()
+main.java.controlp5.Controller : ScrollableList onChange(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onClick(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onDoublePress(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onDrag(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onDraw(ControllerView)
+main.java.controlp5.Controller : ScrollableList onEndDrag(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onEnter(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onLeave(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onMove(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onPress(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onRelease(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onStartDrag(CallbackListener)
+main.java.controlp5.Controller : ScrollableList onWheel(CallbackListener)
+main.java.controlp5.Controller : ScrollableList plugTo(Object)
+main.java.controlp5.Controller : ScrollableList plugTo(Object, String)
+main.java.controlp5.Controller : ScrollableList plugTo(Object[])
+main.java.controlp5.Controller : ScrollableList plugTo(Object[], String)
+main.java.controlp5.Controller : ScrollableList registerProperty(String)
+main.java.controlp5.Controller : ScrollableList registerProperty(String, String)
+main.java.controlp5.Controller : ScrollableList registerTooltip(String)
+main.java.controlp5.Controller : ScrollableList removeBehavior()
+main.java.controlp5.Controller : ScrollableList removeCallback()
+main.java.controlp5.Controller : ScrollableList removeCallback(CallbackListener)
+main.java.controlp5.Controller : ScrollableList removeListener(ControlListener)
+main.java.controlp5.Controller : ScrollableList removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : ScrollableList removeListenersFor(int)
+main.java.controlp5.Controller : ScrollableList removeProperty(String)
+main.java.controlp5.Controller : ScrollableList removeProperty(String, String)
+main.java.controlp5.Controller : ScrollableList setArrayValue(float[])
+main.java.controlp5.Controller : ScrollableList setArrayValue(int, float)
+main.java.controlp5.Controller : ScrollableList setBehavior(ControlBehavior)
+main.java.controlp5.Controller : ScrollableList setBroadcast(boolean)
+main.java.controlp5.Controller : ScrollableList setCaptionLabel(String)
+main.java.controlp5.Controller : ScrollableList setColor(CColor)
+main.java.controlp5.Controller : ScrollableList setColorActive(int)
+main.java.controlp5.Controller : ScrollableList setColorBackground(int)
+main.java.controlp5.Controller : ScrollableList setColorCaptionLabel(int)
+main.java.controlp5.Controller : ScrollableList setColorForeground(int)
+main.java.controlp5.Controller : ScrollableList setColorLabel(int)
+main.java.controlp5.Controller : ScrollableList setColorValue(int)
+main.java.controlp5.Controller : ScrollableList setColorValueLabel(int)
+main.java.controlp5.Controller : ScrollableList setDecimalPrecision(int)
+main.java.controlp5.Controller : ScrollableList setDefaultValue(float)
+main.java.controlp5.Controller : ScrollableList setHeight(int)
+main.java.controlp5.Controller : ScrollableList setId(int)
+main.java.controlp5.Controller : ScrollableList setImage(PImage)
+main.java.controlp5.Controller : ScrollableList setImage(PImage, int)
+main.java.controlp5.Controller : ScrollableList setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : ScrollableList setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : ScrollableList setLabel(String)
+main.java.controlp5.Controller : ScrollableList setLabelVisible(boolean)
+main.java.controlp5.Controller : ScrollableList setLock(boolean)
+main.java.controlp5.Controller : ScrollableList setMax(float)
+main.java.controlp5.Controller : ScrollableList setMin(float)
+main.java.controlp5.Controller : ScrollableList setMouseOver(boolean)
+main.java.controlp5.Controller : ScrollableList setMoveable(boolean)
+main.java.controlp5.Controller : ScrollableList setPosition(float, float)
+main.java.controlp5.Controller : ScrollableList setPosition(float[])
+main.java.controlp5.Controller : ScrollableList setSize(PImage)
+main.java.controlp5.Controller : ScrollableList setSize(int, int)
+main.java.controlp5.Controller : ScrollableList setStringValue(String)
+main.java.controlp5.Controller : ScrollableList setUpdate(boolean)
+main.java.controlp5.Controller : ScrollableList setValue(float)
+main.java.controlp5.Controller : ScrollableList setValueLabel(String)
+main.java.controlp5.Controller : ScrollableList setValueSelf(float)
+main.java.controlp5.Controller : ScrollableList setView(ControllerView)
+main.java.controlp5.Controller : ScrollableList setVisible(boolean)
+main.java.controlp5.Controller : ScrollableList setWidth(int)
+main.java.controlp5.Controller : ScrollableList show()
+main.java.controlp5.Controller : ScrollableList unlock()
+main.java.controlp5.Controller : ScrollableList unplugFrom(Object)
+main.java.controlp5.Controller : ScrollableList unplugFrom(Object[])
+main.java.controlp5.Controller : ScrollableList unregisterTooltip()
+main.java.controlp5.Controller : ScrollableList update()
+main.java.controlp5.Controller : ScrollableList updateSize()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.ScrollableList : List getItems()
+main.java.controlp5.ScrollableList : Map getItem(String)
+main.java.controlp5.ScrollableList : Map getItem(int)
+main.java.controlp5.ScrollableList : ScrollableList addItem(String, Object)
+main.java.controlp5.ScrollableList : ScrollableList addItems(List)
+main.java.controlp5.ScrollableList : ScrollableList addItems(Map)
+main.java.controlp5.ScrollableList : ScrollableList addItems(String[])
+main.java.controlp5.ScrollableList : ScrollableList clear()
+main.java.controlp5.ScrollableList : ScrollableList close()
+main.java.controlp5.ScrollableList : ScrollableList open()
+main.java.controlp5.ScrollableList : ScrollableList removeItem(String)
+main.java.controlp5.ScrollableList : ScrollableList removeItems(List)
+main.java.controlp5.ScrollableList : ScrollableList setBackgroundColor(int)
+main.java.controlp5.ScrollableList : ScrollableList setBarHeight(int)
+main.java.controlp5.ScrollableList : ScrollableList setBarVisible(boolean)
+main.java.controlp5.ScrollableList : ScrollableList setItemHeight(int)
+main.java.controlp5.ScrollableList : ScrollableList setItems(List)
+main.java.controlp5.ScrollableList : ScrollableList setItems(Map)
+main.java.controlp5.ScrollableList : ScrollableList setItems(String[])
+main.java.controlp5.ScrollableList : ScrollableList setOpen(boolean)
+main.java.controlp5.ScrollableList : ScrollableList setScrollSensitivity(float)
+main.java.controlp5.ScrollableList : ScrollableList setType(int)
+main.java.controlp5.ScrollableList : boolean isBarVisible()
+main.java.controlp5.ScrollableList : boolean isOpen()
+main.java.controlp5.ScrollableList : int getBackgroundColor()
+main.java.controlp5.ScrollableList : int getBarHeight()
+main.java.controlp5.ScrollableList : int getHeight()
+main.java.controlp5.ScrollableList : void controlEvent(ControlEvent)
+main.java.controlp5.ScrollableList : void keyEvent(KeyEvent)
+main.java.controlp5.ScrollableList : void setDirection(int)
+main.java.controlp5.ScrollableList : void updateItemIndexOffset()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5slider/ControlP5slider.pde b/examples/controllers/ControlP5slider/ControlP5slider.pde
index 32ca3e7..4ab6aaf 100644
--- a/examples/controllers/ControlP5slider/ControlP5slider.pde
+++ b/examples/controllers/ControlP5slider/ControlP5slider.pde
@@ -130,163 +130,163 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : Slider addCallback(CallbackListener)
-controlP5.Controller : Slider addListener(ControlListener)
-controlP5.Controller : Slider addListenerFor(int, CallbackListener)
-controlP5.Controller : Slider align(int, int, int, int)
-controlP5.Controller : Slider bringToFront()
-controlP5.Controller : Slider bringToFront(ControllerInterface)
-controlP5.Controller : Slider hide()
-controlP5.Controller : Slider linebreak()
-controlP5.Controller : Slider listen(boolean)
-controlP5.Controller : Slider lock()
-controlP5.Controller : Slider onChange(CallbackListener)
-controlP5.Controller : Slider onClick(CallbackListener)
-controlP5.Controller : Slider onDoublePress(CallbackListener)
-controlP5.Controller : Slider onDrag(CallbackListener)
-controlP5.Controller : Slider onDraw(ControllerView)
-controlP5.Controller : Slider onEndDrag(CallbackListener)
-controlP5.Controller : Slider onEnter(CallbackListener)
-controlP5.Controller : Slider onLeave(CallbackListener)
-controlP5.Controller : Slider onMove(CallbackListener)
-controlP5.Controller : Slider onPress(CallbackListener)
-controlP5.Controller : Slider onRelease(CallbackListener)
-controlP5.Controller : Slider onReleaseOutside(CallbackListener)
-controlP5.Controller : Slider onStartDrag(CallbackListener)
-controlP5.Controller : Slider onWheel(CallbackListener)
-controlP5.Controller : Slider plugTo(Object)
-controlP5.Controller : Slider plugTo(Object, String)
-controlP5.Controller : Slider plugTo(Object[])
-controlP5.Controller : Slider plugTo(Object[], String)
-controlP5.Controller : Slider registerProperty(String)
-controlP5.Controller : Slider registerProperty(String, String)
-controlP5.Controller : Slider registerTooltip(String)
-controlP5.Controller : Slider removeBehavior()
-controlP5.Controller : Slider removeCallback()
-controlP5.Controller : Slider removeCallback(CallbackListener)
-controlP5.Controller : Slider removeListener(ControlListener)
-controlP5.Controller : Slider removeListenerFor(int, CallbackListener)
-controlP5.Controller : Slider removeListenersFor(int)
-controlP5.Controller : Slider removeProperty(String)
-controlP5.Controller : Slider removeProperty(String, String)
-controlP5.Controller : Slider setArrayValue(float[])
-controlP5.Controller : Slider setArrayValue(int, float)
-controlP5.Controller : Slider setBehavior(ControlBehavior)
-controlP5.Controller : Slider setBroadcast(boolean)
-controlP5.Controller : Slider setCaptionLabel(String)
-controlP5.Controller : Slider setColor(CColor)
-controlP5.Controller : Slider setColorActive(int)
-controlP5.Controller : Slider setColorBackground(int)
-controlP5.Controller : Slider setColorCaptionLabel(int)
-controlP5.Controller : Slider setColorForeground(int)
-controlP5.Controller : Slider setColorLabel(int)
-controlP5.Controller : Slider setColorValue(int)
-controlP5.Controller : Slider setColorValueLabel(int)
-controlP5.Controller : Slider setDecimalPrecision(int)
-controlP5.Controller : Slider setDefaultValue(float)
-controlP5.Controller : Slider setHeight(int)
-controlP5.Controller : Slider setId(int)
-controlP5.Controller : Slider setImage(PImage)
-controlP5.Controller : Slider setImage(PImage, int)
-controlP5.Controller : Slider setImages(PImage, PImage, PImage)
-controlP5.Controller : Slider setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Slider setLabel(String)
-controlP5.Controller : Slider setLabelVisible(boolean)
-controlP5.Controller : Slider setLock(boolean)
-controlP5.Controller : Slider setMax(float)
-controlP5.Controller : Slider setMin(float)
-controlP5.Controller : Slider setMouseOver(boolean)
-controlP5.Controller : Slider setMoveable(boolean)
-controlP5.Controller : Slider setPosition(float, float)
-controlP5.Controller : Slider setPosition(float[])
-controlP5.Controller : Slider setSize(PImage)
-controlP5.Controller : Slider setSize(int, int)
-controlP5.Controller : Slider setStringValue(String)
-controlP5.Controller : Slider setUpdate(boolean)
-controlP5.Controller : Slider setValue(float)
-controlP5.Controller : Slider setValueLabel(String)
-controlP5.Controller : Slider setValueSelf(float)
-controlP5.Controller : Slider setView(ControllerView)
-controlP5.Controller : Slider setVisible(boolean)
-controlP5.Controller : Slider setWidth(int)
-controlP5.Controller : Slider show()
-controlP5.Controller : Slider unlock()
-controlP5.Controller : Slider unplugFrom(Object)
-controlP5.Controller : Slider unplugFrom(Object[])
-controlP5.Controller : Slider unregisterTooltip()
-controlP5.Controller : Slider update()
-controlP5.Controller : Slider updateSize()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.Slider : ArrayList getTickMarks()
-controlP5.Slider : Slider setColorTickMark(int)
-controlP5.Slider : Slider setHandleSize(int)
-controlP5.Slider : Slider setHeight(int)
-controlP5.Slider : Slider setMax(float)
-controlP5.Slider : Slider setMin(float)
-controlP5.Slider : Slider setNumberOfTickMarks(int)
-controlP5.Slider : Slider setRange(float, float)
-controlP5.Slider : Slider setScrollSensitivity(float)
-controlP5.Slider : Slider setSize(int, int)
-controlP5.Slider : Slider setSliderMode(int)
-controlP5.Slider : Slider setTriggerEvent(int)
-controlP5.Slider : Slider setValue(float)
-controlP5.Slider : Slider setWidth(int)
-controlP5.Slider : Slider showTickMarks(boolean)
-controlP5.Slider : Slider shuffle()
-controlP5.Slider : Slider snapToTickMarks(boolean)
-controlP5.Slider : Slider update()
-controlP5.Slider : TickMark getTickMark(int)
-controlP5.Slider : float getMax()
-controlP5.Slider : float getMin()
-controlP5.Slider : float getValue()
-controlP5.Slider : float getValuePosition()
-controlP5.Slider : int getDirection()
-controlP5.Slider : int getHandleSize()
-controlP5.Slider : int getNumberOfTickMarks()
-controlP5.Slider : int getSliderMode()
-controlP5.Slider : int getTriggerEvent()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : Slider addCallback(CallbackListener)
+main.java.controlp5.Controller : Slider addListener(ControlListener)
+main.java.controlp5.Controller : Slider addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Slider align(int, int, int, int)
+main.java.controlp5.Controller : Slider bringToFront()
+main.java.controlp5.Controller : Slider bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Slider hide()
+main.java.controlp5.Controller : Slider linebreak()
+main.java.controlp5.Controller : Slider listen(boolean)
+main.java.controlp5.Controller : Slider lock()
+main.java.controlp5.Controller : Slider onChange(CallbackListener)
+main.java.controlp5.Controller : Slider onClick(CallbackListener)
+main.java.controlp5.Controller : Slider onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Slider onDrag(CallbackListener)
+main.java.controlp5.Controller : Slider onDraw(ControllerView)
+main.java.controlp5.Controller : Slider onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Slider onEnter(CallbackListener)
+main.java.controlp5.Controller : Slider onLeave(CallbackListener)
+main.java.controlp5.Controller : Slider onMove(CallbackListener)
+main.java.controlp5.Controller : Slider onPress(CallbackListener)
+main.java.controlp5.Controller : Slider onRelease(CallbackListener)
+main.java.controlp5.Controller : Slider onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Slider onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Slider onWheel(CallbackListener)
+main.java.controlp5.Controller : Slider plugTo(Object)
+main.java.controlp5.Controller : Slider plugTo(Object, String)
+main.java.controlp5.Controller : Slider plugTo(Object[])
+main.java.controlp5.Controller : Slider plugTo(Object[], String)
+main.java.controlp5.Controller : Slider registerProperty(String)
+main.java.controlp5.Controller : Slider registerProperty(String, String)
+main.java.controlp5.Controller : Slider registerTooltip(String)
+main.java.controlp5.Controller : Slider removeBehavior()
+main.java.controlp5.Controller : Slider removeCallback()
+main.java.controlp5.Controller : Slider removeCallback(CallbackListener)
+main.java.controlp5.Controller : Slider removeListener(ControlListener)
+main.java.controlp5.Controller : Slider removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Slider removeListenersFor(int)
+main.java.controlp5.Controller : Slider removeProperty(String)
+main.java.controlp5.Controller : Slider removeProperty(String, String)
+main.java.controlp5.Controller : Slider setArrayValue(float[])
+main.java.controlp5.Controller : Slider setArrayValue(int, float)
+main.java.controlp5.Controller : Slider setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Slider setBroadcast(boolean)
+main.java.controlp5.Controller : Slider setCaptionLabel(String)
+main.java.controlp5.Controller : Slider setColor(CColor)
+main.java.controlp5.Controller : Slider setColorActive(int)
+main.java.controlp5.Controller : Slider setColorBackground(int)
+main.java.controlp5.Controller : Slider setColorCaptionLabel(int)
+main.java.controlp5.Controller : Slider setColorForeground(int)
+main.java.controlp5.Controller : Slider setColorLabel(int)
+main.java.controlp5.Controller : Slider setColorValue(int)
+main.java.controlp5.Controller : Slider setColorValueLabel(int)
+main.java.controlp5.Controller : Slider setDecimalPrecision(int)
+main.java.controlp5.Controller : Slider setDefaultValue(float)
+main.java.controlp5.Controller : Slider setHeight(int)
+main.java.controlp5.Controller : Slider setId(int)
+main.java.controlp5.Controller : Slider setImage(PImage)
+main.java.controlp5.Controller : Slider setImage(PImage, int)
+main.java.controlp5.Controller : Slider setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Slider setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Slider setLabel(String)
+main.java.controlp5.Controller : Slider setLabelVisible(boolean)
+main.java.controlp5.Controller : Slider setLock(boolean)
+main.java.controlp5.Controller : Slider setMax(float)
+main.java.controlp5.Controller : Slider setMin(float)
+main.java.controlp5.Controller : Slider setMouseOver(boolean)
+main.java.controlp5.Controller : Slider setMoveable(boolean)
+main.java.controlp5.Controller : Slider setPosition(float, float)
+main.java.controlp5.Controller : Slider setPosition(float[])
+main.java.controlp5.Controller : Slider setSize(PImage)
+main.java.controlp5.Controller : Slider setSize(int, int)
+main.java.controlp5.Controller : Slider setStringValue(String)
+main.java.controlp5.Controller : Slider setUpdate(boolean)
+main.java.controlp5.Controller : Slider setValue(float)
+main.java.controlp5.Controller : Slider setValueLabel(String)
+main.java.controlp5.Controller : Slider setValueSelf(float)
+main.java.controlp5.Controller : Slider setView(ControllerView)
+main.java.controlp5.Controller : Slider setVisible(boolean)
+main.java.controlp5.Controller : Slider setWidth(int)
+main.java.controlp5.Controller : Slider show()
+main.java.controlp5.Controller : Slider unlock()
+main.java.controlp5.Controller : Slider unplugFrom(Object)
+main.java.controlp5.Controller : Slider unplugFrom(Object[])
+main.java.controlp5.Controller : Slider unregisterTooltip()
+main.java.controlp5.Controller : Slider update()
+main.java.controlp5.Controller : Slider updateSize()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Slider : ArrayList getTickMarks()
+main.java.controlp5.Slider : Slider setColorTickMark(int)
+main.java.controlp5.Slider : Slider setHandleSize(int)
+main.java.controlp5.Slider : Slider setHeight(int)
+main.java.controlp5.Slider : Slider setMax(float)
+main.java.controlp5.Slider : Slider setMin(float)
+main.java.controlp5.Slider : Slider setNumberOfTickMarks(int)
+main.java.controlp5.Slider : Slider setRange(float, float)
+main.java.controlp5.Slider : Slider setScrollSensitivity(float)
+main.java.controlp5.Slider : Slider setSize(int, int)
+main.java.controlp5.Slider : Slider setSliderMode(int)
+main.java.controlp5.Slider : Slider setTriggerEvent(int)
+main.java.controlp5.Slider : Slider setValue(float)
+main.java.controlp5.Slider : Slider setWidth(int)
+main.java.controlp5.Slider : Slider showTickMarks(boolean)
+main.java.controlp5.Slider : Slider shuffle()
+main.java.controlp5.Slider : Slider snapToTickMarks(boolean)
+main.java.controlp5.Slider : Slider update()
+main.java.controlp5.Slider : TickMark getTickMark(int)
+main.java.controlp5.Slider : float getMax()
+main.java.controlp5.Slider : float getMin()
+main.java.controlp5.Slider : float getValue()
+main.java.controlp5.Slider : float getValuePosition()
+main.java.controlp5.Slider : int getDirection()
+main.java.controlp5.Slider : int getHandleSize()
+main.java.controlp5.Slider : int getNumberOfTickMarks()
+main.java.controlp5.Slider : int getSliderMode()
+main.java.controlp5.Slider : int getTriggerEvent()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5slider2D/ControlP5slider2D.pde b/examples/controllers/ControlP5slider2D/ControlP5slider2D.pde
index bf3062d..1054640 100644
--- a/examples/controllers/ControlP5slider2D/ControlP5slider2D.pde
+++ b/examples/controllers/ControlP5slider2D/ControlP5slider2D.pde
@@ -76,158 +76,158 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : Slider2D addCallback(CallbackListener)
-controlP5.Controller : Slider2D addListener(ControlListener)
-controlP5.Controller : Slider2D addListenerFor(int, CallbackListener)
-controlP5.Controller : Slider2D align(int, int, int, int)
-controlP5.Controller : Slider2D bringToFront()
-controlP5.Controller : Slider2D bringToFront(ControllerInterface)
-controlP5.Controller : Slider2D hide()
-controlP5.Controller : Slider2D linebreak()
-controlP5.Controller : Slider2D listen(boolean)
-controlP5.Controller : Slider2D lock()
-controlP5.Controller : Slider2D onChange(CallbackListener)
-controlP5.Controller : Slider2D onClick(CallbackListener)
-controlP5.Controller : Slider2D onDoublePress(CallbackListener)
-controlP5.Controller : Slider2D onDrag(CallbackListener)
-controlP5.Controller : Slider2D onDraw(ControllerView)
-controlP5.Controller : Slider2D onEndDrag(CallbackListener)
-controlP5.Controller : Slider2D onEnter(CallbackListener)
-controlP5.Controller : Slider2D onLeave(CallbackListener)
-controlP5.Controller : Slider2D onMove(CallbackListener)
-controlP5.Controller : Slider2D onPress(CallbackListener)
-controlP5.Controller : Slider2D onRelease(CallbackListener)
-controlP5.Controller : Slider2D onReleaseOutside(CallbackListener)
-controlP5.Controller : Slider2D onStartDrag(CallbackListener)
-controlP5.Controller : Slider2D onWheel(CallbackListener)
-controlP5.Controller : Slider2D plugTo(Object)
-controlP5.Controller : Slider2D plugTo(Object, String)
-controlP5.Controller : Slider2D plugTo(Object[])
-controlP5.Controller : Slider2D plugTo(Object[], String)
-controlP5.Controller : Slider2D registerProperty(String)
-controlP5.Controller : Slider2D registerProperty(String, String)
-controlP5.Controller : Slider2D registerTooltip(String)
-controlP5.Controller : Slider2D removeBehavior()
-controlP5.Controller : Slider2D removeCallback()
-controlP5.Controller : Slider2D removeCallback(CallbackListener)
-controlP5.Controller : Slider2D removeListener(ControlListener)
-controlP5.Controller : Slider2D removeListenerFor(int, CallbackListener)
-controlP5.Controller : Slider2D removeListenersFor(int)
-controlP5.Controller : Slider2D removeProperty(String)
-controlP5.Controller : Slider2D removeProperty(String, String)
-controlP5.Controller : Slider2D setArrayValue(float[])
-controlP5.Controller : Slider2D setArrayValue(int, float)
-controlP5.Controller : Slider2D setBehavior(ControlBehavior)
-controlP5.Controller : Slider2D setBroadcast(boolean)
-controlP5.Controller : Slider2D setCaptionLabel(String)
-controlP5.Controller : Slider2D setColor(CColor)
-controlP5.Controller : Slider2D setColorActive(int)
-controlP5.Controller : Slider2D setColorBackground(int)
-controlP5.Controller : Slider2D setColorCaptionLabel(int)
-controlP5.Controller : Slider2D setColorForeground(int)
-controlP5.Controller : Slider2D setColorLabel(int)
-controlP5.Controller : Slider2D setColorValue(int)
-controlP5.Controller : Slider2D setColorValueLabel(int)
-controlP5.Controller : Slider2D setDecimalPrecision(int)
-controlP5.Controller : Slider2D setDefaultValue(float)
-controlP5.Controller : Slider2D setHeight(int)
-controlP5.Controller : Slider2D setId(int)
-controlP5.Controller : Slider2D setImage(PImage)
-controlP5.Controller : Slider2D setImage(PImage, int)
-controlP5.Controller : Slider2D setImages(PImage, PImage, PImage)
-controlP5.Controller : Slider2D setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Slider2D setLabel(String)
-controlP5.Controller : Slider2D setLabelVisible(boolean)
-controlP5.Controller : Slider2D setLock(boolean)
-controlP5.Controller : Slider2D setMax(float)
-controlP5.Controller : Slider2D setMin(float)
-controlP5.Controller : Slider2D setMouseOver(boolean)
-controlP5.Controller : Slider2D setMoveable(boolean)
-controlP5.Controller : Slider2D setPosition(float, float)
-controlP5.Controller : Slider2D setPosition(float[])
-controlP5.Controller : Slider2D setSize(PImage)
-controlP5.Controller : Slider2D setSize(int, int)
-controlP5.Controller : Slider2D setStringValue(String)
-controlP5.Controller : Slider2D setUpdate(boolean)
-controlP5.Controller : Slider2D setValue(float)
-controlP5.Controller : Slider2D setValueLabel(String)
-controlP5.Controller : Slider2D setValueSelf(float)
-controlP5.Controller : Slider2D setView(ControllerView)
-controlP5.Controller : Slider2D setVisible(boolean)
-controlP5.Controller : Slider2D setWidth(int)
-controlP5.Controller : Slider2D show()
-controlP5.Controller : Slider2D unlock()
-controlP5.Controller : Slider2D unplugFrom(Object)
-controlP5.Controller : Slider2D unplugFrom(Object[])
-controlP5.Controller : Slider2D unregisterTooltip()
-controlP5.Controller : Slider2D update()
-controlP5.Controller : Slider2D updateSize()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.Slider2D : Slider2D disableCrosshair()
-controlP5.Slider2D : Slider2D enableCrosshair()
-controlP5.Slider2D : Slider2D setArrayValue(float[])
-controlP5.Slider2D : Slider2D setCursorX(float)
-controlP5.Slider2D : Slider2D setCursorY(float)
-controlP5.Slider2D : Slider2D setMaxX(float)
-controlP5.Slider2D : Slider2D setMaxY(float)
-controlP5.Slider2D : Slider2D setMinMax(float, float, float, float)
-controlP5.Slider2D : Slider2D setMinX(float)
-controlP5.Slider2D : Slider2D setMinY(float)
-controlP5.Slider2D : Slider2D setValue(float)
-controlP5.Slider2D : Slider2D setValue(float, float)
-controlP5.Slider2D : Slider2D shuffle()
-controlP5.Slider2D : float getCursorHeight()
-controlP5.Slider2D : float getCursorWidth()
-controlP5.Slider2D : float getCursorX()
-controlP5.Slider2D : float getCursorY()
-controlP5.Slider2D : float getMaxX()
-controlP5.Slider2D : float getMaxY()
-controlP5.Slider2D : float getMinX()
-controlP5.Slider2D : float getMinY()
-controlP5.Slider2D : float[] getArrayValue()
-controlP5.Slider2D : void setValueLabelSeparator(String)
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : Slider2D addCallback(CallbackListener)
+main.java.controlp5.Controller : Slider2D addListener(ControlListener)
+main.java.controlp5.Controller : Slider2D addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Slider2D align(int, int, int, int)
+main.java.controlp5.Controller : Slider2D bringToFront()
+main.java.controlp5.Controller : Slider2D bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Slider2D hide()
+main.java.controlp5.Controller : Slider2D linebreak()
+main.java.controlp5.Controller : Slider2D listen(boolean)
+main.java.controlp5.Controller : Slider2D lock()
+main.java.controlp5.Controller : Slider2D onChange(CallbackListener)
+main.java.controlp5.Controller : Slider2D onClick(CallbackListener)
+main.java.controlp5.Controller : Slider2D onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Slider2D onDrag(CallbackListener)
+main.java.controlp5.Controller : Slider2D onDraw(ControllerView)
+main.java.controlp5.Controller : Slider2D onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Slider2D onEnter(CallbackListener)
+main.java.controlp5.Controller : Slider2D onLeave(CallbackListener)
+main.java.controlp5.Controller : Slider2D onMove(CallbackListener)
+main.java.controlp5.Controller : Slider2D onPress(CallbackListener)
+main.java.controlp5.Controller : Slider2D onRelease(CallbackListener)
+main.java.controlp5.Controller : Slider2D onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Slider2D onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Slider2D onWheel(CallbackListener)
+main.java.controlp5.Controller : Slider2D plugTo(Object)
+main.java.controlp5.Controller : Slider2D plugTo(Object, String)
+main.java.controlp5.Controller : Slider2D plugTo(Object[])
+main.java.controlp5.Controller : Slider2D plugTo(Object[], String)
+main.java.controlp5.Controller : Slider2D registerProperty(String)
+main.java.controlp5.Controller : Slider2D registerProperty(String, String)
+main.java.controlp5.Controller : Slider2D registerTooltip(String)
+main.java.controlp5.Controller : Slider2D removeBehavior()
+main.java.controlp5.Controller : Slider2D removeCallback()
+main.java.controlp5.Controller : Slider2D removeCallback(CallbackListener)
+main.java.controlp5.Controller : Slider2D removeListener(ControlListener)
+main.java.controlp5.Controller : Slider2D removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Slider2D removeListenersFor(int)
+main.java.controlp5.Controller : Slider2D removeProperty(String)
+main.java.controlp5.Controller : Slider2D removeProperty(String, String)
+main.java.controlp5.Controller : Slider2D setArrayValue(float[])
+main.java.controlp5.Controller : Slider2D setArrayValue(int, float)
+main.java.controlp5.Controller : Slider2D setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Slider2D setBroadcast(boolean)
+main.java.controlp5.Controller : Slider2D setCaptionLabel(String)
+main.java.controlp5.Controller : Slider2D setColor(CColor)
+main.java.controlp5.Controller : Slider2D setColorActive(int)
+main.java.controlp5.Controller : Slider2D setColorBackground(int)
+main.java.controlp5.Controller : Slider2D setColorCaptionLabel(int)
+main.java.controlp5.Controller : Slider2D setColorForeground(int)
+main.java.controlp5.Controller : Slider2D setColorLabel(int)
+main.java.controlp5.Controller : Slider2D setColorValue(int)
+main.java.controlp5.Controller : Slider2D setColorValueLabel(int)
+main.java.controlp5.Controller : Slider2D setDecimalPrecision(int)
+main.java.controlp5.Controller : Slider2D setDefaultValue(float)
+main.java.controlp5.Controller : Slider2D setHeight(int)
+main.java.controlp5.Controller : Slider2D setId(int)
+main.java.controlp5.Controller : Slider2D setImage(PImage)
+main.java.controlp5.Controller : Slider2D setImage(PImage, int)
+main.java.controlp5.Controller : Slider2D setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Slider2D setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Slider2D setLabel(String)
+main.java.controlp5.Controller : Slider2D setLabelVisible(boolean)
+main.java.controlp5.Controller : Slider2D setLock(boolean)
+main.java.controlp5.Controller : Slider2D setMax(float)
+main.java.controlp5.Controller : Slider2D setMin(float)
+main.java.controlp5.Controller : Slider2D setMouseOver(boolean)
+main.java.controlp5.Controller : Slider2D setMoveable(boolean)
+main.java.controlp5.Controller : Slider2D setPosition(float, float)
+main.java.controlp5.Controller : Slider2D setPosition(float[])
+main.java.controlp5.Controller : Slider2D setSize(PImage)
+main.java.controlp5.Controller : Slider2D setSize(int, int)
+main.java.controlp5.Controller : Slider2D setStringValue(String)
+main.java.controlp5.Controller : Slider2D setUpdate(boolean)
+main.java.controlp5.Controller : Slider2D setValue(float)
+main.java.controlp5.Controller : Slider2D setValueLabel(String)
+main.java.controlp5.Controller : Slider2D setValueSelf(float)
+main.java.controlp5.Controller : Slider2D setView(ControllerView)
+main.java.controlp5.Controller : Slider2D setVisible(boolean)
+main.java.controlp5.Controller : Slider2D setWidth(int)
+main.java.controlp5.Controller : Slider2D show()
+main.java.controlp5.Controller : Slider2D unlock()
+main.java.controlp5.Controller : Slider2D unplugFrom(Object)
+main.java.controlp5.Controller : Slider2D unplugFrom(Object[])
+main.java.controlp5.Controller : Slider2D unregisterTooltip()
+main.java.controlp5.Controller : Slider2D update()
+main.java.controlp5.Controller : Slider2D updateSize()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Slider2D : Slider2D disableCrosshair()
+main.java.controlp5.Slider2D : Slider2D enableCrosshair()
+main.java.controlp5.Slider2D : Slider2D setArrayValue(float[])
+main.java.controlp5.Slider2D : Slider2D setCursorX(float)
+main.java.controlp5.Slider2D : Slider2D setCursorY(float)
+main.java.controlp5.Slider2D : Slider2D setMaxX(float)
+main.java.controlp5.Slider2D : Slider2D setMaxY(float)
+main.java.controlp5.Slider2D : Slider2D setMinMax(float, float, float, float)
+main.java.controlp5.Slider2D : Slider2D setMinX(float)
+main.java.controlp5.Slider2D : Slider2D setMinY(float)
+main.java.controlp5.Slider2D : Slider2D setValue(float)
+main.java.controlp5.Slider2D : Slider2D setValue(float, float)
+main.java.controlp5.Slider2D : Slider2D shuffle()
+main.java.controlp5.Slider2D : float getCursorHeight()
+main.java.controlp5.Slider2D : float getCursorWidth()
+main.java.controlp5.Slider2D : float getCursorX()
+main.java.controlp5.Slider2D : float getCursorY()
+main.java.controlp5.Slider2D : float getMaxX()
+main.java.controlp5.Slider2D : float getMaxY()
+main.java.controlp5.Slider2D : float getMinX()
+main.java.controlp5.Slider2D : float getMinY()
+main.java.controlp5.Slider2D : float[] getArrayValue()
+main.java.controlp5.Slider2D : void setValueLabelSeparator(String)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5tab/ControlP5tab.pde b/examples/controllers/ControlP5tab/ControlP5tab.pde
index 15f1a10..7e87af9 100644
--- a/examples/controllers/ControlP5tab/ControlP5tab.pde
+++ b/examples/controllers/ControlP5tab/ControlP5tab.pde
@@ -130,102 +130,102 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : Canvas addCanvas(Canvas)
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab add(ControllerInterface)
-controlP5.ControllerGroup : Tab addListener(ControlListener)
-controlP5.ControllerGroup : Tab bringToFront()
-controlP5.ControllerGroup : Tab bringToFront(ControllerInterface)
-controlP5.ControllerGroup : Tab close()
-controlP5.ControllerGroup : Tab disableCollapse()
-controlP5.ControllerGroup : Tab enableCollapse()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : Tab hide()
-controlP5.ControllerGroup : Tab hideArrow()
-controlP5.ControllerGroup : Tab hideBar()
-controlP5.ControllerGroup : Tab moveTo(ControlWindow)
-controlP5.ControllerGroup : Tab moveTo(PApplet)
-controlP5.ControllerGroup : Tab open()
-controlP5.ControllerGroup : Tab registerProperty(String)
-controlP5.ControllerGroup : Tab registerProperty(String, String)
-controlP5.ControllerGroup : Tab remove(CDrawable)
-controlP5.ControllerGroup : Tab remove(ControllerInterface)
-controlP5.ControllerGroup : Tab removeCanvas(Canvas)
-controlP5.ControllerGroup : Tab removeListener(ControlListener)
-controlP5.ControllerGroup : Tab removeProperty(String)
-controlP5.ControllerGroup : Tab removeProperty(String, String)
-controlP5.ControllerGroup : Tab setAddress(String)
-controlP5.ControllerGroup : Tab setArrayValue(float[])
-controlP5.ControllerGroup : Tab setArrayValue(int, float)
-controlP5.ControllerGroup : Tab setCaptionLabel(String)
-controlP5.ControllerGroup : Tab setColor(CColor)
-controlP5.ControllerGroup : Tab setColorActive(int)
-controlP5.ControllerGroup : Tab setColorBackground(int)
-controlP5.ControllerGroup : Tab setColorForeground(int)
-controlP5.ControllerGroup : Tab setColorLabel(int)
-controlP5.ControllerGroup : Tab setColorValue(int)
-controlP5.ControllerGroup : Tab setHeight(int)
-controlP5.ControllerGroup : Tab setId(int)
-controlP5.ControllerGroup : Tab setLabel(String)
-controlP5.ControllerGroup : Tab setMouseOver(boolean)
-controlP5.ControllerGroup : Tab setMoveable(boolean)
-controlP5.ControllerGroup : Tab setOpen(boolean)
-controlP5.ControllerGroup : Tab setPosition(float, float)
-controlP5.ControllerGroup : Tab setPosition(float[])
-controlP5.ControllerGroup : Tab setSize(int, int)
-controlP5.ControllerGroup : Tab setStringValue(String)
-controlP5.ControllerGroup : Tab setTitle(String)
-controlP5.ControllerGroup : Tab setUpdate(boolean)
-controlP5.ControllerGroup : Tab setValue(float)
-controlP5.ControllerGroup : Tab setVisible(boolean)
-controlP5.ControllerGroup : Tab setWidth(int)
-controlP5.ControllerGroup : Tab show()
-controlP5.ControllerGroup : Tab showArrow()
-controlP5.ControllerGroup : Tab showBar()
-controlP5.ControllerGroup : Tab update()
-controlP5.ControllerGroup : Tab updateAbsolutePosition()
-controlP5.ControllerGroup : boolean isBarVisible()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getArrayValue(int)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : float[] getPosition()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : int listenerSize()
-controlP5.ControllerGroup : void controlEvent(ControlEvent)
-controlP5.ControllerGroup : void remove()
-controlP5.Tab : String getStringValue()
-controlP5.Tab : Tab activateEvent(boolean)
-controlP5.Tab : Tab bringToFront()
-controlP5.Tab : Tab moveTo(ControlWindow)
-controlP5.Tab : Tab setActive(boolean)
-controlP5.Tab : Tab setAlwaysActive(boolean)
-controlP5.Tab : Tab setHeight(int)
-controlP5.Tab : Tab setLabel(String)
-controlP5.Tab : Tab setValue(float)
-controlP5.Tab : Tab setWidth(int)
-controlP5.Tab : boolean isActive()
-controlP5.Tab : boolean isAlwaysActive()
-controlP5.Tab : float getValue()
+main.java.controlp5.ControllerGroup : CColor getColor()
+main.java.controlp5.ControllerGroup : Canvas addCanvas(Canvas)
+main.java.controlp5.ControllerGroup : ControlWindow getWindow()
+main.java.controlp5.ControllerGroup : Controller getController(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String, String)
+main.java.controlp5.ControllerGroup : Label getCaptionLabel()
+main.java.controlp5.ControllerGroup : Label getValueLabel()
+main.java.controlp5.ControllerGroup : String getAddress()
+main.java.controlp5.ControllerGroup : String getInfo()
+main.java.controlp5.ControllerGroup : String getName()
+main.java.controlp5.ControllerGroup : String getStringValue()
+main.java.controlp5.ControllerGroup : String toString()
+main.java.controlp5.ControllerGroup : Tab add(ControllerInterface)
+main.java.controlp5.ControllerGroup : Tab addListener(ControlListener)
+main.java.controlp5.ControllerGroup : Tab bringToFront()
+main.java.controlp5.ControllerGroup : Tab bringToFront(ControllerInterface)
+main.java.controlp5.ControllerGroup : Tab close()
+main.java.controlp5.ControllerGroup : Tab disableCollapse()
+main.java.controlp5.ControllerGroup : Tab enableCollapse()
+main.java.controlp5.ControllerGroup : Tab getTab()
+main.java.controlp5.ControllerGroup : Tab hide()
+main.java.controlp5.ControllerGroup : Tab hideArrow()
+main.java.controlp5.ControllerGroup : Tab hideBar()
+main.java.controlp5.ControllerGroup : Tab moveTo(ControlWindow)
+main.java.controlp5.ControllerGroup : Tab moveTo(PApplet)
+main.java.controlp5.ControllerGroup : Tab open()
+main.java.controlp5.ControllerGroup : Tab registerProperty(String)
+main.java.controlp5.ControllerGroup : Tab registerProperty(String, String)
+main.java.controlp5.ControllerGroup : Tab remove(CDrawable)
+main.java.controlp5.ControllerGroup : Tab remove(ControllerInterface)
+main.java.controlp5.ControllerGroup : Tab removeCanvas(Canvas)
+main.java.controlp5.ControllerGroup : Tab removeListener(ControlListener)
+main.java.controlp5.ControllerGroup : Tab removeProperty(String)
+main.java.controlp5.ControllerGroup : Tab removeProperty(String, String)
+main.java.controlp5.ControllerGroup : Tab setAddress(String)
+main.java.controlp5.ControllerGroup : Tab setArrayValue(float[])
+main.java.controlp5.ControllerGroup : Tab setArrayValue(int, float)
+main.java.controlp5.ControllerGroup : Tab setCaptionLabel(String)
+main.java.controlp5.ControllerGroup : Tab setColor(CColor)
+main.java.controlp5.ControllerGroup : Tab setColorActive(int)
+main.java.controlp5.ControllerGroup : Tab setColorBackground(int)
+main.java.controlp5.ControllerGroup : Tab setColorForeground(int)
+main.java.controlp5.ControllerGroup : Tab setColorLabel(int)
+main.java.controlp5.ControllerGroup : Tab setColorValue(int)
+main.java.controlp5.ControllerGroup : Tab setHeight(int)
+main.java.controlp5.ControllerGroup : Tab setId(int)
+main.java.controlp5.ControllerGroup : Tab setLabel(String)
+main.java.controlp5.ControllerGroup : Tab setMouseOver(boolean)
+main.java.controlp5.ControllerGroup : Tab setMoveable(boolean)
+main.java.controlp5.ControllerGroup : Tab setOpen(boolean)
+main.java.controlp5.ControllerGroup : Tab setPosition(float, float)
+main.java.controlp5.ControllerGroup : Tab setPosition(float[])
+main.java.controlp5.ControllerGroup : Tab setSize(int, int)
+main.java.controlp5.ControllerGroup : Tab setStringValue(String)
+main.java.controlp5.ControllerGroup : Tab setTitle(String)
+main.java.controlp5.ControllerGroup : Tab setUpdate(boolean)
+main.java.controlp5.ControllerGroup : Tab setValue(float)
+main.java.controlp5.ControllerGroup : Tab setVisible(boolean)
+main.java.controlp5.ControllerGroup : Tab setWidth(int)
+main.java.controlp5.ControllerGroup : Tab show()
+main.java.controlp5.ControllerGroup : Tab showArrow()
+main.java.controlp5.ControllerGroup : Tab showBar()
+main.java.controlp5.ControllerGroup : Tab update()
+main.java.controlp5.ControllerGroup : Tab updateAbsolutePosition()
+main.java.controlp5.ControllerGroup : boolean isBarVisible()
+main.java.controlp5.ControllerGroup : boolean isCollapse()
+main.java.controlp5.ControllerGroup : boolean isMouseOver()
+main.java.controlp5.ControllerGroup : boolean isMoveable()
+main.java.controlp5.ControllerGroup : boolean isOpen()
+main.java.controlp5.ControllerGroup : boolean isUpdate()
+main.java.controlp5.ControllerGroup : boolean isVisible()
+main.java.controlp5.ControllerGroup : boolean setMousePressed(boolean)
+main.java.controlp5.ControllerGroup : float getArrayValue(int)
+main.java.controlp5.ControllerGroup : float getValue()
+main.java.controlp5.ControllerGroup : float[] getArrayValue()
+main.java.controlp5.ControllerGroup : float[] getPosition()
+main.java.controlp5.ControllerGroup : int getHeight()
+main.java.controlp5.ControllerGroup : int getId()
+main.java.controlp5.ControllerGroup : int getWidth()
+main.java.controlp5.ControllerGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : void controlEvent(ControlEvent)
+main.java.controlp5.ControllerGroup : void remove()
+main.java.controlp5.Tab : String getStringValue()
+main.java.controlp5.Tab : Tab activateEvent(boolean)
+main.java.controlp5.Tab : Tab bringToFront()
+main.java.controlp5.Tab : Tab moveTo(ControlWindow)
+main.java.controlp5.Tab : Tab setActive(boolean)
+main.java.controlp5.Tab : Tab setAlwaysActive(boolean)
+main.java.controlp5.Tab : Tab setHeight(int)
+main.java.controlp5.Tab : Tab setLabel(String)
+main.java.controlp5.Tab : Tab setValue(float)
+main.java.controlp5.Tab : Tab setWidth(int)
+main.java.controlp5.Tab : boolean isActive()
+main.java.controlp5.Tab : boolean isAlwaysActive()
+main.java.controlp5.Tab : float getValue()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5textarea/ControlP5textarea.pde b/examples/controllers/ControlP5textarea/ControlP5textarea.pde
index 696846f..4544d76 100644
--- a/examples/controllers/ControlP5textarea/ControlP5textarea.pde
+++ b/examples/controllers/ControlP5textarea/ControlP5textarea.pde
@@ -108,117 +108,117 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControllerGroup : CColor getColor()
-controlP5.ControllerGroup : Canvas addCanvas(Canvas)
-controlP5.ControllerGroup : ControlWindow getWindow()
-controlP5.ControllerGroup : Controller getController(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String)
-controlP5.ControllerGroup : ControllerProperty getProperty(String, String)
-controlP5.ControllerGroup : Label getCaptionLabel()
-controlP5.ControllerGroup : Label getValueLabel()
-controlP5.ControllerGroup : String getAddress()
-controlP5.ControllerGroup : String getInfo()
-controlP5.ControllerGroup : String getName()
-controlP5.ControllerGroup : String getStringValue()
-controlP5.ControllerGroup : String toString()
-controlP5.ControllerGroup : Tab getTab()
-controlP5.ControllerGroup : Textarea add(ControllerInterface)
-controlP5.ControllerGroup : Textarea addListener(ControlListener)
-controlP5.ControllerGroup : Textarea bringToFront()
-controlP5.ControllerGroup : Textarea bringToFront(ControllerInterface)
-controlP5.ControllerGroup : Textarea close()
-controlP5.ControllerGroup : Textarea disableCollapse()
-controlP5.ControllerGroup : Textarea enableCollapse()
-controlP5.ControllerGroup : Textarea hide()
-controlP5.ControllerGroup : Textarea hideArrow()
-controlP5.ControllerGroup : Textarea hideBar()
-controlP5.ControllerGroup : Textarea moveTo(ControlWindow)
-controlP5.ControllerGroup : Textarea moveTo(PApplet)
-controlP5.ControllerGroup : Textarea open()
-controlP5.ControllerGroup : Textarea registerProperty(String)
-controlP5.ControllerGroup : Textarea registerProperty(String, String)
-controlP5.ControllerGroup : Textarea remove(CDrawable)
-controlP5.ControllerGroup : Textarea remove(ControllerInterface)
-controlP5.ControllerGroup : Textarea removeCanvas(Canvas)
-controlP5.ControllerGroup : Textarea removeListener(ControlListener)
-controlP5.ControllerGroup : Textarea removeProperty(String)
-controlP5.ControllerGroup : Textarea removeProperty(String, String)
-controlP5.ControllerGroup : Textarea setAddress(String)
-controlP5.ControllerGroup : Textarea setArrayValue(float[])
-controlP5.ControllerGroup : Textarea setArrayValue(int, float)
-controlP5.ControllerGroup : Textarea setCaptionLabel(String)
-controlP5.ControllerGroup : Textarea setColor(CColor)
-controlP5.ControllerGroup : Textarea setColorActive(int)
-controlP5.ControllerGroup : Textarea setColorBackground(int)
-controlP5.ControllerGroup : Textarea setColorForeground(int)
-controlP5.ControllerGroup : Textarea setColorLabel(int)
-controlP5.ControllerGroup : Textarea setColorValue(int)
-controlP5.ControllerGroup : Textarea setHeight(int)
-controlP5.ControllerGroup : Textarea setId(int)
-controlP5.ControllerGroup : Textarea setLabel(String)
-controlP5.ControllerGroup : Textarea setMouseOver(boolean)
-controlP5.ControllerGroup : Textarea setMoveable(boolean)
-controlP5.ControllerGroup : Textarea setOpen(boolean)
-controlP5.ControllerGroup : Textarea setPosition(float, float)
-controlP5.ControllerGroup : Textarea setPosition(float[])
-controlP5.ControllerGroup : Textarea setSize(int, int)
-controlP5.ControllerGroup : Textarea setStringValue(String)
-controlP5.ControllerGroup : Textarea setTitle(String)
-controlP5.ControllerGroup : Textarea setUpdate(boolean)
-controlP5.ControllerGroup : Textarea setValue(float)
-controlP5.ControllerGroup : Textarea setVisible(boolean)
-controlP5.ControllerGroup : Textarea setWidth(int)
-controlP5.ControllerGroup : Textarea show()
-controlP5.ControllerGroup : Textarea showArrow()
-controlP5.ControllerGroup : Textarea showBar()
-controlP5.ControllerGroup : Textarea update()
-controlP5.ControllerGroup : Textarea updateAbsolutePosition()
-controlP5.ControllerGroup : boolean isBarVisible()
-controlP5.ControllerGroup : boolean isCollapse()
-controlP5.ControllerGroup : boolean isMouseOver()
-controlP5.ControllerGroup : boolean isMoveable()
-controlP5.ControllerGroup : boolean isOpen()
-controlP5.ControllerGroup : boolean isUpdate()
-controlP5.ControllerGroup : boolean isVisible()
-controlP5.ControllerGroup : boolean setMousePressed(boolean)
-controlP5.ControllerGroup : float getArrayValue(int)
-controlP5.ControllerGroup : float getValue()
-controlP5.ControllerGroup : float[] getArrayValue()
-controlP5.ControllerGroup : float[] getPosition()
-controlP5.ControllerGroup : int getHeight()
-controlP5.ControllerGroup : int getId()
-controlP5.ControllerGroup : int getWidth()
-controlP5.ControllerGroup : int listenerSize()
-controlP5.ControllerGroup : void controlEvent(ControlEvent)
-controlP5.ControllerGroup : void remove()
-controlP5.Textarea : Label getValueLabel()
-controlP5.Textarea : String getStringValue()
-controlP5.Textarea : String getText()
-controlP5.Textarea : Textarea append(String)
-controlP5.Textarea : Textarea append(String, int)
-controlP5.Textarea : Textarea clear()
-controlP5.Textarea : Textarea disableColorBackground()
-controlP5.Textarea : Textarea enableColorBackground()
-controlP5.Textarea : Textarea hideScrollbar()
-controlP5.Textarea : Textarea scroll(float)
-controlP5.Textarea : Textarea setBorderColor(int)
-controlP5.Textarea : Textarea setColor(int)
-controlP5.Textarea : Textarea setColorBackground(int)
-controlP5.Textarea : Textarea setFont(ControlFont)
-controlP5.Textarea : Textarea setFont(PFont)
-controlP5.Textarea : Textarea setFont(int)
-controlP5.Textarea : Textarea setHeight(int)
-controlP5.Textarea : Textarea setLineHeight(int)
-controlP5.Textarea : Textarea setScrollActive(int)
-controlP5.Textarea : Textarea setScrollBackground(int)
-controlP5.Textarea : Textarea setScrollForeground(int)
-controlP5.Textarea : Textarea setSize(int, int)
-controlP5.Textarea : Textarea setText(String)
-controlP5.Textarea : Textarea setWidth(int)
-controlP5.Textarea : Textarea showScrollbar()
-controlP5.Textarea : boolean isScrollable()
-controlP5.Textarea : float getValue()
-controlP5.Textarea : void controlEvent(ControlEvent)
+main.java.controlp5.ControllerGroup : CColor getColor()
+main.java.controlp5.ControllerGroup : Canvas addCanvas(Canvas)
+main.java.controlp5.ControllerGroup : ControlWindow getWindow()
+main.java.controlp5.ControllerGroup : Controller getController(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String)
+main.java.controlp5.ControllerGroup : ControllerProperty getProperty(String, String)
+main.java.controlp5.ControllerGroup : Label getCaptionLabel()
+main.java.controlp5.ControllerGroup : Label getValueLabel()
+main.java.controlp5.ControllerGroup : String getAddress()
+main.java.controlp5.ControllerGroup : String getInfo()
+main.java.controlp5.ControllerGroup : String getName()
+main.java.controlp5.ControllerGroup : String getStringValue()
+main.java.controlp5.ControllerGroup : String toString()
+main.java.controlp5.ControllerGroup : Tab getTab()
+main.java.controlp5.ControllerGroup : Textarea add(ControllerInterface)
+main.java.controlp5.ControllerGroup : Textarea addListener(ControlListener)
+main.java.controlp5.ControllerGroup : Textarea bringToFront()
+main.java.controlp5.ControllerGroup : Textarea bringToFront(ControllerInterface)
+main.java.controlp5.ControllerGroup : Textarea close()
+main.java.controlp5.ControllerGroup : Textarea disableCollapse()
+main.java.controlp5.ControllerGroup : Textarea enableCollapse()
+main.java.controlp5.ControllerGroup : Textarea hide()
+main.java.controlp5.ControllerGroup : Textarea hideArrow()
+main.java.controlp5.ControllerGroup : Textarea hideBar()
+main.java.controlp5.ControllerGroup : Textarea moveTo(ControlWindow)
+main.java.controlp5.ControllerGroup : Textarea moveTo(PApplet)
+main.java.controlp5.ControllerGroup : Textarea open()
+main.java.controlp5.ControllerGroup : Textarea registerProperty(String)
+main.java.controlp5.ControllerGroup : Textarea registerProperty(String, String)
+main.java.controlp5.ControllerGroup : Textarea remove(CDrawable)
+main.java.controlp5.ControllerGroup : Textarea remove(ControllerInterface)
+main.java.controlp5.ControllerGroup : Textarea removeCanvas(Canvas)
+main.java.controlp5.ControllerGroup : Textarea removeListener(ControlListener)
+main.java.controlp5.ControllerGroup : Textarea removeProperty(String)
+main.java.controlp5.ControllerGroup : Textarea removeProperty(String, String)
+main.java.controlp5.ControllerGroup : Textarea setAddress(String)
+main.java.controlp5.ControllerGroup : Textarea setArrayValue(float[])
+main.java.controlp5.ControllerGroup : Textarea setArrayValue(int, float)
+main.java.controlp5.ControllerGroup : Textarea setCaptionLabel(String)
+main.java.controlp5.ControllerGroup : Textarea setColor(CColor)
+main.java.controlp5.ControllerGroup : Textarea setColorActive(int)
+main.java.controlp5.ControllerGroup : Textarea setColorBackground(int)
+main.java.controlp5.ControllerGroup : Textarea setColorForeground(int)
+main.java.controlp5.ControllerGroup : Textarea setColorLabel(int)
+main.java.controlp5.ControllerGroup : Textarea setColorValue(int)
+main.java.controlp5.ControllerGroup : Textarea setHeight(int)
+main.java.controlp5.ControllerGroup : Textarea setId(int)
+main.java.controlp5.ControllerGroup : Textarea setLabel(String)
+main.java.controlp5.ControllerGroup : Textarea setMouseOver(boolean)
+main.java.controlp5.ControllerGroup : Textarea setMoveable(boolean)
+main.java.controlp5.ControllerGroup : Textarea setOpen(boolean)
+main.java.controlp5.ControllerGroup : Textarea setPosition(float, float)
+main.java.controlp5.ControllerGroup : Textarea setPosition(float[])
+main.java.controlp5.ControllerGroup : Textarea setSize(int, int)
+main.java.controlp5.ControllerGroup : Textarea setStringValue(String)
+main.java.controlp5.ControllerGroup : Textarea setTitle(String)
+main.java.controlp5.ControllerGroup : Textarea setUpdate(boolean)
+main.java.controlp5.ControllerGroup : Textarea setValue(float)
+main.java.controlp5.ControllerGroup : Textarea setVisible(boolean)
+main.java.controlp5.ControllerGroup : Textarea setWidth(int)
+main.java.controlp5.ControllerGroup : Textarea show()
+main.java.controlp5.ControllerGroup : Textarea showArrow()
+main.java.controlp5.ControllerGroup : Textarea showBar()
+main.java.controlp5.ControllerGroup : Textarea update()
+main.java.controlp5.ControllerGroup : Textarea updateAbsolutePosition()
+main.java.controlp5.ControllerGroup : boolean isBarVisible()
+main.java.controlp5.ControllerGroup : boolean isCollapse()
+main.java.controlp5.ControllerGroup : boolean isMouseOver()
+main.java.controlp5.ControllerGroup : boolean isMoveable()
+main.java.controlp5.ControllerGroup : boolean isOpen()
+main.java.controlp5.ControllerGroup : boolean isUpdate()
+main.java.controlp5.ControllerGroup : boolean isVisible()
+main.java.controlp5.ControllerGroup : boolean setMousePressed(boolean)
+main.java.controlp5.ControllerGroup : float getArrayValue(int)
+main.java.controlp5.ControllerGroup : float getValue()
+main.java.controlp5.ControllerGroup : float[] getArrayValue()
+main.java.controlp5.ControllerGroup : float[] getPosition()
+main.java.controlp5.ControllerGroup : int getHeight()
+main.java.controlp5.ControllerGroup : int getId()
+main.java.controlp5.ControllerGroup : int getWidth()
+main.java.controlp5.ControllerGroup : int listenerSize()
+main.java.controlp5.ControllerGroup : void controlEvent(ControlEvent)
+main.java.controlp5.ControllerGroup : void remove()
+main.java.controlp5.Textarea : Label getValueLabel()
+main.java.controlp5.Textarea : String getStringValue()
+main.java.controlp5.Textarea : String getText()
+main.java.controlp5.Textarea : Textarea append(String)
+main.java.controlp5.Textarea : Textarea append(String, int)
+main.java.controlp5.Textarea : Textarea clear()
+main.java.controlp5.Textarea : Textarea disableColorBackground()
+main.java.controlp5.Textarea : Textarea enableColorBackground()
+main.java.controlp5.Textarea : Textarea hideScrollbar()
+main.java.controlp5.Textarea : Textarea scroll(float)
+main.java.controlp5.Textarea : Textarea setBorderColor(int)
+main.java.controlp5.Textarea : Textarea setColor(int)
+main.java.controlp5.Textarea : Textarea setColorBackground(int)
+main.java.controlp5.Textarea : Textarea setFont(ControlFont)
+main.java.controlp5.Textarea : Textarea setFont(PFont)
+main.java.controlp5.Textarea : Textarea setFont(int)
+main.java.controlp5.Textarea : Textarea setHeight(int)
+main.java.controlp5.Textarea : Textarea setLineHeight(int)
+main.java.controlp5.Textarea : Textarea setScrollActive(int)
+main.java.controlp5.Textarea : Textarea setScrollBackground(int)
+main.java.controlp5.Textarea : Textarea setScrollForeground(int)
+main.java.controlp5.Textarea : Textarea setSize(int, int)
+main.java.controlp5.Textarea : Textarea setText(String)
+main.java.controlp5.Textarea : Textarea setWidth(int)
+main.java.controlp5.Textarea : Textarea showScrollbar()
+main.java.controlp5.Textarea : boolean isScrollable()
+main.java.controlp5.Textarea : float getValue()
+main.java.controlp5.Textarea : void controlEvent(ControlEvent)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5textfield/ControlP5textfield.pde b/examples/controllers/ControlP5textfield/ControlP5textfield.pde
index 8de4528..d6e4dc5 100644
--- a/examples/controllers/ControlP5textfield/ControlP5textfield.pde
+++ b/examples/controllers/ControlP5textfield/ControlP5textfield.pde
@@ -93,160 +93,160 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : Textfield addCallback(CallbackListener)
-controlP5.Controller : Textfield addListener(ControlListener)
-controlP5.Controller : Textfield addListenerFor(int, CallbackListener)
-controlP5.Controller : Textfield align(int, int, int, int)
-controlP5.Controller : Textfield bringToFront()
-controlP5.Controller : Textfield bringToFront(ControllerInterface)
-controlP5.Controller : Textfield hide()
-controlP5.Controller : Textfield linebreak()
-controlP5.Controller : Textfield listen(boolean)
-controlP5.Controller : Textfield lock()
-controlP5.Controller : Textfield onChange(CallbackListener)
-controlP5.Controller : Textfield onClick(CallbackListener)
-controlP5.Controller : Textfield onDoublePress(CallbackListener)
-controlP5.Controller : Textfield onDrag(CallbackListener)
-controlP5.Controller : Textfield onDraw(ControllerView)
-controlP5.Controller : Textfield onEndDrag(CallbackListener)
-controlP5.Controller : Textfield onEnter(CallbackListener)
-controlP5.Controller : Textfield onLeave(CallbackListener)
-controlP5.Controller : Textfield onMove(CallbackListener)
-controlP5.Controller : Textfield onPress(CallbackListener)
-controlP5.Controller : Textfield onRelease(CallbackListener)
-controlP5.Controller : Textfield onReleaseOutside(CallbackListener)
-controlP5.Controller : Textfield onStartDrag(CallbackListener)
-controlP5.Controller : Textfield onWheel(CallbackListener)
-controlP5.Controller : Textfield plugTo(Object)
-controlP5.Controller : Textfield plugTo(Object, String)
-controlP5.Controller : Textfield plugTo(Object[])
-controlP5.Controller : Textfield plugTo(Object[], String)
-controlP5.Controller : Textfield registerProperty(String)
-controlP5.Controller : Textfield registerProperty(String, String)
-controlP5.Controller : Textfield registerTooltip(String)
-controlP5.Controller : Textfield removeBehavior()
-controlP5.Controller : Textfield removeCallback()
-controlP5.Controller : Textfield removeCallback(CallbackListener)
-controlP5.Controller : Textfield removeListener(ControlListener)
-controlP5.Controller : Textfield removeListenerFor(int, CallbackListener)
-controlP5.Controller : Textfield removeListenersFor(int)
-controlP5.Controller : Textfield removeProperty(String)
-controlP5.Controller : Textfield removeProperty(String, String)
-controlP5.Controller : Textfield setArrayValue(float[])
-controlP5.Controller : Textfield setArrayValue(int, float)
-controlP5.Controller : Textfield setBehavior(ControlBehavior)
-controlP5.Controller : Textfield setBroadcast(boolean)
-controlP5.Controller : Textfield setCaptionLabel(String)
-controlP5.Controller : Textfield setColor(CColor)
-controlP5.Controller : Textfield setColorActive(int)
-controlP5.Controller : Textfield setColorBackground(int)
-controlP5.Controller : Textfield setColorCaptionLabel(int)
-controlP5.Controller : Textfield setColorForeground(int)
-controlP5.Controller : Textfield setColorLabel(int)
-controlP5.Controller : Textfield setColorValue(int)
-controlP5.Controller : Textfield setColorValueLabel(int)
-controlP5.Controller : Textfield setDecimalPrecision(int)
-controlP5.Controller : Textfield setDefaultValue(float)
-controlP5.Controller : Textfield setHeight(int)
-controlP5.Controller : Textfield setId(int)
-controlP5.Controller : Textfield setImage(PImage)
-controlP5.Controller : Textfield setImage(PImage, int)
-controlP5.Controller : Textfield setImages(PImage, PImage, PImage)
-controlP5.Controller : Textfield setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Textfield setLabel(String)
-controlP5.Controller : Textfield setLabelVisible(boolean)
-controlP5.Controller : Textfield setLock(boolean)
-controlP5.Controller : Textfield setMax(float)
-controlP5.Controller : Textfield setMin(float)
-controlP5.Controller : Textfield setMouseOver(boolean)
-controlP5.Controller : Textfield setMoveable(boolean)
-controlP5.Controller : Textfield setPosition(float, float)
-controlP5.Controller : Textfield setPosition(float[])
-controlP5.Controller : Textfield setSize(PImage)
-controlP5.Controller : Textfield setSize(int, int)
-controlP5.Controller : Textfield setStringValue(String)
-controlP5.Controller : Textfield setUpdate(boolean)
-controlP5.Controller : Textfield setValue(float)
-controlP5.Controller : Textfield setValueLabel(String)
-controlP5.Controller : Textfield setValueSelf(float)
-controlP5.Controller : Textfield setView(ControllerView)
-controlP5.Controller : Textfield setVisible(boolean)
-controlP5.Controller : Textfield setWidth(int)
-controlP5.Controller : Textfield show()
-controlP5.Controller : Textfield unlock()
-controlP5.Controller : Textfield unplugFrom(Object)
-controlP5.Controller : Textfield unplugFrom(Object[])
-controlP5.Controller : Textfield unregisterTooltip()
-controlP5.Controller : Textfield update()
-controlP5.Controller : Textfield updateSize()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.Textfield : String getText()
-controlP5.Textfield : String[] getTextList()
-controlP5.Textfield : Textfield clear()
-controlP5.Textfield : Textfield keepFocus(boolean)
-controlP5.Textfield : Textfield setAutoClear(boolean)
-controlP5.Textfield : Textfield setColor(int)
-controlP5.Textfield : Textfield setColorCursor(int)
-controlP5.Textfield : Textfield setFocus(boolean)
-controlP5.Textfield : Textfield setFont(ControlFont)
-controlP5.Textfield : Textfield setFont(PFont)
-controlP5.Textfield : Textfield setFont(int)
-controlP5.Textfield : Textfield setHeight(int)
-controlP5.Textfield : Textfield setInputFilter(int)
-controlP5.Textfield : Textfield setPasswordMode(boolean)
-controlP5.Textfield : Textfield setSize(int, int)
-controlP5.Textfield : Textfield setText(String)
-controlP5.Textfield : Textfield setValue(String)
-controlP5.Textfield : Textfield setValue(float)
-controlP5.Textfield : Textfield setWidth(int)
-controlP5.Textfield : Textfield submit()
-controlP5.Textfield : boolean isAutoClear()
-controlP5.Textfield : boolean isFocus()
-controlP5.Textfield : int getIndex()
-controlP5.Textfield : void draw(PGraphics)
-controlP5.Textfield : void keyEvent(KeyEvent)
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : Textfield addCallback(CallbackListener)
+main.java.controlp5.Controller : Textfield addListener(ControlListener)
+main.java.controlp5.Controller : Textfield addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Textfield align(int, int, int, int)
+main.java.controlp5.Controller : Textfield bringToFront()
+main.java.controlp5.Controller : Textfield bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Textfield hide()
+main.java.controlp5.Controller : Textfield linebreak()
+main.java.controlp5.Controller : Textfield listen(boolean)
+main.java.controlp5.Controller : Textfield lock()
+main.java.controlp5.Controller : Textfield onChange(CallbackListener)
+main.java.controlp5.Controller : Textfield onClick(CallbackListener)
+main.java.controlp5.Controller : Textfield onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Textfield onDrag(CallbackListener)
+main.java.controlp5.Controller : Textfield onDraw(ControllerView)
+main.java.controlp5.Controller : Textfield onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Textfield onEnter(CallbackListener)
+main.java.controlp5.Controller : Textfield onLeave(CallbackListener)
+main.java.controlp5.Controller : Textfield onMove(CallbackListener)
+main.java.controlp5.Controller : Textfield onPress(CallbackListener)
+main.java.controlp5.Controller : Textfield onRelease(CallbackListener)
+main.java.controlp5.Controller : Textfield onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Textfield onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Textfield onWheel(CallbackListener)
+main.java.controlp5.Controller : Textfield plugTo(Object)
+main.java.controlp5.Controller : Textfield plugTo(Object, String)
+main.java.controlp5.Controller : Textfield plugTo(Object[])
+main.java.controlp5.Controller : Textfield plugTo(Object[], String)
+main.java.controlp5.Controller : Textfield registerProperty(String)
+main.java.controlp5.Controller : Textfield registerProperty(String, String)
+main.java.controlp5.Controller : Textfield registerTooltip(String)
+main.java.controlp5.Controller : Textfield removeBehavior()
+main.java.controlp5.Controller : Textfield removeCallback()
+main.java.controlp5.Controller : Textfield removeCallback(CallbackListener)
+main.java.controlp5.Controller : Textfield removeListener(ControlListener)
+main.java.controlp5.Controller : Textfield removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Textfield removeListenersFor(int)
+main.java.controlp5.Controller : Textfield removeProperty(String)
+main.java.controlp5.Controller : Textfield removeProperty(String, String)
+main.java.controlp5.Controller : Textfield setArrayValue(float[])
+main.java.controlp5.Controller : Textfield setArrayValue(int, float)
+main.java.controlp5.Controller : Textfield setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Textfield setBroadcast(boolean)
+main.java.controlp5.Controller : Textfield setCaptionLabel(String)
+main.java.controlp5.Controller : Textfield setColor(CColor)
+main.java.controlp5.Controller : Textfield setColorActive(int)
+main.java.controlp5.Controller : Textfield setColorBackground(int)
+main.java.controlp5.Controller : Textfield setColorCaptionLabel(int)
+main.java.controlp5.Controller : Textfield setColorForeground(int)
+main.java.controlp5.Controller : Textfield setColorLabel(int)
+main.java.controlp5.Controller : Textfield setColorValue(int)
+main.java.controlp5.Controller : Textfield setColorValueLabel(int)
+main.java.controlp5.Controller : Textfield setDecimalPrecision(int)
+main.java.controlp5.Controller : Textfield setDefaultValue(float)
+main.java.controlp5.Controller : Textfield setHeight(int)
+main.java.controlp5.Controller : Textfield setId(int)
+main.java.controlp5.Controller : Textfield setImage(PImage)
+main.java.controlp5.Controller : Textfield setImage(PImage, int)
+main.java.controlp5.Controller : Textfield setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Textfield setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Textfield setLabel(String)
+main.java.controlp5.Controller : Textfield setLabelVisible(boolean)
+main.java.controlp5.Controller : Textfield setLock(boolean)
+main.java.controlp5.Controller : Textfield setMax(float)
+main.java.controlp5.Controller : Textfield setMin(float)
+main.java.controlp5.Controller : Textfield setMouseOver(boolean)
+main.java.controlp5.Controller : Textfield setMoveable(boolean)
+main.java.controlp5.Controller : Textfield setPosition(float, float)
+main.java.controlp5.Controller : Textfield setPosition(float[])
+main.java.controlp5.Controller : Textfield setSize(PImage)
+main.java.controlp5.Controller : Textfield setSize(int, int)
+main.java.controlp5.Controller : Textfield setStringValue(String)
+main.java.controlp5.Controller : Textfield setUpdate(boolean)
+main.java.controlp5.Controller : Textfield setValue(float)
+main.java.controlp5.Controller : Textfield setValueLabel(String)
+main.java.controlp5.Controller : Textfield setValueSelf(float)
+main.java.controlp5.Controller : Textfield setView(ControllerView)
+main.java.controlp5.Controller : Textfield setVisible(boolean)
+main.java.controlp5.Controller : Textfield setWidth(int)
+main.java.controlp5.Controller : Textfield show()
+main.java.controlp5.Controller : Textfield unlock()
+main.java.controlp5.Controller : Textfield unplugFrom(Object)
+main.java.controlp5.Controller : Textfield unplugFrom(Object[])
+main.java.controlp5.Controller : Textfield unregisterTooltip()
+main.java.controlp5.Controller : Textfield update()
+main.java.controlp5.Controller : Textfield updateSize()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Textfield : String getText()
+main.java.controlp5.Textfield : String[] getTextList()
+main.java.controlp5.Textfield : Textfield clear()
+main.java.controlp5.Textfield : Textfield keepFocus(boolean)
+main.java.controlp5.Textfield : Textfield setAutoClear(boolean)
+main.java.controlp5.Textfield : Textfield setColor(int)
+main.java.controlp5.Textfield : Textfield setColorCursor(int)
+main.java.controlp5.Textfield : Textfield setFocus(boolean)
+main.java.controlp5.Textfield : Textfield setFont(ControlFont)
+main.java.controlp5.Textfield : Textfield setFont(PFont)
+main.java.controlp5.Textfield : Textfield setFont(int)
+main.java.controlp5.Textfield : Textfield setHeight(int)
+main.java.controlp5.Textfield : Textfield setInputFilter(int)
+main.java.controlp5.Textfield : Textfield setPasswordMode(boolean)
+main.java.controlp5.Textfield : Textfield setSize(int, int)
+main.java.controlp5.Textfield : Textfield setText(String)
+main.java.controlp5.Textfield : Textfield setValue(String)
+main.java.controlp5.Textfield : Textfield setValue(float)
+main.java.controlp5.Textfield : Textfield setWidth(int)
+main.java.controlp5.Textfield : Textfield submit()
+main.java.controlp5.Textfield : boolean isAutoClear()
+main.java.controlp5.Textfield : boolean isFocus()
+main.java.controlp5.Textfield : int getIndex()
+main.java.controlp5.Textfield : void draw(PGraphics)
+main.java.controlp5.Textfield : void keyEvent(KeyEvent)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5textlabel/ControlP5Textlabel.pde b/examples/controllers/ControlP5textlabel/ControlP5Textlabel.pde
index 9ceaeac..861266d 100644
--- a/examples/controllers/ControlP5textlabel/ControlP5Textlabel.pde
+++ b/examples/controllers/ControlP5textlabel/ControlP5Textlabel.pde
@@ -52,155 +52,155 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : Textlabel addCallback(CallbackListener)
-controlP5.Controller : Textlabel addListener(ControlListener)
-controlP5.Controller : Textlabel addListenerFor(int, CallbackListener)
-controlP5.Controller : Textlabel align(int, int, int, int)
-controlP5.Controller : Textlabel bringToFront()
-controlP5.Controller : Textlabel bringToFront(ControllerInterface)
-controlP5.Controller : Textlabel hide()
-controlP5.Controller : Textlabel linebreak()
-controlP5.Controller : Textlabel listen(boolean)
-controlP5.Controller : Textlabel lock()
-controlP5.Controller : Textlabel onChange(CallbackListener)
-controlP5.Controller : Textlabel onClick(CallbackListener)
-controlP5.Controller : Textlabel onDoublePress(CallbackListener)
-controlP5.Controller : Textlabel onDrag(CallbackListener)
-controlP5.Controller : Textlabel onDraw(ControllerView)
-controlP5.Controller : Textlabel onEndDrag(CallbackListener)
-controlP5.Controller : Textlabel onEnter(CallbackListener)
-controlP5.Controller : Textlabel onLeave(CallbackListener)
-controlP5.Controller : Textlabel onMove(CallbackListener)
-controlP5.Controller : Textlabel onPress(CallbackListener)
-controlP5.Controller : Textlabel onRelease(CallbackListener)
-controlP5.Controller : Textlabel onReleaseOutside(CallbackListener)
-controlP5.Controller : Textlabel onStartDrag(CallbackListener)
-controlP5.Controller : Textlabel onWheel(CallbackListener)
-controlP5.Controller : Textlabel plugTo(Object)
-controlP5.Controller : Textlabel plugTo(Object, String)
-controlP5.Controller : Textlabel plugTo(Object[])
-controlP5.Controller : Textlabel plugTo(Object[], String)
-controlP5.Controller : Textlabel registerProperty(String)
-controlP5.Controller : Textlabel registerProperty(String, String)
-controlP5.Controller : Textlabel registerTooltip(String)
-controlP5.Controller : Textlabel removeBehavior()
-controlP5.Controller : Textlabel removeCallback()
-controlP5.Controller : Textlabel removeCallback(CallbackListener)
-controlP5.Controller : Textlabel removeListener(ControlListener)
-controlP5.Controller : Textlabel removeListenerFor(int, CallbackListener)
-controlP5.Controller : Textlabel removeListenersFor(int)
-controlP5.Controller : Textlabel removeProperty(String)
-controlP5.Controller : Textlabel removeProperty(String, String)
-controlP5.Controller : Textlabel setArrayValue(float[])
-controlP5.Controller : Textlabel setArrayValue(int, float)
-controlP5.Controller : Textlabel setBehavior(ControlBehavior)
-controlP5.Controller : Textlabel setBroadcast(boolean)
-controlP5.Controller : Textlabel setCaptionLabel(String)
-controlP5.Controller : Textlabel setColor(CColor)
-controlP5.Controller : Textlabel setColorActive(int)
-controlP5.Controller : Textlabel setColorBackground(int)
-controlP5.Controller : Textlabel setColorCaptionLabel(int)
-controlP5.Controller : Textlabel setColorForeground(int)
-controlP5.Controller : Textlabel setColorLabel(int)
-controlP5.Controller : Textlabel setColorValue(int)
-controlP5.Controller : Textlabel setColorValueLabel(int)
-controlP5.Controller : Textlabel setDecimalPrecision(int)
-controlP5.Controller : Textlabel setDefaultValue(float)
-controlP5.Controller : Textlabel setHeight(int)
-controlP5.Controller : Textlabel setId(int)
-controlP5.Controller : Textlabel setImage(PImage)
-controlP5.Controller : Textlabel setImage(PImage, int)
-controlP5.Controller : Textlabel setImages(PImage, PImage, PImage)
-controlP5.Controller : Textlabel setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Textlabel setLabel(String)
-controlP5.Controller : Textlabel setLabelVisible(boolean)
-controlP5.Controller : Textlabel setLock(boolean)
-controlP5.Controller : Textlabel setMax(float)
-controlP5.Controller : Textlabel setMin(float)
-controlP5.Controller : Textlabel setMouseOver(boolean)
-controlP5.Controller : Textlabel setMoveable(boolean)
-controlP5.Controller : Textlabel setPosition(float, float)
-controlP5.Controller : Textlabel setPosition(float[])
-controlP5.Controller : Textlabel setSize(PImage)
-controlP5.Controller : Textlabel setSize(int, int)
-controlP5.Controller : Textlabel setStringValue(String)
-controlP5.Controller : Textlabel setUpdate(boolean)
-controlP5.Controller : Textlabel setValue(float)
-controlP5.Controller : Textlabel setValueLabel(String)
-controlP5.Controller : Textlabel setValueSelf(float)
-controlP5.Controller : Textlabel setView(ControllerView)
-controlP5.Controller : Textlabel setVisible(boolean)
-controlP5.Controller : Textlabel setWidth(int)
-controlP5.Controller : Textlabel show()
-controlP5.Controller : Textlabel unlock()
-controlP5.Controller : Textlabel unplugFrom(Object)
-controlP5.Controller : Textlabel unplugFrom(Object[])
-controlP5.Controller : Textlabel unregisterTooltip()
-controlP5.Controller : Textlabel update()
-controlP5.Controller : Textlabel updateSize()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.Textlabel : ControllerStyle getStyle()
-controlP5.Textlabel : Label get()
-controlP5.Textlabel : Textlabel append(String, int)
-controlP5.Textlabel : Textlabel setColor(int)
-controlP5.Textlabel : Textlabel setFont(ControlFont)
-controlP5.Textlabel : Textlabel setFont(PFont)
-controlP5.Textlabel : Textlabel setHeight(int)
-controlP5.Textlabel : Textlabel setLetterSpacing(int)
-controlP5.Textlabel : Textlabel setLineHeight(int)
-controlP5.Textlabel : Textlabel setMultiline(boolean)
-controlP5.Textlabel : Textlabel setStringValue(String)
-controlP5.Textlabel : Textlabel setText(String)
-controlP5.Textlabel : Textlabel setValue(String)
-controlP5.Textlabel : Textlabel setValue(float)
-controlP5.Textlabel : Textlabel setWidth(int)
-controlP5.Textlabel : int getLineHeight()
-controlP5.Textlabel : void draw()
-controlP5.Textlabel : void draw(PApplet)
-controlP5.Textlabel : void draw(PGraphics)
-controlP5.Textlabel : void draw(int, int)
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : Textlabel addCallback(CallbackListener)
+main.java.controlp5.Controller : Textlabel addListener(ControlListener)
+main.java.controlp5.Controller : Textlabel addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Textlabel align(int, int, int, int)
+main.java.controlp5.Controller : Textlabel bringToFront()
+main.java.controlp5.Controller : Textlabel bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Textlabel hide()
+main.java.controlp5.Controller : Textlabel linebreak()
+main.java.controlp5.Controller : Textlabel listen(boolean)
+main.java.controlp5.Controller : Textlabel lock()
+main.java.controlp5.Controller : Textlabel onChange(CallbackListener)
+main.java.controlp5.Controller : Textlabel onClick(CallbackListener)
+main.java.controlp5.Controller : Textlabel onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Textlabel onDrag(CallbackListener)
+main.java.controlp5.Controller : Textlabel onDraw(ControllerView)
+main.java.controlp5.Controller : Textlabel onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Textlabel onEnter(CallbackListener)
+main.java.controlp5.Controller : Textlabel onLeave(CallbackListener)
+main.java.controlp5.Controller : Textlabel onMove(CallbackListener)
+main.java.controlp5.Controller : Textlabel onPress(CallbackListener)
+main.java.controlp5.Controller : Textlabel onRelease(CallbackListener)
+main.java.controlp5.Controller : Textlabel onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Textlabel onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Textlabel onWheel(CallbackListener)
+main.java.controlp5.Controller : Textlabel plugTo(Object)
+main.java.controlp5.Controller : Textlabel plugTo(Object, String)
+main.java.controlp5.Controller : Textlabel plugTo(Object[])
+main.java.controlp5.Controller : Textlabel plugTo(Object[], String)
+main.java.controlp5.Controller : Textlabel registerProperty(String)
+main.java.controlp5.Controller : Textlabel registerProperty(String, String)
+main.java.controlp5.Controller : Textlabel registerTooltip(String)
+main.java.controlp5.Controller : Textlabel removeBehavior()
+main.java.controlp5.Controller : Textlabel removeCallback()
+main.java.controlp5.Controller : Textlabel removeCallback(CallbackListener)
+main.java.controlp5.Controller : Textlabel removeListener(ControlListener)
+main.java.controlp5.Controller : Textlabel removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Textlabel removeListenersFor(int)
+main.java.controlp5.Controller : Textlabel removeProperty(String)
+main.java.controlp5.Controller : Textlabel removeProperty(String, String)
+main.java.controlp5.Controller : Textlabel setArrayValue(float[])
+main.java.controlp5.Controller : Textlabel setArrayValue(int, float)
+main.java.controlp5.Controller : Textlabel setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Textlabel setBroadcast(boolean)
+main.java.controlp5.Controller : Textlabel setCaptionLabel(String)
+main.java.controlp5.Controller : Textlabel setColor(CColor)
+main.java.controlp5.Controller : Textlabel setColorActive(int)
+main.java.controlp5.Controller : Textlabel setColorBackground(int)
+main.java.controlp5.Controller : Textlabel setColorCaptionLabel(int)
+main.java.controlp5.Controller : Textlabel setColorForeground(int)
+main.java.controlp5.Controller : Textlabel setColorLabel(int)
+main.java.controlp5.Controller : Textlabel setColorValue(int)
+main.java.controlp5.Controller : Textlabel setColorValueLabel(int)
+main.java.controlp5.Controller : Textlabel setDecimalPrecision(int)
+main.java.controlp5.Controller : Textlabel setDefaultValue(float)
+main.java.controlp5.Controller : Textlabel setHeight(int)
+main.java.controlp5.Controller : Textlabel setId(int)
+main.java.controlp5.Controller : Textlabel setImage(PImage)
+main.java.controlp5.Controller : Textlabel setImage(PImage, int)
+main.java.controlp5.Controller : Textlabel setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Textlabel setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Textlabel setLabel(String)
+main.java.controlp5.Controller : Textlabel setLabelVisible(boolean)
+main.java.controlp5.Controller : Textlabel setLock(boolean)
+main.java.controlp5.Controller : Textlabel setMax(float)
+main.java.controlp5.Controller : Textlabel setMin(float)
+main.java.controlp5.Controller : Textlabel setMouseOver(boolean)
+main.java.controlp5.Controller : Textlabel setMoveable(boolean)
+main.java.controlp5.Controller : Textlabel setPosition(float, float)
+main.java.controlp5.Controller : Textlabel setPosition(float[])
+main.java.controlp5.Controller : Textlabel setSize(PImage)
+main.java.controlp5.Controller : Textlabel setSize(int, int)
+main.java.controlp5.Controller : Textlabel setStringValue(String)
+main.java.controlp5.Controller : Textlabel setUpdate(boolean)
+main.java.controlp5.Controller : Textlabel setValue(float)
+main.java.controlp5.Controller : Textlabel setValueLabel(String)
+main.java.controlp5.Controller : Textlabel setValueSelf(float)
+main.java.controlp5.Controller : Textlabel setView(ControllerView)
+main.java.controlp5.Controller : Textlabel setVisible(boolean)
+main.java.controlp5.Controller : Textlabel setWidth(int)
+main.java.controlp5.Controller : Textlabel show()
+main.java.controlp5.Controller : Textlabel unlock()
+main.java.controlp5.Controller : Textlabel unplugFrom(Object)
+main.java.controlp5.Controller : Textlabel unplugFrom(Object[])
+main.java.controlp5.Controller : Textlabel unregisterTooltip()
+main.java.controlp5.Controller : Textlabel update()
+main.java.controlp5.Controller : Textlabel updateSize()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Textlabel : ControllerStyle getStyle()
+main.java.controlp5.Textlabel : Label get()
+main.java.controlp5.Textlabel : Textlabel append(String, int)
+main.java.controlp5.Textlabel : Textlabel setColor(int)
+main.java.controlp5.Textlabel : Textlabel setFont(ControlFont)
+main.java.controlp5.Textlabel : Textlabel setFont(PFont)
+main.java.controlp5.Textlabel : Textlabel setHeight(int)
+main.java.controlp5.Textlabel : Textlabel setLetterSpacing(int)
+main.java.controlp5.Textlabel : Textlabel setLineHeight(int)
+main.java.controlp5.Textlabel : Textlabel setMultiline(boolean)
+main.java.controlp5.Textlabel : Textlabel setStringValue(String)
+main.java.controlp5.Textlabel : Textlabel setText(String)
+main.java.controlp5.Textlabel : Textlabel setValue(String)
+main.java.controlp5.Textlabel : Textlabel setValue(float)
+main.java.controlp5.Textlabel : Textlabel setWidth(int)
+main.java.controlp5.Textlabel : int getLineHeight()
+main.java.controlp5.Textlabel : void draw()
+main.java.controlp5.Textlabel : void draw(PApplet)
+main.java.controlp5.Textlabel : void draw(PGraphics)
+main.java.controlp5.Textlabel : void draw(int, int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5toggle/ControlP5toggle.pde b/examples/controllers/ControlP5toggle/ControlP5toggle.pde
index 72f8d01..a14a061 100644
--- a/examples/controllers/ControlP5toggle/ControlP5toggle.pde
+++ b/examples/controllers/ControlP5toggle/ControlP5toggle.pde
@@ -90,145 +90,145 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : Toggle addCallback(CallbackListener)
-controlP5.Controller : Toggle addListener(ControlListener)
-controlP5.Controller : Toggle addListenerFor(int, CallbackListener)
-controlP5.Controller : Toggle align(int, int, int, int)
-controlP5.Controller : Toggle bringToFront()
-controlP5.Controller : Toggle bringToFront(ControllerInterface)
-controlP5.Controller : Toggle hide()
-controlP5.Controller : Toggle linebreak()
-controlP5.Controller : Toggle listen(boolean)
-controlP5.Controller : Toggle lock()
-controlP5.Controller : Toggle onChange(CallbackListener)
-controlP5.Controller : Toggle onClick(CallbackListener)
-controlP5.Controller : Toggle onDoublePress(CallbackListener)
-controlP5.Controller : Toggle onDrag(CallbackListener)
-controlP5.Controller : Toggle onDraw(ControllerView)
-controlP5.Controller : Toggle onEndDrag(CallbackListener)
-controlP5.Controller : Toggle onEnter(CallbackListener)
-controlP5.Controller : Toggle onLeave(CallbackListener)
-controlP5.Controller : Toggle onMove(CallbackListener)
-controlP5.Controller : Toggle onPress(CallbackListener)
-controlP5.Controller : Toggle onRelease(CallbackListener)
-controlP5.Controller : Toggle onReleaseOutside(CallbackListener)
-controlP5.Controller : Toggle onStartDrag(CallbackListener)
-controlP5.Controller : Toggle onWheel(CallbackListener)
-controlP5.Controller : Toggle plugTo(Object)
-controlP5.Controller : Toggle plugTo(Object, String)
-controlP5.Controller : Toggle plugTo(Object[])
-controlP5.Controller : Toggle plugTo(Object[], String)
-controlP5.Controller : Toggle registerProperty(String)
-controlP5.Controller : Toggle registerProperty(String, String)
-controlP5.Controller : Toggle registerTooltip(String)
-controlP5.Controller : Toggle removeBehavior()
-controlP5.Controller : Toggle removeCallback()
-controlP5.Controller : Toggle removeCallback(CallbackListener)
-controlP5.Controller : Toggle removeListener(ControlListener)
-controlP5.Controller : Toggle removeListenerFor(int, CallbackListener)
-controlP5.Controller : Toggle removeListenersFor(int)
-controlP5.Controller : Toggle removeProperty(String)
-controlP5.Controller : Toggle removeProperty(String, String)
-controlP5.Controller : Toggle setArrayValue(float[])
-controlP5.Controller : Toggle setArrayValue(int, float)
-controlP5.Controller : Toggle setBehavior(ControlBehavior)
-controlP5.Controller : Toggle setBroadcast(boolean)
-controlP5.Controller : Toggle setCaptionLabel(String)
-controlP5.Controller : Toggle setColor(CColor)
-controlP5.Controller : Toggle setColorActive(int)
-controlP5.Controller : Toggle setColorBackground(int)
-controlP5.Controller : Toggle setColorCaptionLabel(int)
-controlP5.Controller : Toggle setColorForeground(int)
-controlP5.Controller : Toggle setColorLabel(int)
-controlP5.Controller : Toggle setColorValue(int)
-controlP5.Controller : Toggle setColorValueLabel(int)
-controlP5.Controller : Toggle setDecimalPrecision(int)
-controlP5.Controller : Toggle setDefaultValue(float)
-controlP5.Controller : Toggle setHeight(int)
-controlP5.Controller : Toggle setId(int)
-controlP5.Controller : Toggle setImage(PImage)
-controlP5.Controller : Toggle setImage(PImage, int)
-controlP5.Controller : Toggle setImages(PImage, PImage, PImage)
-controlP5.Controller : Toggle setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Toggle setLabel(String)
-controlP5.Controller : Toggle setLabelVisible(boolean)
-controlP5.Controller : Toggle setLock(boolean)
-controlP5.Controller : Toggle setMax(float)
-controlP5.Controller : Toggle setMin(float)
-controlP5.Controller : Toggle setMouseOver(boolean)
-controlP5.Controller : Toggle setMoveable(boolean)
-controlP5.Controller : Toggle setPosition(float, float)
-controlP5.Controller : Toggle setPosition(float[])
-controlP5.Controller : Toggle setSize(PImage)
-controlP5.Controller : Toggle setSize(int, int)
-controlP5.Controller : Toggle setStringValue(String)
-controlP5.Controller : Toggle setUpdate(boolean)
-controlP5.Controller : Toggle setValue(float)
-controlP5.Controller : Toggle setValueLabel(String)
-controlP5.Controller : Toggle setValueSelf(float)
-controlP5.Controller : Toggle setView(ControllerView)
-controlP5.Controller : Toggle setVisible(boolean)
-controlP5.Controller : Toggle setWidth(int)
-controlP5.Controller : Toggle show()
-controlP5.Controller : Toggle unlock()
-controlP5.Controller : Toggle unplugFrom(Object)
-controlP5.Controller : Toggle unplugFrom(Object[])
-controlP5.Controller : Toggle unregisterTooltip()
-controlP5.Controller : Toggle update()
-controlP5.Controller : Toggle updateSize()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.Toggle : Toggle linebreak()
-controlP5.Toggle : Toggle setMode(int)
-controlP5.Toggle : Toggle setState(boolean)
-controlP5.Toggle : Toggle setValue(boolean)
-controlP5.Toggle : Toggle setValue(float)
-controlP5.Toggle : Toggle toggle()
-controlP5.Toggle : Toggle update()
-controlP5.Toggle : boolean getBooleanValue()
-controlP5.Toggle : boolean getState()
-controlP5.Toggle : int getMode()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : Toggle addCallback(CallbackListener)
+main.java.controlp5.Controller : Toggle addListener(ControlListener)
+main.java.controlp5.Controller : Toggle addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Toggle align(int, int, int, int)
+main.java.controlp5.Controller : Toggle bringToFront()
+main.java.controlp5.Controller : Toggle bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Toggle hide()
+main.java.controlp5.Controller : Toggle linebreak()
+main.java.controlp5.Controller : Toggle listen(boolean)
+main.java.controlp5.Controller : Toggle lock()
+main.java.controlp5.Controller : Toggle onChange(CallbackListener)
+main.java.controlp5.Controller : Toggle onClick(CallbackListener)
+main.java.controlp5.Controller : Toggle onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Toggle onDrag(CallbackListener)
+main.java.controlp5.Controller : Toggle onDraw(ControllerView)
+main.java.controlp5.Controller : Toggle onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Toggle onEnter(CallbackListener)
+main.java.controlp5.Controller : Toggle onLeave(CallbackListener)
+main.java.controlp5.Controller : Toggle onMove(CallbackListener)
+main.java.controlp5.Controller : Toggle onPress(CallbackListener)
+main.java.controlp5.Controller : Toggle onRelease(CallbackListener)
+main.java.controlp5.Controller : Toggle onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Toggle onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Toggle onWheel(CallbackListener)
+main.java.controlp5.Controller : Toggle plugTo(Object)
+main.java.controlp5.Controller : Toggle plugTo(Object, String)
+main.java.controlp5.Controller : Toggle plugTo(Object[])
+main.java.controlp5.Controller : Toggle plugTo(Object[], String)
+main.java.controlp5.Controller : Toggle registerProperty(String)
+main.java.controlp5.Controller : Toggle registerProperty(String, String)
+main.java.controlp5.Controller : Toggle registerTooltip(String)
+main.java.controlp5.Controller : Toggle removeBehavior()
+main.java.controlp5.Controller : Toggle removeCallback()
+main.java.controlp5.Controller : Toggle removeCallback(CallbackListener)
+main.java.controlp5.Controller : Toggle removeListener(ControlListener)
+main.java.controlp5.Controller : Toggle removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Toggle removeListenersFor(int)
+main.java.controlp5.Controller : Toggle removeProperty(String)
+main.java.controlp5.Controller : Toggle removeProperty(String, String)
+main.java.controlp5.Controller : Toggle setArrayValue(float[])
+main.java.controlp5.Controller : Toggle setArrayValue(int, float)
+main.java.controlp5.Controller : Toggle setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Toggle setBroadcast(boolean)
+main.java.controlp5.Controller : Toggle setCaptionLabel(String)
+main.java.controlp5.Controller : Toggle setColor(CColor)
+main.java.controlp5.Controller : Toggle setColorActive(int)
+main.java.controlp5.Controller : Toggle setColorBackground(int)
+main.java.controlp5.Controller : Toggle setColorCaptionLabel(int)
+main.java.controlp5.Controller : Toggle setColorForeground(int)
+main.java.controlp5.Controller : Toggle setColorLabel(int)
+main.java.controlp5.Controller : Toggle setColorValue(int)
+main.java.controlp5.Controller : Toggle setColorValueLabel(int)
+main.java.controlp5.Controller : Toggle setDecimalPrecision(int)
+main.java.controlp5.Controller : Toggle setDefaultValue(float)
+main.java.controlp5.Controller : Toggle setHeight(int)
+main.java.controlp5.Controller : Toggle setId(int)
+main.java.controlp5.Controller : Toggle setImage(PImage)
+main.java.controlp5.Controller : Toggle setImage(PImage, int)
+main.java.controlp5.Controller : Toggle setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Toggle setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Toggle setLabel(String)
+main.java.controlp5.Controller : Toggle setLabelVisible(boolean)
+main.java.controlp5.Controller : Toggle setLock(boolean)
+main.java.controlp5.Controller : Toggle setMax(float)
+main.java.controlp5.Controller : Toggle setMin(float)
+main.java.controlp5.Controller : Toggle setMouseOver(boolean)
+main.java.controlp5.Controller : Toggle setMoveable(boolean)
+main.java.controlp5.Controller : Toggle setPosition(float, float)
+main.java.controlp5.Controller : Toggle setPosition(float[])
+main.java.controlp5.Controller : Toggle setSize(PImage)
+main.java.controlp5.Controller : Toggle setSize(int, int)
+main.java.controlp5.Controller : Toggle setStringValue(String)
+main.java.controlp5.Controller : Toggle setUpdate(boolean)
+main.java.controlp5.Controller : Toggle setValue(float)
+main.java.controlp5.Controller : Toggle setValueLabel(String)
+main.java.controlp5.Controller : Toggle setValueSelf(float)
+main.java.controlp5.Controller : Toggle setView(ControllerView)
+main.java.controlp5.Controller : Toggle setVisible(boolean)
+main.java.controlp5.Controller : Toggle setWidth(int)
+main.java.controlp5.Controller : Toggle show()
+main.java.controlp5.Controller : Toggle unlock()
+main.java.controlp5.Controller : Toggle unplugFrom(Object)
+main.java.controlp5.Controller : Toggle unplugFrom(Object[])
+main.java.controlp5.Controller : Toggle unregisterTooltip()
+main.java.controlp5.Controller : Toggle update()
+main.java.controlp5.Controller : Toggle updateSize()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Toggle : Toggle linebreak()
+main.java.controlp5.Toggle : Toggle setMode(int)
+main.java.controlp5.Toggle : Toggle setState(boolean)
+main.java.controlp5.Toggle : Toggle setValue(boolean)
+main.java.controlp5.Toggle : Toggle setValue(float)
+main.java.controlp5.Toggle : Toggle toggle()
+main.java.controlp5.Toggle : Toggle update()
+main.java.controlp5.Toggle : boolean getBooleanValue()
+main.java.controlp5.Toggle : boolean getState()
+main.java.controlp5.Toggle : int getMode()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/controllers/ControlP5tooltip/ControlP5tooltip.pde b/examples/controllers/ControlP5tooltip/ControlP5tooltip.pde
index 435b5a4..19a3193 100644
--- a/examples/controllers/ControlP5tooltip/ControlP5tooltip.pde
+++ b/examples/controllers/ControlP5tooltip/ControlP5tooltip.pde
@@ -86,26 +86,26 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Tooltip : Label getLabel()
-controlP5.Tooltip : Tooltip disable()
-controlP5.Tooltip : Tooltip enable()
-controlP5.Tooltip : Tooltip register(Controller, String)
-controlP5.Tooltip : Tooltip register(String, String)
-controlP5.Tooltip : Tooltip setAlpha(int)
-controlP5.Tooltip : Tooltip setBorder(int)
-controlP5.Tooltip : Tooltip setColorBackground(int)
-controlP5.Tooltip : Tooltip setColorLabel(int)
-controlP5.Tooltip : Tooltip setDelay(long)
-controlP5.Tooltip : Tooltip setHeight(int)
-controlP5.Tooltip : Tooltip setLabel(Label)
-controlP5.Tooltip : Tooltip setPositionOffset(float, float)
-controlP5.Tooltip : Tooltip setView(ControllerView)
-controlP5.Tooltip : Tooltip setWidth(int)
-controlP5.Tooltip : Tooltip unregister(Controller)
-controlP5.Tooltip : Tooltip unregister(String)
-controlP5.Tooltip : boolean isEnabled()
-controlP5.Tooltip : int getBorder()
-controlP5.Tooltip : int getWidth()
+main.java.controlp5.Tooltip : Label getLabel()
+main.java.controlp5.Tooltip : Tooltip disable()
+main.java.controlp5.Tooltip : Tooltip enable()
+main.java.controlp5.Tooltip : Tooltip register(Controller, String)
+main.java.controlp5.Tooltip : Tooltip register(String, String)
+main.java.controlp5.Tooltip : Tooltip setAlpha(int)
+main.java.controlp5.Tooltip : Tooltip setBorder(int)
+main.java.controlp5.Tooltip : Tooltip setColorBackground(int)
+main.java.controlp5.Tooltip : Tooltip setColorLabel(int)
+main.java.controlp5.Tooltip : Tooltip setDelay(long)
+main.java.controlp5.Tooltip : Tooltip setHeight(int)
+main.java.controlp5.Tooltip : Tooltip setLabel(Label)
+main.java.controlp5.Tooltip : Tooltip setPositionOffset(float, float)
+main.java.controlp5.Tooltip : Tooltip setView(ControllerView)
+main.java.controlp5.Tooltip : Tooltip setWidth(int)
+main.java.controlp5.Tooltip : Tooltip unregister(Controller)
+main.java.controlp5.Tooltip : Tooltip unregister(String)
+main.java.controlp5.Tooltip : boolean isEnabled()
+main.java.controlp5.Tooltip : int getBorder()
+main.java.controlp5.Tooltip : int getWidth()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/examples.iml b/examples/examples.iml
index 1eac1ca..d885c57 100644
--- a/examples/examples.iml
+++ b/examples/examples.iml
@@ -7,5 +7,6 @@
+
\ No newline at end of file
diff --git a/examples/experimental/ControlP5MenuList/ControlP5MenuList.pde b/examples/experimental/ControlP5MenuList/ControlP5MenuList.pde
index 651c1e2..023542e 100644
--- a/examples/experimental/ControlP5MenuList/ControlP5MenuList.pde
+++ b/examples/experimental/ControlP5MenuList/ControlP5MenuList.pde
@@ -11,7 +11,7 @@
*/
import controlP5.*;
-import static controlP5.ControlP5.*;
+import static main.java.controlp5.ControlP5.*;
import java.util.*;
import java.util.Map.Entry;
diff --git a/examples/extra/ControlP5chartsCombined/ControlP5chartsCombined.pde b/examples/extra/ControlP5chartsCombined/ControlP5chartsCombined.pde
index d8a0e79..0c42315 100644
--- a/examples/extra/ControlP5chartsCombined/ControlP5chartsCombined.pde
+++ b/examples/extra/ControlP5chartsCombined/ControlP5chartsCombined.pde
@@ -70,178 +70,178 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Chart : Chart addData(ChartData)
-controlP5.Chart : Chart addData(ChartDataSet, float)
-controlP5.Chart : Chart addData(String, ChartData)
-controlP5.Chart : Chart addData(String, float)
-controlP5.Chart : Chart addData(float)
-controlP5.Chart : Chart addDataSet(String)
-controlP5.Chart : Chart addFirst(String, float)
-controlP5.Chart : Chart addFirst(float)
-controlP5.Chart : Chart addLast(String, float)
-controlP5.Chart : Chart addLast(float)
-controlP5.Chart : Chart push(String, float)
-controlP5.Chart : Chart push(float)
-controlP5.Chart : Chart removeData(ChartData)
-controlP5.Chart : Chart removeData(String, ChartData)
-controlP5.Chart : Chart removeData(String, int)
-controlP5.Chart : Chart removeData(int)
-controlP5.Chart : Chart removeDataSet(String)
-controlP5.Chart : Chart removeFirst()
-controlP5.Chart : Chart removeFirst(String)
-controlP5.Chart : Chart removeLast()
-controlP5.Chart : Chart removeLast(String)
-controlP5.Chart : Chart setData(String, int, ChartData)
-controlP5.Chart : Chart setData(int, ChartData)
-controlP5.Chart : Chart setDataSet(ChartDataSet)
-controlP5.Chart : Chart setDataSet(String, ChartDataSet)
-controlP5.Chart : Chart setRange(float, float)
-controlP5.Chart : Chart setResolution(int)
-controlP5.Chart : Chart setStrokeWeight(float)
-controlP5.Chart : Chart setValue(float)
-controlP5.Chart : Chart setView(int)
-controlP5.Chart : Chart unshift(String, float)
-controlP5.Chart : Chart unshift(float)
-controlP5.Chart : ChartData getData(String, int)
-controlP5.Chart : ChartDataSet getDataSet(String)
-controlP5.Chart : LinkedHashMap getDataSet()
-controlP5.Chart : String getInfo()
-controlP5.Chart : String toString()
-controlP5.Chart : float getStrokeWeight()
-controlP5.Chart : float[] getValuesFrom(String)
-controlP5.Chart : int getResolution()
-controlP5.Chart : int size()
-controlP5.Chart : void onEnter()
-controlP5.Chart : void onLeave()
-controlP5.Controller : CColor getColor()
-controlP5.Controller : Chart addCallback(CallbackListener)
-controlP5.Controller : Chart addListener(ControlListener)
-controlP5.Controller : Chart addListenerFor(int, CallbackListener)
-controlP5.Controller : Chart align(int, int, int, int)
-controlP5.Controller : Chart bringToFront()
-controlP5.Controller : Chart bringToFront(ControllerInterface)
-controlP5.Controller : Chart hide()
-controlP5.Controller : Chart linebreak()
-controlP5.Controller : Chart listen(boolean)
-controlP5.Controller : Chart lock()
-controlP5.Controller : Chart onChange(CallbackListener)
-controlP5.Controller : Chart onClick(CallbackListener)
-controlP5.Controller : Chart onDoublePress(CallbackListener)
-controlP5.Controller : Chart onDrag(CallbackListener)
-controlP5.Controller : Chart onDraw(ControllerView)
-controlP5.Controller : Chart onEndDrag(CallbackListener)
-controlP5.Controller : Chart onEnter(CallbackListener)
-controlP5.Controller : Chart onLeave(CallbackListener)
-controlP5.Controller : Chart onMove(CallbackListener)
-controlP5.Controller : Chart onPress(CallbackListener)
-controlP5.Controller : Chart onRelease(CallbackListener)
-controlP5.Controller : Chart onReleaseOutside(CallbackListener)
-controlP5.Controller : Chart onStartDrag(CallbackListener)
-controlP5.Controller : Chart onWheel(CallbackListener)
-controlP5.Controller : Chart plugTo(Object)
-controlP5.Controller : Chart plugTo(Object, String)
-controlP5.Controller : Chart plugTo(Object[])
-controlP5.Controller : Chart plugTo(Object[], String)
-controlP5.Controller : Chart registerProperty(String)
-controlP5.Controller : Chart registerProperty(String, String)
-controlP5.Controller : Chart registerTooltip(String)
-controlP5.Controller : Chart removeBehavior()
-controlP5.Controller : Chart removeCallback()
-controlP5.Controller : Chart removeCallback(CallbackListener)
-controlP5.Controller : Chart removeListener(ControlListener)
-controlP5.Controller : Chart removeListenerFor(int, CallbackListener)
-controlP5.Controller : Chart removeListenersFor(int)
-controlP5.Controller : Chart removeProperty(String)
-controlP5.Controller : Chart removeProperty(String, String)
-controlP5.Controller : Chart setArrayValue(float[])
-controlP5.Controller : Chart setArrayValue(int, float)
-controlP5.Controller : Chart setBehavior(ControlBehavior)
-controlP5.Controller : Chart setBroadcast(boolean)
-controlP5.Controller : Chart setCaptionLabel(String)
-controlP5.Controller : Chart setColor(CColor)
-controlP5.Controller : Chart setColorActive(int)
-controlP5.Controller : Chart setColorBackground(int)
-controlP5.Controller : Chart setColorCaptionLabel(int)
-controlP5.Controller : Chart setColorForeground(int)
-controlP5.Controller : Chart setColorLabel(int)
-controlP5.Controller : Chart setColorValue(int)
-controlP5.Controller : Chart setColorValueLabel(int)
-controlP5.Controller : Chart setDecimalPrecision(int)
-controlP5.Controller : Chart setDefaultValue(float)
-controlP5.Controller : Chart setHeight(int)
-controlP5.Controller : Chart setId(int)
-controlP5.Controller : Chart setImage(PImage)
-controlP5.Controller : Chart setImage(PImage, int)
-controlP5.Controller : Chart setImages(PImage, PImage, PImage)
-controlP5.Controller : Chart setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : Chart setLabel(String)
-controlP5.Controller : Chart setLabelVisible(boolean)
-controlP5.Controller : Chart setLock(boolean)
-controlP5.Controller : Chart setMax(float)
-controlP5.Controller : Chart setMin(float)
-controlP5.Controller : Chart setMouseOver(boolean)
-controlP5.Controller : Chart setMoveable(boolean)
-controlP5.Controller : Chart setPosition(float, float)
-controlP5.Controller : Chart setPosition(float[])
-controlP5.Controller : Chart setSize(PImage)
-controlP5.Controller : Chart setSize(int, int)
-controlP5.Controller : Chart setStringValue(String)
-controlP5.Controller : Chart setUpdate(boolean)
-controlP5.Controller : Chart setValue(float)
-controlP5.Controller : Chart setValueLabel(String)
-controlP5.Controller : Chart setValueSelf(float)
-controlP5.Controller : Chart setView(ControllerView)
-controlP5.Controller : Chart setVisible(boolean)
-controlP5.Controller : Chart setWidth(int)
-controlP5.Controller : Chart show()
-controlP5.Controller : Chart unlock()
-controlP5.Controller : Chart unplugFrom(Object)
-controlP5.Controller : Chart unplugFrom(Object[])
-controlP5.Controller : Chart unregisterTooltip()
-controlP5.Controller : Chart update()
-controlP5.Controller : Chart updateSize()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
+main.java.controlp5.Chart : Chart addData(ChartData)
+main.java.controlp5.Chart : Chart addData(ChartDataSet, float)
+main.java.controlp5.Chart : Chart addData(String, ChartData)
+main.java.controlp5.Chart : Chart addData(String, float)
+main.java.controlp5.Chart : Chart addData(float)
+main.java.controlp5.Chart : Chart addDataSet(String)
+main.java.controlp5.Chart : Chart addFirst(String, float)
+main.java.controlp5.Chart : Chart addFirst(float)
+main.java.controlp5.Chart : Chart addLast(String, float)
+main.java.controlp5.Chart : Chart addLast(float)
+main.java.controlp5.Chart : Chart push(String, float)
+main.java.controlp5.Chart : Chart push(float)
+main.java.controlp5.Chart : Chart removeData(ChartData)
+main.java.controlp5.Chart : Chart removeData(String, ChartData)
+main.java.controlp5.Chart : Chart removeData(String, int)
+main.java.controlp5.Chart : Chart removeData(int)
+main.java.controlp5.Chart : Chart removeDataSet(String)
+main.java.controlp5.Chart : Chart removeFirst()
+main.java.controlp5.Chart : Chart removeFirst(String)
+main.java.controlp5.Chart : Chart removeLast()
+main.java.controlp5.Chart : Chart removeLast(String)
+main.java.controlp5.Chart : Chart setData(String, int, ChartData)
+main.java.controlp5.Chart : Chart setData(int, ChartData)
+main.java.controlp5.Chart : Chart setDataSet(ChartDataSet)
+main.java.controlp5.Chart : Chart setDataSet(String, ChartDataSet)
+main.java.controlp5.Chart : Chart setRange(float, float)
+main.java.controlp5.Chart : Chart setResolution(int)
+main.java.controlp5.Chart : Chart setStrokeWeight(float)
+main.java.controlp5.Chart : Chart setValue(float)
+main.java.controlp5.Chart : Chart setView(int)
+main.java.controlp5.Chart : Chart unshift(String, float)
+main.java.controlp5.Chart : Chart unshift(float)
+main.java.controlp5.Chart : ChartData getData(String, int)
+main.java.controlp5.Chart : ChartDataSet getDataSet(String)
+main.java.controlp5.Chart : LinkedHashMap getDataSet()
+main.java.controlp5.Chart : String getInfo()
+main.java.controlp5.Chart : String toString()
+main.java.controlp5.Chart : float getStrokeWeight()
+main.java.controlp5.Chart : float[] getValuesFrom(String)
+main.java.controlp5.Chart : int getResolution()
+main.java.controlp5.Chart : int size()
+main.java.controlp5.Chart : void onEnter()
+main.java.controlp5.Chart : void onLeave()
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : Chart addCallback(CallbackListener)
+main.java.controlp5.Controller : Chart addListener(ControlListener)
+main.java.controlp5.Controller : Chart addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Chart align(int, int, int, int)
+main.java.controlp5.Controller : Chart bringToFront()
+main.java.controlp5.Controller : Chart bringToFront(ControllerInterface)
+main.java.controlp5.Controller : Chart hide()
+main.java.controlp5.Controller : Chart linebreak()
+main.java.controlp5.Controller : Chart listen(boolean)
+main.java.controlp5.Controller : Chart lock()
+main.java.controlp5.Controller : Chart onChange(CallbackListener)
+main.java.controlp5.Controller : Chart onClick(CallbackListener)
+main.java.controlp5.Controller : Chart onDoublePress(CallbackListener)
+main.java.controlp5.Controller : Chart onDrag(CallbackListener)
+main.java.controlp5.Controller : Chart onDraw(ControllerView)
+main.java.controlp5.Controller : Chart onEndDrag(CallbackListener)
+main.java.controlp5.Controller : Chart onEnter(CallbackListener)
+main.java.controlp5.Controller : Chart onLeave(CallbackListener)
+main.java.controlp5.Controller : Chart onMove(CallbackListener)
+main.java.controlp5.Controller : Chart onPress(CallbackListener)
+main.java.controlp5.Controller : Chart onRelease(CallbackListener)
+main.java.controlp5.Controller : Chart onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : Chart onStartDrag(CallbackListener)
+main.java.controlp5.Controller : Chart onWheel(CallbackListener)
+main.java.controlp5.Controller : Chart plugTo(Object)
+main.java.controlp5.Controller : Chart plugTo(Object, String)
+main.java.controlp5.Controller : Chart plugTo(Object[])
+main.java.controlp5.Controller : Chart plugTo(Object[], String)
+main.java.controlp5.Controller : Chart registerProperty(String)
+main.java.controlp5.Controller : Chart registerProperty(String, String)
+main.java.controlp5.Controller : Chart registerTooltip(String)
+main.java.controlp5.Controller : Chart removeBehavior()
+main.java.controlp5.Controller : Chart removeCallback()
+main.java.controlp5.Controller : Chart removeCallback(CallbackListener)
+main.java.controlp5.Controller : Chart removeListener(ControlListener)
+main.java.controlp5.Controller : Chart removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : Chart removeListenersFor(int)
+main.java.controlp5.Controller : Chart removeProperty(String)
+main.java.controlp5.Controller : Chart removeProperty(String, String)
+main.java.controlp5.Controller : Chart setArrayValue(float[])
+main.java.controlp5.Controller : Chart setArrayValue(int, float)
+main.java.controlp5.Controller : Chart setBehavior(ControlBehavior)
+main.java.controlp5.Controller : Chart setBroadcast(boolean)
+main.java.controlp5.Controller : Chart setCaptionLabel(String)
+main.java.controlp5.Controller : Chart setColor(CColor)
+main.java.controlp5.Controller : Chart setColorActive(int)
+main.java.controlp5.Controller : Chart setColorBackground(int)
+main.java.controlp5.Controller : Chart setColorCaptionLabel(int)
+main.java.controlp5.Controller : Chart setColorForeground(int)
+main.java.controlp5.Controller : Chart setColorLabel(int)
+main.java.controlp5.Controller : Chart setColorValue(int)
+main.java.controlp5.Controller : Chart setColorValueLabel(int)
+main.java.controlp5.Controller : Chart setDecimalPrecision(int)
+main.java.controlp5.Controller : Chart setDefaultValue(float)
+main.java.controlp5.Controller : Chart setHeight(int)
+main.java.controlp5.Controller : Chart setId(int)
+main.java.controlp5.Controller : Chart setImage(PImage)
+main.java.controlp5.Controller : Chart setImage(PImage, int)
+main.java.controlp5.Controller : Chart setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : Chart setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : Chart setLabel(String)
+main.java.controlp5.Controller : Chart setLabelVisible(boolean)
+main.java.controlp5.Controller : Chart setLock(boolean)
+main.java.controlp5.Controller : Chart setMax(float)
+main.java.controlp5.Controller : Chart setMin(float)
+main.java.controlp5.Controller : Chart setMouseOver(boolean)
+main.java.controlp5.Controller : Chart setMoveable(boolean)
+main.java.controlp5.Controller : Chart setPosition(float, float)
+main.java.controlp5.Controller : Chart setPosition(float[])
+main.java.controlp5.Controller : Chart setSize(PImage)
+main.java.controlp5.Controller : Chart setSize(int, int)
+main.java.controlp5.Controller : Chart setStringValue(String)
+main.java.controlp5.Controller : Chart setUpdate(boolean)
+main.java.controlp5.Controller : Chart setValue(float)
+main.java.controlp5.Controller : Chart setValueLabel(String)
+main.java.controlp5.Controller : Chart setValueSelf(float)
+main.java.controlp5.Controller : Chart setView(ControllerView)
+main.java.controlp5.Controller : Chart setVisible(boolean)
+main.java.controlp5.Controller : Chart setWidth(int)
+main.java.controlp5.Controller : Chart show()
+main.java.controlp5.Controller : Chart unlock()
+main.java.controlp5.Controller : Chart unplugFrom(Object)
+main.java.controlp5.Controller : Chart unplugFrom(Object[])
+main.java.controlp5.Controller : Chart unregisterTooltip()
+main.java.controlp5.Controller : Chart update()
+main.java.controlp5.Controller : Chart updateSize()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/extra/ControlP5frameRate/ControlP5frameRate.pde b/examples/extra/ControlP5frameRate/ControlP5frameRate.pde
index 85aed00..1a640bd 100644
--- a/examples/extra/ControlP5frameRate/ControlP5frameRate.pde
+++ b/examples/extra/ControlP5frameRate/ControlP5frameRate.pde
@@ -38,157 +38,157 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.Controller : CColor getColor()
-controlP5.Controller : ControlBehavior getBehavior()
-controlP5.Controller : ControlWindow getControlWindow()
-controlP5.Controller : ControlWindow getWindow()
-controlP5.Controller : ControllerProperty getProperty(String)
-controlP5.Controller : ControllerProperty getProperty(String, String)
-controlP5.Controller : ControllerView getView()
-controlP5.Controller : FrameRate addCallback(CallbackListener)
-controlP5.Controller : FrameRate addListener(ControlListener)
-controlP5.Controller : FrameRate addListenerFor(int, CallbackListener)
-controlP5.Controller : FrameRate align(int, int, int, int)
-controlP5.Controller : FrameRate bringToFront()
-controlP5.Controller : FrameRate bringToFront(ControllerInterface)
-controlP5.Controller : FrameRate hide()
-controlP5.Controller : FrameRate linebreak()
-controlP5.Controller : FrameRate listen(boolean)
-controlP5.Controller : FrameRate lock()
-controlP5.Controller : FrameRate onChange(CallbackListener)
-controlP5.Controller : FrameRate onClick(CallbackListener)
-controlP5.Controller : FrameRate onDoublePress(CallbackListener)
-controlP5.Controller : FrameRate onDrag(CallbackListener)
-controlP5.Controller : FrameRate onDraw(ControllerView)
-controlP5.Controller : FrameRate onEndDrag(CallbackListener)
-controlP5.Controller : FrameRate onEnter(CallbackListener)
-controlP5.Controller : FrameRate onLeave(CallbackListener)
-controlP5.Controller : FrameRate onMove(CallbackListener)
-controlP5.Controller : FrameRate onPress(CallbackListener)
-controlP5.Controller : FrameRate onRelease(CallbackListener)
-controlP5.Controller : FrameRate onReleaseOutside(CallbackListener)
-controlP5.Controller : FrameRate onStartDrag(CallbackListener)
-controlP5.Controller : FrameRate onWheel(CallbackListener)
-controlP5.Controller : FrameRate plugTo(Object)
-controlP5.Controller : FrameRate plugTo(Object, String)
-controlP5.Controller : FrameRate plugTo(Object[])
-controlP5.Controller : FrameRate plugTo(Object[], String)
-controlP5.Controller : FrameRate registerProperty(String)
-controlP5.Controller : FrameRate registerProperty(String, String)
-controlP5.Controller : FrameRate registerTooltip(String)
-controlP5.Controller : FrameRate removeBehavior()
-controlP5.Controller : FrameRate removeCallback()
-controlP5.Controller : FrameRate removeCallback(CallbackListener)
-controlP5.Controller : FrameRate removeListener(ControlListener)
-controlP5.Controller : FrameRate removeListenerFor(int, CallbackListener)
-controlP5.Controller : FrameRate removeListenersFor(int)
-controlP5.Controller : FrameRate removeProperty(String)
-controlP5.Controller : FrameRate removeProperty(String, String)
-controlP5.Controller : FrameRate setArrayValue(float[])
-controlP5.Controller : FrameRate setArrayValue(int, float)
-controlP5.Controller : FrameRate setBehavior(ControlBehavior)
-controlP5.Controller : FrameRate setBroadcast(boolean)
-controlP5.Controller : FrameRate setCaptionLabel(String)
-controlP5.Controller : FrameRate setColor(CColor)
-controlP5.Controller : FrameRate setColorActive(int)
-controlP5.Controller : FrameRate setColorBackground(int)
-controlP5.Controller : FrameRate setColorCaptionLabel(int)
-controlP5.Controller : FrameRate setColorForeground(int)
-controlP5.Controller : FrameRate setColorLabel(int)
-controlP5.Controller : FrameRate setColorValue(int)
-controlP5.Controller : FrameRate setColorValueLabel(int)
-controlP5.Controller : FrameRate setDecimalPrecision(int)
-controlP5.Controller : FrameRate setDefaultValue(float)
-controlP5.Controller : FrameRate setHeight(int)
-controlP5.Controller : FrameRate setId(int)
-controlP5.Controller : FrameRate setImage(PImage)
-controlP5.Controller : FrameRate setImage(PImage, int)
-controlP5.Controller : FrameRate setImages(PImage, PImage, PImage)
-controlP5.Controller : FrameRate setImages(PImage, PImage, PImage, PImage)
-controlP5.Controller : FrameRate setLabel(String)
-controlP5.Controller : FrameRate setLabelVisible(boolean)
-controlP5.Controller : FrameRate setLock(boolean)
-controlP5.Controller : FrameRate setMax(float)
-controlP5.Controller : FrameRate setMin(float)
-controlP5.Controller : FrameRate setMouseOver(boolean)
-controlP5.Controller : FrameRate setMoveable(boolean)
-controlP5.Controller : FrameRate setPosition(float, float)
-controlP5.Controller : FrameRate setPosition(float[])
-controlP5.Controller : FrameRate setSize(PImage)
-controlP5.Controller : FrameRate setSize(int, int)
-controlP5.Controller : FrameRate setStringValue(String)
-controlP5.Controller : FrameRate setUpdate(boolean)
-controlP5.Controller : FrameRate setValue(float)
-controlP5.Controller : FrameRate setValueLabel(String)
-controlP5.Controller : FrameRate setValueSelf(float)
-controlP5.Controller : FrameRate setView(ControllerView)
-controlP5.Controller : FrameRate setVisible(boolean)
-controlP5.Controller : FrameRate setWidth(int)
-controlP5.Controller : FrameRate show()
-controlP5.Controller : FrameRate unlock()
-controlP5.Controller : FrameRate unplugFrom(Object)
-controlP5.Controller : FrameRate unplugFrom(Object[])
-controlP5.Controller : FrameRate unregisterTooltip()
-controlP5.Controller : FrameRate update()
-controlP5.Controller : FrameRate updateSize()
-controlP5.Controller : Label getCaptionLabel()
-controlP5.Controller : Label getValueLabel()
-controlP5.Controller : List getControllerPlugList()
-controlP5.Controller : Pointer getPointer()
-controlP5.Controller : String getAddress()
-controlP5.Controller : String getInfo()
-controlP5.Controller : String getName()
-controlP5.Controller : String getStringValue()
-controlP5.Controller : String toString()
-controlP5.Controller : Tab getTab()
-controlP5.Controller : boolean isActive()
-controlP5.Controller : boolean isBroadcast()
-controlP5.Controller : boolean isInside()
-controlP5.Controller : boolean isLabelVisible()
-controlP5.Controller : boolean isListening()
-controlP5.Controller : boolean isLock()
-controlP5.Controller : boolean isMouseOver()
-controlP5.Controller : boolean isMousePressed()
-controlP5.Controller : boolean isMoveable()
-controlP5.Controller : boolean isUpdate()
-controlP5.Controller : boolean isVisible()
-controlP5.Controller : float getArrayValue(int)
-controlP5.Controller : float getDefaultValue()
-controlP5.Controller : float getMax()
-controlP5.Controller : float getMin()
-controlP5.Controller : float getValue()
-controlP5.Controller : float[] getAbsolutePosition()
-controlP5.Controller : float[] getArrayValue()
-controlP5.Controller : float[] getPosition()
-controlP5.Controller : int getDecimalPrecision()
-controlP5.Controller : int getHeight()
-controlP5.Controller : int getId()
-controlP5.Controller : int getWidth()
-controlP5.Controller : int listenerSize()
-controlP5.Controller : void remove()
-controlP5.Controller : void setView(ControllerView, int)
-controlP5.FrameRate : FrameRate setInterval(int)
-controlP5.FrameRate : void draw(PGraphics)
-controlP5.Textlabel : ControllerStyle getStyle()
-controlP5.Textlabel : Label get()
-controlP5.Textlabel : Textlabel append(String, int)
-controlP5.Textlabel : Textlabel setColor(int)
-controlP5.Textlabel : Textlabel setFont(ControlFont)
-controlP5.Textlabel : Textlabel setFont(PFont)
-controlP5.Textlabel : Textlabel setHeight(int)
-controlP5.Textlabel : Textlabel setLetterSpacing(int)
-controlP5.Textlabel : Textlabel setLineHeight(int)
-controlP5.Textlabel : Textlabel setMultiline(boolean)
-controlP5.Textlabel : Textlabel setStringValue(String)
-controlP5.Textlabel : Textlabel setText(String)
-controlP5.Textlabel : Textlabel setValue(String)
-controlP5.Textlabel : Textlabel setValue(float)
-controlP5.Textlabel : Textlabel setWidth(int)
-controlP5.Textlabel : int getLineHeight()
-controlP5.Textlabel : void draw()
-controlP5.Textlabel : void draw(PApplet)
-controlP5.Textlabel : void draw(PGraphics)
-controlP5.Textlabel : void draw(int, int)
+main.java.controlp5.Controller : CColor getColor()
+main.java.controlp5.Controller : ControlBehavior getBehavior()
+main.java.controlp5.Controller : ControlWindow getControlWindow()
+main.java.controlp5.Controller : ControlWindow getWindow()
+main.java.controlp5.Controller : ControllerProperty getProperty(String)
+main.java.controlp5.Controller : ControllerProperty getProperty(String, String)
+main.java.controlp5.Controller : ControllerView getView()
+main.java.controlp5.Controller : FrameRate addCallback(CallbackListener)
+main.java.controlp5.Controller : FrameRate addListener(ControlListener)
+main.java.controlp5.Controller : FrameRate addListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : FrameRate align(int, int, int, int)
+main.java.controlp5.Controller : FrameRate bringToFront()
+main.java.controlp5.Controller : FrameRate bringToFront(ControllerInterface)
+main.java.controlp5.Controller : FrameRate hide()
+main.java.controlp5.Controller : FrameRate linebreak()
+main.java.controlp5.Controller : FrameRate listen(boolean)
+main.java.controlp5.Controller : FrameRate lock()
+main.java.controlp5.Controller : FrameRate onChange(CallbackListener)
+main.java.controlp5.Controller : FrameRate onClick(CallbackListener)
+main.java.controlp5.Controller : FrameRate onDoublePress(CallbackListener)
+main.java.controlp5.Controller : FrameRate onDrag(CallbackListener)
+main.java.controlp5.Controller : FrameRate onDraw(ControllerView)
+main.java.controlp5.Controller : FrameRate onEndDrag(CallbackListener)
+main.java.controlp5.Controller : FrameRate onEnter(CallbackListener)
+main.java.controlp5.Controller : FrameRate onLeave(CallbackListener)
+main.java.controlp5.Controller : FrameRate onMove(CallbackListener)
+main.java.controlp5.Controller : FrameRate onPress(CallbackListener)
+main.java.controlp5.Controller : FrameRate onRelease(CallbackListener)
+main.java.controlp5.Controller : FrameRate onReleaseOutside(CallbackListener)
+main.java.controlp5.Controller : FrameRate onStartDrag(CallbackListener)
+main.java.controlp5.Controller : FrameRate onWheel(CallbackListener)
+main.java.controlp5.Controller : FrameRate plugTo(Object)
+main.java.controlp5.Controller : FrameRate plugTo(Object, String)
+main.java.controlp5.Controller : FrameRate plugTo(Object[])
+main.java.controlp5.Controller : FrameRate plugTo(Object[], String)
+main.java.controlp5.Controller : FrameRate registerProperty(String)
+main.java.controlp5.Controller : FrameRate registerProperty(String, String)
+main.java.controlp5.Controller : FrameRate registerTooltip(String)
+main.java.controlp5.Controller : FrameRate removeBehavior()
+main.java.controlp5.Controller : FrameRate removeCallback()
+main.java.controlp5.Controller : FrameRate removeCallback(CallbackListener)
+main.java.controlp5.Controller : FrameRate removeListener(ControlListener)
+main.java.controlp5.Controller : FrameRate removeListenerFor(int, CallbackListener)
+main.java.controlp5.Controller : FrameRate removeListenersFor(int)
+main.java.controlp5.Controller : FrameRate removeProperty(String)
+main.java.controlp5.Controller : FrameRate removeProperty(String, String)
+main.java.controlp5.Controller : FrameRate setArrayValue(float[])
+main.java.controlp5.Controller : FrameRate setArrayValue(int, float)
+main.java.controlp5.Controller : FrameRate setBehavior(ControlBehavior)
+main.java.controlp5.Controller : FrameRate setBroadcast(boolean)
+main.java.controlp5.Controller : FrameRate setCaptionLabel(String)
+main.java.controlp5.Controller : FrameRate setColor(CColor)
+main.java.controlp5.Controller : FrameRate setColorActive(int)
+main.java.controlp5.Controller : FrameRate setColorBackground(int)
+main.java.controlp5.Controller : FrameRate setColorCaptionLabel(int)
+main.java.controlp5.Controller : FrameRate setColorForeground(int)
+main.java.controlp5.Controller : FrameRate setColorLabel(int)
+main.java.controlp5.Controller : FrameRate setColorValue(int)
+main.java.controlp5.Controller : FrameRate setColorValueLabel(int)
+main.java.controlp5.Controller : FrameRate setDecimalPrecision(int)
+main.java.controlp5.Controller : FrameRate setDefaultValue(float)
+main.java.controlp5.Controller : FrameRate setHeight(int)
+main.java.controlp5.Controller : FrameRate setId(int)
+main.java.controlp5.Controller : FrameRate setImage(PImage)
+main.java.controlp5.Controller : FrameRate setImage(PImage, int)
+main.java.controlp5.Controller : FrameRate setImages(PImage, PImage, PImage)
+main.java.controlp5.Controller : FrameRate setImages(PImage, PImage, PImage, PImage)
+main.java.controlp5.Controller : FrameRate setLabel(String)
+main.java.controlp5.Controller : FrameRate setLabelVisible(boolean)
+main.java.controlp5.Controller : FrameRate setLock(boolean)
+main.java.controlp5.Controller : FrameRate setMax(float)
+main.java.controlp5.Controller : FrameRate setMin(float)
+main.java.controlp5.Controller : FrameRate setMouseOver(boolean)
+main.java.controlp5.Controller : FrameRate setMoveable(boolean)
+main.java.controlp5.Controller : FrameRate setPosition(float, float)
+main.java.controlp5.Controller : FrameRate setPosition(float[])
+main.java.controlp5.Controller : FrameRate setSize(PImage)
+main.java.controlp5.Controller : FrameRate setSize(int, int)
+main.java.controlp5.Controller : FrameRate setStringValue(String)
+main.java.controlp5.Controller : FrameRate setUpdate(boolean)
+main.java.controlp5.Controller : FrameRate setValue(float)
+main.java.controlp5.Controller : FrameRate setValueLabel(String)
+main.java.controlp5.Controller : FrameRate setValueSelf(float)
+main.java.controlp5.Controller : FrameRate setView(ControllerView)
+main.java.controlp5.Controller : FrameRate setVisible(boolean)
+main.java.controlp5.Controller : FrameRate setWidth(int)
+main.java.controlp5.Controller : FrameRate show()
+main.java.controlp5.Controller : FrameRate unlock()
+main.java.controlp5.Controller : FrameRate unplugFrom(Object)
+main.java.controlp5.Controller : FrameRate unplugFrom(Object[])
+main.java.controlp5.Controller : FrameRate unregisterTooltip()
+main.java.controlp5.Controller : FrameRate update()
+main.java.controlp5.Controller : FrameRate updateSize()
+main.java.controlp5.Controller : Label getCaptionLabel()
+main.java.controlp5.Controller : Label getValueLabel()
+main.java.controlp5.Controller : List getControllerPlugList()
+main.java.controlp5.Controller : Pointer getPointer()
+main.java.controlp5.Controller : String getAddress()
+main.java.controlp5.Controller : String getInfo()
+main.java.controlp5.Controller : String getName()
+main.java.controlp5.Controller : String getStringValue()
+main.java.controlp5.Controller : String toString()
+main.java.controlp5.Controller : Tab getTab()
+main.java.controlp5.Controller : boolean isActive()
+main.java.controlp5.Controller : boolean isBroadcast()
+main.java.controlp5.Controller : boolean isInside()
+main.java.controlp5.Controller : boolean isLabelVisible()
+main.java.controlp5.Controller : boolean isListening()
+main.java.controlp5.Controller : boolean isLock()
+main.java.controlp5.Controller : boolean isMouseOver()
+main.java.controlp5.Controller : boolean isMousePressed()
+main.java.controlp5.Controller : boolean isMoveable()
+main.java.controlp5.Controller : boolean isUpdate()
+main.java.controlp5.Controller : boolean isVisible()
+main.java.controlp5.Controller : float getArrayValue(int)
+main.java.controlp5.Controller : float getDefaultValue()
+main.java.controlp5.Controller : float getMax()
+main.java.controlp5.Controller : float getMin()
+main.java.controlp5.Controller : float getValue()
+main.java.controlp5.Controller : float[] getAbsolutePosition()
+main.java.controlp5.Controller : float[] getArrayValue()
+main.java.controlp5.Controller : float[] getPosition()
+main.java.controlp5.Controller : int getDecimalPrecision()
+main.java.controlp5.Controller : int getHeight()
+main.java.controlp5.Controller : int getId()
+main.java.controlp5.Controller : int getWidth()
+main.java.controlp5.Controller : int listenerSize()
+main.java.controlp5.Controller : void remove()
+main.java.controlp5.Controller : void setView(ControllerView, int)
+main.java.controlp5.FrameRate : FrameRate setInterval(int)
+main.java.controlp5.FrameRate : void draw(PGraphics)
+main.java.controlp5.Textlabel : ControllerStyle getStyle()
+main.java.controlp5.Textlabel : Label get()
+main.java.controlp5.Textlabel : Textlabel append(String, int)
+main.java.controlp5.Textlabel : Textlabel setColor(int)
+main.java.controlp5.Textlabel : Textlabel setFont(ControlFont)
+main.java.controlp5.Textlabel : Textlabel setFont(PFont)
+main.java.controlp5.Textlabel : Textlabel setHeight(int)
+main.java.controlp5.Textlabel : Textlabel setLetterSpacing(int)
+main.java.controlp5.Textlabel : Textlabel setLineHeight(int)
+main.java.controlp5.Textlabel : Textlabel setMultiline(boolean)
+main.java.controlp5.Textlabel : Textlabel setStringValue(String)
+main.java.controlp5.Textlabel : Textlabel setText(String)
+main.java.controlp5.Textlabel : Textlabel setValue(String)
+main.java.controlp5.Textlabel : Textlabel setValue(float)
+main.java.controlp5.Textlabel : Textlabel setWidth(int)
+main.java.controlp5.Textlabel : int getLineHeight()
+main.java.controlp5.Textlabel : void draw()
+main.java.controlp5.Textlabel : void draw(PApplet)
+main.java.controlp5.Textlabel : void draw(PGraphics)
+main.java.controlp5.Textlabel : void draw(int, int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/extra/ControlP5propertiesSets/ControlP5propertiesSets.pde b/examples/extra/ControlP5propertiesSets/ControlP5propertiesSets.pde
index 2c3d1a6..01f019b 100644
--- a/examples/extra/ControlP5propertiesSets/ControlP5propertiesSets.pde
+++ b/examples/extra/ControlP5propertiesSets/ControlP5propertiesSets.pde
@@ -108,26 +108,26 @@ void b4(float v) {
Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperty register(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperty register(ControllerInterface, String, String)
-controlP5.ControllerProperties : HashSet addSet(String)
-controlP5.ControllerProperties : HashSet getPropertySet(ControllerInterface)
-controlP5.ControllerProperties : List get(ControllerInterface)
-controlP5.ControllerProperties : Map get()
-controlP5.ControllerProperties : String toString()
-controlP5.ControllerProperties : boolean load()
-controlP5.ControllerProperties : boolean load(String)
-controlP5.ControllerProperties : void delete(ControllerProperty)
-controlP5.ControllerProperties : void move(ControllerInterface, String, String)
-controlP5.ControllerProperties : void move(ControllerProperty, String, String)
-controlP5.ControllerProperties : void only(ControllerProperty, String)
-controlP5.ControllerProperties : void print()
-controlP5.ControllerProperties : void setFormat(Format)
+main.java.controlp5.ControllerProperties : ControllerProperties remove(ControllerInterface)
+main.java.controlp5.ControllerProperties : ControllerProperties remove(ControllerInterface, String)
+main.java.controlp5.ControllerProperties : ControllerProperties remove(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String)
+main.java.controlp5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : ControllerProperty register(ControllerInterface, String)
+main.java.controlp5.ControllerProperties : ControllerProperty register(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : HashSet addSet(String)
+main.java.controlp5.ControllerProperties : HashSet getPropertySet(ControllerInterface)
+main.java.controlp5.ControllerProperties : List get(ControllerInterface)
+main.java.controlp5.ControllerProperties : Map get()
+main.java.controlp5.ControllerProperties : String toString()
+main.java.controlp5.ControllerProperties : boolean load()
+main.java.controlp5.ControllerProperties : boolean load(String)
+main.java.controlp5.ControllerProperties : void delete(ControllerProperty)
+main.java.controlp5.ControllerProperties : void move(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : void move(ControllerProperty, String, String)
+main.java.controlp5.ControllerProperties : void only(ControllerProperty, String)
+main.java.controlp5.ControllerProperties : void print()
+main.java.controlp5.ControllerProperties : void setFormat(Format)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
*/
diff --git a/examples/extra/ControlP5style/ControlP5style.pde b/examples/extra/ControlP5style/ControlP5style.pde
index 01147c0..9a5baf0 100644
--- a/examples/extra/ControlP5style/ControlP5style.pde
+++ b/examples/extra/ControlP5style/ControlP5style.pde
@@ -86,22 +86,22 @@ ClassName : returnType methodName(parameter type)
-controlP5.ControllerStyle : ControllerStyle margin(int)
-controlP5.ControllerStyle : ControllerStyle margin(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle moveMargin(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle movePadding(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle padding(int)
-controlP5.ControllerStyle : ControllerStyle padding(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle setMargin(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle setMarginBottom(int)
-controlP5.ControllerStyle : ControllerStyle setMarginLeft(int)
-controlP5.ControllerStyle : ControllerStyle setMarginRight(int)
-controlP5.ControllerStyle : ControllerStyle setMarginTop(int)
-controlP5.ControllerStyle : ControllerStyle setPadding(int, int, int, int)
-controlP5.ControllerStyle : ControllerStyle setPaddingBottom(int)
-controlP5.ControllerStyle : ControllerStyle setPaddingLeft(int)
-controlP5.ControllerStyle : ControllerStyle setPaddingRight(int)
-controlP5.ControllerStyle : ControllerStyle setPaddingTop(int)
+main.java.controlp5.ControllerStyle : ControllerStyle margin(int)
+main.java.controlp5.ControllerStyle : ControllerStyle margin(int, int, int, int)
+main.java.controlp5.ControllerStyle : ControllerStyle moveMargin(int, int, int, int)
+main.java.controlp5.ControllerStyle : ControllerStyle movePadding(int, int, int, int)
+main.java.controlp5.ControllerStyle : ControllerStyle padding(int)
+main.java.controlp5.ControllerStyle : ControllerStyle padding(int, int, int, int)
+main.java.controlp5.ControllerStyle : ControllerStyle setMargin(int, int, int, int)
+main.java.controlp5.ControllerStyle : ControllerStyle setMarginBottom(int)
+main.java.controlp5.ControllerStyle : ControllerStyle setMarginLeft(int)
+main.java.controlp5.ControllerStyle : ControllerStyle setMarginRight(int)
+main.java.controlp5.ControllerStyle : ControllerStyle setMarginTop(int)
+main.java.controlp5.ControllerStyle : ControllerStyle setPadding(int, int, int, int)
+main.java.controlp5.ControllerStyle : ControllerStyle setPaddingBottom(int)
+main.java.controlp5.ControllerStyle : ControllerStyle setPaddingLeft(int)
+main.java.controlp5.ControllerStyle : ControllerStyle setPaddingRight(int)
+main.java.controlp5.ControllerStyle : ControllerStyle setPaddingTop(int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/use/ControlP5behavior/ControlP5behavior.pde b/examples/use/ControlP5behavior/ControlP5behavior.pde
index 6f76b82..4ae3779 100644
--- a/examples/use/ControlP5behavior/ControlP5behavior.pde
+++ b/examples/use/ControlP5behavior/ControlP5behavior.pde
@@ -113,10 +113,10 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControlBehavior : Controller controller()
-controlP5.ControlBehavior : boolean isActive()
-controlP5.ControlBehavior : void setActive(boolean)
-controlP5.ControlBehavior : void setValue(float)
+main.java.controlp5.ControlBehavior : Controller controller()
+main.java.controlp5.ControlBehavior : boolean isActive()
+main.java.controlp5.ControlBehavior : void setActive(boolean)
+main.java.controlp5.ControlBehavior : void setValue(float)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/use/ControlP5callback/ControlP5callback.pde b/examples/use/ControlP5callback/ControlP5callback.pde
index 216797c..7c73a82 100644
--- a/examples/use/ControlP5callback/ControlP5callback.pde
+++ b/examples/use/ControlP5callback/ControlP5callback.pde
@@ -51,7 +51,7 @@ void setup() {
// the following CallbackListener will listen to any controlP5
// action such as enter, leave, pressed, released, releasedoutside, broadcast
- // see static variables starting with ACTION_ inside class controlP5.ControlP5Constants
+ // see static variables starting with ACTION_ inside class main.java.controlp5.ControlP5Constants
cb = new CallbackListener() {
public void controlEvent(CallbackEvent theEvent) {
@@ -166,8 +166,8 @@ a list of all methods available for the CallbackEvent Controller
ClassName : returnType methodName(parameter type)
- controlP5.CallbackEvent : Controller getController()
- controlP5.CallbackEvent : int getAction()
+ main.java.controlp5.CallbackEvent : Controller getController()
+ main.java.controlp5.CallbackEvent : int getAction()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/use/ControlP5controlEvent/ControlP5controlEvent.pde b/examples/use/ControlP5controlEvent/ControlP5controlEvent.pde
index 5f7a909..08b6d12 100644
--- a/examples/use/ControlP5controlEvent/ControlP5controlEvent.pde
+++ b/examples/use/ControlP5controlEvent/ControlP5controlEvent.pde
@@ -91,24 +91,24 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControlEvent : ControlGroup getGroup()
-controlP5.ControlEvent : Controller getController()
-controlP5.ControlEvent : String getLabel()
-controlP5.ControlEvent : String getName()
-controlP5.ControlEvent : String getStringValue()
-controlP5.ControlEvent : String toString()
-controlP5.ControlEvent : Tab getTab()
-controlP5.ControlEvent : boolean isAssignableFrom(Class)
-controlP5.ControlEvent : boolean isController()
-controlP5.ControlEvent : boolean isFrom(ControllerInterface)
-controlP5.ControlEvent : boolean isFrom(String)
-controlP5.ControlEvent : boolean isGroup()
-controlP5.ControlEvent : boolean isTab()
-controlP5.ControlEvent : float getArrayValue(int)
-controlP5.ControlEvent : float getValue()
-controlP5.ControlEvent : float[] getArrayValue()
-controlP5.ControlEvent : int getId()
-controlP5.ControlEvent : int getType()
+main.java.controlp5.ControlEvent : ControlGroup getGroup()
+main.java.controlp5.ControlEvent : Controller getController()
+main.java.controlp5.ControlEvent : String getLabel()
+main.java.controlp5.ControlEvent : String getName()
+main.java.controlp5.ControlEvent : String getStringValue()
+main.java.controlp5.ControlEvent : String toString()
+main.java.controlp5.ControlEvent : Tab getTab()
+main.java.controlp5.ControlEvent : boolean isAssignableFrom(Class)
+main.java.controlp5.ControlEvent : boolean isController()
+main.java.controlp5.ControlEvent : boolean isFrom(ControllerInterface)
+main.java.controlp5.ControlEvent : boolean isFrom(String)
+main.java.controlp5.ControlEvent : boolean isGroup()
+main.java.controlp5.ControlEvent : boolean isTab()
+main.java.controlp5.ControlEvent : float getArrayValue(int)
+main.java.controlp5.ControlEvent : float getValue()
+main.java.controlp5.ControlEvent : float[] getArrayValue()
+main.java.controlp5.ControlEvent : int getId()
+main.java.controlp5.ControlEvent : int getType()
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/use/ControlP5controlFont/ControlP5controlFont.pde b/examples/use/ControlP5controlFont/ControlP5controlFont.pde
index 35df35c..d2ba2cd 100644
--- a/examples/use/ControlP5controlFont/ControlP5controlFont.pde
+++ b/examples/use/ControlP5controlFont/ControlP5controlFont.pde
@@ -12,7 +12,7 @@ import controlP5.*;
ControlP5 cp5;
-controlP5.Button b;
+main.java.controlp5.Button b;
int buttonValue = 1;
@@ -108,22 +108,22 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControlFont : PFont getFont()
-controlP5.ControlFont : int getBaseline()
-controlP5.ControlFont : int getBottom()
-controlP5.ControlFont : int getCenter()
-controlP5.ControlFont : int getHeight()
-controlP5.ControlFont : int getOffset(int)
-controlP5.ControlFont : int getOverflow()
-controlP5.ControlFont : int getSize()
-controlP5.ControlFont : int getTextHeight()
-controlP5.ControlFont : int getTop()
-controlP5.ControlFont : int getWidth()
-controlP5.ControlFont : void adjust(PGraphics, Label)
-controlP5.ControlFont : void draw(ControlP5, Label)
-controlP5.ControlFont : void draw(PGraphics, Label)
-controlP5.ControlFont : void init(Label)
-controlP5.ControlFont : void setSize(int)
+main.java.controlp5.ControlFont : PFont getFont()
+main.java.controlp5.ControlFont : int getBaseline()
+main.java.controlp5.ControlFont : int getBottom()
+main.java.controlp5.ControlFont : int getCenter()
+main.java.controlp5.ControlFont : int getHeight()
+main.java.controlp5.ControlFont : int getOffset(int)
+main.java.controlp5.ControlFont : int getOverflow()
+main.java.controlp5.ControlFont : int getSize()
+main.java.controlp5.ControlFont : int getTextHeight()
+main.java.controlp5.ControlFont : int getTop()
+main.java.controlp5.ControlFont : int getWidth()
+main.java.controlp5.ControlFont : void adjust(PGraphics, Label)
+main.java.controlp5.ControlFont : void draw(ControlP5, Label)
+main.java.controlp5.ControlFont : void draw(PGraphics, Label)
+main.java.controlp5.ControlFont : void init(Label)
+main.java.controlp5.ControlFont : void setSize(int)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/examples/use/ControlP5customView/ControlP5customView.pde b/examples/use/ControlP5customView/ControlP5customView.pde
index 4db2e6f..0e685b7 100644
--- a/examples/use/ControlP5customView/ControlP5customView.pde
+++ b/examples/use/ControlP5customView/ControlP5customView.pde
@@ -95,7 +95,7 @@ You can find further details about class ControllerView in the javadoc.
Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControllerView : void display(PApplet, T)
+main.java.controlp5.ControllerView : void display(PApplet, T)
*/
diff --git a/examples/use/ControlP5mouseover/ControlP5mouseover.pde b/examples/use/ControlP5mouseover/ControlP5mouseover.pde
index 89184ca..e4b797c 100644
--- a/examples/use/ControlP5mouseover/ControlP5mouseover.pde
+++ b/examples/use/ControlP5mouseover/ControlP5mouseover.pde
@@ -89,9 +89,9 @@ You can find further details about class ControlP5 in the javadoc.
Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControlP5 : List getMouseOverList()
-controlP5.ControlP5 : boolean isMouseOver()
-controlP5.ControlP5 : boolean isMouseOver(ControllerInterface)
+main.java.controlp5.ControlP5 : List getMouseOverList()
+main.java.controlp5.ControlP5 : boolean isMouseOver()
+main.java.controlp5.ControlP5 : boolean isMouseOver(ControllerInterface)
*/
diff --git a/examples/use/ControlP5snapshot/ControlP5snapshot.pde b/examples/use/ControlP5snapshot/ControlP5snapshot.pde
index 5ab7856..81c0ab7 100644
--- a/examples/use/ControlP5snapshot/ControlP5snapshot.pde
+++ b/examples/use/ControlP5snapshot/ControlP5snapshot.pde
@@ -126,35 +126,35 @@ Format:
ClassName : returnType methodName(parameter type)
-controlP5.ControllerProperties : ArrayList getSnapshotIndices()
-controlP5.ControllerProperties : ControllerProperties addSet(String)
-controlP5.ControllerProperties : ControllerProperties delete(ControllerProperty)
-controlP5.ControllerProperties : ControllerProperties getSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties move(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperties move(ControllerProperty, String, String)
-controlP5.ControllerProperties : ControllerProperties only(ControllerProperty, String)
-controlP5.ControllerProperties : ControllerProperties print()
-controlP5.ControllerProperties : ControllerProperties register(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperties remove(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperties removeSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties saveSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties saveSnapshotAs(String, String)
-controlP5.ControllerProperties : ControllerProperties setSnapshot(String)
-controlP5.ControllerProperties : ControllerProperties updateSnapshot(String)
-controlP5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String)
-controlP5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String, String)
-controlP5.ControllerProperties : ControllerProperty register(ControllerInterface, String, String)
-controlP5.ControllerProperties : HashSet getPropertySet(ControllerInterface)
-controlP5.ControllerProperties : List get(ControllerInterface)
-controlP5.ControllerProperties : Map get()
-controlP5.ControllerProperties : String toString()
-controlP5.ControllerProperties : boolean load()
-controlP5.ControllerProperties : boolean load(String)
-controlP5.ControllerProperties : boolean save()
-controlP5.ControllerProperties : boolean saveAs(String)
-controlP5.ControllerProperties : void setFormat(Format)
+main.java.controlp5.ControllerProperties : ArrayList getSnapshotIndices()
+main.java.controlp5.ControllerProperties : ControllerProperties addSet(String)
+main.java.controlp5.ControllerProperties : ControllerProperties delete(ControllerProperty)
+main.java.controlp5.ControllerProperties : ControllerProperties getSnapshot(String)
+main.java.controlp5.ControllerProperties : ControllerProperties move(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : ControllerProperties move(ControllerProperty, String, String)
+main.java.controlp5.ControllerProperties : ControllerProperties only(ControllerProperty, String)
+main.java.controlp5.ControllerProperties : ControllerProperties print()
+main.java.controlp5.ControllerProperties : ControllerProperties register(ControllerInterface, String)
+main.java.controlp5.ControllerProperties : ControllerProperties remove(ControllerInterface)
+main.java.controlp5.ControllerProperties : ControllerProperties remove(ControllerInterface, String)
+main.java.controlp5.ControllerProperties : ControllerProperties remove(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : ControllerProperties removeSnapshot(String)
+main.java.controlp5.ControllerProperties : ControllerProperties saveSnapshot(String)
+main.java.controlp5.ControllerProperties : ControllerProperties saveSnapshotAs(String, String)
+main.java.controlp5.ControllerProperties : ControllerProperties setSnapshot(String)
+main.java.controlp5.ControllerProperties : ControllerProperties updateSnapshot(String)
+main.java.controlp5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String)
+main.java.controlp5.ControllerProperties : ControllerProperty getProperty(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : ControllerProperty register(ControllerInterface, String, String)
+main.java.controlp5.ControllerProperties : HashSet getPropertySet(ControllerInterface)
+main.java.controlp5.ControllerProperties : List get(ControllerInterface)
+main.java.controlp5.ControllerProperties : Map get()
+main.java.controlp5.ControllerProperties : String toString()
+main.java.controlp5.ControllerProperties : boolean load()
+main.java.controlp5.ControllerProperties : boolean load(String)
+main.java.controlp5.ControllerProperties : boolean save()
+main.java.controlp5.ControllerProperties : boolean saveAs(String)
+main.java.controlp5.ControllerProperties : void setFormat(Format)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
diff --git a/gen/controlP5/layout/XML.interp b/gen/controlP5/layout/XML.interp
new file mode 100644
index 0000000..93d44ff
--- /dev/null
+++ b/gen/controlP5/layout/XML.interp
@@ -0,0 +1,37 @@
+token literal names:
+null
+null
+null
+null
+'<'
+''
+'>'
+'/>'
+'='
+null
+null
+
+token symbolic names:
+null
+SELF_CLOSING
+EMPTY
+SPACE
+OPEN
+OPEN_SLASH
+CLOSE
+SLASH_CLOSE
+EQUALS
+Name
+STRING
+
+rule names:
+document
+element
+startTag
+endTag
+attribute
+content
+
+
+atn:
+[4, 1, 10, 51, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 5, 1, 19, 8, 1, 10, 1, 12, 1, 22, 9, 1, 1, 1, 1, 1, 1, 1, 3, 1, 27, 8, 1, 1, 2, 1, 2, 1, 2, 5, 2, 32, 8, 2, 10, 2, 12, 2, 35, 9, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 3, 5, 49, 8, 5, 1, 5, 0, 0, 6, 0, 2, 4, 6, 8, 10, 0, 0, 49, 0, 12, 1, 0, 0, 0, 2, 26, 1, 0, 0, 0, 4, 28, 1, 0, 0, 0, 6, 38, 1, 0, 0, 0, 8, 42, 1, 0, 0, 0, 10, 48, 1, 0, 0, 0, 12, 13, 3, 2, 1, 0, 13, 14, 5, 0, 0, 1, 14, 1, 1, 0, 0, 0, 15, 20, 3, 4, 2, 0, 16, 19, 3, 10, 5, 0, 17, 19, 5, 2, 0, 0, 18, 16, 1, 0, 0, 0, 18, 17, 1, 0, 0, 0, 19, 22, 1, 0, 0, 0, 20, 18, 1, 0, 0, 0, 20, 21, 1, 0, 0, 0, 21, 23, 1, 0, 0, 0, 22, 20, 1, 0, 0, 0, 23, 24, 3, 6, 3, 0, 24, 27, 1, 0, 0, 0, 25, 27, 5, 1, 0, 0, 26, 15, 1, 0, 0, 0, 26, 25, 1, 0, 0, 0, 27, 3, 1, 0, 0, 0, 28, 29, 5, 4, 0, 0, 29, 33, 5, 9, 0, 0, 30, 32, 3, 8, 4, 0, 31, 30, 1, 0, 0, 0, 32, 35, 1, 0, 0, 0, 33, 31, 1, 0, 0, 0, 33, 34, 1, 0, 0, 0, 34, 36, 1, 0, 0, 0, 35, 33, 1, 0, 0, 0, 36, 37, 5, 6, 0, 0, 37, 5, 1, 0, 0, 0, 38, 39, 5, 5, 0, 0, 39, 40, 5, 9, 0, 0, 40, 41, 5, 6, 0, 0, 41, 7, 1, 0, 0, 0, 42, 43, 5, 9, 0, 0, 43, 44, 5, 8, 0, 0, 44, 45, 5, 10, 0, 0, 45, 9, 1, 0, 0, 0, 46, 49, 3, 2, 1, 0, 47, 49, 5, 10, 0, 0, 48, 46, 1, 0, 0, 0, 48, 47, 1, 0, 0, 0, 49, 11, 1, 0, 0, 0, 5, 18, 20, 26, 33, 48]
\ No newline at end of file
diff --git a/gen/controlP5/layout/XML.tokens b/gen/controlP5/layout/XML.tokens
new file mode 100644
index 0000000..1f60c67
--- /dev/null
+++ b/gen/controlP5/layout/XML.tokens
@@ -0,0 +1,15 @@
+SELF_CLOSING=1
+EMPTY=2
+SPACE=3
+OPEN=4
+OPEN_SLASH=5
+CLOSE=6
+SLASH_CLOSE=7
+EQUALS=8
+Name=9
+STRING=10
+'<'=4
+''=5
+'>'=6
+'/>'=7
+'='=8
diff --git a/gen/controlP5/layout/XMLBaseListener.java b/gen/controlP5/layout/XMLBaseListener.java
new file mode 100644
index 0000000..019ddfa
--- /dev/null
+++ b/gen/controlP5/layout/XMLBaseListener.java
@@ -0,0 +1,112 @@
+// Generated from /Users/gabrielsalvador/Code/controlp5/src/main/java/controlP5/layout/XML.g4 by ANTLR 4.12.0
+package controlP5.layout;
+
+import org.antlr.v4.runtime.ParserRuleContext;
+import org.antlr.v4.runtime.tree.ErrorNode;
+import org.antlr.v4.runtime.tree.TerminalNode;
+
+/**
+ * This class provides an empty implementation of {@link XMLListener},
+ * which can be extended to create a listener which only needs to handle a subset
+ * of the available methods.
+ */
+@SuppressWarnings("CheckReturnValue")
+public class XMLBaseListener implements XMLListener {
+ /**
+ * {@inheritDoc}
+ *
+ *
The default implementation does nothing.
+ */
+ @Override public void enterDocument(XMLParser.DocumentContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDocument(XMLParser.DocumentContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterElement(XMLParser.ElementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitElement(XMLParser.ElementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterStartTag(XMLParser.StartTagContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitStartTag(XMLParser.StartTagContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterEndTag(XMLParser.EndTagContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitEndTag(XMLParser.EndTagContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterAttribute(XMLParser.AttributeContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitAttribute(XMLParser.AttributeContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterContent(XMLParser.ContentContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitContent(XMLParser.ContentContext ctx) { }
+
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterEveryRule(ParserRuleContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitEveryRule(ParserRuleContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void visitTerminal(TerminalNode node) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void visitErrorNode(ErrorNode node) { }
+}
\ No newline at end of file
diff --git a/gen/controlP5/layout/XMLBaseVisitor.java b/gen/controlP5/layout/XMLBaseVisitor.java
new file mode 100644
index 0000000..029c48f
--- /dev/null
+++ b/gen/controlP5/layout/XMLBaseVisitor.java
@@ -0,0 +1,57 @@
+// Generated from /Users/gabrielsalvador/Code/controlp5/src/main/java/controlP5/layout/XML.g4 by ANTLR 4.12.0
+package controlP5.layout;
+import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
+
+/**
+ * This class provides an empty implementation of {@link XMLVisitor},
+ * which can be extended to create a visitor which only needs to handle a subset
+ * of the available methods.
+ *
+ * @param The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+@SuppressWarnings("CheckReturnValue")
+public class XMLBaseVisitor extends AbstractParseTreeVisitor implements XMLVisitor {
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDocument(XMLParser.DocumentContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitElement(XMLParser.ElementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitStartTag(XMLParser.StartTagContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitEndTag(XMLParser.EndTagContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitAttribute(XMLParser.AttributeContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitContent(XMLParser.ContentContext ctx) { return visitChildren(ctx); }
+}
\ No newline at end of file
diff --git a/gen/controlP5/layout/XMLLexer.interp b/gen/controlP5/layout/XMLLexer.interp
new file mode 100644
index 0000000..d3f8e8f
--- /dev/null
+++ b/gen/controlP5/layout/XMLLexer.interp
@@ -0,0 +1,49 @@
+token literal names:
+null
+null
+null
+null
+'<'
+''
+'>'
+'/>'
+'='
+null
+null
+
+token symbolic names:
+null
+SELF_CLOSING
+EMPTY
+SPACE
+OPEN
+OPEN_SLASH
+CLOSE
+SLASH_CLOSE
+EQUALS
+Name
+STRING
+
+rule names:
+SELF_CLOSING
+EMPTY
+SPACE
+OPEN
+OPEN_SLASH
+CLOSE
+SLASH_CLOSE
+EQUALS
+Name
+STRING
+DIGIT
+ALPHA
+
+channel names:
+DEFAULT_TOKEN_CHANNEL
+HIDDEN
+
+mode names:
+DEFAULT_MODE
+
+atn:
+[4, 0, 10, 80, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 5, 1, 31, 8, 1, 10, 1, 12, 1, 34, 9, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 54, 8, 8, 10, 8, 12, 8, 57, 9, 8, 1, 9, 1, 9, 5, 9, 61, 8, 9, 10, 9, 12, 9, 64, 9, 9, 1, 9, 1, 9, 1, 9, 5, 9, 69, 8, 9, 10, 9, 12, 9, 72, 9, 9, 1, 9, 3, 9, 75, 8, 9, 1, 10, 1, 10, 1, 11, 1, 11, 0, 0, 12, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 0, 23, 0, 1, 0, 6, 3, 0, 9, 10, 13, 13, 32, 32, 2, 0, 45, 46, 95, 95, 1, 0, 34, 34, 1, 0, 39, 39, 1, 0, 48, 57, 2, 0, 65, 90, 97, 122, 84, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 1, 25, 1, 0, 0, 0, 3, 32, 1, 0, 0, 0, 5, 35, 1, 0, 0, 0, 7, 37, 1, 0, 0, 0, 9, 39, 1, 0, 0, 0, 11, 42, 1, 0, 0, 0, 13, 44, 1, 0, 0, 0, 15, 47, 1, 0, 0, 0, 17, 49, 1, 0, 0, 0, 19, 74, 1, 0, 0, 0, 21, 76, 1, 0, 0, 0, 23, 78, 1, 0, 0, 0, 25, 26, 3, 7, 3, 0, 26, 27, 3, 17, 8, 0, 27, 28, 3, 13, 6, 0, 28, 2, 1, 0, 0, 0, 29, 31, 3, 5, 2, 0, 30, 29, 1, 0, 0, 0, 31, 34, 1, 0, 0, 0, 32, 30, 1, 0, 0, 0, 32, 33, 1, 0, 0, 0, 33, 4, 1, 0, 0, 0, 34, 32, 1, 0, 0, 0, 35, 36, 7, 0, 0, 0, 36, 6, 1, 0, 0, 0, 37, 38, 5, 60, 0, 0, 38, 8, 1, 0, 0, 0, 39, 40, 5, 60, 0, 0, 40, 41, 5, 47, 0, 0, 41, 10, 1, 0, 0, 0, 42, 43, 5, 62, 0, 0, 43, 12, 1, 0, 0, 0, 44, 45, 5, 47, 0, 0, 45, 46, 5, 62, 0, 0, 46, 14, 1, 0, 0, 0, 47, 48, 5, 61, 0, 0, 48, 16, 1, 0, 0, 0, 49, 55, 3, 23, 11, 0, 50, 54, 3, 23, 11, 0, 51, 54, 3, 21, 10, 0, 52, 54, 7, 1, 0, 0, 53, 50, 1, 0, 0, 0, 53, 51, 1, 0, 0, 0, 53, 52, 1, 0, 0, 0, 54, 57, 1, 0, 0, 0, 55, 53, 1, 0, 0, 0, 55, 56, 1, 0, 0, 0, 56, 18, 1, 0, 0, 0, 57, 55, 1, 0, 0, 0, 58, 62, 5, 34, 0, 0, 59, 61, 8, 2, 0, 0, 60, 59, 1, 0, 0, 0, 61, 64, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 65, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 65, 75, 5, 34, 0, 0, 66, 70, 5, 39, 0, 0, 67, 69, 8, 3, 0, 0, 68, 67, 1, 0, 0, 0, 69, 72, 1, 0, 0, 0, 70, 68, 1, 0, 0, 0, 70, 71, 1, 0, 0, 0, 71, 73, 1, 0, 0, 0, 72, 70, 1, 0, 0, 0, 73, 75, 5, 39, 0, 0, 74, 58, 1, 0, 0, 0, 74, 66, 1, 0, 0, 0, 75, 20, 1, 0, 0, 0, 76, 77, 7, 4, 0, 0, 77, 22, 1, 0, 0, 0, 78, 79, 7, 5, 0, 0, 79, 24, 1, 0, 0, 0, 7, 0, 32, 53, 55, 62, 70, 74, 0]
\ No newline at end of file
diff --git a/gen/controlP5/layout/XMLLexer.java b/gen/controlP5/layout/XMLLexer.java
new file mode 100644
index 0000000..978fbc3
--- /dev/null
+++ b/gen/controlP5/layout/XMLLexer.java
@@ -0,0 +1,166 @@
+// Generated from /Users/gabrielsalvador/Code/controlp5/src/main/java/controlP5/layout/XML.g4 by ANTLR 4.12.0
+package controlP5.layout;
+import org.antlr.v4.runtime.Lexer;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.TokenStream;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.misc.*;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
+public class XMLLexer extends Lexer {
+ static { RuntimeMetaData.checkVersion("4.12.0", RuntimeMetaData.VERSION); }
+
+ protected static final DFA[] _decisionToDFA;
+ protected static final PredictionContextCache _sharedContextCache =
+ new PredictionContextCache();
+ public static final int
+ SELF_CLOSING=1, EMPTY=2, SPACE=3, OPEN=4, OPEN_SLASH=5, CLOSE=6, SLASH_CLOSE=7,
+ EQUALS=8, Name=9, STRING=10;
+ public static String[] channelNames = {
+ "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
+ };
+
+ public static String[] modeNames = {
+ "DEFAULT_MODE"
+ };
+
+ private static String[] makeRuleNames() {
+ return new String[] {
+ "SELF_CLOSING", "EMPTY", "SPACE", "OPEN", "OPEN_SLASH", "CLOSE", "SLASH_CLOSE",
+ "EQUALS", "Name", "STRING", "DIGIT", "ALPHA"
+ };
+ }
+ public static final String[] ruleNames = makeRuleNames();
+
+ private static String[] makeLiteralNames() {
+ return new String[] {
+ null, null, null, null, "'<'", "''", "'>'", "'/>'", "'='"
+ };
+ }
+ private static final String[] _LITERAL_NAMES = makeLiteralNames();
+ private static String[] makeSymbolicNames() {
+ return new String[] {
+ null, "SELF_CLOSING", "EMPTY", "SPACE", "OPEN", "OPEN_SLASH", "CLOSE",
+ "SLASH_CLOSE", "EQUALS", "Name", "STRING"
+ };
+ }
+ private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
+ public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+ /**
+ * @deprecated Use {@link #VOCABULARY} instead.
+ */
+ @Deprecated
+ public static final String[] tokenNames;
+ static {
+ tokenNames = new String[_SYMBOLIC_NAMES.length];
+ for (int i = 0; i < tokenNames.length; i++) {
+ tokenNames[i] = VOCABULARY.getLiteralName(i);
+ if (tokenNames[i] == null) {
+ tokenNames[i] = VOCABULARY.getSymbolicName(i);
+ }
+
+ if (tokenNames[i] == null) {
+ tokenNames[i] = "";
+ }
+ }
+ }
+
+ @Override
+ @Deprecated
+ public String[] getTokenNames() {
+ return tokenNames;
+ }
+
+ @Override
+
+ public Vocabulary getVocabulary() {
+ return VOCABULARY;
+ }
+
+
+ public XMLLexer(CharStream input) {
+ super(input);
+ _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+ }
+
+ @Override
+ public String getGrammarFileName() { return "XML.g4"; }
+
+ @Override
+ public String[] getRuleNames() { return ruleNames; }
+
+ @Override
+ public String getSerializedATN() { return _serializedATN; }
+
+ @Override
+ public String[] getChannelNames() { return channelNames; }
+
+ @Override
+ public String[] getModeNames() { return modeNames; }
+
+ @Override
+ public ATN getATN() { return _ATN; }
+
+ public static final String _serializedATN =
+ "\u0004\u0000\nP\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+
+ "\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+
+ "\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+
+ "\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+
+ "\u0007\u000b\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001"+
+ "\u0005\u0001\u001f\b\u0001\n\u0001\f\u0001\"\t\u0001\u0001\u0002\u0001"+
+ "\u0002\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+
+ "\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0007\u0001"+
+ "\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0005\b6\b\b\n\b\f\b9\t\b\u0001"+
+ "\t\u0001\t\u0005\t=\b\t\n\t\f\t@\t\t\u0001\t\u0001\t\u0001\t\u0005\tE"+
+ "\b\t\n\t\f\tH\t\t\u0001\t\u0003\tK\b\t\u0001\n\u0001\n\u0001\u000b\u0001"+
+ "\u000b\u0000\u0000\f\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t"+
+ "\u0005\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u0000\u0017\u0000"+
+ "\u0001\u0000\u0006\u0003\u0000\t\n\r\r \u0002\u0000-.__\u0001\u0000\""+
+ "\"\u0001\u0000\'\'\u0001\u000009\u0002\u0000AZazT\u0000\u0001\u0001\u0000"+
+ "\u0000\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005\u0001\u0000"+
+ "\u0000\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000"+
+ "\u0000\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000"+
+ "\u0000\u000f\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000\u0000\u0000"+
+ "\u0000\u0013\u0001\u0000\u0000\u0000\u0001\u0019\u0001\u0000\u0000\u0000"+
+ "\u0003 \u0001\u0000\u0000\u0000\u0005#\u0001\u0000\u0000\u0000\u0007%"+
+ "\u0001\u0000\u0000\u0000\t\'\u0001\u0000\u0000\u0000\u000b*\u0001\u0000"+
+ "\u0000\u0000\r,\u0001\u0000\u0000\u0000\u000f/\u0001\u0000\u0000\u0000"+
+ "\u00111\u0001\u0000\u0000\u0000\u0013J\u0001\u0000\u0000\u0000\u0015L"+
+ "\u0001\u0000\u0000\u0000\u0017N\u0001\u0000\u0000\u0000\u0019\u001a\u0003"+
+ "\u0007\u0003\u0000\u001a\u001b\u0003\u0011\b\u0000\u001b\u001c\u0003\r"+
+ "\u0006\u0000\u001c\u0002\u0001\u0000\u0000\u0000\u001d\u001f\u0003\u0005"+
+ "\u0002\u0000\u001e\u001d\u0001\u0000\u0000\u0000\u001f\"\u0001\u0000\u0000"+
+ "\u0000 \u001e\u0001\u0000\u0000\u0000 !\u0001\u0000\u0000\u0000!\u0004"+
+ "\u0001\u0000\u0000\u0000\" \u0001\u0000\u0000\u0000#$\u0007\u0000\u0000"+
+ "\u0000$\u0006\u0001\u0000\u0000\u0000%&\u0005<\u0000\u0000&\b\u0001\u0000"+
+ "\u0000\u0000\'(\u0005<\u0000\u0000()\u0005/\u0000\u0000)\n\u0001\u0000"+
+ "\u0000\u0000*+\u0005>\u0000\u0000+\f\u0001\u0000\u0000\u0000,-\u0005/"+
+ "\u0000\u0000-.\u0005>\u0000\u0000.\u000e\u0001\u0000\u0000\u0000/0\u0005"+
+ "=\u0000\u00000\u0010\u0001\u0000\u0000\u000017\u0003\u0017\u000b\u0000"+
+ "26\u0003\u0017\u000b\u000036\u0003\u0015\n\u000046\u0007\u0001\u0000\u0000"+
+ "52\u0001\u0000\u0000\u000053\u0001\u0000\u0000\u000054\u0001\u0000\u0000"+
+ "\u000069\u0001\u0000\u0000\u000075\u0001\u0000\u0000\u000078\u0001\u0000"+
+ "\u0000\u00008\u0012\u0001\u0000\u0000\u000097\u0001\u0000\u0000\u0000"+
+ ":>\u0005\"\u0000\u0000;=\b\u0002\u0000\u0000<;\u0001\u0000\u0000\u0000"+
+ "=@\u0001\u0000\u0000\u0000><\u0001\u0000\u0000\u0000>?\u0001\u0000\u0000"+
+ "\u0000?A\u0001\u0000\u0000\u0000@>\u0001\u0000\u0000\u0000AK\u0005\"\u0000"+
+ "\u0000BF\u0005\'\u0000\u0000CE\b\u0003\u0000\u0000DC\u0001\u0000\u0000"+
+ "\u0000EH\u0001\u0000\u0000\u0000FD\u0001\u0000\u0000\u0000FG\u0001\u0000"+
+ "\u0000\u0000GI\u0001\u0000\u0000\u0000HF\u0001\u0000\u0000\u0000IK\u0005"+
+ "\'\u0000\u0000J:\u0001\u0000\u0000\u0000JB\u0001\u0000\u0000\u0000K\u0014"+
+ "\u0001\u0000\u0000\u0000LM\u0007\u0004\u0000\u0000M\u0016\u0001\u0000"+
+ "\u0000\u0000NO\u0007\u0005\u0000\u0000O\u0018\u0001\u0000\u0000\u0000"+
+ "\u0007\u0000 57>FJ\u0000";
+ public static final ATN _ATN =
+ new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+ static {
+ _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+ for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+ _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/gen/controlP5/layout/XMLLexer.tokens b/gen/controlP5/layout/XMLLexer.tokens
new file mode 100644
index 0000000..1f60c67
--- /dev/null
+++ b/gen/controlP5/layout/XMLLexer.tokens
@@ -0,0 +1,15 @@
+SELF_CLOSING=1
+EMPTY=2
+SPACE=3
+OPEN=4
+OPEN_SLASH=5
+CLOSE=6
+SLASH_CLOSE=7
+EQUALS=8
+Name=9
+STRING=10
+'<'=4
+''=5
+'>'=6
+'/>'=7
+'='=8
diff --git a/gen/controlP5/layout/XMLListener.java b/gen/controlP5/layout/XMLListener.java
new file mode 100644
index 0000000..f7af6d9
--- /dev/null
+++ b/gen/controlP5/layout/XMLListener.java
@@ -0,0 +1,70 @@
+// Generated from /Users/gabrielsalvador/Code/controlp5/src/main/java/controlP5/layout/XML.g4 by ANTLR 4.12.0
+package controlP5.layout;
+import org.antlr.v4.runtime.tree.ParseTreeListener;
+
+/**
+ * This interface defines a complete listener for a parse tree produced by
+ * {@link XMLParser}.
+ */
+public interface XMLListener extends ParseTreeListener {
+ /**
+ * Enter a parse tree produced by {@link XMLParser#document}.
+ * @param ctx the parse tree
+ */
+ void enterDocument(XMLParser.DocumentContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#document}.
+ * @param ctx the parse tree
+ */
+ void exitDocument(XMLParser.DocumentContext ctx);
+ /**
+ * Enter a parse tree produced by {@link XMLParser#element}.
+ * @param ctx the parse tree
+ */
+ void enterElement(XMLParser.ElementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#element}.
+ * @param ctx the parse tree
+ */
+ void exitElement(XMLParser.ElementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link XMLParser#startTag}.
+ * @param ctx the parse tree
+ */
+ void enterStartTag(XMLParser.StartTagContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#startTag}.
+ * @param ctx the parse tree
+ */
+ void exitStartTag(XMLParser.StartTagContext ctx);
+ /**
+ * Enter a parse tree produced by {@link XMLParser#endTag}.
+ * @param ctx the parse tree
+ */
+ void enterEndTag(XMLParser.EndTagContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#endTag}.
+ * @param ctx the parse tree
+ */
+ void exitEndTag(XMLParser.EndTagContext ctx);
+ /**
+ * Enter a parse tree produced by {@link XMLParser#attribute}.
+ * @param ctx the parse tree
+ */
+ void enterAttribute(XMLParser.AttributeContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#attribute}.
+ * @param ctx the parse tree
+ */
+ void exitAttribute(XMLParser.AttributeContext ctx);
+ /**
+ * Enter a parse tree produced by {@link XMLParser#content}.
+ * @param ctx the parse tree
+ */
+ void enterContent(XMLParser.ContentContext ctx);
+ /**
+ * Exit a parse tree produced by {@link XMLParser#content}.
+ * @param ctx the parse tree
+ */
+ void exitContent(XMLParser.ContentContext ctx);
+}
\ No newline at end of file
diff --git a/gen/controlP5/layout/XMLParser.java b/gen/controlP5/layout/XMLParser.java
new file mode 100644
index 0000000..a35d7b7
--- /dev/null
+++ b/gen/controlP5/layout/XMLParser.java
@@ -0,0 +1,520 @@
+// Generated from /Users/gabrielsalvador/Code/controlp5/src/main/java/controlP5/layout/XML.g4 by ANTLR 4.12.0
+package controlP5.layout;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.misc.*;
+import org.antlr.v4.runtime.tree.*;
+import java.util.List;
+import java.util.Iterator;
+import java.util.ArrayList;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
+public class XMLParser extends Parser {
+ static { RuntimeMetaData.checkVersion("4.12.0", RuntimeMetaData.VERSION); }
+
+ protected static final DFA[] _decisionToDFA;
+ protected static final PredictionContextCache _sharedContextCache =
+ new PredictionContextCache();
+ public static final int
+ SELF_CLOSING=1, EMPTY=2, SPACE=3, OPEN=4, OPEN_SLASH=5, CLOSE=6, SLASH_CLOSE=7,
+ EQUALS=8, Name=9, STRING=10;
+ public static final int
+ RULE_document = 0, RULE_element = 1, RULE_startTag = 2, RULE_endTag = 3,
+ RULE_attribute = 4, RULE_content = 5;
+ private static String[] makeRuleNames() {
+ return new String[] {
+ "document", "element", "startTag", "endTag", "attribute", "content"
+ };
+ }
+ public static final String[] ruleNames = makeRuleNames();
+
+ private static String[] makeLiteralNames() {
+ return new String[] {
+ null, null, null, null, "'<'", "''", "'>'", "'/>'", "'='"
+ };
+ }
+ private static final String[] _LITERAL_NAMES = makeLiteralNames();
+ private static String[] makeSymbolicNames() {
+ return new String[] {
+ null, "SELF_CLOSING", "EMPTY", "SPACE", "OPEN", "OPEN_SLASH", "CLOSE",
+ "SLASH_CLOSE", "EQUALS", "Name", "STRING"
+ };
+ }
+ private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
+ public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+ /**
+ * @deprecated Use {@link #VOCABULARY} instead.
+ */
+ @Deprecated
+ public static final String[] tokenNames;
+ static {
+ tokenNames = new String[_SYMBOLIC_NAMES.length];
+ for (int i = 0; i < tokenNames.length; i++) {
+ tokenNames[i] = VOCABULARY.getLiteralName(i);
+ if (tokenNames[i] == null) {
+ tokenNames[i] = VOCABULARY.getSymbolicName(i);
+ }
+
+ if (tokenNames[i] == null) {
+ tokenNames[i] = "";
+ }
+ }
+ }
+
+ @Override
+ @Deprecated
+ public String[] getTokenNames() {
+ return tokenNames;
+ }
+
+ @Override
+
+ public Vocabulary getVocabulary() {
+ return VOCABULARY;
+ }
+
+ @Override
+ public String getGrammarFileName() { return "XML.g4"; }
+
+ @Override
+ public String[] getRuleNames() { return ruleNames; }
+
+ @Override
+ public String getSerializedATN() { return _serializedATN; }
+
+ @Override
+ public ATN getATN() { return _ATN; }
+
+ public XMLParser(TokenStream input) {
+ super(input);
+ _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DocumentContext extends ParserRuleContext {
+ public ElementContext element() {
+ return getRuleContext(ElementContext.class,0);
+ }
+ public TerminalNode EOF() { return getToken(XMLParser.EOF, 0); }
+ public DocumentContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_document; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterDocument(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitDocument(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitDocument(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DocumentContext document() throws RecognitionException {
+ DocumentContext _localctx = new DocumentContext(_ctx, getState());
+ enterRule(_localctx, 0, RULE_document);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(12);
+ element();
+ setState(13);
+ match(EOF);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ElementContext extends ParserRuleContext {
+ public StartTagContext startTag() {
+ return getRuleContext(StartTagContext.class,0);
+ }
+ public EndTagContext endTag() {
+ return getRuleContext(EndTagContext.class,0);
+ }
+ public List content() {
+ return getRuleContexts(ContentContext.class);
+ }
+ public ContentContext content(int i) {
+ return getRuleContext(ContentContext.class,i);
+ }
+ public List EMPTY() { return getTokens(XMLParser.EMPTY); }
+ public TerminalNode EMPTY(int i) {
+ return getToken(XMLParser.EMPTY, i);
+ }
+ public TerminalNode SELF_CLOSING() { return getToken(XMLParser.SELF_CLOSING, 0); }
+ public ElementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_element; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterElement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitElement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitElement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ElementContext element() throws RecognitionException {
+ ElementContext _localctx = new ElementContext(_ctx, getState());
+ enterRule(_localctx, 2, RULE_element);
+ int _la;
+ try {
+ setState(26);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case OPEN:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(15);
+ startTag();
+ setState(20);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1046L) != 0)) {
+ {
+ setState(18);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case SELF_CLOSING:
+ case OPEN:
+ case STRING:
+ {
+ setState(16);
+ content();
+ }
+ break;
+ case EMPTY:
+ {
+ setState(17);
+ match(EMPTY);
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ setState(22);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ setState(23);
+ endTag();
+ }
+ break;
+ case SELF_CLOSING:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(25);
+ match(SELF_CLOSING);
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class StartTagContext extends ParserRuleContext {
+ public TerminalNode OPEN() { return getToken(XMLParser.OPEN, 0); }
+ public TerminalNode Name() { return getToken(XMLParser.Name, 0); }
+ public TerminalNode CLOSE() { return getToken(XMLParser.CLOSE, 0); }
+ public List attribute() {
+ return getRuleContexts(AttributeContext.class);
+ }
+ public AttributeContext attribute(int i) {
+ return getRuleContext(AttributeContext.class,i);
+ }
+ public StartTagContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_startTag; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterStartTag(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitStartTag(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitStartTag(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final StartTagContext startTag() throws RecognitionException {
+ StartTagContext _localctx = new StartTagContext(_ctx, getState());
+ enterRule(_localctx, 4, RULE_startTag);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(28);
+ match(OPEN);
+ setState(29);
+ match(Name);
+ setState(33);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while (_la==Name) {
+ {
+ {
+ setState(30);
+ attribute();
+ }
+ }
+ setState(35);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ setState(36);
+ match(CLOSE);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class EndTagContext extends ParserRuleContext {
+ public TerminalNode OPEN_SLASH() { return getToken(XMLParser.OPEN_SLASH, 0); }
+ public TerminalNode Name() { return getToken(XMLParser.Name, 0); }
+ public TerminalNode CLOSE() { return getToken(XMLParser.CLOSE, 0); }
+ public EndTagContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_endTag; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterEndTag(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitEndTag(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitEndTag(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final EndTagContext endTag() throws RecognitionException {
+ EndTagContext _localctx = new EndTagContext(_ctx, getState());
+ enterRule(_localctx, 6, RULE_endTag);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(38);
+ match(OPEN_SLASH);
+ setState(39);
+ match(Name);
+ setState(40);
+ match(CLOSE);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class AttributeContext extends ParserRuleContext {
+ public TerminalNode Name() { return getToken(XMLParser.Name, 0); }
+ public TerminalNode EQUALS() { return getToken(XMLParser.EQUALS, 0); }
+ public TerminalNode STRING() { return getToken(XMLParser.STRING, 0); }
+ public AttributeContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_attribute; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterAttribute(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitAttribute(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitAttribute(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final AttributeContext attribute() throws RecognitionException {
+ AttributeContext _localctx = new AttributeContext(_ctx, getState());
+ enterRule(_localctx, 8, RULE_attribute);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(42);
+ match(Name);
+ setState(43);
+ match(EQUALS);
+ setState(44);
+ match(STRING);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ContentContext extends ParserRuleContext {
+ public ElementContext element() {
+ return getRuleContext(ElementContext.class,0);
+ }
+ public TerminalNode STRING() { return getToken(XMLParser.STRING, 0); }
+ public ContentContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_content; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).enterContent(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof XMLListener ) ((XMLListener)listener).exitContent(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof XMLVisitor ) return ((XMLVisitor extends T>)visitor).visitContent(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ContentContext content() throws RecognitionException {
+ ContentContext _localctx = new ContentContext(_ctx, getState());
+ enterRule(_localctx, 10, RULE_content);
+ try {
+ setState(48);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case SELF_CLOSING:
+ case OPEN:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(46);
+ element();
+ }
+ break;
+ case STRING:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(47);
+ match(STRING);
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static final String _serializedATN =
+ "\u0004\u0001\n3\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+
+ "\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"+
+ "\u0005\u0007\u0005\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001"+
+ "\u0001\u0001\u0001\u0005\u0001\u0013\b\u0001\n\u0001\f\u0001\u0016\t\u0001"+
+ "\u0001\u0001\u0001\u0001\u0001\u0001\u0003\u0001\u001b\b\u0001\u0001\u0002"+
+ "\u0001\u0002\u0001\u0002\u0005\u0002 \b\u0002\n\u0002\f\u0002#\t\u0002"+
+ "\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+
+ "\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0005\u0001\u0005"+
+ "\u0003\u00051\b\u0005\u0001\u0005\u0000\u0000\u0006\u0000\u0002\u0004"+
+ "\u0006\b\n\u0000\u00001\u0000\f\u0001\u0000\u0000\u0000\u0002\u001a\u0001"+
+ "\u0000\u0000\u0000\u0004\u001c\u0001\u0000\u0000\u0000\u0006&\u0001\u0000"+
+ "\u0000\u0000\b*\u0001\u0000\u0000\u0000\n0\u0001\u0000\u0000\u0000\f\r"+
+ "\u0003\u0002\u0001\u0000\r\u000e\u0005\u0000\u0000\u0001\u000e\u0001\u0001"+
+ "\u0000\u0000\u0000\u000f\u0014\u0003\u0004\u0002\u0000\u0010\u0013\u0003"+
+ "\n\u0005\u0000\u0011\u0013\u0005\u0002\u0000\u0000\u0012\u0010\u0001\u0000"+
+ "\u0000\u0000\u0012\u0011\u0001\u0000\u0000\u0000\u0013\u0016\u0001\u0000"+
+ "\u0000\u0000\u0014\u0012\u0001\u0000\u0000\u0000\u0014\u0015\u0001\u0000"+
+ "\u0000\u0000\u0015\u0017\u0001\u0000\u0000\u0000\u0016\u0014\u0001\u0000"+
+ "\u0000\u0000\u0017\u0018\u0003\u0006\u0003\u0000\u0018\u001b\u0001\u0000"+
+ "\u0000\u0000\u0019\u001b\u0005\u0001\u0000\u0000\u001a\u000f\u0001\u0000"+
+ "\u0000\u0000\u001a\u0019\u0001\u0000\u0000\u0000\u001b\u0003\u0001\u0000"+
+ "\u0000\u0000\u001c\u001d\u0005\u0004\u0000\u0000\u001d!\u0005\t\u0000"+
+ "\u0000\u001e \u0003\b\u0004\u0000\u001f\u001e\u0001\u0000\u0000\u0000"+
+ " #\u0001\u0000\u0000\u0000!\u001f\u0001\u0000\u0000\u0000!\"\u0001\u0000"+
+ "\u0000\u0000\"$\u0001\u0000\u0000\u0000#!\u0001\u0000\u0000\u0000$%\u0005"+
+ "\u0006\u0000\u0000%\u0005\u0001\u0000\u0000\u0000&\'\u0005\u0005\u0000"+
+ "\u0000\'(\u0005\t\u0000\u0000()\u0005\u0006\u0000\u0000)\u0007\u0001\u0000"+
+ "\u0000\u0000*+\u0005\t\u0000\u0000+,\u0005\b\u0000\u0000,-\u0005\n\u0000"+
+ "\u0000-\t\u0001\u0000\u0000\u0000.1\u0003\u0002\u0001\u0000/1\u0005\n"+
+ "\u0000\u00000.\u0001\u0000\u0000\u00000/\u0001\u0000\u0000\u00001\u000b"+
+ "\u0001\u0000\u0000\u0000\u0005\u0012\u0014\u001a!0";
+ public static final ATN _ATN =
+ new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+ static {
+ _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+ for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+ _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/gen/controlP5/layout/XMLVisitor.java b/gen/controlP5/layout/XMLVisitor.java
new file mode 100644
index 0000000..8696cff
--- /dev/null
+++ b/gen/controlP5/layout/XMLVisitor.java
@@ -0,0 +1,49 @@
+// Generated from /Users/gabrielsalvador/Code/controlp5/src/main/java/controlP5/layout/XML.g4 by ANTLR 4.12.0
+package controlP5.layout;
+import org.antlr.v4.runtime.tree.ParseTreeVisitor;
+
+/**
+ * This interface defines a complete generic visitor for a parse tree produced
+ * by {@link XMLParser}.
+ *
+ * @param The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+public interface XMLVisitor extends ParseTreeVisitor {
+ /**
+ * Visit a parse tree produced by {@link XMLParser#document}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDocument(XMLParser.DocumentContext ctx);
+ /**
+ * Visit a parse tree produced by {@link XMLParser#element}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitElement(XMLParser.ElementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link XMLParser#startTag}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitStartTag(XMLParser.StartTagContext ctx);
+ /**
+ * Visit a parse tree produced by {@link XMLParser#endTag}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitEndTag(XMLParser.EndTagContext ctx);
+ /**
+ * Visit a parse tree produced by {@link XMLParser#attribute}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitAttribute(XMLParser.AttributeContext ctx);
+ /**
+ * Visit a parse tree produced by {@link XMLParser#content}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitContent(XMLParser.ContentContext ctx);
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 0593aa7..f3b8991 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,11 +28,11 @@
-
+
diff --git a/resources/.DS_Store b/resources/.DS_Store
new file mode 100644
index 0000000..0647067
Binary files /dev/null and b/resources/.DS_Store differ
diff --git a/resources/addons/AddMethodList/AddMethodList.java b/resources/addons/AddMethodList/AddMethodList.java
index d5f9e5b..cef84b7 100644
--- a/resources/addons/AddMethodList/AddMethodList.java
+++ b/resources/addons/AddMethodList/AddMethodList.java
@@ -3,7 +3,7 @@ import java.util.*;
import java.text.*;
import java.io.*;
-import static controlP5.ControlP5Legacy.*;
+import static main.java.controlp5.ControlP5Legacy.*;
public class AddMethodList {
diff --git a/resources/addons/addons.iml b/resources/addons/addons.iml
index 2b9413b..a7b08d3 100644
--- a/resources/addons/addons.iml
+++ b/resources/addons/addons.iml
@@ -8,5 +8,6 @@
+
\ No newline at end of file
diff --git a/resources/resources.iml b/resources/resources.iml
index d3b4689..224f004 100644
--- a/resources/resources.iml
+++ b/resources/resources.iml
@@ -2,10 +2,9 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/src/main/java/.DS_Store b/src/main/java/.DS_Store
index 77a6756..15e44e9 100644
Binary files a/src/main/java/.DS_Store and b/src/main/java/.DS_Store differ
diff --git a/src/main/java/controlP5/Accordion.java b/src/main/java/controlP5/Accordion.java
index eb077c1..0dfc847 100755
--- a/src/main/java/controlP5/Accordion.java
+++ b/src/main/java/controlP5/Accordion.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -29,8 +29,8 @@ package controlP5;
*
* An Accordion here is a list of ControlGroups which can be expanded and collapsed.
*
- * @see controlP5.ControllerGroup
- * @see controlP5.ControlGroup
+ * @see ControllerGroup
+ * @see ControlGroup
* @example controllers/ControlP5accordion
*/
@SuppressWarnings( "rawtypes" ) public class Accordion extends ControlGroup< Accordion > {
@@ -77,7 +77,7 @@ package controlP5;
* theGroup) overwrites it's super method. if you want to remove a ControlGroup only from the
* accordion, use removeItem(ControlGroup).
*
- * @see controlP5.Accordion#removeItem(ControlGroup)
+ * @see Accordion#removeItem(ControlGroup)
* @return ControllerInterface
*/
@Override public Accordion remove( ControllerInterface< ? > theGroup ) {
diff --git a/src/main/java/controlP5/Background.java b/src/main/java/controlP5/Background.java
index a454509..aa4646b 100644
--- a/src/main/java/controlP5/Background.java
+++ b/src/main/java/controlP5/Background.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Bang.java b/src/main/java/controlP5/Bang.java
index ff8bfc1..527c27b 100755
--- a/src/main/java/controlP5/Bang.java
+++ b/src/main/java/controlP5/Bang.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/BitFont.java b/src/main/java/controlP5/BitFont.java
index 15bec01..be89f61 100755
--- a/src/main/java/controlP5/BitFont.java
+++ b/src/main/java/controlP5/BitFont.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Button.java b/src/main/java/controlP5/Button.java
index f67b1d1..35850d6 100755
--- a/src/main/java/controlP5/Button.java
+++ b/src/main/java/controlP5/Button.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -168,7 +168,7 @@ public class Button extends Controller< Button > {
/**
* If the button acts as a switch, setOn will turn on
* the switch. Use
- * {@link controlP5.Button#setSwitch(boolean) setSwitch}
+ * {@link Button#setSwitch(boolean) setSwitch}
* to turn a Button into a Switch.
*
* @return Button
@@ -185,7 +185,7 @@ public class Button extends Controller< Button > {
/**
* If the button acts as a switch, setOff will turn off
* the switch. Use
- * {@link controlP5.Button#setSwitch(boolean) setSwitch}
+ * {@link Button#setSwitch(boolean) setSwitch}
* to turn a Button into a Switch.
*
* @return Button
@@ -222,7 +222,7 @@ public class Button extends Controller< Button > {
* of the button. {@link setSwitch(boolean) setSwitch}
* should have been set before.
*
- * @see controlP5.Button#setSwitch(boolean)
+ * @see Button#setSwitch(boolean)
* @return boolean
*/
public boolean getBooleanValue( ) {
diff --git a/src/main/java/controlP5/ButtonBar.java b/src/main/java/controlP5/ButtonBar.java
index 85c0973..1ad3a0b 100644
--- a/src/main/java/controlP5/ButtonBar.java
+++ b/src/main/java/controlP5/ButtonBar.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
@@ -27,7 +27,7 @@ package controlP5;
*/
-import static controlP5.ControlP5.b;
+import static main.java.controlp5.ControlP5.b;
import java.util.ArrayList;
import java.util.Arrays;
@@ -35,7 +35,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import static controlP5.ControlP5.s;
+import static main.java.controlp5.ControlP5.s;
import processing.core.PGraphics;
public class ButtonBar extends Controller< ButtonBar > {
diff --git a/src/main/java/controlP5/CColor.java b/src/main/java/controlP5/CColor.java
index 1720a14..7d78fb7 100755
--- a/src/main/java/controlP5/CColor.java
+++ b/src/main/java/controlP5/CColor.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -103,7 +103,7 @@ public class CColor implements Serializable {
* @param theAlpha
*/
public CColor setAlpha( int theAlpha ) {
- System.out.println( "controlP5.CColor.setAlpha: setting alpha values disabled for this version of controlP5." );
+ System.out.println( "main.java.controlp5.CColor.setAlpha: setting alpha values disabled for this version of controlP5." );
return this;
}
diff --git a/src/main/java/controlP5/CDrawable.java b/src/main/java/controlP5/CDrawable.java
index 9fbe46a..dc8f46b 100755
--- a/src/main/java/controlP5/CDrawable.java
+++ b/src/main/java/controlP5/CDrawable.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/CP.java b/src/main/java/controlP5/CP.java
index 1a867ff..9f4f6dc 100755
--- a/src/main/java/controlP5/CP.java
+++ b/src/main/java/controlP5/CP.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/CallbackEvent.java b/src/main/java/controlP5/CallbackEvent.java
index 7fde0b1..3845c4c 100755
--- a/src/main/java/controlP5/CallbackEvent.java
+++ b/src/main/java/controlP5/CallbackEvent.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/CallbackListener.java b/src/main/java/controlP5/CallbackListener.java
index f1399ef..0c2c3f1 100755
--- a/src/main/java/controlP5/CallbackListener.java
+++ b/src/main/java/controlP5/CallbackListener.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -32,7 +32,7 @@ package controlP5;
*
*
* @example use/ControlP5callback
- * @see controlP5.ControlP5#addCallback(CallbackListener)
+ * @see ControlP5#addCallback(CallbackListener)
*/
public interface CallbackListener {
diff --git a/src/main/java/controlP5/Canvas.java b/src/main/java/controlP5/Canvas.java
index 0533214..37af835 100755
--- a/src/main/java/controlP5/Canvas.java
+++ b/src/main/java/controlP5/Canvas.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Chart.java b/src/main/java/controlP5/Chart.java
index 7b77ee6..229d0b0 100755
--- a/src/main/java/controlP5/Chart.java
+++ b/src/main/java/controlP5/Chart.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ChartData.java b/src/main/java/controlP5/ChartData.java
index 45dfafd..45933af 100755
--- a/src/main/java/controlP5/ChartData.java
+++ b/src/main/java/controlP5/ChartData.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ChartDataSet.java b/src/main/java/controlP5/ChartDataSet.java
index 323ab33..51b7e8e 100755
--- a/src/main/java/controlP5/ChartDataSet.java
+++ b/src/main/java/controlP5/ChartDataSet.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/CheckBox.java b/src/main/java/controlP5/CheckBox.java
index 1d9accd..a6a680c 100755
--- a/src/main/java/controlP5/CheckBox.java
+++ b/src/main/java/controlP5/CheckBox.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -38,7 +38,7 @@ import processing.core.PImage;
*
* @example controllers/ControlP5checkBox
*
- * @see controlP5.Toggle
+ * @see Toggle
*
*/
public class CheckBox extends ControlGroup< CheckBox > {
@@ -246,7 +246,7 @@ public class CheckBox extends ControlGroup< CheckBox > {
public CheckBox addItem( final String theName , final float theValue ) {
Toggle t = cp5.addToggle( theName , 0 , 0 , itemWidth , itemHeight );
t.getCaptionLabel( ).align( RIGHT_OUTSIDE , CENTER ).setPadding( Label.paddingX , 0 );
- t.setMode( ControlP5.DEFAULT );
+ t.setMode(DEFAULT);
t.setImages( images[ 0 ] , images[ 1 ] , images[ 2 ] );
t.setSize( images[ 0 ] );
addItem( t , theValue );
@@ -561,7 +561,7 @@ public class CheckBox extends ControlGroup< CheckBox > {
}
if ( theBroadcastFlag ) {
ControlEvent myEvent = new ControlEvent( this );
- cp5.getControlBroadcaster( ).broadcast( myEvent , ControlP5Constants.FLOAT );
+ cp5.getControlBroadcaster( ).broadcast( myEvent , FLOAT);
}
}
diff --git a/src/main/java/controlP5/ColorPalette.java b/src/main/java/controlP5/ColorPalette.java
index 05fd20e..089eace 100644
--- a/src/main/java/controlP5/ColorPalette.java
+++ b/src/main/java/controlP5/ColorPalette.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ColorPicker.java b/src/main/java/controlP5/ColorPicker.java
index 468c127..aad9ad8 100755
--- a/src/main/java/controlP5/ColorPicker.java
+++ b/src/main/java/controlP5/ColorPicker.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -167,7 +167,7 @@ public class ColorPicker extends ControlGroup< ColorPicker > {
private ColorPicker broadcast( ) {
ControlEvent ev = new ControlEvent( this );
setValue( getColorValue( ) );
- cp5.getControlBroadcaster( ).broadcast( ev , ControlP5Constants.EVENT );
+ cp5.getControlBroadcaster( ).broadcast( ev , EVENT);
if ( _myPlug != null ) {
try {
Method method = _myPlug.getClass( ).getMethod( _myPlugName , int.class );
diff --git a/src/main/java/controlP5/ColorWheel.java b/src/main/java/controlP5/ColorWheel.java
index c7d1dee..691ff4a 100644
--- a/src/main/java/controlP5/ColorWheel.java
+++ b/src/main/java/controlP5/ColorWheel.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControlBehavior.java b/src/main/java/controlP5/ControlBehavior.java
index 25b5c5f..df64724 100755
--- a/src/main/java/controlP5/ControlBehavior.java
+++ b/src/main/java/controlP5/ControlBehavior.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControlBroadcaster.java b/src/main/java/controlP5/ControlBroadcaster.java
index 04da3ee..0b3db43 100755
--- a/src/main/java/controlP5/ControlBroadcaster.java
+++ b/src/main/java/controlP5/ControlBroadcaster.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -42,7 +42,7 @@ import java.util.Set;
* through an instance of the ControlP5 class. Instead of accessing the ControlBroadcaster directly,
* use the convenience methods available from the ControlP5 class.
*
- * @see controlP5.ControlP5#getControlBroadcaster()
+ * @see ControlP5#getControlBroadcaster()
*/
public class ControlBroadcaster {
diff --git a/src/main/java/controlP5/ControlElement.java b/src/main/java/controlP5/ControlElement.java
index 7da0d48..2000efe 100755
--- a/src/main/java/controlP5/ControlElement.java
+++ b/src/main/java/controlP5/ControlElement.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControlEvent.java b/src/main/java/controlP5/ControlEvent.java
index 4f4f16b..106320b 100755
--- a/src/main/java/controlP5/ControlEvent.java
+++ b/src/main/java/controlP5/ControlEvent.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -157,7 +157,7 @@ public class ControlEvent {
/**
* Checks if the ControlEvent was triggered by a tab
*
- * @see controlP5.Tab
+ * @see Tab
* @return boolean
*/
public boolean isTab( ) {
@@ -167,7 +167,7 @@ public class ControlEvent {
/**
* Checks if the ControlEvent was triggered by a controller
*
- * @see controlP5.Controller
+ * @see Controller
* @return boolean
*/
public boolean isController( ) {
@@ -177,7 +177,7 @@ public class ControlEvent {
/**
* Checks if the ControlEvent was triggered by a ControlGroup
*
- * @see controlP5.ControllerGroup
+ * @see ControllerGroup
* @return boolean
*/
public boolean isGroup( ) {
diff --git a/src/main/java/controlP5/ControlFont.java b/src/main/java/controlP5/ControlFont.java
index 53d553b..2cbe34e 100755
--- a/src/main/java/controlP5/ControlFont.java
+++ b/src/main/java/controlP5/ControlFont.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControlGroup.java b/src/main/java/controlP5/ControlGroup.java
index 1d77774..9591cde 100755
--- a/src/main/java/controlP5/ControlGroup.java
+++ b/src/main/java/controlP5/ControlGroup.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -43,7 +43,7 @@ import processing.core.PGraphics;
* {@link ControllerGroup} documentation.
*
*
- * @see controlP5.Group
+ * @see Group
* @example controllers/ControlP5group
*/
public class ControlGroup< T > extends ControllerGroup< T > implements ControlListener {
@@ -79,7 +79,7 @@ public class ControlGroup< T > extends ControllerGroup< T > implements ControlLi
isOpen = !isOpen;
if ( isEventActive ) {
final ControlEvent myEvent = new ControlEvent( this );
- cp5.getControlBroadcaster( ).broadcast( myEvent , ControlP5Constants.METHOD );
+ cp5.getControlBroadcaster( ).broadcast( myEvent , METHOD);
for ( ControlListener cl : _myControlListener ) {
cl.controlEvent( myEvent );
}
diff --git a/src/main/java/controlP5/ControlKey.java b/src/main/java/controlP5/ControlKey.java
index 81f930e..29fedb1 100755
--- a/src/main/java/controlP5/ControlKey.java
+++ b/src/main/java/controlP5/ControlKey.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControlListener.java b/src/main/java/controlP5/ControlListener.java
index ffc622e..e8d37cf 100755
--- a/src/main/java/controlP5/ControlListener.java
+++ b/src/main/java/controlP5/ControlListener.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -29,8 +29,8 @@ package controlP5;
* ControlListener is an interface that can be implemented by a custom class to be notified when
* controller values change. To add a ControlListener to a controller use Controller.addListner()
*
- * @see controlP5.Controller#addListener(ControlListener)
- * @see controlP5.CallbackListener
+ * @see Controller#addListener(ControlListener)
+ * @see CallbackListener
*
* @example use/ControlP5listenerForSingleController
*/
@@ -41,8 +41,8 @@ public interface ControlListener {
* value changes. Use the CallbackListener to get informed when actions such as pressed,
* release, drag, etc are performed.
*
- * @see controlP5.CallbackListener
- * @see controlP5.CallbackEvent
+ * @see CallbackListener
+ * @see CallbackEvent
* @param theEvent
* ControlEvent
* @example ControlP5listener
diff --git a/src/main/java/controlP5/ControlP5.java b/src/main/java/controlP5/ControlP5.java
index 5f6ed0f..eeaa172 100755
--- a/src/main/java/controlP5/ControlP5.java
+++ b/src/main/java/controlP5/ControlP5.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -50,7 +50,7 @@ import processing.core.PFont;
import processing.core.PGraphics;
import processing.event.KeyEvent;
import processing.event.MouseEvent;
-import controlP5.ControlWindow.Pointer;
+import main.java.controlp5.ControlWindow.Pointer;
/**
*
@@ -63,7 +63,7 @@ import controlP5.ControlWindow.Pointer;
* ControlP5Base class.
*
*
- * @see controlP5.ControlP5Base
+ * @see ControlP5Base
* @example use/ControlP5basics
*/
public class ControlP5 extends ControlP5Base {
@@ -326,14 +326,14 @@ public class ControlP5 extends ControlP5Base {
/**
*
- * @see controlP5.ControlBroadcaster
+ * @see ControlBroadcaster
*/
public ControlBroadcaster getControlBroadcaster( ) {
return _myControlBroadcaster;
}
/**
- * @see controlP5.ControlListener
+ * @see ControlListener
*/
public ControlP5 addListener( ControlListener ... theListeners ) {
getControlBroadcaster( ).addListener( theListeners );
@@ -341,7 +341,7 @@ public class ControlP5 extends ControlP5Base {
}
/**
- * @see controlP5.ControlListener
+ * @see ControlListener
*/
public ControlP5 removeListener( ControlListener ... theListeners ) {
getControlBroadcaster( ).removeListener( theListeners );
@@ -349,7 +349,7 @@ public class ControlP5 extends ControlP5Base {
}
/**
- * @see controlP5.ControlListener
+ * @see ControlListener
*/
public ControlP5 removeListener( ControlListener theListener ) {
getControlBroadcaster( ).removeListener( theListener );
@@ -357,15 +357,15 @@ public class ControlP5 extends ControlP5Base {
}
/**
- * @see controlP5.ControlListener
+ * @see ControlListener
*/
public ControlListener getListener( int theIndex ) {
return getControlBroadcaster( ).getListener( theIndex );
}
/**
- * @see controlP5.CallbackEvent
- * @see controlP5.CallbackListener
+ * @see CallbackEvent
+ * @see CallbackListener
*/
public ControlP5 addCallback( CallbackListener ... theListeners ) {
getControlBroadcaster( ).addCallback( theListeners );
@@ -373,8 +373,8 @@ public class ControlP5 extends ControlP5Base {
}
/**
- * @see controlP5.CallbackEvent
- * @see controlP5.CallbackListener
+ * @see CallbackEvent
+ * @see CallbackListener
*/
public ControlP5 addCallback( CallbackListener theListener ) {
getControlBroadcaster( ).addCallback( theListener );
@@ -382,8 +382,8 @@ public class ControlP5 extends ControlP5Base {
}
/**
- * @see controlP5.CallbackEvent
- * @see controlP5.CallbackListener
+ * @see CallbackEvent
+ * @see CallbackListener
*/
public ControlP5 addCallback( CallbackListener theListener , Controller< ? > ... theControllers ) {
getControlBroadcaster( ).addCallback( theListener , theControllers );
@@ -391,8 +391,8 @@ public class ControlP5 extends ControlP5Base {
}
/**
- * @see controlP5.CallbackEvent
- * @see controlP5.CallbackListener
+ * @see CallbackEvent
+ * @see CallbackListener
*/
public ControlP5 removeCallback( CallbackListener ... theListeners ) {
getControlBroadcaster( ).removeCallback( theListeners );
@@ -400,8 +400,8 @@ public class ControlP5 extends ControlP5Base {
}
/**
- * @see controlP5.CallbackEvent
- * @see controlP5.CallbackListener
+ * @see CallbackEvent
+ * @see CallbackListener
*/
public ControlP5 removeCallback( Controller< ? > ... theControllers ) {
getControlBroadcaster( ).removeCallback( theControllers );
@@ -409,8 +409,8 @@ public class ControlP5 extends ControlP5Base {
}
/**
- * @see controlP5.CallbackEvent
- * @see controlP5.CallbackListener
+ * @see CallbackEvent
+ * @see CallbackListener
*/
public ControlP5 removeCallback( Controller< ? > theController ) {
getControlBroadcaster( ).removeCallback( theController );
@@ -649,7 +649,7 @@ public class ControlP5 extends ControlP5Base {
/**
* @exclude
- * @see controlP5.ControlP5#getAll(Class)
+ * @see ControlP5#getAll(Class)
* @return List
*/
@ControlP5.Invisible public List< ControllerInterface< ? >> getList( ) {
@@ -806,7 +806,7 @@ public class ControlP5 extends ControlP5Base {
/**
* adds a Canvas to the default sketch window.
*
- * @see controlP5.Canvas
+ * @see Canvas
*/
public ControlP5 addCanvas( Canvas theCanvas ) {
getWindow( ).addCanvas( theCanvas );
@@ -910,7 +910,7 @@ public class ControlP5 extends ControlP5Base {
* Saves the current values of controllers into a
* default properties file
*
- * @see controlP5.ControllerProperties
+ * @see ControllerProperties
*/
public boolean saveProperties( ) {
return _myProperties.save( );
@@ -920,7 +920,7 @@ public class ControlP5 extends ControlP5Base {
* Saves the current values of controllers into a file,
* the filepath is given by parameter theFilePath.
*
- * @see controlP5.ControllerProperties
+ * @see ControllerProperties
*/
public boolean saveProperties( String theFilePath ) {
return _myProperties.saveAs( theFilePath );
@@ -934,7 +934,7 @@ public class ControlP5 extends ControlP5Base {
* Loads properties from a default properties file and
* changes values of controllers accordingly.
*
- * @see controlP5.ControllerProperties
+ * @see ControllerProperties
* @return
*/
public boolean loadProperties( ) {
@@ -1002,8 +1002,8 @@ public class ControlP5 extends ControlP5Base {
/**
* shows all controllers and tabs in your sketch.
*
- * @see controlP5.ControlP5#isVisible()
- * @see controlP5.ControlP5#hide()
+ * @see ControlP5#isVisible()
+ * @see ControlP5#hide()
*/
public void show( ) {
@@ -1019,8 +1019,8 @@ public class ControlP5 extends ControlP5Base {
* returns true or false according to the current
* visibility flag.
*
- * @see controlP5.ControlP5#show()
- * @see controlP5.ControlP5#hide()
+ * @see ControlP5#show()
+ * @see ControlP5#hide()
*/
public boolean isVisible( ) {
return controlWindow.isVisible( );
@@ -1039,8 +1039,8 @@ public class ControlP5 extends ControlP5Base {
* hide all controllers and tabs inside your sketch
* window.
*
- * @see controlP5.ControlP5#show()
- * @see controlP5.ControlP5#isVisible()
+ * @see ControlP5#show()
+ * @see ControlP5#isVisible()
*/
public void hide( ) {
controlWindow.hide( );
@@ -1049,8 +1049,8 @@ public class ControlP5 extends ControlP5Base {
/**
* forces all controllers to update.
*
- * @see controlP5.ControlP5#isUpdate()
- * @see controlP5.ControlP5#setUpdate()
+ * @see ControlP5#isUpdate()
+ * @see ControlP5#setUpdate()
*/
public void update( ) {
controlWindow.update( );
@@ -1060,8 +1060,8 @@ public class ControlP5 extends ControlP5Base {
* checks if automatic updates are enabled. By default
* this is true.
*
- * @see controlP5.ControlP5#update()
- * @see controlP5.ControlP5#setUpdate(boolean)
+ * @see ControlP5#update()
+ * @see ControlP5#setUpdate(boolean)
* @return
*/
public boolean isUpdate( ) {
@@ -1072,8 +1072,8 @@ public class ControlP5 extends ControlP5Base {
* changes the update behavior according to parameter
* theFlag
*
- * @see controlP5.ControlP5#update()
- * @see controlP5.ControlP5#isUpdate()
+ * @see ControlP5#update()
+ * @see ControlP5#isUpdate()
* @param theFlag
*/
public void setUpdate( boolean theFlag ) {
diff --git a/src/main/java/controlP5/ControlP5Base.java b/src/main/java/controlP5/ControlP5Base.java
index f2caed7..0e2e4a2 100755
--- a/src/main/java/controlP5/ControlP5Base.java
+++ b/src/main/java/controlP5/ControlP5Base.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -39,7 +39,7 @@ import java.util.TreeSet;
import processing.core.PApplet;
import processing.event.Event;
-import static controlP5.Controller.*;
+import static main.java.controlp5.Controller.*;
/**
* The ControlP5Base supports the ControlP5 class and
diff --git a/src/main/java/controlP5/ControlP5Constants.java b/src/main/java/controlP5/ControlP5Constants.java
index e4f93d9..a48af46 100755
--- a/src/main/java/controlP5/ControlP5Constants.java
+++ b/src/main/java/controlP5/ControlP5Constants.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControlP5Legacy.java b/src/main/java/controlP5/ControlP5Legacy.java
index 63ecaa0..235fc97 100644
--- a/src/main/java/controlP5/ControlP5Legacy.java
+++ b/src/main/java/controlP5/ControlP5Legacy.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -28,7 +28,7 @@ package controlP5;
import java.util.ArrayList;
import processing.core.PApplet;
-import static controlP5.Controller.*;
+import static main.java.controlp5.Controller.*;
public class ControlP5Legacy {
diff --git a/src/main/java/controlP5/ControlTimer.java b/src/main/java/controlP5/ControlTimer.java
index 5a93fb4..5af97bb 100755
--- a/src/main/java/controlP5/ControlTimer.java
+++ b/src/main/java/controlP5/ControlTimer.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControlWindow.java b/src/main/java/controlP5/ControlWindow.java
index 1172bbf..07dc421 100755
--- a/src/main/java/controlP5/ControlWindow.java
+++ b/src/main/java/controlP5/ControlWindow.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -36,7 +36,6 @@ import processing.core.PConstants;
import processing.core.PGraphics;
import processing.event.KeyEvent;
import processing.event.MouseEvent;
-import controlP5.ControlP5Base.KeyCode;
// TODO ! add mouse-button mask for left, center, right; also see Controller #mouse-button ^1
@@ -484,7 +483,7 @@ public final class ControlWindow {
c[ n++ ] = ( ( char ) i );
}
}
- KeyCode code = new KeyCode( c );
+ ControlP5Base.KeyCode code = new ControlP5Base.KeyCode( c );
if ( cp5.keymap.containsKey( code ) ) {
for ( ControlKey ck : cp5.keymap.get( code ) ) {
@@ -622,7 +621,7 @@ public final class ControlWindow {
* Adds a custom context to a ControlWindow. Use a
* custom class which implements the CDrawable interface
*
- * @see controlP5.CDrawable
+ * @see CDrawable
* @param theDrawable CDrawable
*/
public ControlWindow setContext( CDrawable theDrawable ) {
@@ -883,13 +882,13 @@ public final class ControlWindow {
* and released state. The pointer can be accessed by
* its getter method {@link ControlWindow#getPointer()}.
* Then use
- * {@link controlP5.ControlWindow#set(int, int)} to
+ * {@link ControlWindow#set(int, int)} to
* alter its position or invoke {
- * {@link controlP5.ControlWindow#pressed()} or
- * {@link controlP5.ControlWindow#released()} to change
+ * {@link ControlWindow#pressed()} or
+ * {@link ControlWindow#released()} to change
* its state. To disable the mouse and enable the
- * Pointer use {@link controlP5.ControlWindow#enable()}
- * and {@link controlP5.ControlWindow#disable()} to
+ * Pointer use {@link ControlWindow#enable()}
+ * and {@link ControlWindow#disable()} to
* default back to the mouse as input parameter.
*/
// TODO offset against pgx and pgy
diff --git a/src/main/java/controlP5/ControlWindowCanvas.java b/src/main/java/controlP5/ControlWindowCanvas.java
index 2a322aa..e0e8219 100755
--- a/src/main/java/controlP5/ControlWindowCanvas.java
+++ b/src/main/java/controlP5/ControlWindowCanvas.java
@@ -1,5 +1,5 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Controller.java b/src/main/java/controlP5/Controller.java
index 3f3a6c6..89d64c0 100755
--- a/src/main/java/controlP5/Controller.java
+++ b/src/main/java/controlP5/Controller.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -31,7 +31,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import controlP5.events.ReleasedOutsideListener;
+import main.java.controlp5.events.ReleasedOutsideListener;
import processing.core.PApplet;
import processing.core.PFont;
import processing.core.PGraphics;
@@ -51,28 +51,28 @@ import processing.event.KeyEvent;
*
* - (1) add method controlEvent(ControlEvent theEvent) to your sketch. ControlP5 will automatically detect this
* method and will used it to forward any controlEvent triggered by a controller - you can disable forwarding by using
- * setBroadcast(false) {@link controlP5.Controller#setBroadcast(boolean)}
+ * setBroadcast(false) {@link Controller#setBroadcast(boolean)}
* - (2) each controller requires a unique name when being create. In case an existing name is used for a newly
* created Controller, the existing one will be overwritten. each unique name can be used to automatically link a
* controller to either a method or a field within your program.
*
*
- * @see controlP5.Bang
- * @see controlP5.Button
- * @see controlP5.Knob
- * @see controlP5.Matrix
- * @see controlP5.MultiList
- * @see controlP5.Numberbox
- * @see controlP5.RadioButton
- * @see controlP5.ListBox
- * @see controlP5.Slider
- * @see controlP5.Textarea
- * @see controlP5.Textfield
- * @see controlP5.Textlabel
- * @see controlP5.Toggle
- * @see controlP5.ControlGroup
- * @see controlP5.ControlBehavior
- * @see controlP5.ControlEvent
+ * @see Bang
+ * @see Button
+ * @see Knob
+ * @see Matrix
+ * @see MultiList
+ * @see Numberbox
+ * @see RadioButton
+ * @see ListBox
+ * @see Slider
+ * @see Textarea
+ * @see Textfield
+ * @see Textlabel
+ * @see Toggle
+ * @see ControlGroup
+ * @see ControlBehavior
+ * @see ControlEvent
*
* @example use/ControlP5basics
*/
@@ -663,7 +663,7 @@ public abstract class Controller< T > implements ControllerInterface< T > , CDra
/**
* returns true or false for the current listening status. by default it is set to false
*
- * @see controlP5.Controller#listen(boolean)
+ * @see Controller#listen(boolean)
*
* @return boolean
*/
@@ -711,7 +711,7 @@ public abstract class Controller< T > implements ControllerInterface< T > , CDra
* this particular controller.
*
* @exclude
- * @see controlP5.ControllerView
+ * @see ControllerView
* @param theApplet PApplet
*/
@ControlP5.Invisible @Override public void draw( final PGraphics theGraphics ) {
@@ -1532,7 +1532,7 @@ public abstract class Controller< T > implements ControllerInterface< T > , CDra
}
/**
- * @see controlP5.ControlListener
+ * @see ControlListener
* @param theListener ControlListener
* @return Controller
*/
@@ -1542,7 +1542,7 @@ public abstract class Controller< T > implements ControllerInterface< T > , CDra
}
/**
- * @see controlP5.ControlListener
+ * @see ControlListener
* @param theListener ControlListener
* @return Controller
*/
@@ -1800,7 +1800,7 @@ public abstract class Controller< T > implements ControllerInterface< T > , CDra
* use setDisplay to customize your controller look. A new controller-display class required to implement interface
* ControllerView. By default the display mode will be set to CUSTOM when setting a new display.
*
- * @see controlP5.ControllerView
+ * @see ControllerView
* @param theView
* @return Controller
*/
@@ -1819,7 +1819,7 @@ public abstract class Controller< T > implements ControllerInterface< T > , CDra
}
/**
- * @see controlP5.Label
+ * @see Label
* @return Label
*/
@ControlP5.Layout public Label getCaptionLabel( ) {
@@ -2060,7 +2060,7 @@ public abstract class Controller< T > implements ControllerInterface< T > , CDra
}
/**
- * @see controlP5.Controller#registerTooltip(String)
+ * @see Controller#registerTooltip(String)
* @return Controller
*/
public T unregisterTooltip( ) {
diff --git a/src/main/java/controlP5/ControllerAutomator.java b/src/main/java/controlP5/ControllerAutomator.java
index 25b0863..d24410d 100755
--- a/src/main/java/controlP5/ControllerAutomator.java
+++ b/src/main/java/controlP5/ControllerAutomator.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControllerDisplay.java b/src/main/java/controlP5/ControllerDisplay.java
index 768ace2..3a35d65 100755
--- a/src/main/java/controlP5/ControllerDisplay.java
+++ b/src/main/java/controlP5/ControllerDisplay.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControllerGroup.java b/src/main/java/controlP5/ControllerGroup.java
index 53cee10..c7e332a 100755
--- a/src/main/java/controlP5/ControllerGroup.java
+++ b/src/main/java/controlP5/ControllerGroup.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControllerInterface.java b/src/main/java/controlP5/ControllerInterface.java
index 6a4a355..3c1c226 100755
--- a/src/main/java/controlP5/ControllerInterface.java
+++ b/src/main/java/controlP5/ControllerInterface.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControllerLayout.java b/src/main/java/controlP5/ControllerLayout.java
index 29eda66..b7d1eac 100755
--- a/src/main/java/controlP5/ControllerLayout.java
+++ b/src/main/java/controlP5/ControllerLayout.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControllerLayoutElement.java b/src/main/java/controlP5/ControllerLayoutElement.java
index d59b07f..34c6ea7 100755
--- a/src/main/java/controlP5/ControllerLayoutElement.java
+++ b/src/main/java/controlP5/ControllerLayoutElement.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControllerList.java b/src/main/java/controlP5/ControllerList.java
index ddc9f78..8d2d4b6 100755
--- a/src/main/java/controlP5/ControllerList.java
+++ b/src/main/java/controlP5/ControllerList.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControllerPlug.java b/src/main/java/controlP5/ControllerPlug.java
index 9c350b1..9846133 100755
--- a/src/main/java/controlP5/ControllerPlug.java
+++ b/src/main/java/controlP5/ControllerPlug.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControllerProperties.java b/src/main/java/controlP5/ControllerProperties.java
index bd80412..8a179a4 100755
--- a/src/main/java/controlP5/ControllerProperties.java
+++ b/src/main/java/controlP5/ControllerProperties.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -35,7 +35,6 @@ import java.io.ObjectOutputStream;
import java.io.StringReader;
import java.lang.reflect.Method;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -348,7 +347,7 @@ public class ControllerProperties {
* logs all registered properties in memory. Here, clones of properties are stored inside a map and can be accessed
* by key using the getLog method.
*
- * @see controlP5.ControllerProperties#getSnapshot(String)
+ * @see ControllerProperties#getSnapshot(String)
* @param theKey
* @return ControllerProperties
*/
@@ -415,7 +414,7 @@ public class ControllerProperties {
/**
* restores properties previously stored as snapshot in memory.
*
- * @see controlP5.ControllerProperties#setSnapshot(String)
+ * @see ControllerProperties#setSnapshot(String)
*/
public ControllerProperties getSnapshot( String theKey ) {
Set< ControllerProperty > l = _mySnapshots.get( theKey );
diff --git a/src/main/java/controlP5/ControllerProperty.java b/src/main/java/controlP5/ControllerProperty.java
index f068fe6..ab85716 100755
--- a/src/main/java/controlP5/ControllerProperty.java
+++ b/src/main/java/controlP5/ControllerProperty.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/ControllerStyle.java b/src/main/java/controlP5/ControllerStyle.java
index b4b85f7..93d1fce 100755
--- a/src/main/java/controlP5/ControllerStyle.java
+++ b/src/main/java/controlP5/ControllerStyle.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -31,7 +31,7 @@ import java.io.Serializable;
/**
* Labels use the ControllerStyle class to store margin and padding information.
*
- * @see controlP5.Label#getStyle()
+ * @see Label#getStyle()
*
* @example extra/ControlP5style
*/
diff --git a/src/main/java/controlP5/ControllerView.java b/src/main/java/controlP5/ControllerView.java
index ca0f9d7..827d1c4 100755
--- a/src/main/java/controlP5/ControllerView.java
+++ b/src/main/java/controlP5/ControllerView.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/DropdownList.java b/src/main/java/controlP5/DropdownList.java
index 9e276bf..6d29163 100755
--- a/src/main/java/controlP5/DropdownList.java
+++ b/src/main/java/controlP5/DropdownList.java
@@ -1,6 +1,6 @@
-package controlP5;
+package main.java.controlp5;
-import static controlP5.ControlP5.b;
+import static main.java.controlp5.ControlP5.b;
import java.util.ArrayList;
import java.util.Arrays;
@@ -412,7 +412,7 @@ public class DropdownList extends Controller< DropdownList > implements ControlL
for ( int i = m0 ; i < m1 ; i++ ) {
Map< String , Object > item = c.items.get( i );
CColor color = ( CColor ) item.get( "color" );
- g.fill( ( b( item.get( "state" ) ) ) ? color.getActive( ) : ( i == c.itemHover ) ? ( c.isMousePressed ? color.getActive( ) : color.getForeground( ) ) : color.getBackground( ) );
+ g.fill( ( ControlP5.b( item.get( "state" ) ) ) ? color.getActive( ) : ( i == c.itemHover ) ? ( c.isMousePressed ? color.getActive( ) : color.getForeground( ) ) : color.getBackground( ) );
g.rect( 0 , 0 , c.getWidth( ) , c.itemHeight - 1 );
c.getValueLabel( ).set( item.get( "text" ).toString( ) ).draw( g , 4 , c.itemHeight / 2 );
g.translate( 0 , c.itemHeight );
@@ -443,19 +443,19 @@ public class DropdownList extends Controller< DropdownList > implements ControlL
public void keyEvent( KeyEvent theKeyEvent ) {
if ( isInside && theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
switch ( theKeyEvent.getKeyCode( ) ) {
- case ( ControlP5.UP ):
+ case (UP):
scroll( theKeyEvent.isAltDown( ) ? -itemIndexOffset : theKeyEvent.isShiftDown( ) ? -10 : -1 );
updateHover( );
break;
- case ( ControlP5.DOWN ):
+ case (DOWN):
scroll( theKeyEvent.isAltDown( ) ? items.size( ) - itemRange : theKeyEvent.isShiftDown( ) ? 10 : 1 );
updateHover( );
break;
- case ( ControlP5.LEFT ):
+ case (LEFT):
break;
- case ( ControlP5.RIGHT ):
+ case (RIGHT):
break;
- case ( ControlP5.ENTER ):
+ case (ENTER):
onRelease( );
break;
}
diff --git a/src/main/java/controlP5/FieldChangedListener.java b/src/main/java/controlP5/FieldChangedListener.java
index 1ba3663..0e2f6b0 100755
--- a/src/main/java/controlP5/FieldChangedListener.java
+++ b/src/main/java/controlP5/FieldChangedListener.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -32,7 +32,7 @@ import java.lang.reflect.Field;
* linked to a controller. The FieldChangedListener is for primarily for
* internal use.
*
- * @see controlP5.Controller#listen(boolean)
+ * @see Controller#listen(boolean)
*/
class FieldChangedListener {
diff --git a/src/main/java/controlP5/FrameRate.java b/src/main/java/controlP5/FrameRate.java
index b816618..881f68d 100755
--- a/src/main/java/controlP5/FrameRate.java
+++ b/src/main/java/controlP5/FrameRate.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Group.java b/src/main/java/controlP5/Group.java
index fb661d1..9680e68 100755
--- a/src/main/java/controlP5/Group.java
+++ b/src/main/java/controlP5/Group.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Icon.java b/src/main/java/controlP5/Icon.java
index efb8781..ccaa6a3 100644
--- a/src/main/java/controlP5/Icon.java
+++ b/src/main/java/controlP5/Icon.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -142,7 +142,7 @@ public class Icon extends Controller< Icon > {
/**
* If the Icon acts as a switch, setOn will turn on
* the switch. Use
- * {@link controlP5.Icon#setSwitch(boolean) setSwitch}
+ * {@link Icon#setSwitch(boolean) setSwitch}
* to turn a Icon into a Switch.
*/
public Icon setOn( ) {
@@ -157,7 +157,7 @@ public class Icon extends Controller< Icon > {
/**
* If the Icon acts as a switch, setOff will turn off
* the switch. Use
- * {@link controlP5.Icon#setSwitch(boolean) setSwitch}
+ * {@link Icon#setSwitch(boolean) setSwitch}
* to turn a Icon into a Switch.
*/
public Icon setOff( ) {
diff --git a/src/main/java/controlP5/Knob.java b/src/main/java/controlP5/Knob.java
index 880f1fe..2a766af 100755
--- a/src/main/java/controlP5/Knob.java
+++ b/src/main/java/controlP5/Knob.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -82,7 +82,7 @@ public class Knob extends Controller< Knob > {
setMax( theMax );
_myDiameter = theWidth;
_myRadius = _myDiameter / 2;
- _myUnit = ( _myMax - _myMin ) / ControlP5Constants.TWO_PI;
+ _myUnit = ( _myMax - _myMin ) / TWO_PI;
startAngle = HALF_PI + PI * 0.25f;
angleRange = PI + HALF_PI;
myAngle = startAngle;
@@ -450,16 +450,16 @@ public class Knob extends Controller< Knob > {
theGraphics.popMatrix( );
int c = isActive( ) ? getColor( ).getActive( ) : getColor( ).getForeground( );
theGraphics.pushMatrix( );
- if ( getViewStyle( ) == Controller.LINE ) {
+ if ( getViewStyle( ) == LINE) {
theGraphics.rotate( getAngle( ) );
theGraphics.stroke( c );
theGraphics.strokeWeight( getTickMarkWeight( ) );
theGraphics.line( 0 , 0 , getRadius( ) , 0 );
- } else if ( getViewStyle( ) == Controller.ELLIPSE ) {
+ } else if ( getViewStyle( ) == ELLIPSE) {
theGraphics.rotate( getAngle( ) );
theGraphics.fill( c );
theGraphics.ellipse( getRadius( ) * 0.75f , 0 , getRadius( ) * 0.2f , getRadius( ) * 0.2f );
- } else if ( getViewStyle( ) == Controller.ARC ) {
+ } else if ( getViewStyle( ) == ARC) {
theGraphics.fill( c );
theGraphics.arc( 0 , 0 , getRadius( ) * 1.8f , getRadius( ) * 1.8f , getStartAngle( ) , getAngle( ) + ( ( getStartAngle( ) == getAngle( ) ) ? 0.06f : 0f ) );
theGraphics.fill( theGraphics.red( getColor( ).getBackground( ) ) , theGraphics.green( getColor( ).getBackground( ) ) , theGraphics.blue( getColor( ).getBackground( ) ) , 255 );
@@ -494,7 +494,7 @@ public class Knob extends Controller< Knob > {
theGraphics.translate( -getWidth( ) / 2 , -getHeight( ) / 2 );
if ( isLabelVisible ) {
_myCaptionLabel.draw( theGraphics , 0 , 0 , theController );
- _myValueLabel.align( ControlP5.CENTER , ControlP5.CENTER );
+ _myValueLabel.align(CENTER, CENTER);
_myValueLabel.draw( theGraphics , 0 , 0 , theController );
}
theGraphics.popMatrix( );
@@ -569,4 +569,4 @@ public class Knob extends Controller< Knob > {
/* (non-Javadoc)
*
- * @see controlP5.Controller#updateInternalEvents(processing.core.PApplet) */
+ * @see main.java.controlp5.Controller#updateInternalEvents(processing.core.PApplet) */
diff --git a/src/main/java/controlP5/Label.java b/src/main/java/controlP5/Label.java
index a7f75b8..9cb0e7b 100755
--- a/src/main/java/controlP5/Label.java
+++ b/src/main/java/controlP5/Label.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -35,7 +35,7 @@ import processing.core.PGraphics;
* ControlFonts.
*
*
- * @see controlP5.ControlFont
+ * @see ControlFont
* @example controllers/ControlP5Textlabel
*
*/
diff --git a/src/main/java/controlP5/ListBox.java b/src/main/java/controlP5/ListBox.java
index 57c8a05..51e234f 100755
--- a/src/main/java/controlP5/ListBox.java
+++ b/src/main/java/controlP5/ListBox.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -25,7 +25,7 @@ package controlP5;
*
*/
-import static controlP5.ControlP5.b;
+import static main.java.controlp5.ControlP5.b;
import java.util.ArrayList;
import java.util.Arrays;
@@ -41,7 +41,7 @@ import processing.event.KeyEvent;
/**
* A ListBox is a list of vertically aligned items which can be scrolled if required.
*
- * @see controlP5.ListBox
+ * @see ListBox
* @example controllers/ControlP5listBox
*/
public class ListBox extends Controller< ListBox > implements ControlListener {
@@ -415,7 +415,7 @@ public class ListBox extends Controller< ListBox > implements ControlListener {
for ( int i = m0 ; i < m1 ; i++ ) {
Map< String , Object > item = c.items.get( i );
CColor color = ( CColor ) item.get( "color" );
- g.fill( ( b( item.get( "state" ) ) ) ? color.getActive( ) : ( i == c.itemHover ) ? ( c.isMousePressed ? color.getActive( ) : color.getForeground( ) ) : color.getBackground( ) );
+ g.fill( ( ControlP5.b( item.get( "state" ) ) ) ? color.getActive( ) : ( i == c.itemHover ) ? ( c.isMousePressed ? color.getActive( ) : color.getForeground( ) ) : color.getBackground( ) );
g.rect( 0 , 0 , c.getWidth( ) , c.itemHeight - 1 );
c.getValueLabel( ).align( PApplet.LEFT , PApplet.CENTER ).set( item.get( "text" ).toString( ) ).draw( g , 4 , c.itemHeight / 2 );
g.translate( 0 , c.itemHeight );
@@ -446,19 +446,19 @@ public class ListBox extends Controller< ListBox > implements ControlListener {
public void keyEvent( KeyEvent theKeyEvent ) {
if ( isInside && theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
switch ( theKeyEvent.getKeyCode( ) ) {
- case ( ControlP5.UP ):
+ case (UP):
scroll( theKeyEvent.isAltDown( ) ? -itemIndexOffset : theKeyEvent.isShiftDown( ) ? -10 : -1 );
updateHover( );
break;
- case ( ControlP5.DOWN ):
+ case (DOWN):
scroll( theKeyEvent.isAltDown( ) ? items.size( ) - itemRange : theKeyEvent.isShiftDown( ) ? 10 : 1 );
updateHover( );
break;
- case ( ControlP5.LEFT ):
+ case (LEFT):
break;
- case ( ControlP5.RIGHT ):
+ case (RIGHT):
break;
- case ( ControlP5.ENTER ):
+ case (ENTER):
onRelease( );
break;
}
diff --git a/src/main/java/controlP5/Matrix.java b/src/main/java/controlP5/Matrix.java
index 57e58b4..31f3f8c 100755
--- a/src/main/java/controlP5/Matrix.java
+++ b/src/main/java/controlP5/Matrix.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -81,7 +81,7 @@ public class Matrix extends Controller< Matrix > {
_myPlug = cp5.papplet;
_myPlugName = getName( );
- _myCaptionLabel.align( ControlP5.LEFT , ControlP5.BOTTOM_OUTSIDE );
+ _myCaptionLabel.align(LEFT, BOTTOM_OUTSIDE);
_myCaptionLabel.setPadding( 0 , 4 );
runThread( );
}
diff --git a/src/main/java/controlP5/MultiList.java b/src/main/java/controlP5/MultiList.java
index e9c3237..6641592 100755
--- a/src/main/java/controlP5/MultiList.java
+++ b/src/main/java/controlP5/MultiList.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -47,7 +47,7 @@ public class MultiList extends Controller< MultiList > implements MultiListInter
protected boolean isUpdateLocation = false;
protected MultiListInterface mostRecent;
protected int[] _myRect = new int[ 4 ];
- protected int _myDirection = ControlP5Constants.RIGHT;
+ protected int _myDirection = RIGHT;
public int closeDelay = 30;
protected int _myDefaultButtonHeight = 10;
protected boolean isUpperCase = true;
@@ -164,7 +164,7 @@ public class MultiList extends Controller< MultiList > implements MultiListInter
if ( theEvent.getController( ) instanceof MultiListButton ) {
_myValue = theEvent.getController( ).getValue( );
ControlEvent myEvent = new ControlEvent( this );
- cp5.getControlBroadcaster( ).broadcast( myEvent , ControlP5Constants.FLOAT );
+ cp5.getControlBroadcaster( ).broadcast( myEvent , FLOAT);
}
}
diff --git a/src/main/java/controlP5/MultiListButton.java b/src/main/java/controlP5/MultiListButton.java
index 852189a..2ad286c 100755
--- a/src/main/java/controlP5/MultiListButton.java
+++ b/src/main/java/controlP5/MultiListButton.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -25,9 +25,6 @@ package controlP5;
*
*/
-import java.util.ArrayList;
-import java.util.List;
-
/**
* Used by MultiList.
*
@@ -41,7 +38,7 @@ public class MultiListButton extends Button implements MultiListInterface {
private Controller parent;
private MultiList root;
private int[] _myRect = new int[ 4 ];
- protected int _myDirection = ControlP5Constants.RIGHT;
+ protected int _myDirection = RIGHT;
private boolean isUpperCase = true;
/**
diff --git a/src/main/java/controlP5/MultiListInterface.java b/src/main/java/controlP5/MultiListInterface.java
index 3509731..78fcd1f 100755
--- a/src/main/java/controlP5/MultiListInterface.java
+++ b/src/main/java/controlP5/MultiListInterface.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/MultilineTextfield.java b/src/main/java/controlP5/MultilineTextfield.java
index 41eb2a9..54ee4f3 100644
--- a/src/main/java/controlP5/MultilineTextfield.java
+++ b/src/main/java/controlP5/MultilineTextfield.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
import processing.event.KeyEvent;
diff --git a/src/main/java/controlP5/Numberbox.java b/src/main/java/controlP5/Numberbox.java
index 313580b..ee763f1 100755
--- a/src/main/java/controlP5/Numberbox.java
+++ b/src/main/java/controlP5/Numberbox.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -113,7 +113,7 @@ public class Numberbox extends Controller< Numberbox > {
/* (non-Javadoc)
*
- * @see controlP5.Controller#mousePressed() */
+ * @see main.java.controlp5.Controller#mousePressed() */
@Override
@ControlP5.Invisible
public void mousePressed( ) {
@@ -122,7 +122,7 @@ public class Numberbox extends Controller< Numberbox > {
/* (non-Javadoc)
*
- * @see controlP5.Controller#mouseReleased() */
+ * @see main.java.controlp5.Controller#mouseReleased() */
@Override
@ControlP5.Invisible
public void mouseReleased( ) {
@@ -131,7 +131,7 @@ public class Numberbox extends Controller< Numberbox > {
/* (non-Javadoc)
*
- * @see controlP5.Controller#mouseReleasedOutside() */
+ * @see main.java.controlp5.Controller#mouseReleasedOutside() */
@Override
@ControlP5.Invisible
public void mouseReleasedOutside( ) {
@@ -237,7 +237,7 @@ public class Numberbox extends Controller< Numberbox > {
/* (non-Javadoc)
*
- * @see controlP5.Controller#update() */
+ * @see main.java.controlp5.Controller#update() */
@Override
public Numberbox update( ) {
return setValue( _myValue );
@@ -290,7 +290,7 @@ public class Numberbox extends Controller< Numberbox > {
}
/**
- * @see controlP5.Numberbox#setScrollSensitivity(float)
+ * @see Numberbox#setScrollSensitivity(float)
*
* @param theValue
* @return
diff --git a/src/main/java/controlP5/Pad.java b/src/main/java/controlP5/Pad.java
index 382cd3d..e6233f7 100755
--- a/src/main/java/controlP5/Pad.java
+++ b/src/main/java/controlP5/Pad.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Pointer.java b/src/main/java/controlP5/Pointer.java
index c8ba02b..e7740f6 100755
--- a/src/main/java/controlP5/Pointer.java
+++ b/src/main/java/controlP5/Pointer.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Println.java b/src/main/java/controlP5/Println.java
index 787866e..ea3ef53 100755
--- a/src/main/java/controlP5/Println.java
+++ b/src/main/java/controlP5/Println.java
@@ -1,5 +1,5 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Radio.java b/src/main/java/controlP5/Radio.java
index 31c1c91..92cf28a 100755
--- a/src/main/java/controlP5/Radio.java
+++ b/src/main/java/controlP5/Radio.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/RadioButton.java b/src/main/java/controlP5/RadioButton.java
index e2aff5a..b1bd697 100755
--- a/src/main/java/controlP5/RadioButton.java
+++ b/src/main/java/controlP5/RadioButton.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -107,7 +107,7 @@ public class RadioButton extends ControlGroup< RadioButton > {
public RadioButton addItem( final String theName , final float theValue ) {
Toggle t = cp5.addToggle( theName , 0 , 0 , itemWidth , itemHeight );
t.getCaptionLabel( ).align( alignX , alignY ).setPadding( _myPaddingX , _myPaddingY );
- t.setMode( ControlP5.DEFAULT );
+ t.setMode(DEFAULT);
t.setImages( images[ 0 ] , images[ 1 ] , images[ 2 ] );
t.setSize( images[ 0 ] );
addItem( t , theValue );
@@ -564,7 +564,7 @@ public class RadioButton extends ControlGroup< RadioButton > {
}
if ( theBroadcastFlag ) {
ControlEvent myEvent = new ControlEvent( this );
- cp5.getControlBroadcaster( ).broadcast( myEvent , ControlP5Constants.FLOAT );
+ cp5.getControlBroadcaster( ).broadcast( myEvent , FLOAT);
}
}
diff --git a/src/main/java/controlP5/Range.java b/src/main/java/controlP5/Range.java
index 255e28c..81c1f49 100755
--- a/src/main/java/controlP5/Range.java
+++ b/src/main/java/controlP5/Range.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -31,7 +31,6 @@ import java.util.logging.Level;
import processing.core.PApplet;
import processing.core.PFont;
import processing.core.PGraphics;
-import controlP5.ControlP5.Invisible;
/**
* A range slider works just like a slider but can be adjusted on both ends.
@@ -179,7 +178,8 @@ public class Range extends Controller< Range > {
return this;
}
- @Override @Invisible public void mousePressed( ) {
+ @Override @ControlP5.Invisible
+ public void mousePressed( ) {
final float posX = x( _myParent.getAbsolutePosition( ) ) + x( position );
final float posY = y( _myParent.getAbsolutePosition( ) ) + y( position );
diff --git a/src/main/java/controlP5/ScrollableList.java b/src/main/java/controlP5/ScrollableList.java
index eba6931..fd219ac 100644
--- a/src/main/java/controlP5/ScrollableList.java
+++ b/src/main/java/controlP5/ScrollableList.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -25,7 +25,7 @@ package controlP5;
*
*/
-import static controlP5.ControlP5.b;
+import static main.java.controlp5.ControlP5.b;
import java.util.ArrayList;
import java.util.Arrays;
@@ -460,19 +460,19 @@ public class ScrollableList extends Controller< ScrollableList > implements Cont
public void keyEvent( KeyEvent theKeyEvent ) {
if ( isInside && theKeyEvent.getAction( ) == KeyEvent.PRESS ) {
switch ( theKeyEvent.getKeyCode( ) ) {
- case ( ControlP5.UP ):
+ case (UP):
scroll( theKeyEvent.isAltDown( ) ? -itemIndexOffset : theKeyEvent.isShiftDown( ) ? -10 : -1 );
updateHover( );
break;
- case ( ControlP5.DOWN ):
+ case (DOWN):
scroll( theKeyEvent.isAltDown( ) ? items.size( ) - itemRange : theKeyEvent.isShiftDown( ) ? 10 : 1 );
updateHover( );
break;
- case ( ControlP5.LEFT ):
+ case (LEFT):
break;
- case ( ControlP5.RIGHT ):
+ case (RIGHT):
break;
- case ( ControlP5.ENTER ):
+ case (ENTER):
onRelease( );
break;
}
diff --git a/src/main/java/controlP5/Slider.java b/src/main/java/controlP5/Slider.java
index 4a55331..cea4232 100755
--- a/src/main/java/controlP5/Slider.java
+++ b/src/main/java/controlP5/Slider.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -636,7 +636,7 @@ public class Slider extends Controller< Slider > {
}
/**
- * @see controlP5.Slider#setScrollSensitivity(float)
+ * @see Slider#setScrollSensitivity(float)
*
* @param theValue
* @return Slider
diff --git a/src/main/java/controlP5/Slider2D.java b/src/main/java/controlP5/Slider2D.java
index 6980bc7..4312403 100755
--- a/src/main/java/controlP5/Slider2D.java
+++ b/src/main/java/controlP5/Slider2D.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -72,7 +72,7 @@ public class Slider2D extends Controller< Slider2D > {
/* (non-Javadoc)
*
- * @see controlP5.Controller#updateInternalEvents(processing.core.PApplet) */
+ * @see main.java.controlp5.Controller#updateInternalEvents(processing.core.PApplet) */
@ControlP5.Invisible public Slider2D updateInternalEvents( PApplet theApplet ) {
if ( isInside( ) ) {
if ( !cp5.isAltDown( ) ) {
@@ -188,7 +188,7 @@ public class Slider2D extends Controller< Slider2D > {
/* (non-Javadoc) TODO see https://forum.processing.org/topic/controlp5-slider2d-questions
*
- * @see controlP5.Controller#setArrayValue(float[]) */
+ * @see main.java.controlp5.Controller#setArrayValue(float[]) */
@Override public Slider2D setArrayValue( float[] theArray ) {
_myArrayValue = theArray;
float rX = ( getWidth( ) - cursorWidth ) / ( float ) ( _myMaxX - _myMinX );
@@ -212,7 +212,7 @@ public class Slider2D extends Controller< Slider2D > {
/* (non-Javadoc)
*
- * @see controlP5.Controller#setValue(float) */
+ * @see main.java.controlp5.Controller#setValue(float) */
public Slider2D setValue( float theValue ) {
_myArrayValue[ 0 ] = cursorX / ( ( float ) ( getWidth( ) - cursorWidth ) / ( float ) getWidth( ) );
_myArrayValue[ 1 ] = cursorY / ( ( float ) ( getHeight( ) - cursorHeight ) / ( float ) getHeight( ) );
diff --git a/src/main/java/controlP5/Spacer.java b/src/main/java/controlP5/Spacer.java
index f7b384a..034a68c 100644
--- a/src/main/java/controlP5/Spacer.java
+++ b/src/main/java/controlP5/Spacer.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Tab.java b/src/main/java/controlP5/Tab.java
index 9309e14..2460919 100755
--- a/src/main/java/controlP5/Tab.java
+++ b/src/main/java/controlP5/Tab.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -30,7 +30,7 @@ import processing.core.PGraphics;
/**
* Tabs are used to organize controllers. Tabs are arranged horizontally from the top-left corner by
* default, Tab extends ControllerGroup, for more available methods see the ControllerGroup
- * documentation. Reposition tabs with {@link controlP5.ControlWindow#setPositionOfTabs(int, int)}
+ * documentation. Reposition tabs with {@link ControlWindow#setPositionOfTabs(int, int)}
*
* @example controllers/ControlP5tab
* @nosuperclasses ControllerGroup ControllerGroup
@@ -137,7 +137,7 @@ public class Tab extends ControllerGroup< Tab > {
@ControlP5.Invisible public void mousePressed( ) {
cp5.getWindow( ).activateTab( this );
if ( isEventActive ) {
- cp5.getControlBroadcaster( ).broadcast( new ControlEvent( this ) , ControlP5Constants.METHOD );
+ cp5.getControlBroadcaster( ).broadcast( new ControlEvent( this ) , METHOD);
}
}
diff --git a/src/main/java/controlP5/Textarea.java b/src/main/java/controlP5/Textarea.java
index fb01036..e1d5930 100755
--- a/src/main/java/controlP5/Textarea.java
+++ b/src/main/java/controlP5/Textarea.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Textfield.java b/src/main/java/controlP5/Textfield.java
index 8979dfc..61c7c07 100755
--- a/src/main/java/controlP5/Textfield.java
+++ b/src/main/java/controlP5/Textfield.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -31,10 +31,8 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import controlP5.events.ReleasedOutsideListener;
-import controlP5.textfield.TextfieldCommand;
+import main.java.controlp5.events.ReleasedOutsideListener;
import processing.core.PApplet;
-import processing.core.PFont;
import processing.core.PGraphics;
import processing.event.Event;
import processing.event.KeyEvent;
@@ -114,7 +112,7 @@ public class Textfield extends Controller< Textfield > implements ReleasedOutsid
_myCaptionLabel = new Label( cp5 , theName , 0 , 0 , color.getCaptionLabel( ) );
_myValueLabel.setFont( cp5.controlFont == cp5.defaultFont ? cp5.defaultFontForText : cp5.controlFont );
- _myCaptionLabel.align( ControlP5.LEFT , ControlP5.BOTTOM_OUTSIDE );
+ _myCaptionLabel.align(LEFT, BOTTOM_OUTSIDE);
_myCaptionLabel.setPaddingX( 0 );
_myBroadcastType = STRING;
diff --git a/src/main/java/controlP5/TextfieldCommand.java b/src/main/java/controlP5/TextfieldCommand.java
index 4cbdb3a..b8e586f 100644
--- a/src/main/java/controlP5/TextfieldCommand.java
+++ b/src/main/java/controlP5/TextfieldCommand.java
@@ -1,4 +1,4 @@
-package controlP5.textfield;
+package main.java.controlp5;
public interface TextfieldCommand {
void execute( );
diff --git a/src/main/java/controlP5/Textlabel.java b/src/main/java/controlP5/Textlabel.java
index f0742ba..89a0285 100755
--- a/src/main/java/controlP5/Textlabel.java
+++ b/src/main/java/controlP5/Textlabel.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/TickMark.java b/src/main/java/controlP5/TickMark.java
index 2ff66fb..b869aec 100755
--- a/src/main/java/controlP5/TickMark.java
+++ b/src/main/java/controlP5/TickMark.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Toggle.java b/src/main/java/controlP5/Toggle.java
index 490791d..c55147b 100755
--- a/src/main/java/controlP5/Toggle.java
+++ b/src/main/java/controlP5/Toggle.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
diff --git a/src/main/java/controlP5/Tooltip.java b/src/main/java/controlP5/Tooltip.java
index 041d2a1..7afeece 100755
--- a/src/main/java/controlP5/Tooltip.java
+++ b/src/main/java/controlP5/Tooltip.java
@@ -1,4 +1,4 @@
-package controlP5;
+package main.java.controlp5;
/**
* controlP5 is a processing gui library.
@@ -187,7 +187,7 @@ public class Tooltip {
* view class can be found at the bottom of the Tooltip
* source.
*
- * @see controlP5.ControllerView
+ * @see ControllerView
* @param theDisplay
* @return Tooltip
*/
@@ -248,8 +248,8 @@ public class Tooltip {
* any effect without changing the default display to a
* custom ControllerView.
*
- * @see controlP5.ControllerView
- * @see controlP5.Tooltip#setDisplay(ControllerView)
+ * @see ControllerView
+ * @see Tooltip#setDisplay(ControllerView)
* @return Tooltip
*/
public Tooltip setWidth( int theWidth ) {
@@ -263,7 +263,7 @@ public class Tooltip {
}
/**
- * @see controlP5.Tooltip#setWidth(int)
+ * @see Tooltip#setWidth(int)
* @param theHeight
* @return Tooltip
*/
@@ -294,7 +294,7 @@ public class Tooltip {
* controller. to disable a tooltip for aparticular
* controller, used unregister(Controller)
*
- * @see controlP5.Tooltip#unregister(Controller)
+ * @see Tooltip#unregister(Controller)
* @return Tooltip
*/
public Tooltip disable( ) {
diff --git a/src/main/java/controlP5/changeLog.txt b/src/main/java/controlP5/changeLog.txt
index 5b318b4..6f52652 100755
--- a/src/main/java/controlP5/changeLog.txt
+++ b/src/main/java/controlP5/changeLog.txt
@@ -14,11 +14,11 @@
2014-09-08 Andreas Schlegel
- * src controlP5.Icon:
+ * src main.java.controlp5.Icon:
adding Icon class, acts like a button; can be used with images and font-icons
from "Font Awesome".
- * src controlP5.Button:
+ * src main.java.controlp5.Button:
when theButton acts as a switch (setSwitch(true)), the corresponding
method inside a sketch should use type boolean as argument instead of float;
a java.lang.IllegalArgumentException will be thrown in case of a float argument
@@ -26,14 +26,14 @@
2014-08-28 Andreas Schlegel
- * src controlP5.Background:
+ * src main.java.controlp5.Background:
adding Background class, a convenience class for grouping controllers with
the top bar disabled by default.
2014-07-21 Andreas Schlegel
- * src controlP5.Textfield:
+ * src main.java.controlp5.Textfield:
making use of a graphics buffer now, simplifies cursor position calculation and
prevents from throwing an ArrayIndexOutOfBoundsException which could occasionally
happen with previous versions.
@@ -46,7 +46,7 @@
* removing all deprecated methods
- * src controlP5.ListBox, controlP5.DropdownList:
+ * src main.java.controlp5.ListBox, main.java.controlp5.DropdownList:
Due to changes to and deprecation of DropdownList and ListBox, both share the same
source code as ScrollableList. Consequently some functionality got lost though this
should be marginal. In case of any issues occuring due to these changes, please
@@ -63,14 +63,14 @@
* preparing for next release.
- * src controlP5.ListBox, controlP5.DropdownList:
+ * src main.java.controlp5.ListBox, main.java.controlp5.DropdownList:
deprecated, use ScrollableList instead.
- * src controlP5.ControlP5Legacy:
+ * src main.java.controlp5.ControlP5Legacy:
repository of functions only kept for backwards compatibility but it is not encouraged
to use the anymore. Use ControlP5Base instead.
- * src controlP5.Controller:
+ * src main.java.controlp5.Controller:
adding onEnter, onLeave, onDrag, onStartDrag, onEndDrag, onWheel, onMove, onClick,
onPress, onDoublePress, onRelease, onReleaseOutside, onChange to register callbacks
for specific events. This is not implemented for classes extending ControllerGroup.
@@ -80,7 +80,7 @@
* version 2.1.5
- * src controlP5.ControllerProperties:
+ * src main.java.controlp5.ControllerProperties:
removing XML format. adding JSON format, JSON format will be the default format instead of the Java Serialization format.
@@ -88,7 +88,7 @@
* version 2.1.3
- * src controlP5.ListBox:
+ * src main.java.controlp5.ListBox:
now extends Controller instead of ControlGroup.
@@ -109,10 +109,10 @@
only automatic function detection and binding is available. But then why not variables? See my request here:
https://processing-js.lighthouseapp.com/projects/41284/tickets/1972-feature-request-access-sketch-global-variables-from-library
- * src controlP5.Slider2D:
+ * src main.java.controlp5.Slider2D:
changed size of cursor, changed color handling
- * src controlP5.Button:
+ * src main.java.controlp5.Button:
alignment of caption label changed to CENTER,CENTER
* adding PGraphics support instead of only rendering into PApplet directly
@@ -125,13 +125,13 @@
* version 2.0.4
- * src controlP5.Textfield.java,controlP5.ListBox.java,
- controlP5.DropdownList.java,controlP5.ControlWindow.java
- controlP5.ControlP5Base.java:
+ * src main.java.controlp5.Textfield.java,main.java.controlp5.ListBox.java,
+ main.java.controlp5.DropdownList.java,main.java.controlp5.ControlWindow.java
+ main.java.controlp5.ControlP5Base.java:
adjusting to processing's KeyEvent final variable name changes
see issue 69 https://code.google.com/p/controlp5/issues/detail?id=69 (thanks jeff)
- * src controlP5.Textfield.java:
+ * src main.java.controlp5.Textfield.java:
reimplemented password mode (thanks jeff)
@@ -140,7 +140,7 @@
* version 2.0.3
- * src controlP5.Controller.java:
+ * src main.java.controlp5.Controller.java:
Automatic (PApplet) field recognition for Slider, Knob, Numberbox, Toggle adjusted.
@@ -156,7 +156,7 @@
* src controlP5.BitFontRenderer.java:
removed
- * src controlP5.BitFont.java:
+ * src main.java.controlp5.BitFont.java:
added, see above.
@@ -179,12 +179,12 @@
from this version onwards Android is supported
- * src controlP5.Println.java:
+ * src main.java.controlp5.Println.java:
new class added
a console logger that captures the System.out stream and displays it using a Textarea
- * src controlP5.FrameRate.java:
+ * src main.java.controlp5.FrameRate.java:
new class added
a Textlabel that displays the current or average framerate based on update interval
@@ -193,15 +193,15 @@
using Base64 encoded bitfont source instead of loading gif textures
- * src controlP5.Knob.java:
+ * src main.java.controlp5.Knob.java:
adding value label, ARC is default view now.
- * src controlP5.Matrix.java:
+ * src main.java.controlp5.Matrix.java:
adding play(), pause(), stop(), isPlaying(), trigger(int)
- * src controlP5.Controller.java:
+ * src main.java.controlp5.Controller.java:
all ControllerSprite references (previously deprecated) have been removed
@@ -210,7 +210,7 @@
* src controlP5.ControlP5IOHandler.java:
- obsolete, removed, all static method transfered to controlP5.CP.java which will handle static method
+ obsolete, removed, all static method transfered to main.java.controlp5.CP.java which will handle static method
* src controlP5.ControlWindowKeyListener.java:
@@ -221,7 +221,7 @@
obsolete, removed, currently there is no support for separate frames other than the main window due to removing java.awt dependencies
- * src controlP5.ControlWindow.java:
+ * src main.java.controlp5.ControlWindow.java:
removed mouseWheelMoved(MouseWheelEvent e) due to removal of java.awt dependencies
how to use an extra window, see example extra/ControlP5frame
@@ -235,7 +235,7 @@
* src controlP5.ControlCanvas.java:
- obsolete, removed, use controlP5.Canvas.java instead.
+ obsolete, removed, use main.java.controlp5.Canvas.java instead.
2012-09-07 Andreas Schlegel
@@ -253,27 +253,27 @@
* version 0.7.6
- * src controlP5.Textfield.java:
+ * src main.java.controlp5.Textfield.java:
fixing special character issue with e.g. �,�,�,�, etc.
backspace, left arrow, right arrow now respond when pressed longer
added isFocus()
implemented issue 56 http://code.google.com/p/controlp5/issues/detail?id=56 , thanks jeff
- * src controlP5.ControllerAutomator.java:
+ * src main.java.controlp5.ControllerAutomator.java:
fixed annotation mapping for methods
added list support for methods
- * src controlP5.CColor.java:
+ * src main.java.controlp5.CColor.java:
removing alpha masking
- * src controlP5.MultiList.java:
+ * src main.java.controlp5.MultiList.java:
Conflict with moving a Multilist from one to another tab
removed field _myChildren. MultiListButtons are now store in the Controller's sublements filed.
- * src controlP5.ControllerInterface.java:
+ * src main.java.controlp5.ControllerInterface.java:
adding getArrayValue(int), setArrayValue(int, float), setArrayValue(float[]);
- * src controlP5.ControlP5.java:
+ * src main.java.controlp5.ControlP5.java:
adding setBroadcast(boolean) to disable/enable broadcasting of value changes.
@@ -282,7 +282,7 @@
* version 0.7.5
- * src controlP5.Controller.java:
+ * src main.java.controlp5.Controller.java:
adding empty methods onPress(), onClick(), onRelease(), onReleaseOutside(),
onScroll(int),onMove(),onDrag() for input access when extending a controller.
@@ -296,29 +296,29 @@
* version 0.7.3
- * src controlP5.ControlEvent.java:
+ * src main.java.controlp5.ControlEvent.java:
adding getArrayValue(int), returns a float value for a given index, does not check for ArrayIndexOutOfBounds
- * src controlP5.Slider.java:
+ * src main.java.controlp5.Slider.java:
issue 47 http://code.google.com/p/controlp5/issues/detail?id=47 fixed
- * src controlP5.CheckBox.java, controlP5.RadioButton.java:
+ * src main.java.controlp5.CheckBox.java, main.java.controlp5.RadioButton.java:
issue 41 http://code.google.com/p/controlp5/issues/detail?id=41 fixed
- * src controlP5.Chart.java:
+ * src main.java.controlp5.Chart.java:
implemented
- * src controlP5.ControlFont.java:
+ * src main.java.controlp5.ControlFont.java:
issue 46 http://code.google.com/p/controlp5/issues/detail?id=46 fixed
- * src controlP5.ControlWindow.java:
+ * src main.java.controlp5.ControlWindow.java:
sketches using controlP5 running in the browser as Applet did not work anymore, fixed
- * src controlP5.ColorPicker.java:
+ * src main.java.controlp5.ColorPicker.java:
missing implementation reported in http://forum.processing.org/topic/controlp5-how-to-receive-colorpicker-controlevents fixed
ColorPicker example has been modified accordingly
- * src controlP5.Textfield.java:
+ * src main.java.controlp5.Textfield.java:
issue 44 http://code.google.com/p/controlp5/issues/detail?id=44 fixed
* src controlP5.ControlWindowKeyHandler.java:
@@ -330,10 +330,10 @@
* version 0.7.0
- * src controlP5.ControllerInterface.java, controlP5.Controller.java,controlP5.ControllerGroup.java:
+ * src main.java.controlp5.ControllerInterface.java, main.java.controlp5.Controller.java,main.java.controlp5.ControllerGroup.java:
adding generic type declaration for object specific method chaining (fluent interface)
- * src controlP5.RadioButton.java:
+ * src main.java.controlp5.RadioButton.java:
changed return type for methods addItem from Toggle to RadioButton
changed return type for methods setImage from PImage to RadioButton
@@ -344,7 +344,7 @@
* version 0.6.9
- * src controlP5.Textarea.java:
+ * src main.java.controlp5.Textarea.java:
included isScrollable() to adapt to ListBox
@@ -352,16 +352,16 @@
* version 0.6.8
- * src controlP5.ControllerGroup.java, controlP5.Controller.java:
+ * src main.java.controlp5.ControllerGroup.java, main.java.controlp5.Controller.java:
making addition to isVisible() to check if the parent element is invisible
in which case the child element will return false as well although the visible
state might be true. this fixes an issue with mousewheel scroll being active
for an invisible child controller. The mouseoverlist handling was updated as well.
- * src controlP5.Slider.java:
+ * src main.java.controlp5.Slider.java:
Slider will only broadcast when there is a change in value when pressed
- * src controlP5.ControlWindow.java:
+ * src main.java.controlp5.ControlWindow.java:
mouseWheelMoved() now only updates the first item in the mouseoverlist
and then exits the loop
diff --git a/src/main/java/controlP5/events/ReleasedOutsideListener.java b/src/main/java/controlP5/events/ReleasedOutsideListener.java
index a5f05dd..cb9c2a9 100644
--- a/src/main/java/controlP5/events/ReleasedOutsideListener.java
+++ b/src/main/java/controlP5/events/ReleasedOutsideListener.java
@@ -1,4 +1,4 @@
-package controlP5.events;
+package main.java.controlp5.events;
public interface ReleasedOutsideListener {
public void mouseReleasedOutside( ) ;
diff --git a/src/main/java/controlP5/layout/ControllerFactory.java b/src/main/java/controlP5/layout/ControllerFactory.java
index deb6f1e..5a0f182 100644
--- a/src/main/java/controlP5/layout/ControllerFactory.java
+++ b/src/main/java/controlP5/layout/ControllerFactory.java
@@ -1,12 +1,11 @@
-package controlP5.layout;
+package main.java.controlp5.layout;
import controlP5.*;
-import controlP5.layout.lang.XMLParser;
+import main.java.controlp5.layout.lang.XMLParser;
import processing.core.PApplet;
import java.lang.reflect.Constructor;
import java.util.*;
-import java.lang.reflect.*;
public class ControllerFactory {
private final PApplet applet;
diff --git a/src/main/java/controlP5/layout/LayoutBuilder.java b/src/main/java/controlP5/layout/LayoutBuilder.java
index ae53c30..c8c970d 100644
--- a/src/main/java/controlP5/layout/LayoutBuilder.java
+++ b/src/main/java/controlP5/layout/LayoutBuilder.java
@@ -1,10 +1,10 @@
-package controlP5.layout;
+package main.java.controlp5.layout;
-import controlP5.ControlP5;
-import controlP5.layout.lang.XMLBaseVisitor;
-import controlP5.layout.lang.XMLLexer;
-import controlP5.layout.lang.XMLParser;
+import main.java.controlp5.ControlP5;
+import main.java.controlp5.layout.lang.XMLBaseVisitor;
+import main.java.controlp5.layout.lang.XMLLexer;
+import main.java.controlp5.layout.lang.XMLParser;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.tree.*;
import org.antlr.v4.runtime.tree.ParseTreeWalker;
diff --git a/src/main/java/controlP5/layout/lang/XMLBaseListener.java b/src/main/java/controlP5/layout/lang/XMLBaseListener.java
index 00befed..cc1b35c 100644
--- a/src/main/java/controlP5/layout/lang/XMLBaseListener.java
+++ b/src/main/java/controlP5/layout/lang/XMLBaseListener.java
@@ -1,5 +1,5 @@
// Generated from XML.g4 by ANTLR 4.13.0
-package controlP5.layout.lang;
+package main.java.controlp5.layout.lang;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.tree.ErrorNode;
diff --git a/src/main/java/controlP5/layout/lang/XMLBaseVisitor.java b/src/main/java/controlP5/layout/lang/XMLBaseVisitor.java
index 07fbb5b..c858cfe 100644
--- a/src/main/java/controlP5/layout/lang/XMLBaseVisitor.java
+++ b/src/main/java/controlP5/layout/lang/XMLBaseVisitor.java
@@ -1,5 +1,5 @@
// Generated from XML.g4 by ANTLR 4.13.0
-package controlP5.layout.lang;
+package main.java.controlp5.layout.lang;
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
/**
diff --git a/src/main/java/controlP5/layout/lang/XMLLexer.java b/src/main/java/controlP5/layout/lang/XMLLexer.java
index f634b64..80a4f8b 100644
--- a/src/main/java/controlP5/layout/lang/XMLLexer.java
+++ b/src/main/java/controlP5/layout/lang/XMLLexer.java
@@ -1,5 +1,5 @@
// Generated from XML.g4 by ANTLR 4.13.0
-package controlP5.layout.lang;
+package main.java.controlp5.layout.lang;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
diff --git a/src/main/java/controlP5/layout/lang/XMLListener.java b/src/main/java/controlP5/layout/lang/XMLListener.java
index affbd5b..fab5eb9 100644
--- a/src/main/java/controlP5/layout/lang/XMLListener.java
+++ b/src/main/java/controlP5/layout/lang/XMLListener.java
@@ -1,5 +1,5 @@
// Generated from XML.g4 by ANTLR 4.13.0
-package controlP5.layout.lang;
+package main.java.controlp5.layout.lang;
import org.antlr.v4.runtime.tree.ParseTreeListener;
/**
diff --git a/src/main/java/controlP5/layout/lang/XMLParser.java b/src/main/java/controlP5/layout/lang/XMLParser.java
index 0e79aa2..b8a3e5b 100644
--- a/src/main/java/controlP5/layout/lang/XMLParser.java
+++ b/src/main/java/controlP5/layout/lang/XMLParser.java
@@ -1,13 +1,10 @@
// Generated from XML.g4 by ANTLR 4.13.0
-package controlP5.layout.lang;
+package main.java.controlp5.layout.lang;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
public class XMLParser extends Parser {
diff --git a/src/main/java/controlP5/layout/lang/XMLVisitor.java b/src/main/java/controlP5/layout/lang/XMLVisitor.java
index 4b8fd76..04189a6 100644
--- a/src/main/java/controlP5/layout/lang/XMLVisitor.java
+++ b/src/main/java/controlP5/layout/lang/XMLVisitor.java
@@ -1,5 +1,5 @@
// Generated from XML.g4 by ANTLR 4.13.0
-package controlP5.layout.lang;
+package main.java.controlp5.layout.lang;
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
/**
diff --git a/src/main/java/sketch/Sketch.java b/src/main/java/sketch/Sketch.java
index 5541f71..4872537 100644
--- a/src/main/java/sketch/Sketch.java
+++ b/src/main/java/sketch/Sketch.java
@@ -1,13 +1,16 @@
-package sketch;
+package main.java.sketch;
-import controlP5.*;
+
+import main.java.controlp5.Button;
+import main.java.controlp5.ControlP5;
+import main.java.controlp5.MultilineTextfield;
import processing.core.PApplet;
public class Sketch extends PApplet {
static public void main (String[] args){
- PApplet.main("sketch.Sketch");
+ PApplet.main("main.java.sketch.Sketch");
}
ControlP5 cp5;
diff --git a/src/test/java/LayoutTests.java b/src/test/tests/LayoutTests.java
similarity index 100%
rename from src/test/java/LayoutTests.java
rename to src/test/tests/LayoutTests.java
diff --git a/target/classes/main/java/controlp5/Accordion.class b/target/classes/main/java/controlp5/Accordion.class
new file mode 100644
index 0000000..503df44
Binary files /dev/null and b/target/classes/main/java/controlp5/Accordion.class differ
diff --git a/target/classes/main/java/controlp5/Background.class b/target/classes/main/java/controlp5/Background.class
new file mode 100644
index 0000000..a3fcfb0
Binary files /dev/null and b/target/classes/main/java/controlp5/Background.class differ
diff --git a/target/classes/main/java/controlp5/Bang$1.class b/target/classes/main/java/controlp5/Bang$1.class
new file mode 100644
index 0000000..f6f3e25
Binary files /dev/null and b/target/classes/main/java/controlp5/Bang$1.class differ
diff --git a/target/classes/main/java/controlp5/Bang$BangImageView.class b/target/classes/main/java/controlp5/Bang$BangImageView.class
new file mode 100644
index 0000000..2bd6a96
Binary files /dev/null and b/target/classes/main/java/controlp5/Bang$BangImageView.class differ
diff --git a/target/classes/main/java/controlp5/Bang$BangView.class b/target/classes/main/java/controlp5/Bang$BangView.class
new file mode 100644
index 0000000..611c901
Binary files /dev/null and b/target/classes/main/java/controlp5/Bang$BangView.class differ
diff --git a/target/classes/main/java/controlp5/Bang.class b/target/classes/main/java/controlp5/Bang.class
new file mode 100644
index 0000000..a643a1e
Binary files /dev/null and b/target/classes/main/java/controlp5/Bang.class differ
diff --git a/target/classes/main/java/controlp5/BitFont.class b/target/classes/main/java/controlp5/BitFont.class
new file mode 100644
index 0000000..12284bf
Binary files /dev/null and b/target/classes/main/java/controlp5/BitFont.class differ
diff --git a/target/classes/main/java/controlp5/Button$1.class b/target/classes/main/java/controlp5/Button$1.class
new file mode 100644
index 0000000..b6c9d2c
Binary files /dev/null and b/target/classes/main/java/controlp5/Button$1.class differ
diff --git a/target/classes/main/java/controlp5/Button$ButtonImageView.class b/target/classes/main/java/controlp5/Button$ButtonImageView.class
new file mode 100644
index 0000000..9fd1b84
Binary files /dev/null and b/target/classes/main/java/controlp5/Button$ButtonImageView.class differ
diff --git a/target/classes/main/java/controlp5/Button$ButtonView.class b/target/classes/main/java/controlp5/Button$ButtonView.class
new file mode 100644
index 0000000..30f1ac0
Binary files /dev/null and b/target/classes/main/java/controlp5/Button$ButtonView.class differ
diff --git a/target/classes/main/java/controlp5/Button.class b/target/classes/main/java/controlp5/Button.class
new file mode 100644
index 0000000..39a81c8
Binary files /dev/null and b/target/classes/main/java/controlp5/Button.class differ
diff --git a/target/classes/main/java/controlp5/ButtonBar$1.class b/target/classes/main/java/controlp5/ButtonBar$1.class
new file mode 100644
index 0000000..1a82380
Binary files /dev/null and b/target/classes/main/java/controlp5/ButtonBar$1.class differ
diff --git a/target/classes/main/java/controlp5/ButtonBar$ButtonBarView.class b/target/classes/main/java/controlp5/ButtonBar$ButtonBarView.class
new file mode 100644
index 0000000..caa50d0
Binary files /dev/null and b/target/classes/main/java/controlp5/ButtonBar$ButtonBarView.class differ
diff --git a/target/classes/main/java/controlp5/ButtonBar.class b/target/classes/main/java/controlp5/ButtonBar.class
new file mode 100644
index 0000000..abeb94d
Binary files /dev/null and b/target/classes/main/java/controlp5/ButtonBar.class differ
diff --git a/target/classes/main/java/controlp5/CColor.class b/target/classes/main/java/controlp5/CColor.class
new file mode 100644
index 0000000..2c5251b
Binary files /dev/null and b/target/classes/main/java/controlp5/CColor.class differ
diff --git a/target/classes/main/java/controlp5/CDrawable.class b/target/classes/main/java/controlp5/CDrawable.class
new file mode 100644
index 0000000..96e78fd
Binary files /dev/null and b/target/classes/main/java/controlp5/CDrawable.class differ
diff --git a/target/classes/main/java/controlp5/CP.class b/target/classes/main/java/controlp5/CP.class
new file mode 100644
index 0000000..f1730af
Binary files /dev/null and b/target/classes/main/java/controlp5/CP.class differ
diff --git a/target/classes/main/java/controlp5/CallbackEvent.class b/target/classes/main/java/controlp5/CallbackEvent.class
new file mode 100644
index 0000000..15048a4
Binary files /dev/null and b/target/classes/main/java/controlp5/CallbackEvent.class differ
diff --git a/target/classes/main/java/controlp5/CallbackListener.class b/target/classes/main/java/controlp5/CallbackListener.class
new file mode 100644
index 0000000..3be2fad
Binary files /dev/null and b/target/classes/main/java/controlp5/CallbackListener.class differ
diff --git a/target/classes/main/java/controlp5/Canvas.class b/target/classes/main/java/controlp5/Canvas.class
new file mode 100644
index 0000000..aad78c7
Binary files /dev/null and b/target/classes/main/java/controlp5/Canvas.class differ
diff --git a/target/classes/main/java/controlp5/Chart$ChartViewArea.class b/target/classes/main/java/controlp5/Chart$ChartViewArea.class
new file mode 100644
index 0000000..4dadbde
Binary files /dev/null and b/target/classes/main/java/controlp5/Chart$ChartViewArea.class differ
diff --git a/target/classes/main/java/controlp5/Chart$ChartViewBar.class b/target/classes/main/java/controlp5/Chart$ChartViewBar.class
new file mode 100644
index 0000000..f6ab1db
Binary files /dev/null and b/target/classes/main/java/controlp5/Chart$ChartViewBar.class differ
diff --git a/target/classes/main/java/controlp5/Chart$ChartViewBarCentered.class b/target/classes/main/java/controlp5/Chart$ChartViewBarCentered.class
new file mode 100644
index 0000000..2bef70d
Binary files /dev/null and b/target/classes/main/java/controlp5/Chart$ChartViewBarCentered.class differ
diff --git a/target/classes/main/java/controlp5/Chart$ChartViewLine.class b/target/classes/main/java/controlp5/Chart$ChartViewLine.class
new file mode 100644
index 0000000..1ae7083
Binary files /dev/null and b/target/classes/main/java/controlp5/Chart$ChartViewLine.class differ
diff --git a/target/classes/main/java/controlp5/Chart$ChartViewPie.class b/target/classes/main/java/controlp5/Chart$ChartViewPie.class
new file mode 100644
index 0000000..699129d
Binary files /dev/null and b/target/classes/main/java/controlp5/Chart$ChartViewPie.class differ
diff --git a/target/classes/main/java/controlp5/Chart.class b/target/classes/main/java/controlp5/Chart.class
new file mode 100644
index 0000000..8d00049
Binary files /dev/null and b/target/classes/main/java/controlp5/Chart.class differ
diff --git a/target/classes/main/java/controlp5/ChartData.class b/target/classes/main/java/controlp5/ChartData.class
new file mode 100644
index 0000000..df5882c
Binary files /dev/null and b/target/classes/main/java/controlp5/ChartData.class differ
diff --git a/target/classes/main/java/controlp5/ChartDataSet.class b/target/classes/main/java/controlp5/ChartDataSet.class
new file mode 100644
index 0000000..5978d17
Binary files /dev/null and b/target/classes/main/java/controlp5/ChartDataSet.class differ
diff --git a/target/classes/main/java/controlp5/CheckBox.class b/target/classes/main/java/controlp5/CheckBox.class
new file mode 100644
index 0000000..9aa1cad
Binary files /dev/null and b/target/classes/main/java/controlp5/CheckBox.class differ
diff --git a/target/classes/main/java/controlp5/ColorPalette.class b/target/classes/main/java/controlp5/ColorPalette.class
new file mode 100644
index 0000000..d519113
Binary files /dev/null and b/target/classes/main/java/controlp5/ColorPalette.class differ
diff --git a/target/classes/main/java/controlp5/ColorPicker$1.class b/target/classes/main/java/controlp5/ColorPicker$1.class
new file mode 100644
index 0000000..58f6e29
Binary files /dev/null and b/target/classes/main/java/controlp5/ColorPicker$1.class differ
diff --git a/target/classes/main/java/controlp5/ColorPicker$ColorField.class b/target/classes/main/java/controlp5/ColorPicker$ColorField.class
new file mode 100644
index 0000000..4510eeb
Binary files /dev/null and b/target/classes/main/java/controlp5/ColorPicker$ColorField.class differ
diff --git a/target/classes/main/java/controlp5/ColorPicker.class b/target/classes/main/java/controlp5/ColorPicker.class
new file mode 100644
index 0000000..17382fc
Binary files /dev/null and b/target/classes/main/java/controlp5/ColorPicker.class differ
diff --git a/target/classes/main/java/controlp5/ColorWheel$1.class b/target/classes/main/java/controlp5/ColorWheel$1.class
new file mode 100644
index 0000000..a2a23ec
Binary files /dev/null and b/target/classes/main/java/controlp5/ColorWheel$1.class differ
diff --git a/target/classes/main/java/controlp5/ColorWheel$ColorWheelView.class b/target/classes/main/java/controlp5/ColorWheel$ColorWheelView.class
new file mode 100644
index 0000000..423e3ce
Binary files /dev/null and b/target/classes/main/java/controlp5/ColorWheel$ColorWheelView.class differ
diff --git a/target/classes/main/java/controlp5/ColorWheel.class b/target/classes/main/java/controlp5/ColorWheel.class
new file mode 100644
index 0000000..9fc8f15
Binary files /dev/null and b/target/classes/main/java/controlp5/ColorWheel.class differ
diff --git a/target/classes/main/java/controlp5/ControlBehavior.class b/target/classes/main/java/controlp5/ControlBehavior.class
new file mode 100644
index 0000000..dd4f85e
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlBehavior.class differ
diff --git a/target/classes/main/java/controlp5/ControlBroadcaster$EmptyController.class b/target/classes/main/java/controlp5/ControlBroadcaster$EmptyController.class
new file mode 100644
index 0000000..945881e
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlBroadcaster$EmptyController.class differ
diff --git a/target/classes/main/java/controlp5/ControlBroadcaster.class b/target/classes/main/java/controlp5/ControlBroadcaster.class
new file mode 100644
index 0000000..667026f
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlBroadcaster.class differ
diff --git a/target/classes/main/java/controlp5/ControlElement.class b/target/classes/main/java/controlp5/ControlElement.class
new file mode 100644
index 0000000..7811d25
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlElement.class differ
diff --git a/target/classes/main/java/controlp5/ControlEvent.class b/target/classes/main/java/controlp5/ControlEvent.class
new file mode 100644
index 0000000..5c7fd3e
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlEvent.class differ
diff --git a/target/classes/main/java/controlp5/ControlFont.class b/target/classes/main/java/controlp5/ControlFont.class
new file mode 100644
index 0000000..7a1a277
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlFont.class differ
diff --git a/target/classes/main/java/controlp5/ControlGroup.class b/target/classes/main/java/controlp5/ControlGroup.class
new file mode 100644
index 0000000..b70bfb2
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlGroup.class differ
diff --git a/target/classes/main/java/controlp5/ControlKey.class b/target/classes/main/java/controlp5/ControlKey.class
new file mode 100644
index 0000000..0469aad
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlKey.class differ
diff --git a/target/classes/main/java/controlp5/ControlListener.class b/target/classes/main/java/controlp5/ControlListener.class
new file mode 100644
index 0000000..5f9e88e
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlListener.class differ
diff --git a/target/classes/main/java/controlp5/ControlP5$1.class b/target/classes/main/java/controlp5/ControlP5$1.class
new file mode 100644
index 0000000..22a21ce
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlP5$1.class differ
diff --git a/target/classes/main/java/controlp5/ControlP5$2.class b/target/classes/main/java/controlp5/ControlP5$2.class
new file mode 100644
index 0000000..bccbc43
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlP5$2.class differ
diff --git a/target/classes/main/java/controlp5/ControlP5$3.class b/target/classes/main/java/controlp5/ControlP5$3.class
new file mode 100644
index 0000000..cdaea00
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlP5$3.class differ
diff --git a/target/classes/main/java/controlp5/ControlP5$4.class b/target/classes/main/java/controlp5/ControlP5$4.class
new file mode 100644
index 0000000..0a74a74
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlP5$4.class differ
diff --git a/target/classes/main/java/controlp5/ControlP5$Invisible.class b/target/classes/main/java/controlp5/ControlP5$Invisible.class
new file mode 100644
index 0000000..721f630
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlP5$Invisible.class differ
diff --git a/target/classes/main/java/controlp5/ControlP5$Layout.class b/target/classes/main/java/controlp5/ControlP5$Layout.class
new file mode 100644
index 0000000..ea84cc2
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlP5$Layout.class differ
diff --git a/target/classes/main/java/controlp5/ControlP5.class b/target/classes/main/java/controlp5/ControlP5.class
new file mode 100644
index 0000000..56692d1
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlP5.class differ
diff --git a/target/classes/main/java/controlp5/ControlP5Base$KeyCode.class b/target/classes/main/java/controlp5/ControlP5Base$KeyCode.class
new file mode 100644
index 0000000..a884bf6
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlP5Base$KeyCode.class differ
diff --git a/target/classes/main/java/controlp5/ControlP5Base.class b/target/classes/main/java/controlp5/ControlP5Base.class
new file mode 100644
index 0000000..447f0cc
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlP5Base.class differ
diff --git a/target/classes/main/java/controlp5/ControlP5Constants.class b/target/classes/main/java/controlp5/ControlP5Constants.class
new file mode 100644
index 0000000..24a19ea
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlP5Constants.class differ
diff --git a/target/classes/main/java/controlp5/ControlP5Legacy.class b/target/classes/main/java/controlp5/ControlP5Legacy.class
new file mode 100644
index 0000000..ee228f2
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlP5Legacy.class differ
diff --git a/target/classes/main/java/controlp5/ControlTimer.class b/target/classes/main/java/controlp5/ControlTimer.class
new file mode 100644
index 0000000..9383af0
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlTimer.class differ
diff --git a/target/classes/main/java/controlp5/ControlWindow$Pointer.class b/target/classes/main/java/controlp5/ControlWindow$Pointer.class
new file mode 100644
index 0000000..9db8e1a
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlWindow$Pointer.class differ
diff --git a/target/classes/main/java/controlp5/ControlWindow.class b/target/classes/main/java/controlp5/ControlWindow.class
new file mode 100644
index 0000000..224bb58
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlWindow.class differ
diff --git a/target/classes/main/java/controlp5/ControlWindowCanvas.class b/target/classes/main/java/controlp5/ControlWindowCanvas.class
new file mode 100644
index 0000000..e5022a8
Binary files /dev/null and b/target/classes/main/java/controlp5/ControlWindowCanvas.class differ
diff --git a/target/classes/main/java/controlp5/Controller$1.class b/target/classes/main/java/controlp5/Controller$1.class
new file mode 100644
index 0000000..023dbdd
Binary files /dev/null and b/target/classes/main/java/controlp5/Controller$1.class differ
diff --git a/target/classes/main/java/controlp5/Controller$DebugView.class b/target/classes/main/java/controlp5/Controller$DebugView.class
new file mode 100644
index 0000000..4ef2739
Binary files /dev/null and b/target/classes/main/java/controlp5/Controller$DebugView.class differ
diff --git a/target/classes/main/java/controlp5/Controller.class b/target/classes/main/java/controlp5/Controller.class
new file mode 100644
index 0000000..7ecd8c3
Binary files /dev/null and b/target/classes/main/java/controlp5/Controller.class differ
diff --git a/target/classes/main/java/controlp5/ControllerAutomator$1.class b/target/classes/main/java/controlp5/ControllerAutomator$1.class
new file mode 100644
index 0000000..d47b460
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerAutomator$1.class differ
diff --git a/target/classes/main/java/controlp5/ControllerAutomator.class b/target/classes/main/java/controlp5/ControllerAutomator.class
new file mode 100644
index 0000000..5d2acb4
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerAutomator.class differ
diff --git a/target/classes/main/java/controlp5/ControllerDisplay.class b/target/classes/main/java/controlp5/ControllerDisplay.class
new file mode 100644
index 0000000..81b6ae6
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerDisplay.class differ
diff --git a/target/classes/main/java/controlp5/ControllerGroup.class b/target/classes/main/java/controlp5/ControllerGroup.class
new file mode 100644
index 0000000..d6a36ef
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerGroup.class differ
diff --git a/target/classes/main/java/controlp5/ControllerInterface.class b/target/classes/main/java/controlp5/ControllerInterface.class
new file mode 100644
index 0000000..fae58ec
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerInterface.class differ
diff --git a/target/classes/main/java/controlp5/ControllerLayout.class b/target/classes/main/java/controlp5/ControllerLayout.class
new file mode 100644
index 0000000..1e975c1
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerLayout.class differ
diff --git a/target/classes/main/java/controlp5/ControllerLayoutElement.class b/target/classes/main/java/controlp5/ControllerLayoutElement.class
new file mode 100644
index 0000000..1abb26f
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerLayoutElement.class differ
diff --git a/target/classes/main/java/controlp5/ControllerList.class b/target/classes/main/java/controlp5/ControllerList.class
new file mode 100644
index 0000000..55ce986
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerList.class differ
diff --git a/target/classes/main/java/controlp5/ControllerPlug.class b/target/classes/main/java/controlp5/ControllerPlug.class
new file mode 100644
index 0000000..2676d58
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerPlug.class differ
diff --git a/target/classes/main/java/controlp5/ControllerProperties$JSONFormat.class b/target/classes/main/java/controlp5/ControllerProperties$JSONFormat.class
new file mode 100644
index 0000000..59cd079
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerProperties$JSONFormat.class differ
diff --git a/target/classes/main/java/controlp5/ControllerProperties$JSONReader.class b/target/classes/main/java/controlp5/ControllerProperties$JSONReader.class
new file mode 100644
index 0000000..78ca9a1
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerProperties$JSONReader.class differ
diff --git a/target/classes/main/java/controlp5/ControllerProperties$PropertiesStorageFormat.class b/target/classes/main/java/controlp5/ControllerProperties$PropertiesStorageFormat.class
new file mode 100644
index 0000000..54ba4a9
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerProperties$PropertiesStorageFormat.class differ
diff --git a/target/classes/main/java/controlp5/ControllerProperties$SerializedFormat.class b/target/classes/main/java/controlp5/ControllerProperties$SerializedFormat.class
new file mode 100644
index 0000000..03e3c4e
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerProperties$SerializedFormat.class differ
diff --git a/target/classes/main/java/controlp5/ControllerProperties$XMLFormat.class b/target/classes/main/java/controlp5/ControllerProperties$XMLFormat.class
new file mode 100644
index 0000000..9d241d3
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerProperties$XMLFormat.class differ
diff --git a/target/classes/main/java/controlp5/ControllerProperties.class b/target/classes/main/java/controlp5/ControllerProperties.class
new file mode 100644
index 0000000..f0d8553
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerProperties.class differ
diff --git a/target/classes/main/java/controlp5/ControllerProperty.class b/target/classes/main/java/controlp5/ControllerProperty.class
new file mode 100644
index 0000000..53a5c17
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerProperty.class differ
diff --git a/target/classes/main/java/controlp5/ControllerStyle.class b/target/classes/main/java/controlp5/ControllerStyle.class
new file mode 100644
index 0000000..16b91f4
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerStyle.class differ
diff --git a/target/classes/main/java/controlp5/ControllerView.class b/target/classes/main/java/controlp5/ControllerView.class
new file mode 100644
index 0000000..d4d1ce1
Binary files /dev/null and b/target/classes/main/java/controlp5/ControllerView.class differ
diff --git a/target/classes/main/java/controlp5/DropdownList$1.class b/target/classes/main/java/controlp5/DropdownList$1.class
new file mode 100644
index 0000000..598d173
Binary files /dev/null and b/target/classes/main/java/controlp5/DropdownList$1.class differ
diff --git a/target/classes/main/java/controlp5/DropdownList$DropdownListView.class b/target/classes/main/java/controlp5/DropdownList$DropdownListView.class
new file mode 100644
index 0000000..e4368ed
Binary files /dev/null and b/target/classes/main/java/controlp5/DropdownList$DropdownListView.class differ
diff --git a/target/classes/main/java/controlp5/DropdownList.class b/target/classes/main/java/controlp5/DropdownList.class
new file mode 100644
index 0000000..4b15c6f
Binary files /dev/null and b/target/classes/main/java/controlp5/DropdownList.class differ
diff --git a/target/classes/main/java/controlp5/FieldChangedListener$1.class b/target/classes/main/java/controlp5/FieldChangedListener$1.class
new file mode 100644
index 0000000..aaf9ee1
Binary files /dev/null and b/target/classes/main/java/controlp5/FieldChangedListener$1.class differ
diff --git a/target/classes/main/java/controlp5/FieldChangedListener$2.class b/target/classes/main/java/controlp5/FieldChangedListener$2.class
new file mode 100644
index 0000000..99bc67e
Binary files /dev/null and b/target/classes/main/java/controlp5/FieldChangedListener$2.class differ
diff --git a/target/classes/main/java/controlp5/FieldChangedListener$3.class b/target/classes/main/java/controlp5/FieldChangedListener$3.class
new file mode 100644
index 0000000..48c5503
Binary files /dev/null and b/target/classes/main/java/controlp5/FieldChangedListener$3.class differ
diff --git a/target/classes/main/java/controlp5/FieldChangedListener$4.class b/target/classes/main/java/controlp5/FieldChangedListener$4.class
new file mode 100644
index 0000000..90365ea
Binary files /dev/null and b/target/classes/main/java/controlp5/FieldChangedListener$4.class differ
diff --git a/target/classes/main/java/controlp5/FieldChangedListener.class b/target/classes/main/java/controlp5/FieldChangedListener.class
new file mode 100644
index 0000000..a7734e3
Binary files /dev/null and b/target/classes/main/java/controlp5/FieldChangedListener.class differ
diff --git a/target/classes/main/java/controlp5/FieldValue.class b/target/classes/main/java/controlp5/FieldValue.class
new file mode 100644
index 0000000..ceff382
Binary files /dev/null and b/target/classes/main/java/controlp5/FieldValue.class differ
diff --git a/target/classes/main/java/controlp5/FrameRate.class b/target/classes/main/java/controlp5/FrameRate.class
new file mode 100644
index 0000000..8d415c2
Binary files /dev/null and b/target/classes/main/java/controlp5/FrameRate.class differ
diff --git a/target/classes/main/java/controlp5/Group.class b/target/classes/main/java/controlp5/Group.class
new file mode 100644
index 0000000..42d2f2a
Binary files /dev/null and b/target/classes/main/java/controlp5/Group.class differ
diff --git a/target/classes/main/java/controlp5/Icon$1.class b/target/classes/main/java/controlp5/Icon$1.class
new file mode 100644
index 0000000..bed678a
Binary files /dev/null and b/target/classes/main/java/controlp5/Icon$1.class differ
diff --git a/target/classes/main/java/controlp5/Icon$IconImageView.class b/target/classes/main/java/controlp5/Icon$IconImageView.class
new file mode 100644
index 0000000..8b94ddf
Binary files /dev/null and b/target/classes/main/java/controlp5/Icon$IconImageView.class differ
diff --git a/target/classes/main/java/controlp5/Icon$IconView.class b/target/classes/main/java/controlp5/Icon$IconView.class
new file mode 100644
index 0000000..003ba25
Binary files /dev/null and b/target/classes/main/java/controlp5/Icon$IconView.class differ
diff --git a/target/classes/main/java/controlp5/Icon.class b/target/classes/main/java/controlp5/Icon.class
new file mode 100644
index 0000000..da32ed9
Binary files /dev/null and b/target/classes/main/java/controlp5/Icon.class differ
diff --git a/target/classes/main/java/controlp5/Knob$KnobView.class b/target/classes/main/java/controlp5/Knob$KnobView.class
new file mode 100644
index 0000000..b2d350d
Binary files /dev/null and b/target/classes/main/java/controlp5/Knob$KnobView.class differ
diff --git a/target/classes/main/java/controlp5/Knob.class b/target/classes/main/java/controlp5/Knob.class
new file mode 100644
index 0000000..66253f5
Binary files /dev/null and b/target/classes/main/java/controlp5/Knob.class differ
diff --git a/target/classes/main/java/controlp5/Label$Labeltype.class b/target/classes/main/java/controlp5/Label$Labeltype.class
new file mode 100644
index 0000000..471921d
Binary files /dev/null and b/target/classes/main/java/controlp5/Label$Labeltype.class differ
diff --git a/target/classes/main/java/controlp5/Label$MultilineLabel.class b/target/classes/main/java/controlp5/Label$MultilineLabel.class
new file mode 100644
index 0000000..aa20bc0
Binary files /dev/null and b/target/classes/main/java/controlp5/Label$MultilineLabel.class differ
diff --git a/target/classes/main/java/controlp5/Label$SinglelineLabel.class b/target/classes/main/java/controlp5/Label$SinglelineLabel.class
new file mode 100644
index 0000000..4f5644b
Binary files /dev/null and b/target/classes/main/java/controlp5/Label$SinglelineLabel.class differ
diff --git a/target/classes/main/java/controlp5/Label$SinglelineTextfield.class b/target/classes/main/java/controlp5/Label$SinglelineTextfield.class
new file mode 100644
index 0000000..1f6be70
Binary files /dev/null and b/target/classes/main/java/controlp5/Label$SinglelineTextfield.class differ
diff --git a/target/classes/main/java/controlp5/Label.class b/target/classes/main/java/controlp5/Label.class
new file mode 100644
index 0000000..6a67b3a
Binary files /dev/null and b/target/classes/main/java/controlp5/Label.class differ
diff --git a/target/classes/main/java/controlp5/ListBox$1.class b/target/classes/main/java/controlp5/ListBox$1.class
new file mode 100644
index 0000000..663fa05
Binary files /dev/null and b/target/classes/main/java/controlp5/ListBox$1.class differ
diff --git a/target/classes/main/java/controlp5/ListBox$ListBoxView.class b/target/classes/main/java/controlp5/ListBox$ListBoxView.class
new file mode 100644
index 0000000..10e62ca
Binary files /dev/null and b/target/classes/main/java/controlp5/ListBox$ListBoxView.class differ
diff --git a/target/classes/main/java/controlp5/ListBox.class b/target/classes/main/java/controlp5/ListBox.class
new file mode 100644
index 0000000..520002b
Binary files /dev/null and b/target/classes/main/java/controlp5/ListBox.class differ
diff --git a/target/classes/main/java/controlp5/Matrix$1.class b/target/classes/main/java/controlp5/Matrix$1.class
new file mode 100644
index 0000000..a0c982a
Binary files /dev/null and b/target/classes/main/java/controlp5/Matrix$1.class differ
diff --git a/target/classes/main/java/controlp5/Matrix$MatrixView.class b/target/classes/main/java/controlp5/Matrix$MatrixView.class
new file mode 100644
index 0000000..96c059c
Binary files /dev/null and b/target/classes/main/java/controlp5/Matrix$MatrixView.class differ
diff --git a/target/classes/main/java/controlp5/Matrix.class b/target/classes/main/java/controlp5/Matrix.class
new file mode 100644
index 0000000..9d3c933
Binary files /dev/null and b/target/classes/main/java/controlp5/Matrix.class differ
diff --git a/target/classes/main/java/controlp5/MultiList.class b/target/classes/main/java/controlp5/MultiList.class
new file mode 100644
index 0000000..60be1f2
Binary files /dev/null and b/target/classes/main/java/controlp5/MultiList.class differ
diff --git a/target/classes/main/java/controlp5/MultiListButton.class b/target/classes/main/java/controlp5/MultiListButton.class
new file mode 100644
index 0000000..3fe1566
Binary files /dev/null and b/target/classes/main/java/controlp5/MultiListButton.class differ
diff --git a/target/classes/main/java/controlp5/MultiListInterface.class b/target/classes/main/java/controlp5/MultiListInterface.class
new file mode 100644
index 0000000..153f83c
Binary files /dev/null and b/target/classes/main/java/controlp5/MultiListInterface.class differ
diff --git a/target/classes/main/java/controlp5/MultilineTextfield.class b/target/classes/main/java/controlp5/MultilineTextfield.class
new file mode 100644
index 0000000..9257e2f
Binary files /dev/null and b/target/classes/main/java/controlp5/MultilineTextfield.class differ
diff --git a/target/classes/main/java/controlp5/Numberbox$NumberboxView.class b/target/classes/main/java/controlp5/Numberbox$NumberboxView.class
new file mode 100644
index 0000000..87c07a9
Binary files /dev/null and b/target/classes/main/java/controlp5/Numberbox$NumberboxView.class differ
diff --git a/target/classes/main/java/controlp5/Numberbox.class b/target/classes/main/java/controlp5/Numberbox.class
new file mode 100644
index 0000000..1418921
Binary files /dev/null and b/target/classes/main/java/controlp5/Numberbox.class differ
diff --git a/target/classes/main/java/controlp5/Pad.class b/target/classes/main/java/controlp5/Pad.class
new file mode 100644
index 0000000..ef9c509
Binary files /dev/null and b/target/classes/main/java/controlp5/Pad.class differ
diff --git a/target/classes/main/java/controlp5/Pointer.class b/target/classes/main/java/controlp5/Pointer.class
new file mode 100644
index 0000000..e470305
Binary files /dev/null and b/target/classes/main/java/controlp5/Pointer.class differ
diff --git a/target/classes/main/java/controlp5/Println$1.class b/target/classes/main/java/controlp5/Println$1.class
new file mode 100644
index 0000000..f57dc0d
Binary files /dev/null and b/target/classes/main/java/controlp5/Println$1.class differ
diff --git a/target/classes/main/java/controlp5/Println.class b/target/classes/main/java/controlp5/Println.class
new file mode 100644
index 0000000..4b9b4e3
Binary files /dev/null and b/target/classes/main/java/controlp5/Println.class differ
diff --git a/target/classes/main/java/controlp5/Radio.class b/target/classes/main/java/controlp5/Radio.class
new file mode 100644
index 0000000..955c915
Binary files /dev/null and b/target/classes/main/java/controlp5/Radio.class differ
diff --git a/target/classes/main/java/controlp5/RadioButton.class b/target/classes/main/java/controlp5/RadioButton.class
new file mode 100644
index 0000000..8e09492
Binary files /dev/null and b/target/classes/main/java/controlp5/RadioButton.class differ
diff --git a/target/classes/main/java/controlp5/Range$RangeImageView.class b/target/classes/main/java/controlp5/Range$RangeImageView.class
new file mode 100644
index 0000000..8e471eb
Binary files /dev/null and b/target/classes/main/java/controlp5/Range$RangeImageView.class differ
diff --git a/target/classes/main/java/controlp5/Range$RangeSpriteView.class b/target/classes/main/java/controlp5/Range$RangeSpriteView.class
new file mode 100644
index 0000000..988ff63
Binary files /dev/null and b/target/classes/main/java/controlp5/Range$RangeSpriteView.class differ
diff --git a/target/classes/main/java/controlp5/Range$RangeView.class b/target/classes/main/java/controlp5/Range$RangeView.class
new file mode 100644
index 0000000..28dd1e0
Binary files /dev/null and b/target/classes/main/java/controlp5/Range$RangeView.class differ
diff --git a/target/classes/main/java/controlp5/Range.class b/target/classes/main/java/controlp5/Range.class
new file mode 100644
index 0000000..dce170d
Binary files /dev/null and b/target/classes/main/java/controlp5/Range.class differ
diff --git a/target/classes/main/java/controlp5/ScrollableList$1.class b/target/classes/main/java/controlp5/ScrollableList$1.class
new file mode 100644
index 0000000..a2dac7b
Binary files /dev/null and b/target/classes/main/java/controlp5/ScrollableList$1.class differ
diff --git a/target/classes/main/java/controlp5/ScrollableList$ScrollableListView.class b/target/classes/main/java/controlp5/ScrollableList$ScrollableListView.class
new file mode 100644
index 0000000..640ec84
Binary files /dev/null and b/target/classes/main/java/controlp5/ScrollableList$ScrollableListView.class differ
diff --git a/target/classes/main/java/controlp5/ScrollableList.class b/target/classes/main/java/controlp5/ScrollableList.class
new file mode 100644
index 0000000..71f6157
Binary files /dev/null and b/target/classes/main/java/controlp5/ScrollableList.class differ
diff --git a/target/classes/main/java/controlp5/Slider$1.class b/target/classes/main/java/controlp5/Slider$1.class
new file mode 100644
index 0000000..b30d998
Binary files /dev/null and b/target/classes/main/java/controlp5/Slider$1.class differ
diff --git a/target/classes/main/java/controlp5/Slider$SliderView.class b/target/classes/main/java/controlp5/Slider$SliderView.class
new file mode 100644
index 0000000..62c35c0
Binary files /dev/null and b/target/classes/main/java/controlp5/Slider$SliderView.class differ
diff --git a/target/classes/main/java/controlp5/Slider$SliderViewH.class b/target/classes/main/java/controlp5/Slider$SliderViewH.class
new file mode 100644
index 0000000..34a605b
Binary files /dev/null and b/target/classes/main/java/controlp5/Slider$SliderViewH.class differ
diff --git a/target/classes/main/java/controlp5/Slider$SliderViewV.class b/target/classes/main/java/controlp5/Slider$SliderViewV.class
new file mode 100644
index 0000000..2082fcc
Binary files /dev/null and b/target/classes/main/java/controlp5/Slider$SliderViewV.class differ
diff --git a/target/classes/main/java/controlp5/Slider.class b/target/classes/main/java/controlp5/Slider.class
new file mode 100644
index 0000000..75c9c7c
Binary files /dev/null and b/target/classes/main/java/controlp5/Slider.class differ
diff --git a/target/classes/main/java/controlp5/Slider2D$Slider2DView.class b/target/classes/main/java/controlp5/Slider2D$Slider2DView.class
new file mode 100644
index 0000000..63582c5
Binary files /dev/null and b/target/classes/main/java/controlp5/Slider2D$Slider2DView.class differ
diff --git a/target/classes/main/java/controlp5/Slider2D.class b/target/classes/main/java/controlp5/Slider2D.class
new file mode 100644
index 0000000..0f55d7b
Binary files /dev/null and b/target/classes/main/java/controlp5/Slider2D.class differ
diff --git a/target/classes/main/java/controlp5/Spacer$1.class b/target/classes/main/java/controlp5/Spacer$1.class
new file mode 100644
index 0000000..ef86dbc
Binary files /dev/null and b/target/classes/main/java/controlp5/Spacer$1.class differ
diff --git a/target/classes/main/java/controlp5/Spacer$SpacerView.class b/target/classes/main/java/controlp5/Spacer$SpacerView.class
new file mode 100644
index 0000000..e2ba1c6
Binary files /dev/null and b/target/classes/main/java/controlp5/Spacer$SpacerView.class differ
diff --git a/target/classes/main/java/controlp5/Spacer.class b/target/classes/main/java/controlp5/Spacer.class
new file mode 100644
index 0000000..28e46ad
Binary files /dev/null and b/target/classes/main/java/controlp5/Spacer.class differ
diff --git a/target/classes/main/java/controlp5/TODO b/target/classes/main/java/controlp5/TODO
new file mode 100755
index 0000000..af03f11
--- /dev/null
+++ b/target/classes/main/java/controlp5/TODO
@@ -0,0 +1,92 @@
+2014-09-08 Andreas Schlegel
+ * add glyphicons reference to controlp5.Icon.java http://glyphicons.com
+ * add useiconic to controlp5.Icon.java https://useiconic.com/open
+
+2014-05-29 Andreas Schlegel
+ * distinguish between left,center, right mouse click events http://forum.processing.org/two/discussion/5422/controlp5-mousepressed-only-if-mousebutton-left-
+
+2014-04-22 Andreas Schlegel
+ * javascript version on hold; it is unclear which project processing.js or p5.js will become the default js framework for processing
+
+2013-09-09 Andreas Schlegel
+ * javascript version
+ * textinput on android
+ * color picker used for clicks-and-strokes
+ * rendering into pgraphics
+ * add colorwheel
+ * add ControlFrame with customizable render access
+ * spacer / separator
+
+2011-03-24 Andreas Schlegel
+ * finish info to toString conversion
+ * implement plugTo for ControllerGroups
+ * BitFontRenderer addBitFont is broken, see the ControlP5bitFont example,
+ the font is cut off at the bottom, probably something wrong with
+ the label's PImage height.
+
+2010-08-07 Andreas Schlegel
+ * fix ControlWindowCanvas.pre(), doesnt work anymore.
+
+2010-07-25 Andreas Schlegel
+ * Android support, current version conflicts with android java (ControlWindow, PAppletWindow, using Toolkit when loading bit-font, KeyEvents, etc.)
+ * CColor: alpha handling
+ * Chart: finish. a chart graph controller to display line, bar, pie and histogram charts.
+
+2010-04-02 Andreas Schlegel
+ * BitFontRenderer: \n is recognized as a not-supported-character. fix!
+ * general: processingjs port
+ * Knob: implement new version of knob
+ * Textfield: implement new version of textfield
+ * TextArea: implement new version of TextArea
+ * Label: implement modifications so that text rendering for P3D works properly
+ * picking: use an image and color-coding for picking controllers instead mouse-coordinates against rectangular boxes.
+
+
+
+* fileChooser conflicts with mouse event.
+http://processing.org/discourse/yabb2/YaBB.pl?num=1247162607/0#0
+
+
+* alt-tab causes problems with dragging functionality.
+http://processing.org/discourse/yabb2/YaBB.pl?num=1242718131/0#0
+
+* Multilist, pop out to the left.
+* ScrollList, slider on the left option.
+* ScrollList: collapse/and hide. add option to hide the scroll-list area but only keep the scrollbar.
+* add CheckBoxList
+* tab issues as addressed in this post:
+http://processing.org/discourse/yabb_beta/YaBB.cgi?board=LibraryProblems;action=display;num=1237538493;start=2#2
+ - moveTo does not work for only a String which would stanbd for the name of a tab
+ - controlP5.window(this).activateTab("myTab");
+ controlP5.tab("myTab").mousePressed();
+* ControlGroup, set Width of bar. the + - toggle is not updated visually.
+* Text -Field, -Label, -Area: customize font
+* textarea: when changing the font of the valueLabel, the scrollbar is not updated / does not show even it is required. current hack is: myTextarea.setHeight(myTextarea.valueLabel().height());
+* textarea: automatically updating the scrollbar whensetting text with setText() see email from martin froehlich 16.january 2009
+* save and load does not work for some controllers.
+* loading and saving
+* multilist, range, matrix dont load from xml file.
+* colorstyle does not save and load.
+* labels dont save properly, background color is not saved.
+* matrix needs to be redone. develop whole new concept for matrix / synthesizer.
+* multitouch support
+* controlWindow: add feedback when closing window. see email from henri 5 january 2009
+* controllerStyle: see email from johnny rodgers 30 november 2008
+* range: see email from hartmut bohnacker 27 november 2008
+* textfield: see email from henri 14 october 2008
+* save and open file dialog: see email from henri 12 october 2008
+* ControlBroadcaster suggestions: see email from aaron mayers 2 october 2008
+* pushmatrix / popMatrix : see email from florian 6 june 2008
+Lib.pre() { /*other code */ pushMatrix(); }
+PApplet.draw() { ... }
+Lib.draw() { popMatrix(); /* the lib code, untransformed */ }
+
+
+
+DONE
+* (done) add setArrayValue to Controller class.
+* (done, implemented with TickMark) Slider: snap
+* (done) add id() method to ControlEvent
+* (done, fixed) fix save/load. saving twice and loading again results in empty.
+* (done) add setTitle to ControlWindow http://processing.org/discourse/yabb2/YaBB.pl?num=1245762312/0#0
+* (done, now ListBox) redo ScrollList so that it becomes a controller? change the button management of a scrollList.
diff --git a/target/classes/main/java/controlp5/Tab.class b/target/classes/main/java/controlp5/Tab.class
new file mode 100644
index 0000000..fba2a81
Binary files /dev/null and b/target/classes/main/java/controlp5/Tab.class differ
diff --git a/target/classes/main/java/controlp5/Textarea.class b/target/classes/main/java/controlp5/Textarea.class
new file mode 100644
index 0000000..62b6b50
Binary files /dev/null and b/target/classes/main/java/controlp5/Textarea.class differ
diff --git a/target/classes/main/java/controlp5/Textfield$DeleteCharacter.class b/target/classes/main/java/controlp5/Textfield$DeleteCharacter.class
new file mode 100644
index 0000000..2ce97f0
Binary files /dev/null and b/target/classes/main/java/controlp5/Textfield$DeleteCharacter.class differ
diff --git a/target/classes/main/java/controlp5/Textfield$Enter.class b/target/classes/main/java/controlp5/Textfield$Enter.class
new file mode 100644
index 0000000..a7c34a5
Binary files /dev/null and b/target/classes/main/java/controlp5/Textfield$Enter.class differ
diff --git a/target/classes/main/java/controlp5/Textfield$InputFilter.class b/target/classes/main/java/controlp5/Textfield$InputFilter.class
new file mode 100644
index 0000000..f49177b
Binary files /dev/null and b/target/classes/main/java/controlp5/Textfield$InputFilter.class differ
diff --git a/target/classes/main/java/controlp5/Textfield$InsertCharacter.class b/target/classes/main/java/controlp5/Textfield$InsertCharacter.class
new file mode 100644
index 0000000..115e1f3
Binary files /dev/null and b/target/classes/main/java/controlp5/Textfield$InsertCharacter.class differ
diff --git a/target/classes/main/java/controlp5/Textfield$MoveDown.class b/target/classes/main/java/controlp5/Textfield$MoveDown.class
new file mode 100644
index 0000000..c0acb65
Binary files /dev/null and b/target/classes/main/java/controlp5/Textfield$MoveDown.class differ
diff --git a/target/classes/main/java/controlp5/Textfield$MoveLeft.class b/target/classes/main/java/controlp5/Textfield$MoveLeft.class
new file mode 100644
index 0000000..d486e43
Binary files /dev/null and b/target/classes/main/java/controlp5/Textfield$MoveLeft.class differ
diff --git a/target/classes/main/java/controlp5/Textfield$MoveRight.class b/target/classes/main/java/controlp5/Textfield$MoveRight.class
new file mode 100644
index 0000000..2c7f8ce
Binary files /dev/null and b/target/classes/main/java/controlp5/Textfield$MoveRight.class differ
diff --git a/target/classes/main/java/controlp5/Textfield$MoveUp.class b/target/classes/main/java/controlp5/Textfield$MoveUp.class
new file mode 100644
index 0000000..7949665
Binary files /dev/null and b/target/classes/main/java/controlp5/Textfield$MoveUp.class differ
diff --git a/target/classes/main/java/controlp5/Textfield.class b/target/classes/main/java/controlp5/Textfield.class
new file mode 100644
index 0000000..edd22b9
Binary files /dev/null and b/target/classes/main/java/controlp5/Textfield.class differ
diff --git a/target/classes/main/java/controlp5/TextfieldCommand.class b/target/classes/main/java/controlp5/TextfieldCommand.class
new file mode 100644
index 0000000..f574e2c
Binary files /dev/null and b/target/classes/main/java/controlp5/TextfieldCommand.class differ
diff --git a/target/classes/main/java/controlp5/Textlabel.class b/target/classes/main/java/controlp5/Textlabel.class
new file mode 100644
index 0000000..fd1885d
Binary files /dev/null and b/target/classes/main/java/controlp5/Textlabel.class differ
diff --git a/target/classes/main/java/controlp5/TickMark.class b/target/classes/main/java/controlp5/TickMark.class
new file mode 100644
index 0000000..24196ac
Binary files /dev/null and b/target/classes/main/java/controlp5/TickMark.class differ
diff --git a/target/classes/main/java/controlp5/Toggle$ToggleImageView.class b/target/classes/main/java/controlp5/Toggle$ToggleImageView.class
new file mode 100644
index 0000000..8882c6f
Binary files /dev/null and b/target/classes/main/java/controlp5/Toggle$ToggleImageView.class differ
diff --git a/target/classes/main/java/controlp5/Toggle$ToggleSwitchView.class b/target/classes/main/java/controlp5/Toggle$ToggleSwitchView.class
new file mode 100644
index 0000000..9a240bd
Binary files /dev/null and b/target/classes/main/java/controlp5/Toggle$ToggleSwitchView.class differ
diff --git a/target/classes/main/java/controlp5/Toggle$ToggleView.class b/target/classes/main/java/controlp5/Toggle$ToggleView.class
new file mode 100644
index 0000000..e102d69
Binary files /dev/null and b/target/classes/main/java/controlp5/Toggle$ToggleView.class differ
diff --git a/target/classes/main/java/controlp5/Toggle.class b/target/classes/main/java/controlp5/Toggle.class
new file mode 100644
index 0000000..4802e81
Binary files /dev/null and b/target/classes/main/java/controlp5/Toggle.class differ
diff --git a/target/classes/main/java/controlp5/Tooltip$TooltipView.class b/target/classes/main/java/controlp5/Tooltip$TooltipView.class
new file mode 100644
index 0000000..5c31cf0
Binary files /dev/null and b/target/classes/main/java/controlp5/Tooltip$TooltipView.class differ
diff --git a/target/classes/main/java/controlp5/Tooltip.class b/target/classes/main/java/controlp5/Tooltip.class
new file mode 100644
index 0000000..a32f938
Binary files /dev/null and b/target/classes/main/java/controlp5/Tooltip.class differ
diff --git a/target/classes/main/java/controlp5/changeLog.txt b/target/classes/main/java/controlp5/changeLog.txt
new file mode 100755
index 0000000..6f52652
--- /dev/null
+++ b/target/classes/main/java/controlp5/changeLog.txt
@@ -0,0 +1,867 @@
+2016-14-04 Andreas Schlegel
+
+ mostly bug fixes, see github issues
+ removed all PVector references, variables, and functions using processing.core.PVector
+
+2015-08-02 Andreas Schlegel
+
+ changes see github change log
+
+2015-03-29 Andreas Schlegel
+
+ * src controlP5.ScrollabelList:
+ fixing ArrayOutOfBounds error as reported on github under issue 3 https://github.com/sojamo/controlp5/issues/3
+
+2014-09-08 Andreas Schlegel
+
+ * src main.java.controlp5.Icon:
+ adding Icon class, acts like a button; can be used with images and font-icons
+ from "Font Awesome".
+
+ * src main.java.controlp5.Button:
+ when theButton acts as a switch (setSwitch(true)), the corresponding
+ method inside a sketch should use type boolean as argument instead of float;
+ a java.lang.IllegalArgumentException will be thrown in case of a float argument
+
+
+2014-08-28 Andreas Schlegel
+
+ * src main.java.controlp5.Background:
+ adding Background class, a convenience class for grouping controllers with
+ the top bar disabled by default.
+
+
+2014-07-21 Andreas Schlegel
+
+ * src main.java.controlp5.Textfield:
+ making use of a graphics buffer now, simplifies cursor position calculation and
+ prevents from throwing an ArrayIndexOutOfBoundsException which could occasionally
+ happen with previous versions.
+
+
+2014-07-17 Andreas Schlegel
+ * version 2.2.1
+
+ * removing PVector dependencies
+
+ * removing all deprecated methods
+
+ * src main.java.controlp5.ListBox, main.java.controlp5.DropdownList:
+ Due to changes to and deprecation of DropdownList and ListBox, both share the same
+ source code as ScrollableList. Consequently some functionality got lost though this
+ should be marginal. In case of any issues occuring due to these changes, please
+ inform the author. In any case use ScrollableList instead of DropdownList and ListBox.
+ The major benefit of using a ScrollableList is that an item is now of type Map and
+ therefore is not limited (as it was the case before) to the implementation of a
+ ListBoxItem and hence is more flexible as data container.
+ Do note that ListBox, DropdownList and ScrollableList do extend Controller,
+ not ControllerGroup
+
+
+2014-04-27 Andreas Schlegel
+ * version 2.1.6
+
+ * preparing for next release.
+
+ * src main.java.controlp5.ListBox, main.java.controlp5.DropdownList:
+ deprecated, use ScrollableList instead.
+
+ * src main.java.controlp5.ControlP5Legacy:
+ repository of functions only kept for backwards compatibility but it is not encouraged
+ to use the anymore. Use ControlP5Base instead.
+
+ * src main.java.controlp5.Controller:
+ adding onEnter, onLeave, onDrag, onStartDrag, onEndDrag, onWheel, onMove, onClick,
+ onPress, onDoublePress, onRelease, onReleaseOutside, onChange to register callbacks
+ for specific events. This is not implemented for classes extending ControllerGroup.
+
+
+2013-01-23 Andreas Schlegel
+
+ * version 2.1.5
+
+ * src main.java.controlp5.ControllerProperties:
+ removing XML format. adding JSON format, JSON format will be the default format instead of the Java Serialization format.
+
+
+2012-09-22 Andreas Schlegel
+
+ * version 2.1.3
+
+ * src main.java.controlp5.ListBox:
+ now extends Controller instead of ControlGroup.
+
+
+2012-09-09 Andreas Schlegel
+
+ * version 2.1.0
+
+ * starting processingjs implementation.
+ - many controllers will be included:
+ completed: Bang, Button, CheckBox, ColorPalette, Group, Knob, Label, ListBox, DropdownList, Numberbox, RadioButton,
+ Range, Slider, Slider2D, Tab, Textfield, Toggle
+ under construction: Canvas, Chart, ColorPicker, ControllerView, FrameRate, Matrix, Textarea
+ pending: ButtonBar, Pointer, TickMark, Tooltip
+ some will be missed: MutiList, Textlabel
+ and more will be missed: CColor, ControlBehavior, ControllerProperties, ControllerStyle, ControlTimer, ControlWindow
+ - the BitFont from the Java version will not be ported over to js and the default fontsize will be set to 10
+ - The automatic binding of functions and variables with the js version did not work as smooth as expected. Currently
+ only automatic function detection and binding is available. But then why not variables? See my request here:
+ https://processing-js.lighthouseapp.com/projects/41284/tickets/1972-feature-request-access-sketch-global-variables-from-library
+
+ * src main.java.controlp5.Slider2D:
+ changed size of cursor, changed color handling
+
+ * src main.java.controlp5.Button:
+ alignment of caption label changed to CENTER,CENTER
+
+ * adding PGraphics support instead of only rendering into PApplet directly
+
+ * fixing Annotation issue addressed here https://forum.processing.org/topic/controlp5-annotations-24-8-2012#25080000002597047
+
+
+
+2012-12-23 Andreas Schlegel
+
+ * version 2.0.4
+
+ * src main.java.controlp5.Textfield.java,main.java.controlp5.ListBox.java,
+ main.java.controlp5.DropdownList.java,main.java.controlp5.ControlWindow.java
+ main.java.controlp5.ControlP5Base.java:
+ adjusting to processing's KeyEvent final variable name changes
+ see issue 69 https://code.google.com/p/controlp5/issues/detail?id=69 (thanks jeff)
+
+ * src main.java.controlp5.Textfield.java:
+ reimplemented password mode (thanks jeff)
+
+
+
+2012-10-19 Andreas Schlegel
+
+ * version 2.0.3
+
+ * src main.java.controlp5.Controller.java:
+ Automatic (PApplet) field recognition for Slider, Knob, Numberbox, Toggle adjusted.
+
+
+2012-09-17 Andreas Schlegel
+
+ * version 2.0.2
+
+ * major changes to controlP5's font handling. the BitFontRenderer has been removed and the BitFont class
+ has been introduced. BitFont extends PFont and is the replacement for rendering controlP5's bitfont as
+ a pfont. this makes font handling way more easier and stable. if this has caused any font rendering
+ flaws, let me know.
+
+ * src controlP5.BitFontRenderer.java:
+ removed
+
+ * src main.java.controlp5.BitFont.java:
+ added, see above.
+
+
+
+2012-09-07 Andreas Schlegel
+
+ * version 2.0.1
+
+ * processing 2.0, time to make some changes, major revision in progress.
+ The goal should be to make 2.0+ desktop and android compatible, for that java.awt dependencies
+ will be removed.
+ starting to remove deprecated methods, fields and classes
+
+ * removing all java.awt dependencies.
+ with each ControlP5 instance there will only be 1 ControlWindow since separate windows/frames have
+ been removed due to their java.awt dependency. There will be an example of how to make your own
+ separate Frame when in desktop mode.
+
+ * versions starting with 2.0.1 will not be backwards compatible with 1.5.1 and earlier
+ from this version onwards Android is supported
+
+
+ * src main.java.controlp5.Println.java:
+ new class added
+ a console logger that captures the System.out stream and displays it using a Textarea
+
+
+ * src main.java.controlp5.FrameRate.java:
+ new class added
+ a Textlabel that displays the current or average framerate based on update interval
+
+
+ * src controlP5.BitFontRenderer.java:
+ using Base64 encoded bitfont source instead of loading gif textures
+
+
+ * src main.java.controlp5.Knob.java:
+ adding value label, ARC is default view now.
+
+
+ * src main.java.controlp5.Matrix.java:
+ adding play(), pause(), stop(), isPlaying(), trigger(int)
+
+
+ * src main.java.controlp5.Controller.java:
+ all ControllerSprite references (previously deprecated) have been removed
+
+
+ * src controlP5.ControllerSprite.java:
+ removed
+
+
+ * src controlP5.ControlP5IOHandler.java:
+ obsolete, removed, all static method transfered to main.java.controlp5.CP.java which will handle static method
+
+
+ * src controlP5.ControlWindowKeyListener.java:
+ obsolete, removed
+
+
+ * src controlP5.PAppletWindow.java:
+ obsolete, removed, currently there is no support for separate frames other than the main window due to removing java.awt dependencies
+
+
+ * src main.java.controlp5.ControlWindow.java:
+ removed mouseWheelMoved(MouseWheelEvent e) due to removal of java.awt dependencies
+ how to use an extra window, see example extra/ControlP5frame
+
+
+ * src controlP5.ControlWindowKeyHandler.java:
+ obsolete, removed, now handled by controlP5/ControlWindow.java
+
+
+ * src controlP5.CRect.java:
+ obsolete, removed, was only used by MultiList and MultiListButton - replaced with int array.
+
+
+ * src controlP5.ControlCanvas.java:
+ obsolete, removed, use main.java.controlp5.Canvas.java instead.
+
+
+2012-09-07 Andreas Schlegel
+
+ * version 1.5.1
+
+ * This version will be the last version that is stable and fully compatible with processing 1.5.1
+ due to major changes in the processing 2.0 version, future releases of controlp5 will only be
+ compatible with the processing 2.0 and higher versions.
+ The next controlp5 release will continue with version 2.0.1
+
+
+
+2012-08-25 Andreas Schlegel
+
+ * version 0.7.6
+
+ * src main.java.controlp5.Textfield.java:
+ fixing special character issue with e.g. �,�,�,�, etc.
+ backspace, left arrow, right arrow now respond when pressed longer
+ added isFocus()
+ implemented issue 56 http://code.google.com/p/controlp5/issues/detail?id=56 , thanks jeff
+
+ * src main.java.controlp5.ControllerAutomator.java:
+ fixed annotation mapping for methods
+ added list support for methods
+
+ * src main.java.controlp5.CColor.java:
+ removing alpha masking
+
+ * src main.java.controlp5.MultiList.java:
+ Conflict with moving a Multilist from one to another tab
+ removed field _myChildren. MultiListButtons are now store in the Controller's sublements filed.
+
+ * src main.java.controlp5.ControllerInterface.java:
+ adding getArrayValue(int), setArrayValue(int, float), setArrayValue(float[]);
+
+ * src main.java.controlp5.ControlP5.java:
+ adding setBroadcast(boolean) to disable/enable broadcasting of value changes.
+
+
+
+2012-05-30 Andreas Schlegel
+
+ * version 0.7.5
+
+ * src main.java.controlp5.Controller.java:
+ adding empty methods onPress(), onClick(), onRelease(), onReleaseOutside(),
+ onScroll(int),onMove(),onDrag() for input access when extending a controller.
+
+ * adding convenience constructor to Controllers, convenient when extending a Controller.
+
+ * adding example use/ControlP5extendController
+
+
+
+2012-05-18 Andreas Schlegel
+
+ * version 0.7.3
+
+ * src main.java.controlp5.ControlEvent.java:
+ adding getArrayValue(int), returns a float value for a given index, does not check for ArrayIndexOutOfBounds
+
+ * src main.java.controlp5.Slider.java:
+ issue 47 http://code.google.com/p/controlp5/issues/detail?id=47 fixed
+
+ * src main.java.controlp5.CheckBox.java, main.java.controlp5.RadioButton.java:
+ issue 41 http://code.google.com/p/controlp5/issues/detail?id=41 fixed
+
+ * src main.java.controlp5.Chart.java:
+ implemented
+
+ * src main.java.controlp5.ControlFont.java:
+ issue 46 http://code.google.com/p/controlp5/issues/detail?id=46 fixed
+
+ * src main.java.controlp5.ControlWindow.java:
+ sketches using controlP5 running in the browser as Applet did not work anymore, fixed
+
+ * src main.java.controlp5.ColorPicker.java:
+ missing implementation reported in http://forum.processing.org/topic/controlp5-how-to-receive-colorpicker-controlevents fixed
+ ColorPicker example has been modified accordingly
+
+ * src main.java.controlp5.Textfield.java:
+ issue 44 http://code.google.com/p/controlp5/issues/detail?id=44 fixed
+
+ * src controlP5.ControlWindowKeyHandler.java:
+ issue 49 http://code.google.com/p/controlp5/issues/detail?id=49 fixed, keys boolean array size increased to 525 due to windows key issue
+
+
+
+2012-01-15 Andreas Schlegel
+
+ * version 0.7.0
+
+ * src main.java.controlp5.ControllerInterface.java, main.java.controlp5.Controller.java,main.java.controlp5.ControllerGroup.java:
+ adding generic type declaration for object specific method chaining (fluent interface)
+
+ * src main.java.controlp5.RadioButton.java:
+ changed return type for methods addItem from Toggle to RadioButton
+ changed return type for methods setImage from PImage to RadioButton
+
+
+
+
+2011-10-14 Andreas Schlegel
+
+ * version 0.6.9
+
+ * src main.java.controlp5.Textarea.java:
+ included isScrollable() to adapt to ListBox
+
+
+2011-10-13 Andreas Schlegel
+
+ * version 0.6.8
+
+ * src main.java.controlp5.ControllerGroup.java, main.java.controlp5.Controller.java:
+ making addition to isVisible() to check if the parent element is invisible
+ in which case the child element will return false as well although the visible
+ state might be true. this fixes an issue with mousewheel scroll being active
+ for an invisible child controller. The mouseoverlist handling was updated as well.
+
+ * src main.java.controlp5.Slider.java:
+ Slider will only broadcast when there is a change in value when pressed
+
+ * src main.java.controlp5.ControlWindow.java:
+ mouseWheelMoved() now only updates the first item in the mouseoverlist
+ and then exits the loop
+
+
+2011-10-12 Andreas Schlegel
+
+ * version 0.6.7
+
+ * examples reorganized and grouped into 3 categories,
+ controllers, use, extra
+
+
+2011-10-07 Andreas Schlegel
+
+ * version 0.6.6
+
+ * src controlP5/Textarea.java:
+ scrollbar pixel offset fixed, setPosition update fixed.
+
+
+2011-09-22 Andreas Schlegel
+
+ * version 0.6.5
+
+ * src controlP5/ControlWindow.java:
+ adding removeMouseOverFor() to remove controllers from the mouseoverlist.
+ Called when a controller or group is removed. Necessary when a controller/group is removed
+ when clicked or hovered by the mouse.
+
+
+2011-09-20 Andreas Schlegel
+
+ * version 0.6.4
+
+ * src controlP5/Textfield.java:
+ adding support for PFont
+
+ * javadoc, new design
+
+
+
+2011-08-27 Andreas Schlegel
+
+ * version 0.6.3
+
+ * src controlP5/ListBox.java, controlP5/DropdownList.java:
+ adding mouseover support.
+
+ * src controlP5/ControlP5.java:
+ adding enableMouseWheel(), disableMouseWheel(), isMouseWheel()
+ by default the mouse wheel is active for Slider, Knob, Numberbox,
+ ListBox and DropdownList. The MouseWheelListener is handled
+ by each ControlWindow individually.
+
+ * src controlP5/ControlWindow.java:
+ adding getFrame() to access the frame object of a ControlWindow.
+
+
+2011-08-25 Andreas Schlegel
+
+ * version 0.6.2
+
+ * src controlP5/ControlP5.java:
+ removing static from the papplet field, this had consequences for some internal
+ calls to papplet but do not affect any publicly available methods or constructors
+ except the Label class which requires a controlP5 instances as it's constructor's
+ first parameter.
+
+ * src controlP5/ControlP5.java:
+ field keyHandler is now non-static
+
+ * src controlP5/Label.java:
+ adding a ControlP5 parameter to all Label constructors due to changes made
+ to field controlP5.papplet
+
+ * src controlP5/Textlabel.java:
+ Constructors with the first parameter of type Component have been deprecated
+ and replaced with constructors using a reference to ControlP5 as first parameter.
+ if this affects your programs, please make changes accordingly.
+
+
+2011-08-20 Andreas Schlegel
+
+ * version 0.6.1
+
+ * ongoing internal code refactoring, adding getter and setter methods for
+ existing methods (which are deprecated accordingly)
+
+ * reference cleanup
+
+ * preparing for release
+
+ * src controlP5/ControllerSprite.java:
+ deprecated
+
+ * src controlP5/ControlCanvas.java:
+ deprecated, use ControlWindowCanvas instead
+
+ * Names of controllers now follows the OSC address pattern specs,
+ use controlP5.printControllerMap() to see the changed address space.
+ This has been added to controlP5 since controllers now can be directly
+ linked to custom objects and not only to the instance of the main program.
+ http://opensoundcontrol.org/spec-1_0-examples
+ (OSC Address Parts not included)
+
+
+
+2011-06-25 Andreas Schlegel
+
+ * version 0.6.0
+
+ * adding Annotation support, very much inspired by cp5magic by Karsten Schmidt (toxi)
+ see the ControlP5annotation example for further details
+
+ * src controlP5/ControllerAutomator.java:
+ for internal use only, handles the reflection for the annotation implementation
+
+ * src controlP5/FieldChangedListener.java:
+ for internal use only, listens for changes of variables linked to controllers
+ (needs to be anabled, disabled by default)
+
+ * src controlP5/ScrollList.java:
+ ScrollList removed, use ListBox.
+
+ * src controlP5/ControllerGroup.java:
+ moveTo(Tab) changed according to issue http://code.google.com/p/controlp5/issues/detail?id=15
+
+ * src controlP5/ListBox.java,controlP5/DropdownList.java:
+ adding mousewheel support.
+
+ * src controlP5/CallbackEvent.java, controlP5/CallbackListener.java:
+ adding new callback event and listener for controller actions such as enter, leave, pressed, released, releasedoutside.
+ how to use see the ControlP5callback example
+
+ * src controlP5/Radio.java:
+ removed, has been deprecated. Use RadioButton or CheckBox instead.
+
+ * src controlP5/ControlWindow.Pointer.java:
+ adding a pointer class which can be used as replacement for mouse activity. To make use of the Pointer,
+ disable the mouse first and then set coordinates and events such as released and pressed from your program to
+ control controllers. see example ControlP5pointer
+
+
+2011-05-08 Andreas Schlegel
+
+ * version 0.5.9
+
+ * src controlP5/ControllerInterface.java:
+ adding method float[] arrayValue()
+
+ * src controlP5/ListBox.java:
+ adding addItems(String[]), which allows to add a string array to a ListBox or a DropdownList
+ automatically resulting in a list of listBoxItems
+
+ * src controlP5/ControlEvent.java:
+ adding method isFrom(String) and isFrom(ControllerInterface) to identify the origin of a Control Event
+
+2011-05-08 Andreas Schlegel
+
+ * version 0.5.8
+
+ * src controlP5/ListBox.java:
+ Scrollbar (when visible) is now included inside the dimensions of a listbox (and its derivatives).
+
+ * src controlP5/Textfield.java:
+ Frame which surrounds a textfield is back again after being removed in version 0.5.7.
+
+ * src controlP5/ListBox.java, controlP5/DropdownList.java:
+ adding key support. up and down arrows can be used to scroll listbox or dropdownList,
+ up and down, use shift+up/down for faster scrolling, use alt+up/down to jump to the
+ top or bottom.
+
+ * shuffle
+
+2011-02-14 Andreas Schlegel
+
+ * version 0.5.7
+
+ * src controlP5/Controller.java, controlP5/ControllerGroup.java:
+ toString now prints out Type, name and value instead of all details including position, etc.
+ detailed information can now be accessed through method info().
+
+ * src controlP5/Controller.java, controlP5/ControllerGroup.java:
+ adding method info() print out details such as position, visibility, label, id, etc. of
+ a Controller or ControllerGroup.
+
+ * src controlP5/ListBox.java:
+ adding ControlListeners to ListBox, will also be inherited
+ by DropdownList.
+
+ * src controlP5/ControlWindowKeyHandler.java:
+ Key combination ALT-L and ALT-S have been removed.
+ ControlP5 setups cant be saved at this point anymore. But
+ ControllerProperties have been introduced instead to save
+ properties for single controllers - how to use ControllerProperties
+ see the examples and source code of controlP5/ControllerProperties.java
+ and controlP5/ControllerProperty.java
+
+ * src controlP5/Textfield.java:
+ Introducing a new text-cursor. Frame which surrounds a textfield has been removed.
+
+ * src controlP5/Slider.java, Slider2D.java,
+ controlP5/Knob.java, controlP5/Numberbox.java:
+ adding shuffle() command, when called, a random value will be set
+ for the controller.
+
+ * src controlP5/Knob.java:
+ Caption Label was missing, now back.
+
+ * controlP5/Slider2D.java:
+ absolute, relative positioning issue resolved.
+ see http://forum.processing.org/topic/three-problems-i-m-having-with-controlp5
+
+ * src controlP5/ControlP5IOHandler.java:
+ Loading and saving controllers in xml format has been removed due
+ to incompletness. Alternatively ControllerProperties are introduced
+ with this release, see below for more details.
+
+ * src controlP5/ControlWindow.java:
+ Adding setPositionOfTabs() to change the origin of the tab bar.
+ Use controlP5.window().setPositionOfTabs(PVector) or
+ controlP5.window().setPositionOfTabs(int,int)
+
+ * src controlP5/ControlP5Base.java:
+ Adding saveProperties(String) and loadProperties(String) to
+ save and load serialized controller properties inside a file.
+ The range of controllers implementing save/load properties is yet
+ limited to Slider, Knob, Numberbox, Toggle, Checkbox,
+ RadioButton, Textlabel, Matrix,Range, textarea, ListBox, Dropdown,
+ colorPicker. Properties are currently saved in the java serialization
+ format but xml and possibily json alternatives are being worked out.
+
+ * src controlP5/ControllerProperty.java:
+ Adding controller property. Controllers can register properties which
+ can be saved in a serialized format.
+
+ * src controlP5/Matrix.java:
+ Adding setMode(int), please refer to to the documentation which
+ constants to use - cells can be activated by row, column, many-per-row-and-colum
+
+ * src controlP5/CColor.java:
+ Fields changed from protected to private, use setter and getter
+ to change color values. CColor is serializable so that instances can
+ be saved as properties.
+
+ * src controlP5/Accordion.java:
+ Adding new class Accordion, an Accordion allows similar behavior
+ as a common UI accordion, here it combines ControlGroups where
+ one or no group can be active at a time.
+
+ * src controlP5/CVector3f.java:
+ Removed. Replaced with processing.core.PVector.
+
+ * src controlP5/ControlP5.java:
+ Removing setFilePath(), setUrlPath(), urlPath(), filePath()
+
+ * src controlP5/ControlP5XMLElement.java,
+ ControlP5/ControlP5XMLParseException:
+ removed.
+
+ * src controlP5/ControlP5.java:
+ Adding convenience method window() which returns the controlWindow
+ of the sketch, before one had to use window(PApplet)
+
+
+2010-11-07 Andreas Schlegel
+
+ * version 0.5.6
+
+ * src/controlP5/ListBox.java:
+ adding updateListBoxItems() to update color changes.
+ adding scoll() calls to color related methods to update color
+ changes for currently active listBox buttons.
+
+ * src/controlP5/ListBox.java:
+ adding item(Controller) to access a ListBoxItem by it's Button reference.
+
+ * src/controlP5/ControlWindow.java:
+ use isMouseOver(Controller), getMouseOverList() to check
+ if the mouse is inside a specific controller. This does not work for
+ groups, only for controllers.
+
+
+
+
+2010-10-07 Andreas Schlegel
+
+ * version 0.5.5
+
+ * src/controlP5/ControlP5.java:
+ enableShortcuts() and disableShortcuts() were interchanged, fixed now.
+
+
+
+2010-09-30 Andreas Schlegel
+
+ * version 0.5.4
+
+ * src/controlP5/RadioButton.java:
+ adding setNoneSelectedAllowed(true/false) default is true.
+ http://forum.processing.org/topic/controlp5-radiobutton-strange-behaviour
+
+ * src/controlP5/DropdownList.java:
+ renaming PulldownMenu to DropdownList.
+
+ * src/controlP5/Range.java
+ setMin() and setMax() bug fixed.
+
+ * src/controlP5/ControlBroadcaster.java:
+ adding addListner(), removeListener(), getListener()
+ any object that implements ControlListener can register with the ControlBroadcaster to
+ receive ControlEvents broadcasted.
+
+ * src/controlP5/BitFontRenderer.java:
+ fixed ArrayIndexOutOfBoundsException
+ only characters between ASCII 32 and 127 are supported.
+
+ * src/controlP5/ControlP5.java:
+ disabled clear() call (called from within dispose()) when in applet mode.
+ Reason: all controllers will be cleared due to dispose call
+ when switching tabs. Fix required.
+
+ * src/controlP5/Button.java:
+ colorForeground and colorActive are reveresed due to adding an active state to buttons
+ when clicked. Rollovers no display colorForeground, clicked buttons will display
+ colorActive. This also affects ListBoxItems.
+
+
+2010-08-18 Andreas Schlegel
+
+ * version 0.5.3
+
+ * src/controlP5/ListBox.java:
+ adding clear(). clears a ListBox in order to re-filling list.
+
+ * src/controlP5/ListBox.java:
+ changing behavior of a ListBox-Button.
+ a ListBox-button is clicked, it will call the Button's onLeave()
+ and setIsInside(false) function to solve problem addressed here:
+ http://forum.processing.org/topic/controlp5-listbox-loses-mouseclicks
+
+ * src/controlP5/ListBox.java:
+ adding actAsPulldownMenu() to enable/disable pulldown
+ functionality for a ListBox.
+
+ * src/controlP5/PulldownMenu.java:
+ new Controller, extends ListBox, acts as a pulldown-menu.
+
+
+2010-08-03 Andreas Schlegel
+ * version 0.5.2
+ * Slider2D: a new Controller, 2D slider control.
+ * Button, Bang, Toggle, : setImage() defines an image for DEFAULT,OVER,ACTIVE,HIGHLIGHT mode.
+ * Button, Bang, Toggle, : setImages() defines an image for DEFAULT,OVER,ACTIVE,HIGHLIGHT mode.
+ * Button: adding setSwitch() in order to use a button as a switch (makes toggle obsolete)
+ * Button: adding booleanValue() returns true or false, useful in case a button is set to be a switch.
+ * Button: adding setOn() setOff(), useful when button is a switch.
+ * Toggle: changing default look to ControlP5.SWITCH, an on/off look for toggles. use toggle.setMode(ControlP5.DEFAULT) to reset to the old default look.
+ * ControllerDisplay: adding interface ControllerDisplay to enable custom displays for a controller.
+ * Controller: setImage, allows to replace the default look of a controller with an image (PImage).
+ * Controller: setDisplay allows custom displays for controller. the custom display is called from within a controller's draw function. A custom Display implements interface ControllerDisplay
+ * Controller: adding lock(), unlock(), isLock(), setMoveable(), isMoveable(), isUserInteraction(), setUserInteraction()
+ * Controller: adding plugTo(), unplugFrom() (if this causes any problems or error message, please report)
+ * ControlP5: adding java.util.logging.Logger for logging error, debug, info messages - wrapped in ControlP5.error(), ControlP5.warning(), ControlP5.info(), ControlP5.debug()
+ * ControlP5: added registerDispose()
+ * ControlP5: adding setMoveable() and isMoveable() to disable/enable controllers to be moved around.
+ * ControlP5: adding disableShortcuts(), enableShortcuts() instead of disableKeys() and enableKeys()
+ * ControlP5: deprecating lock(), unlock(), disableKeys(), enableKeys()
+ * ControlWindow: adding begin() and end(). this allows to move controllers automatically to the main window or a separate controlWindow.
+ * Toggle: adding setValue(boolean)
+ * Matrix: mouseReleasedOutside error fixed.
+ * ControlWindow: window is now properly removed when closed, thanks henri.
+ * TextLabel: adding setControlFont()
+ * Knob: all new.
+
+2010-04-04 Andreas Schlegel
+ * version 0.5.1
+ * ControlP5: lock() and unlock() are working again.
+ * ControlEvent: added function id() to make access to the id of controller, group, tab, etc. easier
+ * ControlEvent: added function type() for easier distinguishing between the type of Controller the event was triggered from, returns ControlEvent.UNDEFINED, ControlEvent.CONTROLLER, ControlEvent.TAB, ControlEvent.GROUP
+ * ListBoxItem: adding ListBoxItem to make changes to each item of a listBox especially the color settings of a listBoxItem.
+ * CColor: now with getter and setter functions, supports changing the value of the alpha channel.
+ * ControlWindow: adding begin() and end(). this allows to move controllers automatically to the main window or a separate controlWindow.
+ * ControllerGroup: adding enableCollapse(), disableCollapse(), isCollapse() to enable/disable the collapsing and opening of a controllerGroup e.g. listBox.
+
+2010-03-26 Andreas Schlegel
+ * version 0.5.0
+ * making transition to 1.5+, no more java 1.4 support.
+ * compiling against processing 1.1
+ * ControlP5: added disableKeys() and enableKeys(), suggested in the discourse. disables and enables keyEvents such as hide/show with ALT-h.
+ * Toggle: when inactive, the color refers to colorBackground instead of colorForeground now.
+ * ControlFont: smooth related functions have been disabled and deprecated due to processing 1.1 changes.
+ * Slider: use alignValueLabel() to position the value label of a slider on TOP, CENTER, or BOTTOM
+ * example ControlP5quick: new, ControlP5quick shows how to quickly add Controllers with auto-arrangement.
+
+2010-02-16 Andreas Schlegel
+ * version 0.4.7
+ * Slider: adding TickMarks and replacing steps with snapToTickMarks().
+ * ControlWindow: adding setUndecorated(), isUndecorated(), toggleUndecorated()
+ * ControllerSprite: sprites are now clone-able and state management has been improved, thanks to c.a. church. http://processing.org/discourse/yabb2/YaBB.pl?num=1265905257
+ * Controller: adding getSprite()
+ * BitFontRenderer: adding warning for character that are not supported by the BitFontRenderer.
+
+2010-02-06 Andreas Schlegel
+ * version 0.4.6
+ * ControlWindow: imageMode was not set back to CENTER/CORNER correctly, now fixed.
+
+0.4.5
+ * ControllerGroup: adding moveTo(String). will move ControllerGroups such as e.g. Textarea to another tab.
+
+0.4.4
+ * ControlWindow: imageMode CENTER/CORNER issue fixed.
+
+0.4.3
+ * Controller.isInside is private now. use setIsInside(true/false) and getIsInside() to access this boolean field.
+ * trying to solve the problem of overlapping described here:
+ http://processing.org/discourse/yabb2/YaBB.pl?num=1259885420/0#0
+ yet not successful, but loops managing the mouseEvents have been reversed from i++ to i--
+ * CheckBox,RadioButton: adding activateAll, activate, deactivate, getState to CheckBox and RadioButton to be able to control individual items by code.
+ * CheckBox: adding toggle() to CheckBox to be able to toggle individual items of a checkBox.
+ * CheckBox,RadioButton: adding setItemHeight(), setItemWidth() to radioButton and checkBox
+ * Toggle: adding toggle()
+
+0.4.2
+-
+
+0.4.1
+ * Controller: added changeValue() to change the float value of a controller without broadcasting its change as a event.
+ * Numberbox: added setMultiplier() and multiplier() to customize the value sensitivity.
+ * Toggle: setLabelVisible() is now working.
+ * ControlWindow: adding setTitle, showCoordinates, hideCoordinates to ControlWindow. only applies to controlWindows of type PAppletWindow (external window).
+ * adding Matrix.set
+ * Controller: Controller.isInside() is public now
+ * added ControlFont. does not support textarea and textfield yet.
+
+(note: take a look at subversion changelog generator http://ch.tudelft.nl/~arthur/svn2cl/)
+
+0.3.15
+ * Texfield: textfield scrolls to the left if text is larger than display area.
+ * Knob: knob setValue issue solved.
+
+ * BitFontRenderer: removed getWidth(String theText, int theFontIndex)
+ is now getWidth(String theText, Label theLabel);
+ removed getWidth(String theText, int theFontIndex, int theLength))
+ is now getWidth(String theText, Label theLabel, int theLength));
+
+
+0.3.14
+ * ScrollList: adding void hideScrollbar()
+ adding void showScrollbar()
+ adding void showScrollbar()
+ adding void scroll(float)
+ adding boolean isScrollbarVisible()
+
+ * Textarea: adding void hideScrollbar()
+ adding void showScrollbar()
+ adding void showScrollbar()
+ adding void scroll(float)
+ adding boolean isScrollbarVisible()
+
+ * Textfield: textinput now works from a controlWindow
+
+ * Label: adding adjust() to fix the cutting off of Labels when changing fonts.
+ use e.g. mySlider.captionLabel().setFont(ControlP5.grixel).adjust();
+
+0.3.13
+ * Textfield: adding setAutoClear(true/false) prevents the textfield to be cleared after pressing RETURN.
+ adding clear(), clears the current textline
+ adding keepFocus(true/false)
+ adding getTextList()
+ adding setAutoClear(true/false)
+ adding isAutoClear()
+ adding submit()
+
+0.3.12
+ * Radio: if deactiveAll is set before the first button is added, the first button will not trigger an event.
+ * ControlGroup: added method getBackgroundHeight() to get the height of a group's background that has been set before.
+ * Textfield: fixed bug with clearing the variable myTextline too early.
+
+0.3.11
+ * Textfield: added method setText to Textfield
+ * Range: made corrections to Range, _myUnit was not set properly. now fixed. Range remains experimental.
+
+0.3.10
+ * fixed little issues with setColor, again.
+ * removed decimal point when setDecimalPrecision(0)
+
+0.3.9
+ * Range: defaultValue for min shows correct value now.
+ * Radio: added deactivateAll()
+ * TextLabel: added setWidth, setHeight
+ * setColor -Label(), -Active(), -Value(), -Foreground(), -Background(): issues resolved and tested for slider, range, button, knob, sliderlist, multilist, toggle, radio
+ * Controller: added method setDecimalPrecision(int theNum) to set the decimal precision for floats when displayed as valueLabel. the precision does not apply to the returned float value.
+ Controller.captionLabel().set("txt") is fixed.
+ * ControlP5: controlP5.setAutoDraw(true/false) issue is fixed.
+ * ControlWindow: controlWindow.post() has been deleted.
+ * Knob: issue with minimum value has been resolved.
+
+how to move a textlabel that has been created with "new" to a tab other than the default:
+Tab myTab = controlP5.addTab("new");
+Textlabel myTextlabel = new Textlabel(this,"a single textlabel.",20,100,400,200,0xffff0000,ControlP5.synt24);
+myTab.addDrawable(myTextlabel);
+
diff --git a/target/classes/main/java/controlp5/events/ReleasedOutsideListener.class b/target/classes/main/java/controlp5/events/ReleasedOutsideListener.class
new file mode 100644
index 0000000..9461228
Binary files /dev/null and b/target/classes/main/java/controlp5/events/ReleasedOutsideListener.class differ
diff --git a/target/classes/main/java/controlp5/layout/ControllerFactory.class b/target/classes/main/java/controlp5/layout/ControllerFactory.class
new file mode 100644
index 0000000..1aa6032
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/ControllerFactory.class differ
diff --git a/target/classes/main/java/controlp5/layout/LayoutBuilder$Attribute.class b/target/classes/main/java/controlp5/layout/LayoutBuilder$Attribute.class
new file mode 100644
index 0000000..7954fba
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/LayoutBuilder$Attribute.class differ
diff --git a/target/classes/main/java/controlp5/layout/LayoutBuilder$ElementProps.class b/target/classes/main/java/controlp5/layout/LayoutBuilder$ElementProps.class
new file mode 100644
index 0000000..52ed005
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/LayoutBuilder$ElementProps.class differ
diff --git a/target/classes/main/java/controlp5/layout/LayoutBuilder$Tag.class b/target/classes/main/java/controlp5/layout/LayoutBuilder$Tag.class
new file mode 100644
index 0000000..b8fc222
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/LayoutBuilder$Tag.class differ
diff --git a/target/classes/main/java/controlp5/layout/LayoutBuilder$XMLVisitor.class b/target/classes/main/java/controlp5/layout/LayoutBuilder$XMLVisitor.class
new file mode 100644
index 0000000..8a82112
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/LayoutBuilder$XMLVisitor.class differ
diff --git a/target/classes/main/java/controlp5/layout/LayoutBuilder.class b/target/classes/main/java/controlp5/layout/LayoutBuilder.class
new file mode 100644
index 0000000..d0ba018
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/LayoutBuilder.class differ
diff --git a/target/classes/main/java/controlp5/layout/XML.g4 b/target/classes/main/java/controlp5/layout/XML.g4
new file mode 100644
index 0000000..08e98a6
--- /dev/null
+++ b/target/classes/main/java/controlp5/layout/XML.g4
@@ -0,0 +1,35 @@
+grammar XML;
+
+document : '' element+ '' ;
+
+element : startTag (content )? endTag
+ | SELF_CLOSING
+ ;
+
+startTag : OPEN Name attribute* CLOSE ;
+
+endTag : OPEN_SLASH Name CLOSE ;
+
+SELF_CLOSING : OPEN Name SLASH_CLOSE ;
+
+attribute : Name EQUALS value ;
+
+content : element | STRING ;
+
+value: STRING
+ | NUMBER UNIT;
+
+UNIT: 'px' | '%';
+WS : [ \t\r\n]+ -> skip;
+OPEN : '<' ;
+OPEN_SLASH: '' ;
+CLOSE : '>' ;
+SLASH_CLOSE: '/>' ;
+EQUALS : '=' ;
+
+Name : ALPHA (ALPHA | DIGIT | '.' | '-' | '_')* ;
+STRING : '"' ( ~'"' )* '"' | '\'' ( ~'\'' )* '\'' ;
+NUMBER : DIGIT+ ;
+
+fragment DIGIT : [0-9] ;
+fragment ALPHA : [a-zA-Z] ;
diff --git a/target/classes/main/java/controlp5/layout/lang/XML.interp b/target/classes/main/java/controlp5/layout/lang/XML.interp
new file mode 100644
index 0000000..b98a8de
--- /dev/null
+++ b/target/classes/main/java/controlp5/layout/lang/XML.interp
@@ -0,0 +1,44 @@
+token literal names:
+null
+''
+''
+null
+null
+null
+'<'
+''
+'>'
+'/>'
+'='
+null
+null
+null
+
+token symbolic names:
+null
+null
+null
+SELF_CLOSING
+UNIT
+WS
+OPEN
+OPEN_SLASH
+CLOSE
+SLASH_CLOSE
+EQUALS
+Name
+STRING
+NUMBER
+
+rule names:
+document
+element
+startTag
+endTag
+attribute
+content
+value
+
+
+atn:
+[4, 1, 13, 59, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 1, 0, 1, 0, 4, 0, 17, 8, 0, 11, 0, 12, 0, 18, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 25, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 30, 8, 1, 1, 2, 1, 2, 1, 2, 5, 2, 35, 8, 2, 10, 2, 12, 2, 38, 9, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 3, 5, 52, 8, 5, 1, 6, 1, 6, 1, 6, 3, 6, 57, 8, 6, 1, 6, 0, 0, 7, 0, 2, 4, 6, 8, 10, 12, 0, 0, 57, 0, 14, 1, 0, 0, 0, 2, 29, 1, 0, 0, 0, 4, 31, 1, 0, 0, 0, 6, 41, 1, 0, 0, 0, 8, 45, 1, 0, 0, 0, 10, 51, 1, 0, 0, 0, 12, 56, 1, 0, 0, 0, 14, 16, 5, 1, 0, 0, 15, 17, 3, 2, 1, 0, 16, 15, 1, 0, 0, 0, 17, 18, 1, 0, 0, 0, 18, 16, 1, 0, 0, 0, 18, 19, 1, 0, 0, 0, 19, 20, 1, 0, 0, 0, 20, 21, 5, 2, 0, 0, 21, 1, 1, 0, 0, 0, 22, 24, 3, 4, 2, 0, 23, 25, 3, 10, 5, 0, 24, 23, 1, 0, 0, 0, 24, 25, 1, 0, 0, 0, 25, 26, 1, 0, 0, 0, 26, 27, 3, 6, 3, 0, 27, 30, 1, 0, 0, 0, 28, 30, 5, 3, 0, 0, 29, 22, 1, 0, 0, 0, 29, 28, 1, 0, 0, 0, 30, 3, 1, 0, 0, 0, 31, 32, 5, 6, 0, 0, 32, 36, 5, 11, 0, 0, 33, 35, 3, 8, 4, 0, 34, 33, 1, 0, 0, 0, 35, 38, 1, 0, 0, 0, 36, 34, 1, 0, 0, 0, 36, 37, 1, 0, 0, 0, 37, 39, 1, 0, 0, 0, 38, 36, 1, 0, 0, 0, 39, 40, 5, 8, 0, 0, 40, 5, 1, 0, 0, 0, 41, 42, 5, 7, 0, 0, 42, 43, 5, 11, 0, 0, 43, 44, 5, 8, 0, 0, 44, 7, 1, 0, 0, 0, 45, 46, 5, 11, 0, 0, 46, 47, 5, 10, 0, 0, 47, 48, 3, 12, 6, 0, 48, 9, 1, 0, 0, 0, 49, 52, 3, 2, 1, 0, 50, 52, 5, 12, 0, 0, 51, 49, 1, 0, 0, 0, 51, 50, 1, 0, 0, 0, 52, 11, 1, 0, 0, 0, 53, 57, 5, 12, 0, 0, 54, 55, 5, 13, 0, 0, 55, 57, 5, 4, 0, 0, 56, 53, 1, 0, 0, 0, 56, 54, 1, 0, 0, 0, 57, 13, 1, 0, 0, 0, 6, 18, 24, 29, 36, 51, 56]
\ No newline at end of file
diff --git a/target/classes/main/java/controlp5/layout/lang/XML.tokens b/target/classes/main/java/controlp5/layout/lang/XML.tokens
new file mode 100644
index 0000000..30d639a
--- /dev/null
+++ b/target/classes/main/java/controlp5/layout/lang/XML.tokens
@@ -0,0 +1,20 @@
+T__0=1
+T__1=2
+SELF_CLOSING=3
+UNIT=4
+WS=5
+OPEN=6
+OPEN_SLASH=7
+CLOSE=8
+SLASH_CLOSE=9
+EQUALS=10
+Name=11
+STRING=12
+NUMBER=13
+''=1
+''=2
+'<'=6
+''=7
+'>'=8
+'/>'=9
+'='=10
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLBaseListener.class b/target/classes/main/java/controlp5/layout/lang/XMLBaseListener.class
new file mode 100644
index 0000000..c8cf48d
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLBaseListener.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLBaseVisitor.class b/target/classes/main/java/controlp5/layout/lang/XMLBaseVisitor.class
new file mode 100644
index 0000000..7ad3ad5
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLBaseVisitor.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLLexer.class b/target/classes/main/java/controlp5/layout/lang/XMLLexer.class
new file mode 100644
index 0000000..3a100b5
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLLexer.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLLexer.interp b/target/classes/main/java/controlp5/layout/lang/XMLLexer.interp
new file mode 100644
index 0000000..5848fd8
--- /dev/null
+++ b/target/classes/main/java/controlp5/layout/lang/XMLLexer.interp
@@ -0,0 +1,58 @@
+token literal names:
+null
+''
+''
+null
+null
+null
+'<'
+''
+'>'
+'/>'
+'='
+null
+null
+null
+
+token symbolic names:
+null
+null
+null
+SELF_CLOSING
+UNIT
+WS
+OPEN
+OPEN_SLASH
+CLOSE
+SLASH_CLOSE
+EQUALS
+Name
+STRING
+NUMBER
+
+rule names:
+T__0
+T__1
+SELF_CLOSING
+UNIT
+WS
+OPEN
+OPEN_SLASH
+CLOSE
+SLASH_CLOSE
+EQUALS
+Name
+STRING
+NUMBER
+DIGIT
+ALPHA
+
+channel names:
+DEFAULT_TOKEN_CHANNEL
+HIDDEN
+
+mode names:
+DEFAULT_MODE
+
+atn:
+[4, 0, 13, 114, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 3, 3, 58, 8, 3, 1, 4, 4, 4, 61, 8, 4, 11, 4, 12, 4, 62, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 5, 10, 83, 8, 10, 10, 10, 12, 10, 86, 9, 10, 1, 11, 1, 11, 5, 11, 90, 8, 11, 10, 11, 12, 11, 93, 9, 11, 1, 11, 1, 11, 1, 11, 5, 11, 98, 8, 11, 10, 11, 12, 11, 101, 9, 11, 1, 11, 3, 11, 104, 8, 11, 1, 12, 4, 12, 107, 8, 12, 11, 12, 12, 12, 108, 1, 13, 1, 13, 1, 14, 1, 14, 0, 0, 15, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 0, 29, 0, 1, 0, 6, 3, 0, 9, 10, 13, 13, 32, 32, 2, 0, 45, 46, 95, 95, 1, 0, 34, 34, 1, 0, 39, 39, 1, 0, 48, 57, 2, 0, 65, 90, 97, 122, 120, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 1, 31, 1, 0, 0, 0, 3, 40, 1, 0, 0, 0, 5, 50, 1, 0, 0, 0, 7, 57, 1, 0, 0, 0, 9, 60, 1, 0, 0, 0, 11, 66, 1, 0, 0, 0, 13, 68, 1, 0, 0, 0, 15, 71, 1, 0, 0, 0, 17, 73, 1, 0, 0, 0, 19, 76, 1, 0, 0, 0, 21, 78, 1, 0, 0, 0, 23, 103, 1, 0, 0, 0, 25, 106, 1, 0, 0, 0, 27, 110, 1, 0, 0, 0, 29, 112, 1, 0, 0, 0, 31, 32, 5, 60, 0, 0, 32, 33, 5, 87, 0, 0, 33, 34, 5, 105, 0, 0, 34, 35, 5, 110, 0, 0, 35, 36, 5, 100, 0, 0, 36, 37, 5, 111, 0, 0, 37, 38, 5, 119, 0, 0, 38, 39, 5, 62, 0, 0, 39, 2, 1, 0, 0, 0, 40, 41, 5, 60, 0, 0, 41, 42, 5, 47, 0, 0, 42, 43, 5, 87, 0, 0, 43, 44, 5, 105, 0, 0, 44, 45, 5, 110, 0, 0, 45, 46, 5, 100, 0, 0, 46, 47, 5, 111, 0, 0, 47, 48, 5, 119, 0, 0, 48, 49, 5, 62, 0, 0, 49, 4, 1, 0, 0, 0, 50, 51, 3, 11, 5, 0, 51, 52, 3, 21, 10, 0, 52, 53, 3, 17, 8, 0, 53, 6, 1, 0, 0, 0, 54, 55, 5, 112, 0, 0, 55, 58, 5, 120, 0, 0, 56, 58, 5, 37, 0, 0, 57, 54, 1, 0, 0, 0, 57, 56, 1, 0, 0, 0, 58, 8, 1, 0, 0, 0, 59, 61, 7, 0, 0, 0, 60, 59, 1, 0, 0, 0, 61, 62, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 65, 6, 4, 0, 0, 65, 10, 1, 0, 0, 0, 66, 67, 5, 60, 0, 0, 67, 12, 1, 0, 0, 0, 68, 69, 5, 60, 0, 0, 69, 70, 5, 47, 0, 0, 70, 14, 1, 0, 0, 0, 71, 72, 5, 62, 0, 0, 72, 16, 1, 0, 0, 0, 73, 74, 5, 47, 0, 0, 74, 75, 5, 62, 0, 0, 75, 18, 1, 0, 0, 0, 76, 77, 5, 61, 0, 0, 77, 20, 1, 0, 0, 0, 78, 84, 3, 29, 14, 0, 79, 83, 3, 29, 14, 0, 80, 83, 3, 27, 13, 0, 81, 83, 7, 1, 0, 0, 82, 79, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 81, 1, 0, 0, 0, 83, 86, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 84, 85, 1, 0, 0, 0, 85, 22, 1, 0, 0, 0, 86, 84, 1, 0, 0, 0, 87, 91, 5, 34, 0, 0, 88, 90, 8, 2, 0, 0, 89, 88, 1, 0, 0, 0, 90, 93, 1, 0, 0, 0, 91, 89, 1, 0, 0, 0, 91, 92, 1, 0, 0, 0, 92, 94, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0, 94, 104, 5, 34, 0, 0, 95, 99, 5, 39, 0, 0, 96, 98, 8, 3, 0, 0, 97, 96, 1, 0, 0, 0, 98, 101, 1, 0, 0, 0, 99, 97, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 102, 1, 0, 0, 0, 101, 99, 1, 0, 0, 0, 102, 104, 5, 39, 0, 0, 103, 87, 1, 0, 0, 0, 103, 95, 1, 0, 0, 0, 104, 24, 1, 0, 0, 0, 105, 107, 3, 27, 13, 0, 106, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 26, 1, 0, 0, 0, 110, 111, 7, 4, 0, 0, 111, 28, 1, 0, 0, 0, 112, 113, 7, 5, 0, 0, 113, 30, 1, 0, 0, 0, 9, 0, 57, 62, 82, 84, 91, 99, 103, 108, 1, 6, 0, 0]
\ No newline at end of file
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLLexer.tokens b/target/classes/main/java/controlp5/layout/lang/XMLLexer.tokens
new file mode 100644
index 0000000..30d639a
--- /dev/null
+++ b/target/classes/main/java/controlp5/layout/lang/XMLLexer.tokens
@@ -0,0 +1,20 @@
+T__0=1
+T__1=2
+SELF_CLOSING=3
+UNIT=4
+WS=5
+OPEN=6
+OPEN_SLASH=7
+CLOSE=8
+SLASH_CLOSE=9
+EQUALS=10
+Name=11
+STRING=12
+NUMBER=13
+''=1
+''=2
+'<'=6
+''=7
+'>'=8
+'/>'=9
+'='=10
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLListener.class b/target/classes/main/java/controlp5/layout/lang/XMLListener.class
new file mode 100644
index 0000000..4e2322c
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLListener.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLParser$AttributeContext.class b/target/classes/main/java/controlp5/layout/lang/XMLParser$AttributeContext.class
new file mode 100644
index 0000000..bca6919
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLParser$AttributeContext.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLParser$ContentContext.class b/target/classes/main/java/controlp5/layout/lang/XMLParser$ContentContext.class
new file mode 100644
index 0000000..81f897f
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLParser$ContentContext.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLParser$DocumentContext.class b/target/classes/main/java/controlp5/layout/lang/XMLParser$DocumentContext.class
new file mode 100644
index 0000000..c041884
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLParser$DocumentContext.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLParser$ElementContext.class b/target/classes/main/java/controlp5/layout/lang/XMLParser$ElementContext.class
new file mode 100644
index 0000000..5025d43
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLParser$ElementContext.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLParser$EndTagContext.class b/target/classes/main/java/controlp5/layout/lang/XMLParser$EndTagContext.class
new file mode 100644
index 0000000..e7f2afe
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLParser$EndTagContext.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLParser$StartTagContext.class b/target/classes/main/java/controlp5/layout/lang/XMLParser$StartTagContext.class
new file mode 100644
index 0000000..2e71912
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLParser$StartTagContext.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLParser$ValueContext.class b/target/classes/main/java/controlp5/layout/lang/XMLParser$ValueContext.class
new file mode 100644
index 0000000..06ddc01
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLParser$ValueContext.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLParser.class b/target/classes/main/java/controlp5/layout/lang/XMLParser.class
new file mode 100644
index 0000000..baf8bd9
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLParser.class differ
diff --git a/target/classes/main/java/controlp5/layout/lang/XMLVisitor.class b/target/classes/main/java/controlp5/layout/lang/XMLVisitor.class
new file mode 100644
index 0000000..3f4196e
Binary files /dev/null and b/target/classes/main/java/controlp5/layout/lang/XMLVisitor.class differ
diff --git a/target/classes/main/java/controlp5/package.html b/target/classes/main/java/controlp5/package.html
new file mode 100755
index 0000000..132bc08
--- /dev/null
+++ b/target/classes/main/java/controlp5/package.html
@@ -0,0 +1,16 @@
+
+
+
+controlP5 documentation
+
+
+
+ControlP5
+ControlP5 (www.sojamo.de/libraries/controlP5) is a library written by Andreas Schlegel for the programming environment processing. ControlP5 is a GUI and controller library for processing that can be used in authoring, application mode. Controllers including Sliders, Buttons, Toggles, Knobs, Textfields, RadioButtons, Checkboxes amongst others can be easily added to a processing sketch and can be arranged in separate control windows, or can be organized in tabs or groups. The controlP5 source code repository is available on github at github.com/sojamo/controlp5.
+
+Javascript
+Currently there is no javascript version of ControlP5, though I had started implementing a slimmed down version for processing.js but since it is currently unclear which javascript version, processing.js or p5.js, will become the default js version of processing, controlP5.js is on hold.
+
+
+
diff --git a/target/classes/main/java/sketch/Sketch.class b/target/classes/main/java/sketch/Sketch.class
new file mode 100644
index 0000000..9ebfb53
Binary files /dev/null and b/target/classes/main/java/sketch/Sketch.class differ
diff --git a/target/test-classes/PACKAGE_NAME/LayoutTests.class b/target/test-classes/PACKAGE_NAME/LayoutTests.class
new file mode 100644
index 0000000..973e930
Binary files /dev/null and b/target/test-classes/PACKAGE_NAME/LayoutTests.class differ