apwidgets
Class APTextView

java.lang.Object
  extended by apwidgets.APWidget
      extended by 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 Class Summary
 
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)
           
 
Method Summary
 void afterTextChanged(android.text.Editable s)
          Updating the text variable.
 void beforeTextChanged(java.lang.CharSequence s, int start, int count, int after)
           
 java.lang.String getText()
           
 int getTextColor()
           
 int getTextSize()
           
 void init(processing.core.PApplet pApplet)
          Initializes the text field.
 void onTextChanged(java.lang.CharSequence s, int start, int before, int count)
           
 void setText(java.lang.String text)
           
 void setTextColor(int r, int g, int b, int a)
          Sets the color of the text content.
 void setTextSize(int textSize)
           
 
Methods inherited from class apwidgets.APWidget
addOnClickWidgetListener, getHeight, getPApplet, getWidth, getView, getX, getY, onClick, setPosition, setSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

APTextView

public APTextView(int x,
                  int y,
                  int width,
                  int height,
                  java.lang.String text)
Method Detail

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 - Red
g - Green
b - Blue
a - 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