controlP5

## Class Icon

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

- All Implemented Interfaces:
    CDrawable, ControllerInterface<Icon>, ControlP5Constants

      public class Icon
      extends Controller<Icon>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `autoHeight`
    `static int` | `autoWidth`

    - ### Fields inherited from class controlP5.Controller

      `autoSpacing`

    - ### 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, 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 Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Icon` | `activateBy(int theValue)` A Icon can be activated by a mouse PRESSED or mouse RELEASE.
    `boolean` | `getBooleanValue()` Returns true or false and indicates the switch state of the Icon.
    `int` | `getFontIcon(int theState)`
    `java.lang.String` | `getInfo()`
    `Icon` | `hideBackground()`
    `boolean` | `isOn()`
    `boolean` | `isPressed()`
    `boolean` | `isSwitch()`
    `void` | `mousePressed()`
    `void` | `mouseReleased()`
    `void` | `mouseReleasedOutside()`
    `Icon` | `setFill(boolean theBoolean)`
    `Icon` | `setFont(processing.core.PFont thePFont)`
    `Icon` | `setFont(processing.core.PFont thePFont, int theSize)`
    `Icon` | `setFontIcon(int theId)`
    `Icon` | `setFontIcon(int theId, int theState)`
    `Icon` | `setFontIconOff(int theStateOff)`
    `Icon` | `setFontIconOn(int theStateOn)`
    `Icon` | `setFontIcons(int... theIds)`
    `Icon` | `setFontIcons(int theStateOff, int theStateOn)`
    `Icon` | `setFontIconSize(int theSize)`
    `Icon` | `setFontIndex(int theIndex)`
    `Icon` | `setOff()` If the Icon acts as a switch, setOff will turn off the switch.
    `Icon` | `setOn()` If the Icon acts as a switch, setOn will turn on the switch.
    `Icon` | `setRoundedCorners(int theRadius)`
    `Icon` | `setScale(float theScalePressed, float theScaleReleased)`
    `Icon` | `setStroke(boolean theBoolean)`
    `Icon` | `setStrokeWeight(float theStrokeWeight)`
    `Icon` | `setSwitch(boolean theFlag)` Turns an icon into a switch.
    `Icon` | `setValue(float theValue)`
    `Icon` | `showBackground()`
    `java.lang.String` | `toString()`
    `Icon` | `update()` updates the value of the controller without having to set the value explicitly.
    `Icon` | `updateDisplayMode(int theMode)`
    `Icon` | `updateViewMode(int theMode)`

    - ### 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, getHeight, getId, 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, keyEvent, 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, setFont, 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, setValueLabel, setValueSelf, setView, setView, setVisible, setWidth, show, unlock, unplugFrom, unplugFrom, unregisterTooltip, updateAbsolutePosition, updateEvents, updateInternalEvents, updateSize, x, y`

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

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

- - ### Field Detail

    - #### autoHeight

          public static int autoHeight

    - #### autoWidth

          public static int autoWidth

  - ### Constructor Detail

    - #### Icon

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

  - ### Method Detail

    - #### activateBy

          public Icon activateBy(int theValue)

      A Icon can be activated by a mouse PRESSED or mouse RELEASE. Default value is RELEASE.

    - #### getBooleanValue

          public boolean getBooleanValue()

      Returns true or false and indicates the switch state of the Icon. `setSwitch` should have been set before.

    - #### getFontIcon

          public int getFontIcon(int theState)

    - #### getInfo

          public java.lang.String getInfo()

      Overrides:
        `getInfo` in class `Controller<Icon>`
      Returns:
        String

    - #### hideBackground

          public Icon hideBackground()

    - #### isOn

          public boolean isOn()

    - #### isPressed

          public boolean isPressed()

    - #### isSwitch

          public boolean isSwitch()

    - #### mousePressed

          public void mousePressed()

    - #### mouseReleased

          public void mouseReleased()

    - #### mouseReleasedOutside

          public void mouseReleasedOutside()

    - #### setFill

          public Icon setFill(boolean theBoolean)

    - #### setFont

          public Icon setFont(processing.core.PFont thePFont)

      Specified by:
        `setFont` in interface `ControllerInterface<Icon>`
      Overrides:
        `setFont` in class `Controller<Icon>`

    - #### setFont

          public Icon setFont(processing.core.PFont thePFont,
                              int theSize)

    - #### setFontIcon

          public Icon setFontIcon(int theId)

    - #### setFontIcon

          public Icon setFontIcon(int theId,
                                  int theState)

      Parameters:
        `theImage` -
        `theState` - use Controller.DEFAULT (background) Controller.OVER (foreground) Controller.ACTIVE (active)

    - #### setFontIconOff

          public Icon setFontIconOff(int theStateOff)

    - #### setFontIconOn

          public Icon setFontIconOn(int theStateOn)

    - #### setFontIcons

          public Icon setFontIcons(int... theIds)

    - #### setFontIcons

          public Icon setFontIcons(int theStateOff,
                                   int theStateOn)

    - #### setFontIconSize

          public Icon setFontIconSize(int theSize)

    - #### setFontIndex

          public Icon setFontIndex(int theIndex)

    - #### setOff

          public Icon setOff()

      If the Icon acts as a switch, setOff will turn off the switch. Use `setSwitch` to turn a Icon into a Switch.

    - #### setOn

          public Icon setOn()

      If the Icon acts as a switch, setOn will turn on the switch. Use `setSwitch` to turn a Icon into a Switch.

    - #### setRoundedCorners

          public Icon setRoundedCorners(int theRadius)

    - #### setScale

          public Icon setScale(float theScalePressed,
                               float theScaleReleased)

    - #### setStroke

          public Icon setStroke(boolean theBoolean)

    - #### setStrokeWeight

          public Icon setStrokeWeight(float theStrokeWeight)

    - #### setSwitch

          public Icon setSwitch(boolean theFlag)

      Turns an icon into a switch.

    - #### setValue

          public Icon setValue(float theValue)

      Specified by:
        `setValue` in interface `ControllerInterface<Icon>`
      Overrides:
        `setValue` in class `Controller<Icon>`
      Parameters:
        `theValue` - float

    - #### showBackground

          public Icon showBackground()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `Controller<Icon>`

    - #### update

          public Icon 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<Icon>`
      Overrides:
        `update` in class `Controller<Icon>`
      Returns:
        Controller
      See Also:
        `Controller.setUpdate(boolean)`, `Controller.isUpdate()`

    - #### updateDisplayMode

          public Icon updateDisplayMode(int theMode)

    - #### updateViewMode

          public Icon updateViewMode(int theMode)

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