controlP5
Class ControlEvent

java.lang.Object
  extended by controlP5.ControlEvent

public class ControlEvent
extends java.lang.Object

a controlEvent is sent to a PApplet whenever a controlP5 action has been made. you can receive events from controllers and tabs. by default tab events are disabled and have to be enabled with Tab.activateEvent(). for detailed information see the tab documentation.


Field Summary
static int ENTER
           
static int LEAVE
           
static int PRESSED
           
static int RELEASED
           
static int RELEASEDOUTSIDE
           
 
Constructor Summary
ControlEvent(ControllerGroup theController)
           
ControlEvent(Tab theController)
           
 
Method Summary
 float[] arrayValue()
          returns a float array, apllies for e.g.
 Controller controller()
          returns the instance of the controller.
 ControlGroup group()
          return the tab that evoked the event.
 boolean isController()
          check if the event was evoked by a controller.
 boolean isGroup()
          check if the event was evoked by a controlGroup.
 boolean isTab()
          check if the event was evoked by a tab.
 java.lang.String label()
          get the label of the controller that evoked the event.
 java.lang.String name()
           
 java.lang.String stringValue()
          returns a string value if applicable to the controller e.g.
 Tab tab()
          return the tab that evoked the event.
 float value()
          returns the value of the controller as float.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRESSED

public static final int PRESSED
See Also:
Constant Field Values

ENTER

public static final int ENTER
See Also:
Constant Field Values

LEAVE

public static final int LEAVE
See Also:
Constant Field Values

RELEASED

public static final int RELEASED
See Also:
Constant Field Values

RELEASEDOUTSIDE

public static final int RELEASEDOUTSIDE
See Also:
Constant Field Values
Constructor Detail

ControlEvent

public ControlEvent(Tab theController)
Parameters:
theController - Controller

ControlEvent

public ControlEvent(ControllerGroup theController)
Parameters:
theController - Controller
Method Detail

value

public float value()
returns the value of the controller as float.

Returns:
float

stringValue

public java.lang.String stringValue()
returns a string value if applicable to the controller e.g. textfield has a string value.

Returns:
String

arrayValue

public float[] arrayValue()
returns a float array, apllies for e.g. Range.

Returns:

controller

public Controller controller()
returns the instance of the controller.

Returns:
Controller

tab

public Tab tab()
return the tab that evoked the event.

Returns:
Tab

group

public ControlGroup group()
return the tab that evoked the event.

Returns:
Tab

label

public java.lang.String label()
get the label of the controller that evoked the event.

Returns:
String

isTab

public boolean isTab()
check if the event was evoked by a tab.

Returns:
boolean

isController

public boolean isController()
check if the event was evoked by a controller.

Returns:
boolean

isGroup

public boolean isGroup()
check if the event was evoked by a controlGroup.

Returns:
boolean

name

public java.lang.String name()


processing library controlP5 by Andreas Schlegel. (c) 2010