|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectcontrolP5.Controller
public abstract class Controller
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:
Controller.setBroadcast(boolean)
Bang
,
Button
,
Knob
,
Matrix
,
MultiList
,
Numberbox
,
RadioButton
,
ListBox
,
Slider
,
Textarea
,
Textfield
,
Textlabel
,
Toggle
,
ControlGroup
,
ControlBehavior
,
ControlEvent
/**
* 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 | |
---|---|
static int |
autoHeight
|
static processing.core.PVector |
autoSpacing
|
static int |
autoWidth
|
Fields inherited from interface controlP5.ControlP5Constants |
---|
acceptClassList, ACTION_BROADCAST, ACTION_ENTER, ACTION_LEAVE, ACTION_PRESSED, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTIVE, ALL, ALT, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, KEYCONTROL, LEFT, LEFT_OUTSIDE, LINE, LOAD, MENU, METHOD, MOVE, MULTI, MULTIPLES, OVER, PI, PRESSED, PRINT, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, TAB, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT |
Constructor Summary | |
---|---|
Controller(ControlP5 theControlP5,
java.lang.String theName)
Convenience constructor to extend Controller. |
Method Summary | |
---|---|
java.lang.Object |
add(ControllerInterface theElement)
|
java.lang.Object |
addCallback(CallbackListener theListener)
|
java.lang.Object |
addListener(ControlListener theListener)
|
java.lang.Object |
align(int theCaptionX,
int theCaptionY,
int theValueX,
int theValueY)
|
java.lang.Object |
bringToFront()
|
java.lang.Object |
bringToFront(ControllerInterface theController)
|
java.lang.Object |
changeValue(float theValue)
sets the value of the controller without sending the broadcast event. |
processing.core.PVector |
getAbsolutePosition()
|
java.lang.String |
getAddress()
|
float[] |
getArrayValue()
returns the current float array value of a controller. |
float |
getArrayValue(int theIndex)
|
ControlBehavior |
getBehavior()
|
Label |
getCaptionLabel()
|
CColor |
getColor()
|
java.util.List |
getControllerPlugList()
|
ControlWindow |
getControlWindow()
|
int |
getDecimalPrecision()
|
float |
getDefaultValue()
|
int |
getHeight()
|
int |
getId()
returns the id of a controller, by default the id is -1. |
java.lang.String |
getLabel()
returns the controller's caption label text. |
float |
getMax()
returns the maximum value of the controller. |
float |
getMin()
returns the minimum value of the controller. |
java.lang.String |
getName()
returns the index name of the controller. |
ControllerInterface |
getParent()
returns the parent of a controller. |
int |
getPickingColor()
|
Pointer |
getPointer()
|
processing.core.PVector |
getPosition()
get the position of a controller. |
ControllerProperty |
getProperty(java.lang.String thePropertyName)
|
ControllerProperty |
getProperty(java.lang.String theSetter,
java.lang.String theGetter)
|
java.lang.String |
getStringValue()
|
Tab |
getTab()
get the instance of the tab the controller belongs to. |
float |
getValue()
|
Label |
getValueLabel()
|
int |
getWidth()
|
ControlWindow |
getWindow()
returns the control window of the controller |
java.lang.Object |
hide()
|
void |
init()
|
boolean |
isActive()
checks if a controller is active. |
boolean |
isBroadcast()
check if broadcasting is enabled or disabled for a controller. |
boolean |
isInside()
returns true or false and indicates if the mouse is inside the area of a controller. |
boolean |
isLabelVisible()
|
boolean |
isListening()
returns true or false for the current listening status. |
boolean |
isLock()
|
boolean |
isMouseOver()
check if the mouse is within this particular controller. |
boolean |
isMousePressed()
returns true or false if the mouse has is pressed. |
boolean |
isMoveable()
checks if a controller is moveable. |
boolean |
isUpdate()
enables the update function for a controller. |
boolean |
isVisible()
|
void |
keyEvent(java.awt.event.KeyEvent theEvent)
|
java.lang.Object |
linebreak()
|
java.lang.Object |
listen(boolean theValue)
enables a controller to listen to changes made to the variable linked to the controller. |
int |
listenerSize()
|
java.lang.Object |
lock()
disables the controller to be moved, or changed or controlled by the user. |
java.lang.Object |
moveTo(ControlGroup theGroup)
|
java.lang.Object |
moveTo(ControllerGroup theGroup)
|
java.lang.Object |
moveTo(ControllerGroup theGroup,
Tab theTab,
ControlWindow theControlWindow)
|
java.lang.Object |
moveTo(ControlWindow theControlWindow)
moves the controller to the default tab of a control window - other than the main window. |
java.lang.Object |
moveTo(ControlWindow theControlWindow,
java.lang.String theTabName)
|
java.lang.Object |
moveTo(processing.core.PApplet theApplet)
moves the controller to the default tab inside the main window. |
java.lang.Object |
moveTo(processing.core.PApplet theApplet,
java.lang.String theTabName)
moves the controller to a tab inside the main window. |
java.lang.Object |
moveTo(java.lang.String theTabName)
moves the controller to another tab. |
java.lang.Object |
moveTo(Tab theTab)
moves the controller to another tab. |
java.lang.Object |
plugTo(java.lang.Object theObject)
|
java.lang.Object |
plugTo(java.lang.Object[] theObjects)
plugs the controller to a list of objects |
java.lang.Object |
plugTo(java.lang.Object[] theObjects,
java.lang.String theName)
|
java.lang.Object |
plugTo(java.lang.Object theObject,
java.lang.String theName)
|
java.lang.Object |
registerProperty(java.lang.String thePropertyName)
|
java.lang.Object |
registerProperty(java.lang.String theSetter,
java.lang.String theGetter)
|
java.lang.Object |
registerTooltip(java.lang.String theText)
adds a tooltip to a controller, by default the tooltip is disabled. |
void |
remove()
removes a controller from controlP5. |
java.lang.Object |
remove(ControllerInterface theElement)
|
java.lang.Object |
removeBehavior()
|
java.lang.Object |
removeCallback()
|
java.lang.Object |
removeCallback(CallbackListener theListener)
|
java.lang.Object |
removeListener(ControlListener theListener)
|
java.lang.Object |
removeProperty(java.lang.String thePropertyName)
|
java.lang.Object |
removeProperty(java.lang.String theSetter,
java.lang.String theGetter)
|
java.lang.Object |
setAbsolutePosition(processing.core.PVector thePVector)
|
java.lang.Object |
setAddress(java.lang.String theAddress)
|
java.lang.Object |
setArrayValue(float[] theArray)
|
java.lang.Object |
setArrayValue(int theIndex,
float theValue)
|
java.lang.Object |
setBehavior(ControlBehavior theBehavior)
with setBehavior you can add a ControlBehavior to a controller. |
java.lang.Object |
setBroadcast(boolean theFlag)
Use setBroadcast to enable and disable the broadcasting of changes in a controller's value. |
java.lang.Object |
setCaptionLabel(java.lang.String theLabel)
sets the content of the caption label of a controller. |
java.lang.Object |
setColor(CColor theColor)
|
java.lang.Object |
setColorActive(int theColor)
|
java.lang.Object |
setColorBackground(int theColor)
|
java.lang.Object |
setColorCaptionLabel(int theColor)
|
java.lang.Object |
setColorForeground(int theColor)
|
java.lang.Object |
setColorValueLabel(int theColor)
|
java.lang.Object |
setDecimalPrecision(int theValue)
sets the decimal precision of a controller's float value displayed. |
java.lang.Object |
setDefaultValue(float theValue)
set the default value. |
java.lang.Object |
setGroup(ControllerGroup theGroup)
|
java.lang.Object |
setGroup(java.lang.String theName)
sets the group of the controller. |
java.lang.Object |
setHeight(int theHeight)
|
java.lang.Object |
setId(int theId)
set the id of a controller. |
java.lang.Object |
setImage(processing.core.PImage theImage)
|
java.lang.Object |
setImage(processing.core.PImage theImage,
int theState)
|
java.lang.Object |
setImages(processing.core.PImage[] imgs)
|
java.lang.Object |
setImages(processing.core.PImage theImageDefault,
processing.core.PImage theImageOver,
processing.core.PImage theImageActive)
by default controllers use simple shapes, to replace these shapes with images, use setImages(). |
java.lang.Object |
setImages(processing.core.PImage theImageDefault,
processing.core.PImage theImageOver,
processing.core.PImage theImageActive,
processing.core.PImage theImageHighlight)
|
java.lang.Object |
setLabelVisible(boolean theValue)
show or hide the labels of a controller. |
java.lang.Object |
setLock(boolean theValue)
sets the lock status of the controller |
java.lang.Object |
setMax(float theValue)
sets the maximum value of the Controller. |
java.lang.Object |
setMin(float theValue)
sets the minimum value of the Controller. |
java.lang.Object |
setMouseOver(boolean theFlag)
|
boolean |
setMousePressed(boolean theStatus)
|
java.lang.Object |
setMoveable(boolean theValue)
enable or prevent the controller to be moveable. |
java.lang.Object |
setParent(ControllerInterface theParent)
set the parent of a parent of a controller. |
java.lang.Object |
setPosition(float theX,
float theY)
set the position of a controller. |
java.lang.Object |
setPosition(processing.core.PVector thePVector)
|
java.lang.Object |
setSize(int theWidth,
int theHeight)
|
java.lang.Object |
setSize(processing.core.PImage theImage)
auto-updates the size of a controller according to the dimensions of the PImage. |
java.lang.Object |
setStringValue(java.lang.String theValue)
|
java.lang.Object |
setTab(ControlWindow theWindow,
java.lang.String theName)
|
java.lang.Object |
setTab(java.lang.String theName)
sets the tab of the controller. |
java.lang.Object |
setUpdate(boolean theFlag)
disables the update function for a controller. |
java.lang.Object |
setValue(float theValue)
|
java.lang.Object |
setValueLabel(java.lang.String theLabel)
set or change the value of the value label of a controller. |
java.lang.Object |
setView(ControllerView theDisplay)
use setDisplay to customize your controller look. |
void |
setView(ControllerView theDisplay,
int theMode)
|
java.lang.Object |
setVisible(boolean theFlag)
|
java.lang.Object |
setWidth(int theWidth)
|
java.lang.Object |
show()
|
java.lang.Object |
unlock()
enables the controller to be moved, changed and controlled by the user. |
java.lang.Object |
unplugFrom(java.lang.Object theObject)
unplugs the Controller for a single object |
java.lang.Object |
unplugFrom(java.lang.Object[] theObjects)
unplugs the controller from a list of objects |
java.lang.Object |
unregisterTooltip()
|
java.lang.Object |
update()
updates the value of the controller without having to set the value explicitly. |
java.lang.Object |
updateAbsolutePosition()
|
java.lang.Object |
updateEvents()
updateEvents is used for internal updates of a controller. |
java.lang.Object |
updateInternalEvents(processing.core.PApplet theApplet)
a method for putting input events like e.g. |
java.lang.Object |
updateSize()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface controlP5.ControllerInterface |
---|
continuousUpdateEvents, draw, parent, setColorLabel, setColorValue, setLabel |
Methods inherited from interface controlP5.CDrawable |
---|
draw |
Field Detail |
---|
public static int autoHeight
public static processing.core.PVector autoSpacing
public static int autoWidth
Constructor Detail |
---|
public Controller(ControlP5 theControlP5, java.lang.String theName)
theControlP5
- theName
-
/**
* ControlP5 extending Controllers
*
* the following example shows how to extend the Controller class to
* create customizable Controllers. You can either extend the Controller class itself,
* or any class that extends Controller itself like the Slider, Button, DropdownList, etc.
*
* How to:
*
* 1) do a super call to the convenience constructor requiring
* 2 parameter (ControlP5 instance, name)
*
* 2) the Controller class has a set of empty methods that allow you to capture
* inputs from the mouse including
* onEnter(), onLeave(), onPress(), onRelease(), onClick(), onScroll(int), onDrag()
* These you can override and include functionality as needed.
*
* 3) use method getPointer() to return the local (relative)
* xy-coordinates of the controller
*
* 4) after instantiation custom controllers are treated the same
* as default controlP5 controllers.
*
* by Andreas Schlegel, 2012
* www.sojamo.de/libraries/controlp5
*
*/
import controlP5.*;
ControlP5 cp5;
PApplet p;
void setup() {
size(400, 400);
cp5 = new ControlP5(this);
// create 2 groups to show nesting of custom controllers and
//
Group g1 = cp5.addGroup("a").setPosition(0,100).setWidth(180);
Group g2 = cp5.addGroup("b").setPosition(0,10).setWidth(180);
g2.moveTo(g1);
// create 2 custom Controllers from class MyButton
// MyButton extends Controller and inherits all methods accordingly.
new MyButton(cp5, "b1").setPosition(0, 0).setSize(180, 200).moveTo(g2);
new MyButton(cp5, "b2").setPosition(205, 15).setSize(180, 200);
}
void draw() {
background(0);
}
// b1 will be called from Controller b1
public void b1(float theValue) {
println("yay button "+theValue);
}
public void controlEvent(ControlEvent theEvent) {
println("controlEvent : "+theEvent);
}
// Create a custom Controller, please not that
// MyButton extends Controller,
// is an indicator for the super class about the type of
// custom controller to be created.
class MyButton extends Controller {
int current = 0xffff0000;
float a = 128;
float na;
int y;
// use the convenience constructor of super class Controller
// MyButton will automatically registered and move to the
// default controlP5 tab.
MyButton(ControlP5 cp5, String theName) {
super(cp5, theName);
// replace the default view with a custom view.
setView(new ControllerView() {
public void display(PApplet p, Object b) {
// draw button background
na += (a-na) * 0.1;
p.fill(current,na);
p.rect(0, 0, getWidth(), getHeight());
// draw horizontal line which can be moved on the x-axis
// using the scroll wheel.
p.fill(0,255,0);
p.rect(0,y,width,10);
// draw the custom label
p.fill(128);
translate(0,getHeight()+14);
p.text(getName(),0,0);
p.text(getName(),0,0);
}
}
);
}
// override various input methods for mouse input control
void onEnter() {
cursor(HAND);
println("enter");
a = 255;
}
void onScroll(int n) {
println("scrolling");
y -= n;
y = constrain(y,0,getHeight()-10);
}
void onPress() {
println("press");
current = 0xffffff00;
}
void onClick() {
Pointer p1 = getPointer();
println("clicked at "+p1.x()+", "+p1.y());
current = 0xffffff00;
setValue(y);
}
void onRelease() {
println("release");
current = 0xffffffff;
}
void onMove() {
println("moving "+this+" "+_myControlWindow.getMouseOverList());
}
void onDrag() {
current = 0xff0000ff;
Pointer p1 = getPointer();
float dif = dist(p1.px(),p1.py(),p1.x(),p1.y());
println("dragging at "+p1.x()+", "+p1.y()+" "+dif);
}
void onReleaseOutside() {
onLeave();
}
void onLeave() {
println("leave");
cursor(ARROW);
a = 128;
}
}
Method Detail |
---|
public java.lang.Object add(ControllerInterface theElement)
add
in interface ControllerInterface
theElement
- ControllerInterface
public java.lang.Object addCallback(CallbackListener theListener)
theListener
-
CallbackListener
public java.lang.Object addListener(ControlListener theListener)
addListener
in interface ControllerInterface
theListener
- ControlListener
ControlListener
public java.lang.Object align(int theCaptionX, int theCaptionY, int theValueX, int theValueY)
public java.lang.Object bringToFront()
bringToFront
in interface ControllerInterface
public java.lang.Object bringToFront(ControllerInterface theController)
bringToFront
in interface ControllerInterface
public final java.lang.Object changeValue(float theValue)
theValue
- float
public processing.core.PVector getAbsolutePosition()
getAbsolutePosition
in interface ControllerInterface
PVector
public java.lang.String getAddress()
getAddress
in interface ControllerInterface
public float[] getArrayValue()
getArrayValue
in interface ControllerInterface
Controller.getValue()
,
Controller.getStringValue()
public float getArrayValue(int theIndex)
getArrayValue
in interface ControllerInterface
theIndex
-
public ControlBehavior getBehavior()
public Label getCaptionLabel()
Label
public CColor getColor()
getColor
in interface ControllerInterface
public java.util.List getControllerPlugList()
public ControlWindow getControlWindow()
public int getDecimalPrecision()
public float getDefaultValue()
public int getHeight()
getHeight
in interface ControllerInterface
public int getId()
getId
in interface ControllerInterface
public java.lang.String getLabel()
public float getMax()
public float getMin()
public java.lang.String getName()
getName
in interface ControllerInterface
public ControllerInterface getParent()
getParent
in interface ControllerInterface
public int getPickingColor()
getPickingColor
in interface ControllerInterface
public final Pointer getPointer()
public processing.core.PVector getPosition()
getPosition
in interface ControllerInterface
public ControllerProperty getProperty(java.lang.String thePropertyName)
getProperty
in interface ControllerInterface
public ControllerProperty getProperty(java.lang.String theSetter, java.lang.String theGetter)
getProperty
in interface ControllerInterface
public java.lang.String getStringValue()
getStringValue
in interface ControllerInterface
Controller.getValue()
,
Controller.getArrayValue()
public Tab getTab()
getTab
in interface ControllerInterface
public float getValue()
getValue
in interface ControllerInterface
Controller.getStringValue()
,
Controller.getArrayValue()
public Label getValueLabel()
public int getWidth()
getWidth
in interface ControllerInterface
public ControlWindow getWindow()
getWindow
in interface ControllerInterface
public java.lang.Object hide()
hide
in interface ControllerInterface
public void init()
init
in interface ControllerInterface
public boolean isActive()
public boolean isBroadcast()
public boolean isInside()
public boolean isLabelVisible()
public boolean isListening()
Controller.listen(boolean)
public boolean isLock()
public boolean isMouseOver()
isMouseOver
in interface ControllerInterface
public boolean isMousePressed()
public boolean isMoveable()
public boolean isUpdate()
isUpdate
in interface ControllerInterface
Controller.update()
,
Controller.setUpdate(boolean)
public boolean isVisible()
isVisible
in interface ControllerInterface
public void keyEvent(java.awt.event.KeyEvent theEvent)
keyEvent
in interface ControllerInterface
KeyEvent
- theEventpublic java.lang.Object linebreak()
public java.lang.Object listen(boolean theValue)
theFlag
-
public int listenerSize()
public java.lang.Object lock()
public final java.lang.Object moveTo(ControlGroup theGroup)
theGroup
-
public final java.lang.Object moveTo(ControllerGroup theGroup)
moveTo
in interface ControllerInterface
public final java.lang.Object moveTo(ControllerGroup theGroup, Tab theTab, ControlWindow theControlWindow)
moveTo
in interface ControllerInterface
public final java.lang.Object moveTo(ControlWindow theControlWindow)
theControlWindow
- public final java.lang.Object moveTo(ControlWindow theControlWindow, java.lang.String theTabName)
theControlWindow
- theTabName
-
public final java.lang.Object moveTo(processing.core.PApplet theApplet)
theApplet
-
public final java.lang.Object moveTo(processing.core.PApplet theApplet, java.lang.String theTabName)
theApplet
- theTabName
- public final java.lang.Object moveTo(java.lang.String theTabName)
theTabName
- String
public final java.lang.Object moveTo(Tab theTab)
theTab
-
public java.lang.Object plugTo(java.lang.Object theObject)
theObject
-
public java.lang.Object plugTo(java.lang.Object[] theObjects)
theObject
-
public java.lang.Object plugTo(java.lang.Object[] theObjects, java.lang.String theName)
theObjects
- theName
-
public java.lang.Object plugTo(java.lang.Object theObject, java.lang.String theName)
public java.lang.Object registerProperty(java.lang.String thePropertyName)
registerProperty
in interface ControllerInterface
public java.lang.Object registerProperty(java.lang.String theSetter, java.lang.String theGetter)
registerProperty
in interface ControllerInterface
public java.lang.Object registerTooltip(java.lang.String theText)
theText
-
public void remove()
remove
in interface ControllerInterface
public java.lang.Object remove(ControllerInterface theElement)
remove
in interface ControllerInterface
theElement
- ControllerInterface
public java.lang.Object removeBehavior()
public java.lang.Object removeCallback()
public java.lang.Object removeCallback(CallbackListener theListener)
theListener
-
CallbackListener
public java.lang.Object removeListener(ControlListener theListener)
theListener
- ControlListener
ControlListener
public java.lang.Object removeProperty(java.lang.String thePropertyName)
removeProperty
in interface ControllerInterface
public java.lang.Object removeProperty(java.lang.String theSetter, java.lang.String theGetter)
removeProperty
in interface ControllerInterface
public java.lang.Object setAbsolutePosition(processing.core.PVector thePVector)
setAbsolutePosition
in interface ControllerInterface
public java.lang.Object setAddress(java.lang.String theAddress)
setAddress
in interface ControllerInterface
public java.lang.Object setArrayValue(float[] theArray)
setArrayValue
in interface ControllerInterface
theArray
-
public java.lang.Object setArrayValue(int theIndex, float theValue)
setArrayValue
in interface ControllerInterface
theIndex
- theValue
-
public java.lang.Object setBehavior(ControlBehavior theBehavior)
theBehavior
- ControlBehavior
public java.lang.Object setBroadcast(boolean theFlag)
theFlag
- boolean
public java.lang.Object setCaptionLabel(java.lang.String theLabel)
setCaptionLabel
in interface ControllerInterface
theLabel
-
public java.lang.Object setColor(CColor theColor)
setColor
in interface ControllerInterface
public java.lang.Object setColorActive(int theColor)
setColorActive
in interface ControllerInterface
public java.lang.Object setColorBackground(int theColor)
setColorBackground
in interface ControllerInterface
public java.lang.Object setColorCaptionLabel(int theColor)
theColor
-
public java.lang.Object setColorForeground(int theColor)
setColorForeground
in interface ControllerInterface
public java.lang.Object setColorValueLabel(int theColor)
theColor
-
public java.lang.Object setDecimalPrecision(int theValue)
theValue
-
public java.lang.Object setDefaultValue(float theValue)
theValue
- float
public final java.lang.Object setGroup(ControllerGroup theGroup)
public final java.lang.Object setGroup(java.lang.String theName)
theName
- String
public java.lang.Object setHeight(int theHeight)
theHeight
-
public java.lang.Object setId(int theId)
setId
in interface ControllerInterface
int
- theId
public java.lang.Object setImage(processing.core.PImage theImage)
public java.lang.Object setImage(processing.core.PImage theImage, int theState)
theImage
- theState
- use Controller.DEFAULT (background) Controller.OVER (foreground)
Controller.ACTIVE (active)public java.lang.Object setImages(processing.core.PImage[] imgs)
public java.lang.Object setImages(processing.core.PImage theImageDefault, processing.core.PImage theImageOver, processing.core.PImage theImageActive)
theImageDefault
- theImageOver
- theImageActive
-
public java.lang.Object setImages(processing.core.PImage theImageDefault, processing.core.PImage theImageOver, processing.core.PImage theImageActive, processing.core.PImage theImageHighlight)
public java.lang.Object setLabelVisible(boolean theValue)
theValue
- boolean
public java.lang.Object setLock(boolean theValue)
theValue
-
public java.lang.Object setMax(float theValue)
theValue
- float
public java.lang.Object setMin(float theValue)
theValue
- float
public java.lang.Object setMouseOver(boolean theFlag)
setMouseOver
in interface ControllerInterface
public final boolean setMousePressed(boolean theStatus)
setMousePressed
in interface ControllerInterface
theStatus
- boolean
public java.lang.Object setMoveable(boolean theValue)
theValue
- boolean
public final java.lang.Object setParent(ControllerInterface theParent)
theParent
- ControllerInterface
public java.lang.Object setPosition(float theX, float theY)
setPosition
in interface ControllerInterface
theX
- floattheY
- float
public java.lang.Object setPosition(processing.core.PVector thePVector)
setPosition
in interface ControllerInterface
public java.lang.Object setSize(int theWidth, int theHeight)
theWidth
- theHeight
-
public java.lang.Object setSize(processing.core.PImage theImage)
theImage
-
public java.lang.Object setStringValue(java.lang.String theValue)
setStringValue
in interface ControllerInterface
theValue
-
public final java.lang.Object setTab(ControlWindow theWindow, java.lang.String theName)
public final java.lang.Object setTab(java.lang.String theName)
theName
- String
public java.lang.Object setUpdate(boolean theFlag)
setUpdate
in interface ControllerInterface
theFlag
- boolean
Controller.update()
,
Controller.isUpdate()
public java.lang.Object setValue(float theValue)
setValue
in interface ControllerInterface
theValue
- floatpublic java.lang.Object setValueLabel(java.lang.String theLabel)
theLabel
-
public java.lang.Object setView(ControllerView theDisplay)
theDisplay
-
ControllerView
public void setView(ControllerView theDisplay, int theMode)
public java.lang.Object setVisible(boolean theFlag)
theFlag
- boolean
public java.lang.Object setWidth(int theWidth)
theWidth
-
public java.lang.Object show()
show
in interface ControllerInterface
public java.lang.Object unlock()
public java.lang.Object unplugFrom(java.lang.Object theObject)
theObject
-
public java.lang.Object unplugFrom(java.lang.Object[] theObjects)
theObjects
-
public java.lang.Object unregisterTooltip()
Controller.registerTooltip(String)
public java.lang.Object update()
update
in interface ControllerInterface
Controller.setUpdate(boolean)
,
Controller.isUpdate()
public java.lang.Object updateAbsolutePosition()
updateAbsolutePosition
in interface ControllerInterface
public final java.lang.Object updateEvents()
updateEvents
in interface ControllerInterface
public java.lang.Object updateInternalEvents(processing.core.PApplet theApplet)
ControllerInterface
updateInternalEvents
in interface ControllerInterface
ControllerInterface.updateInternalEvents
public java.lang.Object updateSize()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |