# ControlP5 (Javadocs: controlP5)
Date: 2014-04-27

controlP5

## Class ControlP5

- java.lang.Object
- - controlP5.ControlP5Legacy
  - - controlP5.ControlP5Base
    - - controlP5.ControlP5

All Implemented Interfaces:
  ControlP5Constants

    public class ControlP5
    extends ControlP5Base

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 Also:
  `ControlP5Base`

+Example
  `

      /**
       * ControlP5 Basics
       *
       * The following example demonstrates the basic use of controlP5.

       * After initializing controlP5 you can add controllers to controlP5.
       * Here we use three numberboxes, one slider and one textfield.
       * The numberbox with name numberboxC will trigger function numberboxC()
       * in the example below. Whenever controlP5 detects a function in your
       * sketch that corresponds to the name of a controller, it will forward
       * an event to that function. Any event triggered by a controller
       * will be forwarded to function controlEvent in your sketch.
       * related examples ControlP5numberbox, ControlP5slider, ControlP5textfield
       *
       * by Andreas Schlegel, 2011
       * www.sojamo.de/libraries/controlp5
       *
       */

      import controlP5.*;

      ControlP5 cp5;
      public int myColorRect = 200;
      public int myColorBackground = 100;

      void setup() {
        size(400, 400);
        noStroke();

        cp5 = new ControlP5(this);

        // create a slider
        // parameters:
        // name, minValue, maxValue, defaultValue, x, y, width, height
        cp5.addSlider("sliderA", 100, 200, 100, 100, 260, 100, 14);

        // create 3 numberboxes and assign an id for each
        cp5.addNumberbox("numberboxA", myColorRect, 100, 140, 100, 14).setId(1);
        cp5.addNumberbox("numberboxB", myColorBackground, 100, 180, 100, 14).setId(2);
        cp5.addNumberbox("numberboxC", 0, 100, 220, 100, 14).setId(3);

        // create a texfield
        cp5.addTextfield("textA", 100, 290, 100, 20);

        // change individual settings for a controller
        cp5.getController("numberboxA").setMax(255);
        cp5.getController("numberboxA").setMin(0);
      }

      void draw() {
        background(myColorBackground);
        fill(myColorRect);
        rect(0, 0, width, 100);
      }

      // events from controller numberboxC are received here
      public void numberboxC(int theValue) {
        println("### got an event from numberboxC : "+theValue);
      }

      // an event from slider sliderA will change the value of textfield textA here
      public void sliderA(int theValue) {
        Textfield txt = ((Textfield)cp5.getController("textA"));
        txt.setValue(""+theValue);
      }

      // for every change (a textfield event confirmed with a return) in textfield textA,
      // function textA will be invoked
      public void textA(String theValue) {
        println("### got an event from textA : "+theValue);
      }

      // function controlEvent will be invoked with every value change
      // in any registered controller
      public void controlEvent(ControlEvent theEvent) {
        println("got a control event from controller with id "+theEvent.getId());
        switch(theEvent.getId()) {
          case(1): // numberboxA is registered with id 1
          myColorRect = (int)(theEvent.getController().getValue());
          break;
          case(2):  // numberboxB is registered with id 2
          myColorBackground = (int)(theEvent.getController().getValue());
          break;
        }
      }

  `

### Field Summary

Fields
`boolean` `blockDraw` Deprecated.
`ControlWindow` `controlWindow`
`static boolean` `DEBUG` use this static variable to turn DEBUG on or off.
`static boolean` `isApplet`
`static java.util.logging.Logger` `logger`
`processing.core.PApplet` `papplet`
`static java.lang.String` `VERSION`

### Fields inherited from interface controlP5.ControlP5Constants

`acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_WHEEL, ACTIVE, ALL, ALT, AQUA, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BLACK, BLUE, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, CHECKBOX, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, DROPDOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, FUCHSIA, GRAY, GREEN, grixel, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, J2D, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, PI, PRESSED, PRINT, PURPLE, RED, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SILVER, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, standard56, standard58, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, synt24, TAB, TEAL, THEME_A, THEME_CP52014, THEME_CP5BLUE, THEME_RED, THEME_RETRO, THEME_WHITE, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW`

### Constructor Summary

Constructors
Constructor and Description
`ControlP5(processing.core.PApplet theParent)` Create a new instance of controlP5.
`ControlP5(processing.core.PApplet theParent, ControlFont theControlFont)`
`ControlP5(processing.core.PApplet theParent, processing.core.PFont thePFont)`

### Method Summary

Methods
`ControlP5` `addCallback(CallbackListener... theListeners)`
`ControlP5` `addCallback(CallbackListener theListener)`
`ControlP5` `addCallback(CallbackListener theListener, Controller<?>... theControllers)`
`ControlP5` `addCanvas(Canvas theCanvas)` adds a Canvas to the default sketch window.
`void` `addControlsFor(java.lang.Object theObject)` TODO
`ControlP5` `addListener(ControlListener... theListeners)`
`void` `addPositionTo(int theX, int theY, ControllerInterface<?>... theControllers)`
`void` `addPositionTo(int theX, int theY, java.util.List<ControllerInterface<?>> theControllers)`
`static boolean` `b(java.lang.Object o)`
`ControllerGroup<?>` `begin()` cp5.begin() and cp5.end() are mechanisms to auto-layout controllers, see the ControlP5beginEnd example.
`ControllerGroup<?>` `begin(ControllerGroup<?> theGroup)`
`ControllerGroup<?>` `begin(ControllerGroup<?> theGroup, int theX, int theY)`
`ControllerGroup<?>` `begin(ControlWindow theWindow)`
`ControllerGroup<?>` `begin(ControlWindow theWindow, int theX, int theY)`
`ControllerGroup<?>` `begin(int theX, int theY)`
`static double` `d(java.lang.Object o)`
`void` `disableShortcuts()` disables shortcuts such as alt-h for hiding/showing controllers
`void` `dispose()` disposes and clears all controlP5 elements.
`void` `draw()` call draw() from your program when autoDraw is disabled.
`void` `enableShortcuts()` enables shortcuts.
`ControllerGroup<?>` `end()` cp5.begin() and cp5.end() are mechanisms to auto-layout controllers, see the ControlP5beginEnd example.
`ControllerGroup<?>` `end(ControllerGroup<?> theGroup)`
`static float` `f(java.lang.Object o)`
`<C> C` `get(java.lang.Class<C> theClass, java.lang.String theName)`
`ControllerInterface<?>` `get(java.lang.Object theObject, java.lang.String theName)`
`ControllerInterface<?>` `get(java.lang.String theName)`
`java.util.List<ControllerInterface<?>>` `getAll()` Returns a List of all controllers currently registered.
`<T> java.util.List<T>` `getAll(java.lang.Class<T> theClass)` Returns a list of controllers or groups of a particular type.
`static CColor` `getColor()`
`ControlBroadcaster` `getControlBroadcaster()`
`Controller<?>` `getController(java.lang.String theName)`
`ControllerInterface<?>[]` `getControllerList()` Deprecated.
`ControlFont` `getFont()`
`ControllerGroup<?>` `getGroup(java.lang.String theGroupName)`
`java.util.List<ControllerInterface<?>>` `getList()`
`ControlListener` `getListener(int theIndex)`
`java.util.List<ControllerInterface<?>>` `getMouseOverList()` convenience method to check if the mouse (or pointer) is hovering over a specific controller.
`ControlWindow.Pointer` `getPointer()` convenience method to access the pointer of the main control window.
`Tab` `getTab(ControlWindow theWindow, java.lang.String theName)`
`Tab` `getTab(java.lang.String theName)`
`Tooltip` `getTooltip()`
`float` `getValue(java.lang.String theIndex)`
`ControlWindow` `getWindow()` convenience method to access the main window (ControlWindow class).
`ControlWindow` `getWindow(processing.core.PApplet theApplet)`
`void` `hide()` hide all controllers and tabs inside your sketch window.
`static int` `i(java.lang.Object o)`
`static int` `i(java.lang.String o)`
`static java.lang.Object` `invoke(java.lang.Object theObject, java.lang.String theMember, java.lang.Object... theParams)`
`boolean` `isAutoDraw()` check if the autoDraw function for the main window is enabled(true) or disabled(false).
`boolean` `isMouseOver()` convenience method to check if the mouse (or pointer) is hovering over any controller.
`boolean` `isMouseOver(ControllerInterface<?> theController)` convenience method to check if the mouse (or pointer) is hovering over a specific controller.
`boolean` `isMoveable()` Checks if controllers are generally moveable
`static boolean` `isNumeric(java.lang.Object o)`
`static boolean` `isNumeric(java.lang.String str)`
`boolean` `isShortcuts()`
`boolean` `isUpdate()` checks if automatic updates are enabled.
`boolean` `isVisible()` returns true or false according to the current visibility flag.
`void` `keyEvent(processing.event.KeyEvent theKeyEvent)`
`static long` `l(java.lang.Object o)`
`boolean` `loadLayout(java.lang.String theFilePath)`
`boolean` `loadProperties()` Loads properties from a default properties file and changes values of controllers accordingly.
`boolean` `loadProperties(java.lang.String theFilePath)` Loads properties from a properties file and changes the values of controllers accordingly, the filepath is given by parameter theFilePath.
`static java.util.logging.Logger` `logger()`
`void` `mouseEvent(processing.event.MouseEvent theMouseEvent)`
`void` `move(java.lang.Object theObject, ControllerGroup<?> theGroup)`
`void` `moveControllersForObject(java.lang.Object theObject, ControllerGroup<?> theGroup)`
`void` `pre()`
`void` `printControllerMap()`
`ControlP5` `register(ControllerInterface<?> theController)`
`ControlP5` `register(java.lang.Object theObject, java.lang.String theIndex, ControllerInterface<?> theController)` registers a Controller with ControlP5, a Controller should/must be registered with a unique name.
`void` `remove(java.lang.String theName)` removes a controlP5 element such as a controller, group, or tab by name.
`ControlP5` `removeCallback(CallbackListener... theListeners)`
`ControlP5` `removeCallback(Controller<?>... theControllers)`
`ControlP5` `removeCallback(Controller<?> theController)`
`ControlP5` `removeCanvas(Canvas theCanvas)`
`ControlP5` `removeListener(ControlListener... theListeners)`
`ControlP5` `removeListener(ControlListener theListener)`
`static java.lang.String` `s(java.lang.Object o)`
`static java.lang.String` `s(java.lang.Object o, java.lang.String theDefault)`
`static java.lang.String` `s(java.lang.String o)`
`void` `saveLayout(java.lang.String theFilePath)`
`boolean` `saveProperties()` Saves the current values of controllers into a default properties file
`boolean` `saveProperties(java.lang.String theFilePath)` Saves the current values of controllers into a file, the filepath is given by parameter theFilePath.
`boolean` `saveProperties(java.lang.String theFilePath, java.lang.String... theSets)`
`void` `setAutoDraw(boolean 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 ).
`void` `setAutoInitialization(boolean theFlag)` autoInitialization can be very handy when it comes to initializing values, e.g.
`ControlP5` `setBackground(int theColor)`
`ControlP5` `setBroadcast(boolean theValue)`
`ControlP5` `setColor(CColor theColor)`
`ControlP5` `setColorActive(int theColor)` sets the active state color of tabs and controllers, this cascades down to all known controllers.
`ControlP5` `setColorBackground(int theColor)` sets the background color of tabs and controllers, this cascades down to all known controllers.
`ControlP5` `setColorCaptionLabel(int theColor)` sets the label color of tabs and controllers, this cascades down to all known controllers.
`ControlP5` `setColorForeground(int theColor)` sets the foreground color of tabs and controllers, this cascades down to all known controllers.
`ControlP5` `setColorValueLabel(int theColor)` sets the value color of controllers, this cascades down to all known controllers.
`boolean` `setFont(ControlFont theControlFont)`
`boolean` `setFont(int theBitFontIndex)` Deprecated.
`boolean` `setFont(processing.core.PFont thePFont)`
`boolean` `setFont(processing.core.PFont thePFont, int theFontSize)`
`ControlP5` `setGraphics(processing.core.PApplet theApplet, int theX, int theY)`
`ControlP5` `setGraphics(processing.core.PGraphics theGraphics, int theX, int theY)`
`void` `setMouseWheelRotation(int theRotation)`
`ControlP5` `setMoveable(boolean theFlag)` Enables/disables Controllers to be moved around when ALT-key is down and mouse is dragged.
`void` `setTabEventsActive(boolean theFlag)` By default event originating from tabs are disabled, use setTabEventsActive(true) to receive controlEvents when tabs are clicked.
`void` `setTooltip(Tooltip theTooltip)`
`void` `setUpdate(boolean theFlag)` changes the update behavior according to parameter theFlag
`ControlP5` `setVisible(boolean b)`
`void` `show()` shows all controllers and tabs in your sketch.
`static java.util.List` `toList(java.lang.Object o)`
`static java.util.Map` `toMap(java.lang.Object o)`
`void` `update()` forces all controllers to update.
`java.lang.String` `version()` Returns the current version of controlP5

### Methods inherited from class controlP5.ControlP5Base

`addAccordion, addAccordion, addBang, addBang, addButton, addButton, addChart, addCheckBox, addCheckBox, addColorPicker, addColorPicker, addColorWheel, addColorWheel, addConsole, addControllersFor, addControllersFor, addFrameRate, addGroup, addGroup, addKnob, addKnob, addMatrix, addMatrix, addMultiList, addMultiList, addNumberbox, addNumberbox, addRadioButton, addRadioButton, addRange, addRange, addScrollableList, addScrollableList, addSlider, addSlider, addSlider2D, addSlider2D, addTab, addTextarea, addTextfield, addTextfield, addTextlabel, addToggle, addToggle, getDefaultTab, getKey, getKeyCode, getLayout, getObjectForController, getProperties, getPublicMethodsFor, getPublicMethodsFor, getPublicMethodsFor, getPublicMethodsFor, hide, isAltDown, isControlDown, isMetaDown, isShiftDown, listenTo, mapKeyFor, moveTo, printPublicMethodsFor, printPublicMethodsFor, remove, removeKeyFor, removeKeyFor, removeKeysFor, removeKeysFor, removeProperty, setAutoAddDirection, setAutoSpacing, setAutoSpacing, setAutoSpacing, setAutoSpacing, setColor, setPosition, show, stopListeningTo`

### Methods inherited from class controlP5.ControlP5Legacy

`addAccordion, addAccordion, addBang, addBang, addBang, addBang, addBoundingBox, addBoundingBox, addButton, addButton, addButton, addButton, addButton, addChart, addCheckBox, addCheckBox, addColorPicker, addColorPicker, addColorWheel, addColorWheel, addController, addController, addControlWindow, addControlWindow, addControlWindow, addControlWindow, addControlWindow, addDropdownList, addDropdownList, addDropdownList, addGroup, addGroup, addGroup, addGroup, addGroup, addGroup, addKnob, addKnob, addKnob, addKnob, addKnob, addKnob, addKnob, addListBox, addListBox, addListBox, addMatrix, addMatrix, addMultiList, addMultiList, addNumberbox, addNumberbox, addNumberbox, addNumberbox, addNumberbox, addRadio, addRadio, addRadioButton, addRadioButton, addRange, addRange, addRange, addRange, addScrollableList, addScrollableList, addScrollableList, addSlider, addSlider, addSlider, addSlider, addSlider, addSlider, addSlider, addSlider2D, addSlider2D, addSlider2D, addSlider2D, addTab, addTab, addTextarea, addTextfield, addTextfield, addTextfield, addTextlabel, addTextlabel, addTextlabel, addTextlabel, addToggle, addToggle, addToggle, addToggle, addToggle, addToggle, addToggle, addTooltip, getController, getTextlabel, getTextlabel`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### blockDraw

    @Deprecated
    public boolean blockDraw

Deprecated.

#### controlWindow

    public ControlWindow controlWindow

#### DEBUG

    public static boolean DEBUG

use this static variable to turn DEBUG on or off.

#### isApplet

    public static boolean isApplet

#### logger

    public static final java.util.logging.Logger logger

#### papplet

    public processing.core.PApplet papplet

#### VERSION

    public static final java.lang.String VERSION

See Also:
  Constant Field Values

### Constructor Detail

#### ControlP5

    public ControlP5(processing.core.PApplet theParent)

Create a new instance of controlP5.

Parameters:
  `theParent` - PApplet

#### ControlP5

    public ControlP5(processing.core.PApplet theParent,
             ControlFont theControlFont)

#### ControlP5

    public ControlP5(processing.core.PApplet theParent,
             processing.core.PFont thePFont)

### Method Detail

#### addCallback

    public ControlP5 addCallback(CallbackListener... theListeners)

See Also:
  `CallbackEvent`, `CallbackListener`

#### addCallback

    public ControlP5 addCallback(CallbackListener theListener)

See Also:
  `CallbackEvent`, `CallbackListener`

#### addCallback

    public ControlP5 addCallback(CallbackListener theListener,
                        Controller<?>... theControllers)

See Also:
  `CallbackEvent`, `CallbackListener`

#### addCanvas

    public ControlP5 addCanvas(Canvas theCanvas)

adds a Canvas to the default sketch window.

See Also:
  `Canvas`

#### addControlsFor

    public void addControlsFor(java.lang.Object theObject)

TODO

#### addListener

    public ControlP5 addListener(ControlListener... theListeners)

See Also:
  `ControlListener`

#### addPositionTo

    public void addPositionTo(int theX,
                     int theY,
                     ControllerInterface<?>... theControllers)

#### addPositionTo

    public void addPositionTo(int theX,
                     int theY,
                     java.util.List<ControllerInterface<?>> theControllers)

#### b

    public static boolean b(java.lang.Object o)

#### begin

    public ControllerGroup<?> begin()

cp5.begin() and cp5.end() are mechanisms to auto-layout controllers, see the ControlP5beginEnd example.

#### begin

    public ControllerGroup<?> begin(ControllerGroup<?> theGroup)

#### begin

    public ControllerGroup<?> begin(ControllerGroup<?> theGroup,
                           int theX,
                           int theY)

#### begin

    public ControllerGroup<?> begin(ControlWindow theWindow)

#### begin

    public ControllerGroup<?> begin(ControlWindow theWindow,
                           int theX,
                           int theY)

#### begin

    public ControllerGroup<?> begin(int theX,
                           int theY)

#### d

    public static double d(java.lang.Object o)

#### disableShortcuts

    public void disableShortcuts()

disables shortcuts such as alt-h for hiding/showing controllers

#### dispose

    public void dispose()

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.

#### draw

    public void draw()

call draw() from your program when autoDraw is disabled.

#### enableShortcuts

    public void enableShortcuts()

enables shortcuts.

#### end

    public ControllerGroup<?> end()

cp5.begin() and cp5.end() are mechanisms to auto-layout controllers, see the ControlP5beginEnd example.

#### end

    public ControllerGroup<?> end(ControllerGroup<?> theGroup)

#### f

    public static float f(java.lang.Object o)

#### get

    public <C> C get(java.lang.Class<C> theClass,
            java.lang.String theName)

#### get

    public ControllerInterface<?> get(java.lang.Object theObject,
                             java.lang.String theName)

#### get

    public ControllerInterface<?> get(java.lang.String theName)

#### getAll

    public java.util.List<ControllerInterface<?>> getAll()

Returns a List of all controllers currently registered.

Returns:
  List<ControllerInterface<?>>

#### getAll

    public <T> java.util.List<T> getAll(java.lang.Class<T> theClass)

Returns a list of controllers or groups of a particular type. The following example will return a list of registered Bangs only:
`

     List<Bang> 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.

Type Parameters:
  `T` -
Parameters:
  `theClass` - A class that extends ControllerInterface, which applies to all Controllers and ControllerGroups
Returns:
  List<T>

#### getColor

    public static CColor getColor()

#### getControlBroadcaster

    public ControlBroadcaster getControlBroadcaster()

See Also:
  `ControlBroadcaster`

#### getController

    public Controller<?> getController(java.lang.String theName)

#### getControllerList

    @Deprecated
    public ControllerInterface<?>[] getControllerList()

Deprecated.
returns a list of registered Controllers. Controllers with duplicated reference names will be ignored, only the latest of such Controllers will be included in the list. use getAll() instead

Returns:
  ControllerInterface[]
See Also:
  `getAll()`, `getAll(Class)`

#### getFont

    public ControlFont getFont()

#### getGroup

    public ControllerGroup<?> getGroup(java.lang.String theGroupName)

#### getList

    public java.util.List<ControllerInterface<?>> getList()

Returns:
  List<ControllerInterface>
See Also:
  `getAll(Class)`

#### getListener

    public ControlListener getListener(int theIndex)

See Also:
  `ControlListener`

#### getMouseOverList

    public java.util.List<ControllerInterface<?>> getMouseOverList()

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();

#### getPointer

    public ControlWindow.Pointer getPointer()

convenience method to access the pointer of the main control window.

#### getTab

    public Tab getTab(ControlWindow theWindow,
             java.lang.String theName)

#### getTab

    public Tab getTab(java.lang.String theName)

#### getTooltip

    public Tooltip getTooltip()

#### getValue

    public float getValue(java.lang.String theIndex)

#### getWindow

    public ControlWindow getWindow()

convenience method to access the main window (ControlWindow class).

#### getWindow

    public ControlWindow getWindow(processing.core.PApplet theApplet)

#### hide

    public void hide()

hide all controllers and tabs inside your sketch window.

See Also:
  `show()`, `isVisible()`

#### i

    public static int i(java.lang.Object o)

#### i

    public static int i(java.lang.String o)

#### invoke

    public static java.lang.Object invoke(java.lang.Object theObject,
                          java.lang.String theMember,
                          java.lang.Object... theParams)

#### isAutoDraw

    public boolean isAutoDraw()

check if the autoDraw function for the main window is enabled(true) or disabled(false).

Returns:
  boolean

#### isMouseOver

    public boolean isMouseOver()

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();

#### isMouseOver

    public boolean isMouseOver(ControllerInterface<?> 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 ).isMouseOver(ControllerInterface<?>);

#### isMoveable

    public boolean isMoveable()

Checks if controllers are generally moveable

#### isNumeric

    public static boolean isNumeric(java.lang.Object o)

#### isNumeric

    public static boolean isNumeric(java.lang.String str)

#### isShortcuts

    public boolean isShortcuts()

#### isUpdate

    public boolean isUpdate()

checks if automatic updates are enabled. By default this is true.

Returns:
See Also:
  `update()`, `setUpdate(boolean)`

#### isVisible

    public boolean isVisible()

returns true or false according to the current visibility flag.

See Also:
  `show()`, `hide()`

#### keyEvent

    public void keyEvent(processing.event.KeyEvent theKeyEvent)

#### l

    public static long l(java.lang.Object o)

#### loadLayout

    public boolean loadLayout(java.lang.String theFilePath)

Parameters:
  `theFilePath` -
Returns:

#### loadProperties

    public boolean loadProperties()

Loads properties from a default properties file and changes values of controllers accordingly.

Returns:
See Also:
  `ControllerProperties`

#### loadProperties

    public boolean loadProperties(java.lang.String theFilePath)

Loads properties from a properties file and changes the values of controllers accordingly, the filepath is given by parameter theFilePath.

Parameters:
  `theFilePath` -
Returns:

#### logger

    public static java.util.logging.Logger logger()

#### mouseEvent

    public void mouseEvent(processing.event.MouseEvent theMouseEvent)

#### move

    public void move(java.lang.Object theObject,
            ControllerGroup<?> theGroup)

#### moveControllersForObject

    public void moveControllersForObject(java.lang.Object theObject,
                                ControllerGroup<?> theGroup)

#### pre

    public void pre()

#### printControllerMap

    public void printControllerMap()

#### register

    public ControlP5 register(ControllerInterface<?> theController)

#### register

    public ControlP5 register(java.lang.Object theObject,
                     java.lang.String theIndex,
                     ControllerInterface<?> theController)

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.

Parameters:
  `theController` - ControllerInterface
Returns:
  ControlP5

#### remove

    public void remove(java.lang.String theName)

removes a controlP5 element such as a controller, group, or tab by name.

Parameters:
  `theString` - String

#### removeCallback

    public ControlP5 removeCallback(CallbackListener... theListeners)

See Also:
  `CallbackEvent`, `CallbackListener`

#### removeCallback

    public ControlP5 removeCallback(Controller<?>... theControllers)

See Also:
  `CallbackEvent`, `CallbackListener`

#### removeCallback

    public ControlP5 removeCallback(Controller<?> theController)

See Also:
  `CallbackEvent`, `CallbackListener`

#### removeCanvas

    public ControlP5 removeCanvas(Canvas theCanvas)

#### removeListener

    public ControlP5 removeListener(ControlListener... theListeners)

See Also:
  `ControlListener`

#### removeListener

    public ControlP5 removeListener(ControlListener theListener)

See Also:
  `ControlListener`

#### s

    public static java.lang.String s(java.lang.Object o)

#### s

    public static java.lang.String s(java.lang.Object o,
                     java.lang.String theDefault)

#### s

    public static java.lang.String s(java.lang.String o)

#### saveLayout

    public void saveLayout(java.lang.String theFilePath)

Parameters:
  `theFilePath` -

#### saveProperties

    public boolean saveProperties()

Saves the current values of controllers into a default properties file

See Also:
  `ControllerProperties`

#### saveProperties

    public boolean saveProperties(java.lang.String theFilePath)

Saves the current values of controllers into a file, the filepath is given by parameter theFilePath.

See Also:
  `ControllerProperties`

#### saveProperties

    public boolean saveProperties(java.lang.String theFilePath,
                         java.lang.String... theSets)

#### setAutoDraw

    public void setAutoDraw(boolean 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.

Parameters:
  `theFlag` - boolean

#### setAutoInitialization

    public void setAutoInitialization(boolean 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.

Parameters:
  `theFlag` - boolean

#### setBackground

    public ControlP5 setBackground(int theColor)

#### setBroadcast

    public ControlP5 setBroadcast(boolean theValue)

#### setColor

    public ControlP5 setColor(CColor theColor)

#### setColorActive

    public ControlP5 setColorActive(int theColor)

sets the active state color of tabs and controllers, this cascades down to all known controllers.

#### setColorBackground

    public ControlP5 setColorBackground(int theColor)

sets the background color of tabs and controllers, this cascades down to all known controllers.

#### setColorCaptionLabel

    public ControlP5 setColorCaptionLabel(int theColor)

sets the label color of tabs and controllers, this cascades down to all known controllers.

#### setColorForeground

    public ControlP5 setColorForeground(int theColor)

sets the foreground color of tabs and controllers, this cascades down to all known controllers.

#### setColorValueLabel

    public ControlP5 setColorValueLabel(int theColor)

sets the value color of controllers, this cascades down to all known controllers.

#### setFont

    public boolean setFont(ControlFont theControlFont)

#### setFont

    @Deprecated
    public boolean setFont(int theBitFontIndex)

Deprecated.

#### setFont

    public boolean setFont(processing.core.PFont thePFont)

#### setFont

    public boolean setFont(processing.core.PFont thePFont,
                  int theFontSize)

#### setGraphics

    public ControlP5 setGraphics(processing.core.PApplet theApplet,
                        int theX,
                        int theY)

#### setGraphics

    public ControlP5 setGraphics(processing.core.PGraphics theGraphics,
                        int theX,
                        int theY)

#### setMouseWheelRotation

    public void setMouseWheelRotation(int theRotation)

#### setMoveable

    public ControlP5 setMoveable(boolean theFlag)

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()

#### setTabEventsActive

    public void setTabEventsActive(boolean theFlag)

By default event originating from tabs are disabled, use setTabEventsActive(true) to receive controlEvents when tabs are clicked.

Parameters:
  `theFlag` -

#### setTooltip

    public void setTooltip(Tooltip theTooltip)

#### setUpdate

    public void setUpdate(boolean theFlag)

changes the update behavior according to parameter theFlag

Parameters:
  `theFlag` -
See Also:
  `update()`, `isUpdate()`

#### setVisible

    public ControlP5 setVisible(boolean b)

#### show

    public void show()

shows all controllers and tabs in your sketch.

See Also:
  `isVisible()`, `hide()`

#### toList

    public static java.util.List toList(java.lang.Object o)

#### toMap

    public static java.util.Map toMap(java.lang.Object o)

#### update

    public void update()

forces all controllers to update.

See Also:
  `isUpdate()`, `controlP5.ControlP5#setUpdate()`

#### version

    public java.lang.String version()

Returns the current version of controlP5

Returns:
  String