|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectcontrolP5.Controller
controlP5.Textlabel
public class Textlabel
/**
* 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.Textlabel : Label get()
controlP5.Textlabel : Textlabel setColor(int)
controlP5.Textlabel : Textlabel setFont(ControlFont)
controlP5.Textlabel : Textlabel setFont(PFont)
controlP5.Textlabel : Textlabel setFont(int)
controlP5.Textlabel : Textlabel setHeight(int)
controlP5.Textlabel : Textlabel setLetterSpacing(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 : void draw()
controlP5.Textlabel : void draw(PApplet)
controlP5.Textlabel : void draw(int, int)
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 : Label getCaptionLabel()
controlP5.Controller : Label getValueLabel()
controlP5.Controller : List getControllerPlugList()
controlP5.Controller : PImage setImage(PImage)
controlP5.Controller : PImage setImage(PImage, int)
controlP5.Controller : PVector getAbsolutePosition()
controlP5.Controller : PVector getPosition()
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 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 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 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 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 setImages(PImage, PImage, PImage)
controlP5.Controller : Textlabel setImages(PImage, PImage, PImage, PImage)
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(PVector)
controlP5.Controller : Textlabel setPosition(float, 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 setValueLabel(String)
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[] getArrayValue()
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)
java.lang.Object : String toString()
java.lang.Object : boolean equals(Object)
*/
Field Summary |
---|
Fields inherited from class controlP5.Controller |
---|
autoHeight, autoSpacing, autoWidth |
Fields inherited from interface controlP5.ControlP5Constants |
---|
acceptClassList, ACTION_BROADCAST, ACTION_ENTER, ACTION_LEAVE, ACTION_PRESSED, ACTION_RELEASED, ACTION_RELEASEDOUTSIDE, ACTIVE, ALL, ALT, ARC, ARRAY, BACKSPACE, BASELINE, BITFONT, BOOLEAN, BOTTOM, BOTTOM_OUTSIDE, CAPTIONLABEL, CENTER, COMMANDKEY, CONTROL, controlEventClass, CUSTOM, DECREASE, DEFAULT, DELETE, DONE, DOWN, ELLIPSE, ENTER, ESCAPE, EVENT, eventMethod, FADEIN, FADEOUT, FIELD, FLOAT, HALF_PI, HIDE, HIGHLIGHT, HORIZONTAL, IDLE, IMAGE, INACTIVE, INCREASE, INTEGER, INVALID, KEYCONTROL, LEFT, LEFT_OUTSIDE, LINE, LOAD, MENU, METHOD, MOVE, MULTI, MULTIPLES, OVER, PI, PRESSED, PRINT, RELEASE, RESET, RIGHT, RIGHT_OUTSIDE, SAVE, SHIFT, SINGLE, SINGLE_COLUMN, SINGLE_ROW, SPRITE, STRING, SWITCH, SWITCH_BACK, SWITCH_FORE, TAB, TOP, TOP_OUTSIDE, TRANSITION_WAIT_FADEIN, TWO_PI, UP, VALUELABEL, VERBOSE, VERTICAL, WAIT |
Constructor Summary | |
---|---|
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)
|
|
Textlabel(ControlP5 theControlP5,
java.lang.String theValue,
int theX,
int theY,
int theW,
int theH,
int theColor,
int theFont)
Deprecated. |
|
Textlabel(processing.core.PApplet theComponent,
java.lang.String theValue,
int theX,
int theY)
Deprecated. |
|
Textlabel(processing.core.PApplet theComponent,
java.lang.String theValue,
int theX,
int theY,
int theW,
int theH)
Deprecated. |
|
Textlabel(processing.core.PApplet theComponent,
java.lang.String theValue,
int theX,
int theY,
int theW,
int theH,
int theColor,
int theFont)
Deprecated. |
Method Summary | |
---|---|
Textlabel |
append(java.lang.String theText,
int max)
|
void |
draw()
|
void |
draw(int theX,
int theY)
|
void |
draw(processing.core.PApplet theApplet)
draw the textlabel. |
Label |
get()
|
int |
getLineHeight()
|
Textlabel |
setColor(int theColor)
|
Textlabel |
setFont(ControlFont theControlFont)
|
Textlabel |
setFont(int theFont)
Deprecated. |
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)
|
Label |
valueLabel()
Deprecated. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface controlP5.ControllerInterface |
---|
continuousUpdateEvents, parent, setColorLabel, setColorValue, setLabel |
Constructor Detail |
---|
public Textlabel(ControlP5 theControlP5, java.lang.String theValue, int theX, int theY)
theControlP5
- theValue
- theX
- theY
- public Textlabel(ControlP5 theControlP5, java.lang.String theValue, int theX, int theY, int theW, int theH)
theComponent
- theValue
- theX
- theY
- theW
- theH
- @Deprecated public Textlabel(ControlP5 theControlP5, java.lang.String theValue, int theX, int theY, int theW, int theH, int theColor, int theFont)
@Deprecated public Textlabel(processing.core.PApplet theComponent, java.lang.String theValue, int theX, int theY)
@Deprecated public Textlabel(processing.core.PApplet theComponent, java.lang.String theValue, int theX, int theY, int theW, int theH)
@Deprecated public Textlabel(processing.core.PApplet theComponent, java.lang.String theValue, int theX, int theY, int theW, int theH, int theColor, int theFont)
Method Detail |
---|
public Textlabel append(java.lang.String theText, int max)
public void draw()
public void draw(int theX, int theY)
public void draw(processing.core.PApplet theApplet)
draw
in interface CDrawable
draw
in interface ControllerInterface
draw
in class Controller
theApplet
- PAppletControllerView
public Label get()
public int getLineHeight()
public Textlabel setColor(int theColor)
public Textlabel setFont(ControlFont theControlFont)
@Deprecated public Textlabel setFont(int theFont)
theFont
- intpublic Textlabel setFont(processing.core.PFont thePFont)
public Textlabel setHeight(int theValue)
setHeight
in class Controller
public Textlabel setLetterSpacing(int theValue)
theValue
- int
public Textlabel setLineHeight(int theValue)
public Textlabel setMultiline(boolean theFlag)
public Textlabel setStringValue(java.lang.String theValue)
setStringValue
in interface ControllerInterface
setStringValue
in class Controller
public Textlabel setText(java.lang.String theText)
public Textlabel setValue(float theValue)
setValue
in interface ControllerInterface
setValue
in class Controller
theValue
- floatpublic Textlabel setValue(java.lang.String theText)
theText
- Stringpublic Textlabel setWidth(int theValue)
setWidth
in class Controller
@Deprecated public Label valueLabel()
valueLabel
in class Controller
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |