controlP5

## Class Textlabel

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

- All Implemented Interfaces:
    CDrawable, ControllerInterface<Textlabel>, ControlP5Constants
  Direct Known Subclasses:
    FrameRate

      public class Textlabel
      extends Controller<Textlabel>

  +Example
    `

        /**
        * ControlP5 Textlabel
        *
        *
        * find a list of public methods available for the Textlabel Controller
        * at the bottom of this sketch.
        *
        * by Andreas Schlegel, 2012
        * www.sojamo.de/libraries/controlp5
        *
        */

        import controlP5.*;

        ControlP5 cp5;

        Textlabel myTextlabelA;
        Textlabel myTextlabelB;

        void setup() {
          size(700,400);
          cp5 = new ControlP5(this);

          myTextlabelA = cp5.addTextlabel("label")
                            .setText("A single ControlP5 textlabel, in yellow.")
                            .setPosition(100,50)
                            .setColorValue(0xffffff00)
                            .setFont(createFont("Georgia",20))
                            ;

          myTextlabelB = new Textlabel(cp5,"Another textlabel, not created through ControlP5 needs to be rendered separately by calling Textlabel.draw(PApplet).",100,100,400,200);

        }

        void draw() {
          background(0);
          myTextlabelB.draw(this);
        }

        /*
        a list of all methods available for the Textlabel Controller
        use ControlP5.printPublicMethodsFor(Textlabel.class);
        to print the following list into the console.

        You can find further details about class Textlabel in the javadoc.

        Format:
        ClassName : returnType methodName(parameter type)

        controlP5.Controller : CColor getColor()
        controlP5.Controller : ControlBehavior getBehavior()
        controlP5.Controller : ControlWindow getControlWindow()
        controlP5.Controller : ControlWindow getWindow()
        controlP5.Controller : ControllerProperty getProperty(String)
        controlP5.Controller : ControllerProperty getProperty(String, String)
        controlP5.Controller : ControllerView getView()
        controlP5.Controller : Label getCaptionLabel()
        controlP5.Controller : Label getValueLabel()
        controlP5.Controller : List getControllerPlugList()
        controlP5.Controller : Pointer getPointer()
        controlP5.Controller : String getAddress()
        controlP5.Controller : String getInfo()
        controlP5.Controller : String getName()
        controlP5.Controller : String getStringValue()
        controlP5.Controller : String toString()
        controlP5.Controller : Tab getTab()
        controlP5.Controller : Textlabel addCallback(CallbackListener)
        controlP5.Controller : Textlabel addListener(ControlListener)
        controlP5.Controller : Textlabel addListenerFor(int, CallbackListener)
        controlP5.Controller : Textlabel align(int, int, int, int)
        controlP5.Controller : Textlabel bringToFront()
        controlP5.Controller : Textlabel bringToFront(ControllerInterface)
        controlP5.Controller : Textlabel hide()
        controlP5.Controller : Textlabel linebreak()
        controlP5.Controller : Textlabel listen(boolean)
        controlP5.Controller : Textlabel lock()
        controlP5.Controller : Textlabel onChange(CallbackListener)
        controlP5.Controller : Textlabel onClick(CallbackListener)
        controlP5.Controller : Textlabel onDoublePress(CallbackListener)
        controlP5.Controller : Textlabel onDrag(CallbackListener)
        controlP5.Controller : Textlabel onDraw(ControllerView)
        controlP5.Controller : Textlabel onEndDrag(CallbackListener)
        controlP5.Controller : Textlabel onEnter(CallbackListener)
        controlP5.Controller : Textlabel onLeave(CallbackListener)
        controlP5.Controller : Textlabel onMove(CallbackListener)
        controlP5.Controller : Textlabel onPress(CallbackListener)
        controlP5.Controller : Textlabel onRelease(CallbackListener)
        controlP5.Controller : Textlabel onReleaseOutside(CallbackListener)
        controlP5.Controller : Textlabel onStartDrag(CallbackListener)
        controlP5.Controller : Textlabel onWheel(CallbackListener)
        controlP5.Controller : Textlabel plugTo(Object)
        controlP5.Controller : Textlabel plugTo(Object, String)
        controlP5.Controller : Textlabel plugTo(Object[])
        controlP5.Controller : Textlabel plugTo(Object[], String)
        controlP5.Controller : Textlabel registerProperty(String)
        controlP5.Controller : Textlabel registerProperty(String, String)
        controlP5.Controller : Textlabel registerTooltip(String)
        controlP5.Controller : Textlabel removeBehavior()
        controlP5.Controller : Textlabel removeCallback()
        controlP5.Controller : Textlabel removeCallback(CallbackListener)
        controlP5.Controller : Textlabel removeListener(ControlListener)
        controlP5.Controller : Textlabel removeListenerFor(int, CallbackListener)
        controlP5.Controller : Textlabel removeListenersFor(int)
        controlP5.Controller : Textlabel removeProperty(String)
        controlP5.Controller : Textlabel removeProperty(String, String)
        controlP5.Controller : Textlabel setArrayValue(float[])
        controlP5.Controller : Textlabel setArrayValue(int, float)
        controlP5.Controller : Textlabel setBehavior(ControlBehavior)
        controlP5.Controller : Textlabel setBroadcast(boolean)
        controlP5.Controller : Textlabel setCaptionLabel(String)
        controlP5.Controller : Textlabel setColor(CColor)
        controlP5.Controller : Textlabel setColorActive(int)
        controlP5.Controller : Textlabel setColorBackground(int)
        controlP5.Controller : Textlabel setColorCaptionLabel(int)
        controlP5.Controller : Textlabel setColorForeground(int)
        controlP5.Controller : Textlabel setColorLabel(int)
        controlP5.Controller : Textlabel setColorValue(int)
        controlP5.Controller : Textlabel setColorValueLabel(int)
        controlP5.Controller : Textlabel setDecimalPrecision(int)
        controlP5.Controller : Textlabel setDefaultValue(float)
        controlP5.Controller : Textlabel setHeight(int)
        controlP5.Controller : Textlabel setId(int)
        controlP5.Controller : Textlabel setImage(PImage)
        controlP5.Controller : Textlabel setImage(PImage, int)
        controlP5.Controller : Textlabel setImages(PImage, PImage, PImage)
        controlP5.Controller : Textlabel setImages(PImage, PImage, PImage, PImage)
        controlP5.Controller : Textlabel setLabel(String)
        controlP5.Controller : Textlabel setLabelVisible(boolean)
        controlP5.Controller : Textlabel setLock(boolean)
        controlP5.Controller : Textlabel setMax(float)
        controlP5.Controller : Textlabel setMin(float)
        controlP5.Controller : Textlabel setMouseOver(boolean)
        controlP5.Controller : Textlabel setMoveable(boolean)
        controlP5.Controller : Textlabel setPosition(float, float)
        controlP5.Controller : Textlabel setPosition(float[])
        controlP5.Controller : Textlabel setSize(PImage)
        controlP5.Controller : Textlabel setSize(int, int)
        controlP5.Controller : Textlabel setStringValue(String)
        controlP5.Controller : Textlabel setUpdate(boolean)
        controlP5.Controller : Textlabel setValue(float)
        controlP5.Controller : Textlabel setValueLabel(String)
        controlP5.Controller : Textlabel setValueSelf(float)
        controlP5.Controller : Textlabel setView(ControllerView)
        controlP5.Controller : Textlabel setVisible(boolean)
        controlP5.Controller : Textlabel setWidth(int)
        controlP5.Controller : Textlabel show()
        controlP5.Controller : Textlabel unlock()
        controlP5.Controller : Textlabel unplugFrom(Object)
        controlP5.Controller : Textlabel unplugFrom(Object[])
        controlP5.Controller : Textlabel unregisterTooltip()
        controlP5.Controller : Textlabel update()
        controlP5.Controller : Textlabel updateSize()
        controlP5.Controller : boolean isActive()
        controlP5.Controller : boolean isBroadcast()
        controlP5.Controller : boolean isInside()
        controlP5.Controller : boolean isLabelVisible()
        controlP5.Controller : boolean isListening()
        controlP5.Controller : boolean isLock()
        controlP5.Controller : boolean isMouseOver()
        controlP5.Controller : boolean isMousePressed()
        controlP5.Controller : boolean isMoveable()
        controlP5.Controller : boolean isUpdate()
        controlP5.Controller : boolean isVisible()
        controlP5.Controller : float getArrayValue(int)
        controlP5.Controller : float getDefaultValue()
        controlP5.Controller : float getMax()
        controlP5.Controller : float getMin()
        controlP5.Controller : float getValue()
        controlP5.Controller : float[] getAbsolutePosition()
        controlP5.Controller : float[] getArrayValue()
        controlP5.Controller : float[] getPosition()
        controlP5.Controller : int getDecimalPrecision()
        controlP5.Controller : int getHeight()
        controlP5.Controller : int getId()
        controlP5.Controller : int getWidth()
        controlP5.Controller : int listenerSize()
        controlP5.Controller : void remove()
        controlP5.Controller : void setView(ControllerView, int)
        controlP5.Textlabel : ControllerStyle getStyle()
        controlP5.Textlabel : Label get()
        controlP5.Textlabel : Textlabel append(String, int)
        controlP5.Textlabel : Textlabel setColor(int)
        controlP5.Textlabel : Textlabel setFont(ControlFont)
        controlP5.Textlabel : Textlabel setFont(PFont)
        controlP5.Textlabel : Textlabel setHeight(int)
        controlP5.Textlabel : Textlabel setLetterSpacing(int)
        controlP5.Textlabel : Textlabel setLineHeight(int)
        controlP5.Textlabel : Textlabel setMultiline(boolean)
        controlP5.Textlabel : Textlabel setStringValue(String)
        controlP5.Textlabel : Textlabel setText(String)
        controlP5.Textlabel : Textlabel setValue(String)
        controlP5.Textlabel : Textlabel setValue(float)
        controlP5.Textlabel : Textlabel setWidth(int)
        controlP5.Textlabel : int getLineHeight()
        controlP5.Textlabel : void draw()
        controlP5.Textlabel : void draw(PApplet)
        controlP5.Textlabel : void draw(PGraphics)
        controlP5.Textlabel : void draw(int, int)
        java.lang.Object : String toString()
        java.lang.Object : boolean equals(Object)

        created: 2015/03/24 12:21:33

        */

    `

- - ### Field Summary

    - ### 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, 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
    `Textlabel(ControlP5 theControlP5, java.lang.String theValue, int theX, int theY)`
    `Textlabel(ControlP5 theControlP5, java.lang.String theValue, int theX, int theY, int theW, int theH)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Textlabel` | `append(java.lang.String theText, int max)`
    `void` | `draw()`
    `void` | `draw(int theX, int theY)`
    `void` | `draw(processing.core.PApplet theApplet)`
    `void` | `draw(processing.core.PGraphics theGraphics)` the default draw function for each controller extending superclass Controller.
    `Label` | `get()`
    `int` | `getLineHeight()`
    `ControllerStyle` | `getStyle()`
    `Textlabel` | `setColor(int theColor)`
    `Textlabel` | `setFont(ControlFont theControlFont)`
    `Textlabel` | `setFont(processing.core.PFont thePFont)`
    `Textlabel` | `setHeight(int theValue)`
    `Textlabel` | `setLetterSpacing(int theValue)` set the letter spacing of the font.
    `Textlabel` | `setLineHeight(int theValue)`
    `Textlabel` | `setMultiline(boolean theFlag)`
    `Textlabel` | `setStringValue(java.lang.String theValue)`
    `Textlabel` | `setText(java.lang.String theText)`
    `Textlabel` | `setValue(float theValue)`
    `Textlabel` | `setValue(java.lang.String theText)` set the text of the textlabel.
    `Textlabel` | `setWidth(int theValue)`

    - ### Methods inherited from class controlP5.Controller

      `add, addCallback, addListener, addListenerFor, align, bringToFront, bringToFront, changeValue, continuousUpdateEvents, getAbsolutePosition, getAddress, getArrayValue, getArrayValue, getBehavior, getCaptionLabel, getColor, getControllerPlugList, getControlWindow, getDecimalPrecision, getDefaultValue, getHeight, 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, 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, setGroup, setGroup, setId, setImage, setImage, setImages, setImages, setImages, setLabel, setLabelVisible, setLock, setMax, setMin, setMouseOver, setMousePressed, setMoveable, setParent, setPosition, setPosition, setSize, setSize, setTab, setTab, setUpdate, setUserInteraction, setValueLabel, setValueSelf, setView, setView, setVisible, 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`

- - ### Constructor Detail

    - #### Textlabel

          public Textlabel(ControlP5 theControlP5,
                           java.lang.String theValue,
                           int theX,
                           int theY)

    - #### Textlabel

          public Textlabel(ControlP5 theControlP5,
                           java.lang.String theValue,
                           int theX,
                           int theY,
                           int theW,
                           int theH)

  - ### Method Detail

    - #### append

          public Textlabel append(java.lang.String theText,
                                  int max)

    - #### draw

          public void draw()

    - #### draw

          public void draw(int theX,
                           int theY)

    - #### draw

          public void draw(processing.core.PApplet theApplet)

    - #### draw

          public void draw(processing.core.PGraphics theGraphics)

      Description copied from class: `Controller`
      the default draw function for each controller extending superclass Controller. This draw function will take care of default matrix operations and will call the display function of the current ControllerView object active for this particular controller.
      Specified by:
        `draw` in interface `CDrawable`
      Specified by:
        `draw` in interface `ControllerInterface<Textlabel>`
      Overrides:
        `draw` in class `Controller<Textlabel>`
      See Also:
        `ControllerView`

    - #### get

          public Label get()

    - #### getLineHeight

          public int getLineHeight()

    - #### getStyle

          public ControllerStyle getStyle()

    - #### setColor

          public Textlabel setColor(int theColor)

    - #### setFont

          public Textlabel setFont(ControlFont theControlFont)

    - #### setFont

          public Textlabel setFont(processing.core.PFont thePFont)

    - #### setHeight

          public Textlabel setHeight(int theValue)

      Overrides:
        `setHeight` in class `Controller<Textlabel>`
      Returns:
        Controller

    - #### setLetterSpacing

          public Textlabel setLetterSpacing(int theValue)

      set the letter spacing of the font.
      Parameters:
        `theValue` - int
      Returns:
        Textlabel

    - #### setLineHeight

          public Textlabel setLineHeight(int theValue)

    - #### setMultiline

          public Textlabel setMultiline(boolean theFlag)

    - #### setStringValue

          public Textlabel setStringValue(java.lang.String theValue)

      Specified by:
        `setStringValue` in interface `ControllerInterface<Textlabel>`
      Overrides:
        `setStringValue` in class `Controller<Textlabel>`
      Returns:
        Controller

    - #### setText

          public Textlabel setText(java.lang.String theText)

    - #### setValue

          public Textlabel setValue(float theValue)

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

    - #### setValue

          public Textlabel setValue(java.lang.String theText)

      set the text of the textlabel.
      Parameters:
        `theText` - String

    - #### setWidth

          public Textlabel setWidth(int theValue)

      Overrides:
        `setWidth` in class `Controller<Textlabel>`
      Returns:
        Controller

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