apwidgets
Class APToggleButton

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

public class APToggleButton
extends APCompoundButton

A Checkbox.Add instances to APWidgetContainer.

Author:
Rikard Lundstedt

Nested Class Summary
 
Nested classes/interfaces inherited from interface android.text.NoCopySpan
android.text.NoCopySpan.Concrete
 
Constructor Summary
APToggleButton(int x, int y, int width, int height, java.lang.String text)
          Creates a new toggle button.
APToggleButton(int x, int y, java.lang.String text)
          Creates a new toggle button.
 
Method Summary
 java.lang.String getTextOff()
           
 java.lang.String getTextOn()
           
 void init(processing.core.PApplet argPApplet)
          Initializes the toggle button.
 void setTextOff(java.lang.String textOff)
           
 void setTextOn(java.lang.String textOn)
           
 
Methods inherited from class apwidgets.APCompoundButton
isChecked, setChecked
 
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

APToggleButton

public APToggleButton(int x,
                      int y,
                      java.lang.String text)
Creates a new toggle button.

Parameters:
x - The x position of the check box.
y - The y position of the check box.
text - The text on the label of the check box.

APToggleButton

public APToggleButton(int x,
                      int y,
                      int width,
                      int height,
                      java.lang.String text)
Creates a new toggle 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

getTextOn

public java.lang.String getTextOn()

getTextOff

public java.lang.String getTextOff()

init

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

Overrides:
init in class APCompoundButton

setTextOn

public void setTextOn(java.lang.String textOn)

setTextOff

public void setTextOff(java.lang.String textOff)