apwidgets
Class APButton

java.lang.Object
  extended by apwidgets.APWidget
      extended by apwidgets.APTextView
          extended by apwidgets.APButton
All Implemented Interfaces:
android.text.NoCopySpan, android.text.TextWatcher, android.view.View.OnClickListener
Direct Known Subclasses:
APCompoundButton, APRadioButton

public class APButton
extends APTextView

A button. Add instances to APWidgetContainer.

To capture onClick events, declare in sketch:

void onClickWidget(PWidget source)
{
// Your code here.
}

Author:
Rikard Lundstedt

Nested Class Summary
 
Nested classes/interfaces inherited from interface android.text.NoCopySpan
android.text.NoCopySpan.Concrete
 
Constructor Summary
APButton(int x, int y, int width, int height, java.lang.String text)
          Creates a button.
APButton(int x, int y, java.lang.String text)
          Creates a button.
 
Method Summary
 void init(processing.core.PApplet pApplet)
          Initializes the button.
 
Methods inherited from class apwidgets.APTextView
afterTextChanged, beforeTextChanged, getText, getTextColor, getTextSize, onTextChanged, setText, setTextColor, setTextSize
 
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

APButton

public APButton(int x,
                int y,
                java.lang.String text)
Creates a button.

Parameters:
x - The button's x position.
y - The button's y position.
text - The text on the button's label.

APButton

public APButton(int x,
                int y,
                int width,
                int height,
                java.lang.String text)
Creates a button.

Parameters:
x - The button's x position.
y - The button's y position.
width - The button's width.
height - The button's height.
text - The text on the button's label.
Method Detail

init

public void init(processing.core.PApplet pApplet)
Initializes the button. Is called by APWidgetContainer as it is added to it.

Overrides:
init in class APTextView