public abstract class ControllerGroup<T> extends java.lang.Object implements ControllerInterface<T>, ControlP5Constants, ControlListener
acceptClassList, ACTION_BROADCAST, ACTION_CLICK, ACTION_DOUBLE_PRESS, ACTION_DRAG, ACTION_END_DRAG, ACTION_ENTER, ACTION_EXIT, ACTION_LEAVE, ACTION_MOVE, ACTION_PRESS, ACTION_PRESSED, ACTION_RELEASE, ACTION_RELEASE_OUTSIDE, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTION_START_DRAG, 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, delimiter, 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, JSON, KEYCONTROL, LEFT, LEFT_OUTSIDE, LIME, LINE, LIST, LOAD, MAROON, MENU, METHOD, MOVE, MULTI, MULTIPLES, NAVY, OLIVE, ORANGE, OVER, P2D, P3D, pathdelimiter, PI, PRESS, PRESSED, PRINT, PURPLE, RED, RELEASE, RELEASED, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SERIALIZED, 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_GREY, THEME_RED, THEME_RETRO, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TREE, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW
Constructor and Description |
---|
ControllerGroup(ControlP5 theControlP5,
ControllerGroup<?> theParent,
java.lang.String theName,
float theX,
float theY) |
ControllerGroup(ControlP5 theControlP5,
java.lang.String theName)
Convenience constructor to extend ControllerGroup.
|
Modifier and Type | Method and Description |
---|---|
T |
add(ControllerInterface<?> theElement)
Adds a controller to the group, but use Controller.setGroup() instead.
|
Canvas |
addCanvas(Canvas theCanvas)
Adds a canvas to a controllerGroup such as a tab or group.
|
T |
addCloseButton()
TODO redesign or deprecate add a close button to the controlbar of this controlGroup.
|
T |
addDrawable(CDrawable theElement) |
T |
addListener(ControlListener theListener) |
T |
bringToFront() |
T |
bringToFront(ControllerInterface<?> theController) |
T |
close() |
void |
continuousUpdateEvents() |
void |
controlEvent(ControlEvent theEvent)
controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about
value changes.
|
T |
disableCollapse() |
void |
draw(processing.core.PGraphics theGraphics) |
T |
enableCollapse() |
float[] |
getAbsolutePosition() |
java.lang.String |
getAddress() |
float[] |
getArrayValue() |
float |
getArrayValue(int theIndex) |
Label |
getCaptionLabel() |
CColor |
getColor() |
Controller<?> |
getController(java.lang.String theController) |
int |
getHeight() |
int |
getId() |
java.lang.String |
getInfo() |
java.lang.String |
getName() |
ControllerInterface<?> |
getParent() |
int |
getPickingColor() |
float[] |
getPosition() |
ControllerProperty |
getProperty(java.lang.String thePropertyName) |
ControllerProperty |
getProperty(java.lang.String theSetter,
java.lang.String theGetter) |
java.lang.String |
getStringValue() |
Tab |
getTab() |
float |
getValue() |
Label |
getValueLabel() |
int |
getWidth() |
ControlWindow |
getWindow() |
T |
hide() |
T |
hideArrow() |
T |
hideBar() |
void |
init() |
boolean |
isBarVisible() |
boolean |
isCollapse() |
boolean |
isMouseOver() |
boolean |
isMoveable() |
boolean |
isOpen() |
boolean |
isUpdate()
checks the update status of a controller.
|
boolean |
isVisible() |
void |
keyEvent(processing.event.KeyEvent theEvent) |
int |
listenerSize() |
T |
moveTo(ControllerGroup<?> theGroup) |
T |
moveTo(ControllerGroup<?> theGroup,
Tab theTab,
ControlWindow theControlWindow) |
T |
moveTo(ControlWindow theControlWindow) |
T |
moveTo(ControlWindow theControlWindow,
java.lang.String theTabName) |
T |
moveTo(processing.core.PApplet thePApplet) |
T |
moveTo(java.lang.String theTabName) |
T |
moveTo(java.lang.String theTabName,
ControlWindow theControlWindow) |
T |
moveTo(Tab theTab) |
T |
moveTo(Tab theTab,
ControlWindow theControlWindow) |
T |
open() |
T |
registerProperty(java.lang.String thePropertyName) |
T |
registerProperty(java.lang.String theSetter,
java.lang.String theGetter) |
void |
remove()
removes the group from controlP5.
|
T |
remove(CDrawable theElement) |
T |
remove(ControllerInterface<?> theElement)
Removes a controller from the group, but use Controller.setGroup() instead.
|
T |
removeCanvas(Canvas theCanvas)
Removes a canvas from a controller group.
|
T |
removeCloseButton()
TODO redesign or deprecate remove the close button.
|
T |
removeListener(ControlListener theListener) |
T |
removeProperty(java.lang.String thePropertyName) |
T |
removeProperty(java.lang.String theSetter,
java.lang.String theGetter) |
static float[] |
set(float[] theArray,
float... theValues)
convenience method to fill a float array in favor of theArray[0] = 1.2; etc.
|
T |
setAbsolutePosition(float[] thePos) |
T |
setAddress(java.lang.String theAddress) |
T |
setArrayValue(float[] theArray) |
T |
setArrayValue(int theIndex,
float theValue) |
T |
setCaptionLabel(java.lang.String theValue) |
T |
setColor(CColor theColor) |
T |
setColorActive(int theColor) |
T |
setColorBackground(int theColor) |
T |
setColorForeground(int theColor) |
T |
setColorLabel(int theColor) |
T |
setColorValue(int theColor) |
T |
setGroup(ControllerGroup<?> theGroup) |
T |
setGroup(java.lang.String theName) |
T |
setHeight(int theHeight) |
T |
setId(int theId) |
T |
setLabel(java.lang.String theLabel) |
T |
setMouseOver(boolean theFlag) |
boolean |
setMousePressed(boolean theStatus) |
T |
setMoveable(boolean theFlag)
set the moveable status of the group, when false, the group can't be moved.
|
T |
setOpen(boolean theFlag) |
T |
setPosition(float[] thePVector) |
T |
setPosition(float theX,
float theY) |
T |
setSize(int theWidth,
int theHeight) |
T |
setStringValue(java.lang.String theValue) |
T |
setTab(ControlWindow theWindow,
java.lang.String theName) |
T |
setTab(java.lang.String theName) |
T |
setTab(Tab theTab) |
T |
setTitle(java.lang.String theTitle) |
T |
setUpdate(boolean theFlag)
enables or disables the update function of a controller.
|
T |
setValue(float theValue) |
T |
setVisible(boolean theFlag) |
T |
setWidth(int theWidth) |
T |
show() |
T |
showArrow() |
T |
showBar() |
java.lang.String |
toString() |
T |
update() |
T |
updateAbsolutePosition() |
T |
updateEvents() |
T |
updateInternalEvents(processing.core.PApplet theApplet)
a method for putting input events like e.g.
|
static float |
x(float[] theArray)
returns the first element of the float array.
|
static float |
y(float[] theArray)
returns the second element of the float array.
|
public ControllerGroup(ControlP5 theControlP5, ControllerGroup<?> theParent, java.lang.String theName, float theX, float theY)
public ControllerGroup(ControlP5 theControlP5, java.lang.String theName)
public T add(ControllerInterface<?> theElement)
add
in interface ControllerInterface<T>
public Canvas addCanvas(Canvas theCanvas)
public T addCloseButton()
public T addListener(ControlListener theListener)
addListener
in interface ControllerInterface<T>
public T bringToFront()
bringToFront
in interface ControllerInterface<T>
public T bringToFront(ControllerInterface<?> theController)
bringToFront
in interface ControllerInterface<T>
public T close()
public void continuousUpdateEvents()
continuousUpdateEvents
in interface ControllerInterface<T>
public void controlEvent(ControlEvent theEvent)
ControlListener
controlEvent
in interface ControlListener
theEvent
- ControlEventCallbackListener
,
CallbackEvent
public T disableCollapse()
public final void draw(processing.core.PGraphics theGraphics)
draw
in interface ControllerInterface<T>
public T enableCollapse()
public float[] getAbsolutePosition()
getAbsolutePosition
in interface ControllerInterface<T>
public java.lang.String getAddress()
getAddress
in interface ControllerInterface<T>
public float[] getArrayValue()
getArrayValue
in interface ControllerInterface<T>
public float getArrayValue(int theIndex)
getArrayValue
in interface ControllerInterface<T>
public Label getCaptionLabel()
public CColor getColor()
getColor
in interface ControllerInterface<T>
public Controller<?> getController(java.lang.String theController)
public int getHeight()
getHeight
in interface ControllerInterface<T>
public int getId()
getId
in interface ControllerInterface<T>
public java.lang.String getInfo()
public java.lang.String getName()
getName
in interface ControllerInterface<T>
public ControllerInterface<?> getParent()
getParent
in interface ControllerInterface<T>
public int getPickingColor()
getPickingColor
in interface ControllerInterface<T>
public float[] getPosition()
getPosition
in interface ControllerInterface<T>
public ControllerProperty getProperty(java.lang.String thePropertyName)
getProperty
in interface ControllerInterface<T>
public ControllerProperty getProperty(java.lang.String theSetter, java.lang.String theGetter)
getProperty
in interface ControllerInterface<T>
public java.lang.String getStringValue()
getStringValue
in interface ControllerInterface<T>
public Tab getTab()
getTab
in interface ControllerInterface<T>
public float getValue()
getValue
in interface ControllerInterface<T>
public Label getValueLabel()
public int getWidth()
getWidth
in interface ControllerInterface<T>
public ControlWindow getWindow()
getWindow
in interface ControllerInterface<T>
public T hide()
hide
in interface ControllerInterface<T>
public T hideArrow()
public T hideBar()
public void init()
init
in interface ControllerInterface<T>
public boolean isBarVisible()
public boolean isCollapse()
public boolean isMouseOver()
isMouseOver
in interface ControllerInterface<T>
public boolean isMoveable()
public boolean isOpen()
public boolean isUpdate()
isUpdate
in interface ControllerInterface<T>
public boolean isVisible()
isVisible
in interface ControllerInterface<T>
public void keyEvent(processing.event.KeyEvent theEvent)
keyEvent
in interface ControllerInterface<T>
public int listenerSize()
public final T moveTo(ControllerGroup<?> theGroup)
moveTo
in interface ControllerInterface<T>
public final T moveTo(ControllerGroup<?> theGroup, Tab theTab, ControlWindow theControlWindow)
moveTo
in interface ControllerInterface<T>
public T moveTo(ControlWindow theControlWindow)
public final T moveTo(ControlWindow theControlWindow, java.lang.String theTabName)
public T moveTo(processing.core.PApplet thePApplet)
public final T moveTo(java.lang.String theTabName)
public final T moveTo(java.lang.String theTabName, ControlWindow theControlWindow)
public final T moveTo(Tab theTab, ControlWindow theControlWindow)
public T open()
public T registerProperty(java.lang.String thePropertyName)
registerProperty
in interface ControllerInterface<T>
public T registerProperty(java.lang.String theSetter, java.lang.String theGetter)
registerProperty
in interface ControllerInterface<T>
public void remove()
remove
in interface ControllerInterface<T>
public T remove(ControllerInterface<?> theElement)
remove
in interface ControllerInterface<T>
public T removeCloseButton()
public T removeListener(ControlListener theListener)
public T removeProperty(java.lang.String thePropertyName)
removeProperty
in interface ControllerInterface<T>
public T removeProperty(java.lang.String theSetter, java.lang.String theGetter)
removeProperty
in interface ControllerInterface<T>
public static float[] set(float[] theArray, float... theValues)
public T setAbsolutePosition(float[] thePos)
setAbsolutePosition
in interface ControllerInterface<T>
public T setAddress(java.lang.String theAddress)
setAddress
in interface ControllerInterface<T>
public T setArrayValue(float[] theArray)
setArrayValue
in interface ControllerInterface<T>
public T setArrayValue(int theIndex, float theValue)
setArrayValue
in interface ControllerInterface<T>
public T setCaptionLabel(java.lang.String theValue)
setCaptionLabel
in interface ControllerInterface<T>
public T setColor(CColor theColor)
setColor
in interface ControllerInterface<T>
public T setColorActive(int theColor)
setColorActive
in interface ControllerInterface<T>
public T setColorBackground(int theColor)
setColorBackground
in interface ControllerInterface<T>
public T setColorForeground(int theColor)
setColorForeground
in interface ControllerInterface<T>
public T setColorLabel(int theColor)
setColorLabel
in interface ControllerInterface<T>
public T setColorValue(int theColor)
setColorValue
in interface ControllerInterface<T>
public final T setGroup(ControllerGroup<?> theGroup)
public final T setGroup(java.lang.String theName)
public T setHeight(int theHeight)
public T setId(int theId)
setId
in interface ControllerInterface<T>
public T setLabel(java.lang.String theLabel)
setLabel
in interface ControllerInterface<T>
public T setMouseOver(boolean theFlag)
setMouseOver
in interface ControllerInterface<T>
public boolean setMousePressed(boolean theStatus)
setMousePressed
in interface ControllerInterface<T>
public T setMoveable(boolean theFlag)
public T setOpen(boolean theFlag)
public T setPosition(float[] thePVector)
setPosition
in interface ControllerInterface<T>
public T setPosition(float theX, float theY)
setPosition
in interface ControllerInterface<T>
public T setSize(int theWidth, int theHeight)
public T setStringValue(java.lang.String theValue)
setStringValue
in interface ControllerInterface<T>
public final T setTab(ControlWindow theWindow, java.lang.String theName)
public final T setTab(java.lang.String theName)
public T setTitle(java.lang.String theTitle)
public T setUpdate(boolean theFlag)
setUpdate
in interface ControllerInterface<T>
public T setValue(float theValue)
setValue
in interface ControllerInterface<T>
public T setVisible(boolean theFlag)
public T setWidth(int theWidth)
public T show()
show
in interface ControllerInterface<T>
public T showArrow()
public T showBar()
public java.lang.String toString()
toString
in class java.lang.Object
public T update()
update
in interface ControllerInterface<T>
public T updateAbsolutePosition()
updateAbsolutePosition
in interface ControllerInterface<T>
public T updateEvents()
updateEvents
in interface ControllerInterface<T>
public T updateInternalEvents(processing.core.PApplet theApplet)
ControllerInterface
updateInternalEvents
in interface ControllerInterface<T>
public static float x(float[] theArray)
public static float y(float[] theArray)
processing library controlP5 by Andreas Schlegel. (c) 2006-2015