apwidgets
Class APTextView
java.lang.Object
apwidgets.APWidget
apwidgets.APTextView
- All Implemented Interfaces:
- android.text.NoCopySpan, android.text.TextWatcher, android.view.View.OnClickListener
- Direct Known Subclasses:
- APButton, APEditText
public abstract class APTextView
- extends APWidget
- implements android.text.TextWatcher
Nested classes/interfaces inherited from interface android.text.NoCopySpan |
android.text.NoCopySpan.Concrete |
Constructor Summary |
APTextView(int x,
int y,
int width,
int height,
java.lang.String text)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
APTextView
public APTextView(int x,
int y,
int width,
int height,
java.lang.String text)
getText
public java.lang.String getText()
- Returns:
- The text content.
setTextSize
public void setTextSize(int textSize)
- Parameters:
textSize
- The size of the text.
setText
public void setText(java.lang.String text)
- Parameters:
text
- The text content.
setTextColor
public void setTextColor(int r,
int g,
int b,
int a)
- Sets the color of the text content.
- Parameters:
r
- Redg
- Greenb
- Bluea
- Alpha
init
public void init(processing.core.PApplet pApplet)
- Initializes the text field. Is called by
APWidgetContainer
as it is added to it.
- Overrides:
init
in class APWidget
getTextSize
public int getTextSize()
- Returns:
- The size of the text content.
getTextColor
public int getTextColor()
- Returns:
- The color of the text content.
afterTextChanged
public void afterTextChanged(android.text.Editable s)
- Updating the
text
variable.
- Specified by:
afterTextChanged
in interface android.text.TextWatcher
beforeTextChanged
public void beforeTextChanged(java.lang.CharSequence s,
int start,
int count,
int after)
- Specified by:
beforeTextChanged
in interface android.text.TextWatcher
onTextChanged
public void onTextChanged(java.lang.CharSequence s,
int start,
int before,
int count)
- Specified by:
onTextChanged
in interface android.text.TextWatcher