controlP5

## Class DropdownList

- java.lang.Object
- - controlP5.Controller<DropdownList>
  - - controlP5.DropdownList

- All Implemented Interfaces:
    CDrawable, ControllerInterface<DropdownList>, ControlListener, ControlP5Constants

      public class DropdownList
      extends Controller<DropdownList>
      implements ControlListener

  controlP5 is a processing gui library. 2006-2012 by Andreas Schlegel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  Author:
    Andreas Schlegel (http://www.sojamo.de)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DropdownList.DropdownListView`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CHECKBOX`
    `static int` | `DROPDOWN`
    `static int` | `LIST`
    `static int` | `TREE`

    - ### Fields inherited from class controlP5.Controller

      `autoHeight, autoSpacing, autoWidth`

    - ### Fields inherited from interface controlP5.ControlP5Constants

      `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, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, delimiter, DONE, DOWN, 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, 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, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT, WHITE, YELLOW`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DropdownList(ControlP5 theControlP5, java.lang.String theName)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DropdownList` | `addItem(java.lang.String theName, java.lang.Object theValue)`
    `DropdownList` | `addItems(java.util.List<java.lang.String> theItems)`
    `DropdownList` | `addItems(java.util.Map<java.lang.String,java.lang.Object> theItems)`
    `DropdownList` | `addItems(java.lang.String[] theItems)`
    `DropdownList` | `clear()`
    `DropdownList` | `close()`
    `void` | `controlEvent(ControlEvent theEvent)` controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about value changes.
    `int` | `getBackgroundColor()`
    `int` | `getBarHeight()`
    `int` | `getHeight()`
    `java.util.Map<java.lang.String,java.lang.Object>` | `getItem(int theIndex)`
    `java.util.Map<java.lang.String,java.lang.Object>` | `getItem(java.lang.String theName)`
    `java.util.List` | `getItems()`
    `boolean` | `isBarVisible()`
    `boolean` | `isOpen()`
    `void` | `keyEvent(processing.event.KeyEvent theKeyEvent)`
    `DropdownList` | `open()`
    `DropdownList` | `removeItem(java.lang.String theName)`
    `DropdownList` | `removeItems(java.util.List<java.lang.String> theItems)`
    `DropdownList` | `setBackgroundColor(int theColor)`
    `DropdownList` | `setBarHeight(int theHeight)`
    `DropdownList` | `setBarVisible(boolean b)`
    `void` | `setDirection(int theDirection)`
    `DropdownList` | `setItemHeight(int theHeight)`
    `DropdownList` | `setItems(java.util.List<java.lang.String> theItems)`
    `DropdownList` | `setItems(java.util.Map<java.lang.String,java.lang.Object> theItems)`
    `DropdownList` | `setItems(java.lang.String[] theItems)`
    `DropdownList` | `setOpen(boolean b)`
    `DropdownList` | `setScrollSensitivity(float theSensitivity)`
    `DropdownList` | `setType(int theType)`
    `DropdownList` | `updateDisplayMode(int theMode)`
    `void` | `updateItemIndexOffset()`

    - ### Methods inherited from class controlP5.Controller

      `add, addCallback, addListener, addListenerFor, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, draw, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getId, getInfo, getLabel, getMax, getMin, getName, getParent, getPickingColor, getPointer, getPosition, getProperty, getProperty, getStringValue, getTab, getValue, getValueLabel, getView, getWidth, getWindow, hide, init, isActive, isBroadcast, isInside, isLabelVisible, isListening, isLock, isMouseOver, isMousePressed, isMoveable, isUpdate, isUserInteraction, isVisible, linebreak, listen, listenerSize, lock, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, onChange, onClick, onDoublePress, onDrag, onDraw, onEndDrag, onEnter, onLeave, onMove, onPress, onRelease, onReleaseOutside, onStartDrag, onWheel, plugTo, plugTo, plugTo, plugTo, registerProperty, registerProperty, registerTooltip, remove, remove, removeBehavior, removeCallback, removeCallback, removeListener, removeListenerFor, removeListenersFor, removeProperty, removeProperty, set, setAbsolutePosition, setAddress, setArrayValue, setArrayValue, setBehavior, setBroadcast, setCaptionLabel, setColor, setColorActive, setColorBackground, setColorCaptionLabel, setColorForeground, setColorLabel, setColorValue, setColorValueLabel, setDecimalPrecision, setDefaultValue, setGroup, setGroup, setHeight, setId, setImage, setImage, setImages, setImages, setImages, setLabel, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setStringValue, setTab, setTab, setUpdate, setUserInteraction, setValue, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, toString, unlock, unplugFrom, unplugFrom, unregisterTooltip, update, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize, x, y`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### CHECKBOX

          public static final int CHECKBOX

      See Also:
        Constant Field Values

    - #### DROPDOWN

          public static final int DROPDOWN

      See Also:
        Constant Field Values

    - #### LIST

          public static final int LIST

      See Also:
        Constant Field Values

    - #### TREE

          public static final int TREE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DropdownList

          public DropdownList(ControlP5 theControlP5,
                              java.lang.String theName)

  - ### Method Detail

    - #### addItem

          public DropdownList addItem(java.lang.String theName,
                                      java.lang.Object theValue)

    - #### addItems

          public DropdownList addItems(java.util.List<java.lang.String> theItems)

    - #### addItems

          public DropdownList addItems(java.util.Map<java.lang.String,java.lang.Object> theItems)

    - #### addItems

          public DropdownList addItems(java.lang.String[] theItems)

    - #### clear

          public DropdownList clear()

    - #### close

          public DropdownList close()

    - #### controlEvent

          public void controlEvent(ControlEvent theEvent)

      Description copied from interface: `ControlListener`
      controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about value changes. Use the CallbackListener to get informed when actions such as pressed, release, drag, etc are performed.
      Specified by:
        `controlEvent` in interface `ControlListener`
      Parameters:
        `theEvent` - ControlEvent
      See Also:
        `CallbackListener`, `CallbackEvent`

    - #### getBackgroundColor

          public int getBackgroundColor()

    - #### getBarHeight

          public int getBarHeight()

    - #### getHeight

          public int getHeight()

      Specified by:
        `getHeight` in interface `ControllerInterface<DropdownList>`
      Overrides:
        `getHeight` in class `Controller<DropdownList>`
      Returns:
        int

    - #### getItem

          public java.util.Map<java.lang.String,java.lang.Object> getItem(int theIndex)

    - #### getItem

          public java.util.Map<java.lang.String,java.lang.Object> getItem(java.lang.String theName)

    - #### getItems

          public java.util.List getItems()

    - #### isBarVisible

          public boolean isBarVisible()

    - #### isOpen

          public boolean isOpen()

    - #### keyEvent

          public void keyEvent(processing.event.KeyEvent theKeyEvent)

      Specified by:
        `keyEvent` in interface `ControllerInterface<DropdownList>`
      Overrides:
        `keyEvent` in class `Controller<DropdownList>`

    - #### open

          public DropdownList open()

    - #### removeItem

          public DropdownList removeItem(java.lang.String theName)

    - #### removeItems

          public DropdownList removeItems(java.util.List<java.lang.String> theItems)

    - #### setBackgroundColor

          public DropdownList setBackgroundColor(int theColor)

    - #### setBarHeight

          public DropdownList setBarHeight(int theHeight)

    - #### setBarVisible

          public DropdownList setBarVisible(boolean b)

    - #### setDirection

          public void setDirection(int theDirection)

    - #### setItemHeight

          public DropdownList setItemHeight(int theHeight)

    - #### setItems

          public DropdownList setItems(java.util.List<java.lang.String> theItems)

    - #### setItems

          public DropdownList setItems(java.util.Map<java.lang.String,java.lang.Object> theItems)

    - #### setItems

          public DropdownList setItems(java.lang.String[] theItems)

    - #### setOpen

          public DropdownList setOpen(boolean b)

    - #### setScrollSensitivity

          public DropdownList setScrollSensitivity(float theSensitivity)

    - #### setType

          public DropdownList setType(int theType)

    - #### updateDisplayMode

          public DropdownList updateDisplayMode(int theMode)

    - #### updateItemIndexOffset

          public void updateItemIndexOffset()

processing library controlP5 by Andreas Schlegel. (c) 2006-2015