controlP5
Class MultiList

java.lang.Object
  extended by controlP5.Controller
      extended by controlP5.MultiList
All Implemented Interfaces:
CDrawable, ControllerInterface, ControlListener, ControlP5Constants, MultiListInterface

public class MultiList
extends Controller
implements MultiListInterface, ControlListener

multilist has the effect of a menu-tree. see the example for more information and usage.


Field Summary
 int closeDelay
           
 
Fields inherited from class controlP5.Controller
MOVE, PRESSED, RELEASE
 
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
MultiList(ControlP5 theControlP5, Tab theParent, java.lang.String theName, int theX, int theY, int theWidth, int theHeight)
           
 
Method Summary
 MultiListButton add(java.lang.String theName, int theValue)
          add multilist buttons to the multilist.
 void addToXMLElement(ControlP5XMLElement theElement)
           
 void close()
           
 void close(MultiListInterface theInterface)
           
 void controlEvent(ControlEvent theEvent)
          !!! experimental.
 void draw(processing.core.PApplet theApplet)
           
 void mouseReleased()
           
 boolean observe()
           
 void occupied(boolean theFlag)
           
 void open()
           
 void remove()
          remove a multilist.
 void setup()
           
 void setValue(float theValue)
          set the value of the controller.
 java.util.Vector subelements()
           
 void update()
          updates the value of the controller without having to set the value explicitly.
 boolean update(processing.core.PApplet theApplet)
           
 void updateLocation(float theX, float theY)
           
 
Methods inherited from class controlP5.Controller
absolutePosition, add, addListener, arrayValue, behavior, captionLabel, changeValue, color, continuousUpdateEvents, controlWindow, defaultValue, disableSprite, enableSprite, getAsXML, getColor, getHeight, getTab, getWidth, getWindow, hide, id, init, isBroadcast, isInside, isMousePressed, isUpdate, isVisible, isXMLsavable, keyEvent, label, listenerSize, max, min, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, parent, position, remove, removeBehavior, removeListener, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColorActive, setColorBackground, setColorForeground, setColorLabel, setColorValue, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setLabel, setLabelVisible, setMax, setMin, setMousePressed, setMoveable, setParent, setPosition, setSprite, setTab, setTab, setUpdate, setValueLabel, setVisible, setWidth, setWindow, setWindow, show, stringValue, trigger, updateAbsolutePosition, updateEvents, updateInternalEvents, value, valueLabel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface controlP5.MultiListInterface
name
 

Field Detail

closeDelay

public int closeDelay
Constructor Detail

MultiList

public MultiList(ControlP5 theControlP5,
                 Tab theParent,
                 java.lang.String theName,
                 int theX,
                 int theY,
                 int theWidth,
                 int theHeight)
Parameters:
theControlP5 - ControlP5
theParent - Tab
theName - String
theX - int
theY - int
theWidth - int
theHeight - int
Method Detail

setup

public void setup()

subelements

public java.util.Vector subelements()
Specified by:
subelements in interface MultiListInterface
Returns:
Vector

updateLocation

public void updateLocation(float theX,
                           float theY)
Specified by:
updateLocation in interface MultiListInterface
Parameters:
theX - float
theY - float

remove

public void remove()
remove a multilist.

Specified by:
remove in interface ControllerInterface
Overrides:
remove in class Controller

add

public MultiListButton add(java.lang.String theName,
                           int theValue)
add multilist buttons to the multilist.

Parameters:
theName - String
theValue - int
Returns:
MultiListButton

controlEvent

public void controlEvent(ControlEvent theEvent)
!!! experimental. see scrollList. needs controllerPlug.

Specified by:
controlEvent in interface ControlListener
Parameters:
theEvent -

draw

public void draw(processing.core.PApplet theApplet)
Specified by:
draw in interface CDrawable
Specified by:
draw in interface ControllerInterface
Specified by:
draw in interface MultiListInterface
Overrides:
draw in class Controller
Parameters:
theApplet - PApplet

update

public boolean update(processing.core.PApplet theApplet)
Parameters:
theApplet - PApplet
Returns:
boolean

occupied

public void occupied(boolean theFlag)
Parameters:
theFlag - boolean

observe

public boolean observe()
Specified by:
observe in interface MultiListInterface
Returns:
boolean

close

public void close(MultiListInterface theInterface)
Specified by:
close in interface MultiListInterface
Parameters:
theInterface - MultiListInterface

close

public void close()
Specified by:
close in interface MultiListInterface

open

public void open()
Specified by:
open in interface MultiListInterface

setValue

public void setValue(float theValue)
Description copied from class: Controller
set the value of the controller.

Specified by:
setValue in class Controller
Parameters:
theValue - float

update

public void update()
Description copied from class: Controller
updates the value of the controller without having to set the value explicitly. update does not visually update the controller. the updating status can be set with setUpdate(true/false) and checked with isUpdate().

Specified by:
update in interface ControllerInterface
Overrides:
update in class Controller

mouseReleased

public void mouseReleased()

addToXMLElement

public void addToXMLElement(ControlP5XMLElement theElement)
Specified by:
addToXMLElement in interface ControllerInterface
Specified by:
addToXMLElement in interface MultiListInterface
Parameters:
theElement - ControlP5XMLElement


processing library controlP5 by Andreas Schlegel. (c) 2010