|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectcontrolP5.ControlP5
public class ControlP5
controlP5 is a processing and java library for creating simple control GUIs.
Field Summary | |
---|---|
CColor |
color
|
ControlWindow |
controlWindow
|
static boolean |
DEBUG
|
static int |
grixel
|
static boolean |
isApplet
|
static ControlWindowKeyHandler |
keyHandler
|
static processing.core.PApplet |
papplet
|
static int |
standard56
|
static int |
standard58
|
static int |
synt24
|
static java.lang.String |
VERSION
|
Fields inherited from interface controlP5.ControlP5Constants |
---|
acceptClassList, ALT, ARRAY, BACKSPACE, BOOLEAN, CONTROL, DECREASE, DELETE, DOWN, ENTER, ESCAPE, eventMethod, FIELD, FLOAT, HALF_PI, HIDE, INCREASE, INTEGER, INVALID, KEYCONTROL, LEFT, LOAD, MENU, METHOD, PI, PRINT, RESET, RIGHT, SAVE, SHIFT, STRING, SWITCH_BACK, SWITCH_FORE, TAB, TWO_PI, UP, VERBOSE |
Constructor Summary | |
---|---|
ControlP5(processing.core.PApplet theParent)
instantiate controlP5. |
|
ControlP5(processing.core.PApplet theParent,
ControlFont theControlFont)
|
Method Summary | |
---|---|
Bang |
addBang(java.lang.String theName,
int theX,
int theY,
int theWidth,
int theHeight)
add a bang to controlP5. |
Button |
addButton(java.lang.String theName,
float theValue,
int theX,
int theY,
int theW,
int theH)
a button to controlP5. |
CheckBox |
addCheckBox(java.lang.String theName,
int theX,
int theY)
|
ControlWindow |
addControlWindow(java.lang.String theWindowName,
int theWidth,
int theHeight)
create a new ControlWindow. |
ControlWindow |
addControlWindow(java.lang.String theWindowName,
int theX,
int theY,
int theWidth,
int theHeight)
|
ControlWindow |
addControlWindow(java.lang.String theWindowName,
int theX,
int theY,
int theWidth,
int theHeight,
int theFrameRate)
|
ControlWindow |
addControlWindow(java.lang.String theWindowName,
int theX,
int theY,
int theWidth,
int theHeight,
java.lang.String theRenderer,
int theFrameRate)
create a new ControlWindow. |
ControlGroup |
addGroup(java.lang.String theName,
int theX,
int theY)
|
ControlGroup |
addGroup(java.lang.String theName,
int theX,
int theY,
int theW)
add a group to controlP5. |
Knob |
addKnob(java.lang.String theName,
float theMin,
float theMax,
float theDefaultValue,
int theX,
int theY,
int theDiameter)
add a knob to controlP5. |
Knob |
addKnob(java.lang.String theName,
float theMin,
float theMax,
int theX,
int theY,
int theDiameter)
add a knob to your controlP5 setup. |
ListBox |
addListBox(java.lang.String theName,
int theX,
int theY,
int theW,
int theH)
|
Matrix |
addMatrix(java.lang.String theName,
int theCellX,
int theCellY,
int theX,
int theY,
int theWidth,
int theHeight)
|
MultiList |
addMultiList(java.lang.String theName,
int theX,
int theY,
int theWidth,
int theHeight)
|
Numberbox |
addNumberbox(java.lang.String theName,
float theDefaultValue,
int theX,
int theY,
int theWidth,
int theHeight)
add a numberbox to controlP5. |
Numberbox |
addNumberbox(java.lang.String theName,
int theX,
int theY,
int theWidth,
int theHeight)
add a numberbox to controlP5. |
Radio |
addRadio(java.lang.String theName,
int theX,
int theY)
add a radio list to controlP5. |
Radio |
addRadio(java.lang.String theName,
int theX,
int theY,
int theWidth,
int theHeight,
int theLineSpacing)
|
RadioButton |
addRadioButton(java.lang.String theName,
int theX,
int theY)
|
Range |
addRange(java.lang.String theName,
float theMin,
float theMax,
float theDefaultMinValue,
float theDefaultMaxValue,
int theX,
int theY,
int theW,
int theH)
|
Range |
addRange(java.lang.String theName,
float theMin,
float theMax,
int theX,
int theY,
int theWidth,
int theHeight)
add a slider to controlP5. |
ScrollList |
addScrollList(java.lang.String theName,
int theX,
int theY,
int theW,
int theH)
add a scroll list to controlP5. |
Slider |
addSlider(java.lang.String theName,
float theMin,
float theMax,
float theDefaultValue,
int theX,
int theY,
int theW,
int theH)
add a slider to controlP5. |
Slider |
addSlider(java.lang.String theName,
float theMin,
float theMax,
int theX,
int theY,
int theWidth,
int theHeight)
add a slider to controlP5. |
Tab |
addTab(ControlWindow theWindow,
java.lang.String theName)
|
Tab |
addTab(processing.core.PApplet theWindow,
java.lang.String theName)
|
Tab |
addTab(java.lang.String theName)
add a tab to controlP5. |
Textarea |
addTextarea(java.lang.String theName,
java.lang.String theText,
int theX,
int theY,
int theW,
int theH)
add a textlabel to controlP5. |
Textfield |
addTextfield(java.lang.String theName,
int theX,
int theY,
int theW,
int theH)
add a textfield to controlP5. |
Textlabel |
addTextlabel(java.lang.String theName,
java.lang.String theText,
int theX,
int theY)
|
Toggle |
addToggle(java.lang.String theName,
boolean theDefaultValue,
float theX,
float theY,
int theWidth,
int theHeight)
add a toggle to controlP5. |
Toggle |
addToggle(java.lang.String theName,
float theX,
float theY,
int theWidth,
int theHeight)
add a toggle to controlP5. |
ControlBroadcaster |
controlbroadcaster()
|
Controller |
controller(java.lang.String theName)
get a controller by name. |
void |
draw()
|
java.lang.String |
filePath()
get the current file path where your controlP5 setup will be save to on your local disk. |
static ControlFont |
getControlFont()
|
ControllerInterface[] |
getControllerList()
|
ControllerGroup |
getGroup(java.lang.String theGroupName)
get a group by name. |
Tab |
getTab(ControlWindow theWindow,
java.lang.String theName)
get a tab by name from a specific controlwindow. |
Tab |
getTab(java.lang.String theName)
get a tab by name. |
ControllerGroup |
group(java.lang.String theGroupName)
get a group by name |
void |
hide()
hide all controllers and tabs in your sketch. |
boolean |
isAutoDraw()
check if the autoDraw function for the main window is enabled(true) or disabled(false). |
boolean |
isUpdate()
|
boolean |
isVisible()
|
boolean |
load(java.lang.String theFileName)
load an xml file, containing a controlP5 setup |
void |
lock()
lock ControlP5 to disable moving Controllers around. |
void |
register(ControllerInterface theController)
|
void |
remove(java.lang.String theString)
remove a controlP5 element such as a controller, group, or tab by name. |
boolean |
save()
save controlP5 settings to your local disk or to a remote server. |
boolean |
save(java.lang.String theFilePath)
save controlP5 settings to your local disk or to a remote server. |
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. |
void |
setColorActive(int theColor)
set the active state color of tabs and controllers. |
void |
setColorBackground(int theColor)
set the backgorund color of tabs and controllers. |
void |
setColorForeground(int theColor)
set the foreground color of tabs and controllers. |
void |
setColorLabel(int theColor)
set the label color of tabs and controllers. |
void |
setColorValue(int theColor)
set the value color of controllers. |
boolean |
setControlFont(ControlFont theControlFont)
|
boolean |
setControlFont(processing.core.PFont thePFont)
|
boolean |
setControlFont(processing.core.PFont thePFont,
int theFontSize)
|
void |
setFilePath(java.lang.String theFilePath)
set the path / filename of the xml file your controlP5 setup will be saved to. |
void |
setTabEventsActive(boolean theFlag)
|
void |
setUpdate(boolean theFlag)
|
void |
setUrlPath(java.lang.String theUrlPath)
you can set an url an e.g. |
void |
setUrlPath(java.lang.String theUrlPath,
java.lang.String theFilename)
you can set an url e.g. |
void |
show()
show all controllers and tabs in your sketch. |
Tab |
tab(ControlWindow theWindow,
java.lang.String theName)
get a tab by name from a specific controlwindow. |
Tab |
tab(java.lang.String theName)
get a tab by name. |
void |
trigger()
Deprecated. |
void |
unlock()
unlock ControlP5 to enable moving Controllers around. |
void |
update()
|
java.lang.String |
urlPath()
get the current url path where your controlP5 setup will be save to a remote server e.g. |
java.lang.String |
version()
get the current version of controlP5 |
ControlWindow |
window(processing.core.PApplet theApplet)
|
ControlWindow |
window(java.lang.String theWindowName)
get a ControlWindow by name. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public ControlWindow controlWindow
public CColor color
public static final int standard58
public static final int standard56
public static final int synt24
public static final int grixel
public static ControlWindowKeyHandler keyHandler
public static processing.core.PApplet papplet
public static final java.lang.String VERSION
public static boolean isApplet
public static boolean DEBUG
Constructor Detail |
---|
public ControlP5(processing.core.PApplet theParent)
theParent
- PAppletpublic ControlP5(processing.core.PApplet theParent, ControlFont theControlFont)
Method Detail |
---|
public void setTabEventsActive(boolean theFlag)
public void setAutoInitialization(boolean theFlag)
theFlag
- booleanpublic void setAutoDraw(boolean theFlag)
theFlag
- booleanpublic boolean isAutoDraw()
public ControlBroadcaster controlbroadcaster()
public Tab addTab(java.lang.String theName)
theName
- String
public Tab addTab(processing.core.PApplet theWindow, java.lang.String theName)
public Tab addTab(ControlWindow theWindow, java.lang.String theName)
public Tab tab(java.lang.String theName)
theName
- String
public Tab getTab(java.lang.String theName)
theName
- String
public Tab tab(ControlWindow theWindow, java.lang.String theName)
theWindow
- ControlWindowtheName
- String
public Tab getTab(ControlWindow theWindow, java.lang.String theName)
theWindow
- ControlWindowtheName
- String
public Button addButton(java.lang.String theName, float theValue, int theX, int theY, int theW, int theH)
theName
- StringtheValue
- floattheX
- inttheY
- inttheW
- inttheH
- int
public Bang addBang(java.lang.String theName, int theX, int theY, int theWidth, int theHeight)
theName
- StringtheX
- inttheY
- inttheWidth
- inttheHeight
- int
public Toggle addToggle(java.lang.String theName, boolean theDefaultValue, float theX, float theY, int theWidth, int theHeight)
theName
- StringtheDefaultValue
- booleantheX
- floattheY
- floattheWidth
- inttheHeight
- int
public Toggle addToggle(java.lang.String theName, float theX, float theY, int theWidth, int theHeight)
theName
- StringtheDefaultValue
- booleantheX
- floattheY
- floattheWidth
- inttheHeight
- int
public Matrix addMatrix(java.lang.String theName, int theCellX, int theCellY, int theX, int theY, int theWidth, int theHeight)
public Slider addSlider(java.lang.String theName, float theMin, float theMax, float theDefaultValue, int theX, int theY, int theW, int theH)
theName
- StringtheMin
- floattheMax
- floattheDefaultValue
- floattheX
- inttheY
- inttheW
- inttheH
- int
public Slider addSlider(java.lang.String theName, float theMin, float theMax, int theX, int theY, int theWidth, int theHeight)
theName
- StringtheMin
- floattheMax
- floattheX
- inttheY
- inttheWidth
- inttheHeight
- int
public Range addRange(java.lang.String theName, float theMin, float theMax, float theDefaultMinValue, float theDefaultMaxValue, int theX, int theY, int theW, int theH)
public Range addRange(java.lang.String theName, float theMin, float theMax, int theX, int theY, int theWidth, int theHeight)
theName
- StringtheMin
- floattheMax
- floattheX
- inttheY
- inttheWidth
- inttheHeight
- int
public Numberbox addNumberbox(java.lang.String theName, int theX, int theY, int theWidth, int theHeight)
theName
- StringtheX
- floattheY
- floattheWidth
- inttheHeight
- int
public Numberbox addNumberbox(java.lang.String theName, float theDefaultValue, int theX, int theY, int theWidth, int theHeight)
theName
- StringtheDefaultValue
- inttheX
- floattheY
- floattheWidth
- inttheHeight
- int
public Knob addKnob(java.lang.String theName, float theMin, float theMax, int theX, int theY, int theDiameter)
theName
- StringtheMin
- floattheMax
- floattheX
- floattheY
- floattheDiameter
- int
public MultiList addMultiList(java.lang.String theName, int theX, int theY, int theWidth, int theHeight)
public Knob addKnob(java.lang.String theName, float theMin, float theMax, float theDefaultValue, int theX, int theY, int theDiameter)
theName
- StringtheMin
- floattheMax
- floattheDefaultValue
- floattheX
- floattheY
- floattheDiameter
- int
public Textarea addTextarea(java.lang.String theName, java.lang.String theText, int theX, int theY, int theW, int theH)
theName
- StringtheText
- StringtheX
- inttheY
- inttheW
- inttheH
- int
public Textlabel addTextlabel(java.lang.String theName, java.lang.String theText, int theX, int theY)
public Textfield addTextfield(java.lang.String theName, int theX, int theY, int theW, int theH)
theName
- StringtheX
- inttheY
- inttheW
- inttheH
- int
public Radio addRadio(java.lang.String theName, int theX, int theY)
theName
- StringtheX
- inttheY
- int
public Radio addRadio(java.lang.String theName, int theX, int theY, int theWidth, int theHeight, int theLineSpacing)
public RadioButton addRadioButton(java.lang.String theName, int theX, int theY)
public CheckBox addCheckBox(java.lang.String theName, int theX, int theY)
public ScrollList addScrollList(java.lang.String theName, int theX, int theY, int theW, int theH)
theName
- StringtheX
- inttheY
- inttheW
- inttheH
- int
public ListBox addListBox(java.lang.String theName, int theX, int theY, int theW, int theH)
public ControlGroup addGroup(java.lang.String theName, int theX, int theY, int theW)
theName
- StringtheX
- inttheY
- int
public ControlGroup addGroup(java.lang.String theName, int theX, int theY)
public void register(ControllerInterface theController)
theController
- ControllerInterfacepublic ControllerInterface[] getControllerList()
public void remove(java.lang.String theString)
theString
- Stringpublic Controller controller(java.lang.String theName)
theName
- String
public ControllerGroup group(java.lang.String theGroupName)
theGroupName
- String
public ControllerGroup getGroup(java.lang.String theGroupName)
theGroupName
- String
public void draw()
public ControlWindow addControlWindow(java.lang.String theWindowName, int theWidth, int theHeight)
theWindowName
- StringtheWidth
- inttheHeight
- int
public ControlWindow addControlWindow(java.lang.String theWindowName, int theX, int theY, int theWidth, int theHeight)
public ControlWindow addControlWindow(java.lang.String theWindowName, int theX, int theY, int theWidth, int theHeight, int theFrameRate)
public ControlWindow addControlWindow(java.lang.String theWindowName, int theX, int theY, int theWidth, int theHeight, java.lang.String theRenderer, int theFrameRate)
theWindowName
- StringtheX
- inttheY
- inttheWidth
- inttheHeight
- int
public ControlWindow window(processing.core.PApplet theApplet)
public ControlWindow window(java.lang.String theWindowName)
theName
- String
public void setFilePath(java.lang.String theFilePath)
theFilename
- Stringpublic void setUrlPath(java.lang.String theUrlPath)
theUrlPath
- Stringpublic void setUrlPath(java.lang.String theUrlPath, java.lang.String theFilename)
theUrlPath
- StringtheFilename
- Stringpublic java.lang.String filePath()
public java.lang.String urlPath()
public void setColorActive(int theColor)
theColor
- intpublic void setColorForeground(int theColor)
theColor
- intpublic void setColorBackground(int theColor)
theColor
- intpublic void setColorLabel(int theColor)
theColor
- intpublic void setColorValue(int theColor)
theColor
- intpublic void lock()
public void unlock()
public boolean save(java.lang.String theFilePath)
theFilename
- String
public boolean save()
public boolean load(java.lang.String theFileName)
theFileName
- public java.lang.String version()
public void show()
public boolean isVisible()
public void hide()
public void update()
public boolean isUpdate()
public void setUpdate(boolean theFlag)
public void trigger()
public boolean setControlFont(ControlFont theControlFont)
public boolean setControlFont(processing.core.PFont thePFont, int theFontSize)
public boolean setControlFont(processing.core.PFont thePFont)
public static ControlFont getControlFont()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |