controlP5
Class Textarea

java.lang.Object
  extended by controlP5.ControllerGroup
      extended by controlP5.Textarea
All Implemented Interfaces:
ControllerInterface, ControlListener

public class Textarea
extends ControllerGroup
implements ControlListener


Constructor Summary
Textarea(ControlP5 theControlP5, ControllerGroup theGroup, java.lang.String theName, java.lang.String theText, int theX, int theY, int theW, int theH)
           
Textarea(java.lang.String theText, int theX, int theY)
           
 
Method Summary
 void addToXMLElement(ControlP5XMLElement theElement)
           
 void controlEvent(ControlEvent theEvent)
          ControlListener is an interface that can be implemented by a custom class.
 void disableColorBackground()
           
 void enableColorBackground()
           
 void hideScrollbar()
           
 boolean isScrollbarVisible()
           
 void scroll(float theValue)
          scroll the Textarea remotely.
 void setColor(int theColor)
          set the text color of the textarea.
 void setColorBackground(int theColor)
          set the background color of the group.
 void setHeight(int theValue)
          set the height of the textarea.
 void setLineHeight(int theLineHeight)
          set the lineheight of the textarea.
 void setPosition(float theX, float theY)
          set the position of the textarea.
 void setText(java.lang.String theText)
          set the text of the textarea.
 void setWidth(int theValue)
          set the width of the textarea.
 void showScrollbar()
           
 java.lang.String stringValue()
          returns the content of the textarea's label.
 java.lang.String text()
          returns the text content of the textarea .
 float value()
          !!! experimental, have to check if this spoils anything.
 Label valueLabel()
          returns the instance of the textarea's label.
 
Methods inherited from class controlP5.ControllerGroup
absolutePosition, add, addCanvas, addDrawable, arrayValue, captionLabel, close, color, continuousUpdateEvents, controller, draw, getAsXML, getColor, getTab, getWindow, hide, id, init, isMoveable, isOpen, isUpdate, isVisible, isXMLsavable, keyEvent, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, position, remove, remove, remove, removeCanvas, setColorActive, setColorForeground, setColorLabel, setColorValue, setGroup, setGroup, setId, setLabel, setMousePressed, setMoveable, setOpen, setTab, setTab, setTab, setUpdate, setVisible, show, update, updateAbsolutePosition, updateEvents, updateInternalEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Textarea

public Textarea(ControlP5 theControlP5,
                ControllerGroup theGroup,
                java.lang.String theName,
                java.lang.String theText,
                int theX,
                int theY,
                int theW,
                int theH)
Parameters:
theControlP5 - ControlP5
theGroup - ControllerGroup
theName - String
theText - String
theX - int
theY - int
theW - int
theH - int

Textarea

public Textarea(java.lang.String theText,
                int theX,
                int theY)
Parameters:
theText - String
theX - int
theY - int
Method Detail

controlEvent

public void controlEvent(ControlEvent theEvent)
Description copied from interface: ControlListener
ControlListener is an interface that can be implemented by a custom class. add the controlListener to a controller with Controller.addListner()

Specified by:
controlEvent in interface ControlListener
Parameters:
theEvent - ControlEvent

hideScrollbar

public void hideScrollbar()

showScrollbar

public void showScrollbar()

isScrollbarVisible

public boolean isScrollbarVisible()

setColorBackground

public void setColorBackground(int theColor)
Description copied from class: ControllerGroup
set the background color of the group.

Specified by:
setColorBackground in interface ControllerInterface
Overrides:
setColorBackground in class ControllerGroup
Parameters:
theColor - int

disableColorBackground

public void disableColorBackground()

enableColorBackground

public void enableColorBackground()

scroll

public void scroll(float theValue)
scroll the Textarea remotely. values must range from 0 to 1.

Parameters:
theValue -

setWidth

public void setWidth(int theValue)
set the width of the textarea.

Parameters:
theValue - int

setHeight

public void setHeight(int theValue)
set the height of the textarea.

Parameters:
theValue - int

setLineHeight

public void setLineHeight(int theLineHeight)
set the lineheight of the textarea.

Parameters:
theLineHeight - int

setColor

public void setColor(int theColor)
set the text color of the textarea.

Parameters:
theColor - int

valueLabel

public Label valueLabel()
returns the instance of the textarea's label.

Overrides:
valueLabel in class ControllerGroup
Returns:

setText

public void setText(java.lang.String theText)
set the text of the textarea.

Parameters:
theText - String

setPosition

public void setPosition(float theX,
                        float theY)
set the position of the textarea.

Specified by:
setPosition in interface ControllerInterface
Overrides:
setPosition in class ControllerGroup
Parameters:
theX - float
theY - float

addToXMLElement

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

stringValue

public java.lang.String stringValue()
returns the content of the textarea's label.

Specified by:
stringValue in interface ControllerInterface
Overrides:
stringValue in class ControllerGroup
Returns:
String

text

public java.lang.String text()
returns the text content of the textarea .

Returns:

value

public float value()
Description copied from class: ControllerGroup
!!! experimental, have to check if this spoils anything. implemented for ScrollList and MultiList to forward values to a dedicated method

Specified by:
value in interface ControllerInterface
Overrides:
value in class ControllerGroup
Returns:
float


processing library controlP5 by Andreas Schlegel. (c) 2010