edu.washington.cs.supple.wlib
Class AbstractToggleWidget

java.lang.Object
  extended byedu.washington.cs.supple.render.AbstractWidget
      extended byedu.washington.cs.supple.render.SimpleWidget
          extended byedu.washington.cs.supple.wlib.AbstractToggleWidget
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, java.beans.PropertyChangeListener, UnwrappedWidget, Widget
Direct Known Subclasses:
CheckboxWidget

public class AbstractToggleWidget
extends SimpleWidget

Author:
Jing Jing Long TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Field Summary
protected  BooleanType boolType
           
protected  java.awt.Component box
           
 
Fields inherited from class edu.washington.cs.supple.render.AbstractWidget
bag, cost, engaged, object, parent, stateVar, textLabel, type, widgetDescriptor, wrapper
 
Fields inherited from interface edu.washington.cs.supple.render.Widget
MAX_HINT, NO_BORDER, NO_NAME, TOP_LEVEL_WIDGET
 
Constructor Summary
AbstractToggleWidget(UiObject object)
           
 
Method Summary
 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 setEnabled(boolean enabled)
          Subclasses should override this method if they want to respond to the underlying ui objects being active or inactive
 
Methods inherited from class edu.washington.cs.supple.render.SimpleWidget
childIterator, getEffortEstimate, hasChildren
 
Methods inherited from class edu.washington.cs.supple.render.AbstractWidget
anotherPropertyChanged, clone, clone, disengage, dismissCurrentView, displayDynamic, engage, equals, executeAction, generateWidgetDescriptor, getBag, getConcreteWidget, getConcreteWidget, getCost, getParent, getPath, getSize, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, indexChanged, isEngaged, isEquivalent, legalValuesChanged, likelyValuesChanged, propertyChange, reportActionExecutionEvent, reportValueChangedEvent, setBag, setCost, setParent, setSizeCache, setValue, setWrapper, toString, unwrapWidget, valueChanged
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

boolType

protected BooleanType boolType

box

protected java.awt.Component box
Constructor Detail

AbstractToggleWidget

public AbstractToggleWidget(UiObject object)
Parameters:
object -
Method Detail

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

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 all instances of the Boolean type; false otherwise

setEnabled

public void setEnabled(boolean enabled)
Description copied from class: AbstractWidget
Subclasses should override this method if they want to respond to the underlying ui objects being active or inactive

Specified by:
setEnabled in interface Widget
Overrides:
setEnabled in class AbstractWidget
Parameters:
enabled - indicates if the underlying object is active