apwidgets
Class APButton
java.lang.Object
apwidgets.APWidget
apwidgets.APTextView
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 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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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