edu.washington.cs.supple.wlib.html
Class CheckboxWidget
java.lang.Object
edu.washington.cs.supple.render.AbstractWidget
edu.washington.cs.supple.render.SimpleWidget
edu.washington.cs.supple.wlib.html.SimpleHtmlWidget
edu.washington.cs.supple.wlib.html.CheckboxWidget
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.EventListener, HtmlWidget, java.beans.PropertyChangeListener, UnwrappedWidget, Widget
- public class CheckboxWidget
- extends SimpleHtmlWidget
- Author:
- kgajos, kierah
|
Field Summary |
protected static int |
MARGIN
the pixel size of the margin around the widget |
|
Method Summary |
java.lang.String |
getHtmlComponent(int hints)
CheckboxWidget uses a hidden input that represents the on/off state of the checkbox
widget. |
WidgetProperties |
getWidgetProperties()
Returns the corresponding WidgetProperties |
static boolean |
rendersObject(UiObject object)
A static method for testing the applicability of the widget given a type
of the UI component to be rendered |
void |
setParameterValue(java.lang.String paramType,
java.lang.String value)
This method is called in response to a user changing widget values. |
protected java.awt.Dimension |
size(int hints)
Yields the size of the widget. |
java.lang.String |
toString()
|
| Methods inherited from class edu.washington.cs.supple.render.AbstractWidget |
anotherPropertyChanged, clone, clone, disengage, dismissCurrentView, displayDynamic, engage, equals, executeAction, generateWidgetDescriptor, getBag, getConcreteWidget, getCost, getParent, getPath, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, indexChanged, isEngaged, isEquivalent, legalValuesChanged, likelyValuesChanged, propertyChange, reportActionExecutionEvent, reportValueChangedEvent, setBag, setCost, setEnabled, setParent, setSizeCache, setValue, setWrapper, unwrapWidget, valueChanged |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.washington.cs.supple.render.Widget |
childIterator, clone, clone, disengage, engage, getBag, getConcreteWidget, getCost, getEffortEstimate, getPath, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, hasChildren, isEngaged, isEquivalent, setBag, setCost, setEnabled, setParent, setSizeCache, setWrapper, unwrapWidget |
MARGIN
protected static final int MARGIN
- the pixel size of the margin around the widget
- See Also:
- Constant Field Values
CheckboxWidget
public CheckboxWidget(UiObject object)
- Parameters:
object -
rendersObject
public static boolean rendersObject(UiObject object)
- A static method for testing the applicability of the widget given a type
of the UI component to be rendered
- Returns:
- true for state variables of boolean types
getHtmlComponent
public java.lang.String getHtmlComponent(int hints)
- CheckboxWidget uses a hidden input that represents the on/off state of the checkbox
widget.
- Parameters:
hints - rendering hints
- Returns:
- the HTML code
setParameterValue
public void setParameterValue(java.lang.String paramType,
java.lang.String value)
throws java.lang.IllegalArgumentException
- Description copied from interface:
HtmlWidget
- This method is called in response to a user changing widget values.
- Specified by:
setParameterValue in interface HtmlWidget- Overrides:
setParameterValue in class SimpleHtmlWidget
- Throws:
java.lang.IllegalArgumentException
size
protected java.awt.Dimension size(int hints)
- Description copied from class:
SimpleHtmlWidget
- Yields the size of the widget. Contract stipulates that the size be recomputed,
and not taken from the size cache.
- Specified by:
size in class SimpleHtmlWidget
- Parameters:
hints -
- Returns:
- freshly computed size of the widget
getWidgetProperties
public WidgetProperties getWidgetProperties()
- Description copied from interface:
Widget
- Returns the corresponding WidgetProperties
- Specified by:
getWidgetProperties in interface Widget- Overrides:
getWidgetProperties in class AbstractWidget
- Returns:
- properties associated with this widget
toString
public java.lang.String toString()
- Overrides:
toString in class AbstractWidget