edu.washington.cs.supple.wlib.awt
Class ChoiceWidget
java.lang.Object
edu.washington.cs.supple.render.AbstractWidget
edu.washington.cs.supple.render.SimpleWidget
edu.washington.cs.supple.wlib.awt.ChoiceWidget
- All Implemented Interfaces:
- AwtWidget, java.lang.Cloneable, java.util.EventListener, java.beans.PropertyChangeListener, UnwrappedWidget, Widget
- public class ChoiceWidget
- extends SimpleWidget
- implements AwtWidget
- Author:
- kgajos
|
Field Summary |
protected java.awt.Choice |
choice
|
protected java.util.Vector |
elements
|
|
Method Summary |
java.awt.Component |
getAwtComponent(int hints)
|
protected void |
makeModel(java.awt.Choice widget)
|
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 |
protected void |
setValue()
|
java.lang.String |
toString()
|
protected void |
updateSelection(java.lang.Object newValue)
|
protected void |
valueChanged(java.beans.PropertyChangeEvent evt)
Subclasses should override this method if they want to update display the
value of the underlying type changes |
| 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, getWidgetProperties, indexChanged, isEngaged, isEquivalent, legalValuesChanged, likelyValuesChanged, propertyChange, reportActionExecutionEvent, reportValueChangedEvent, setBag, setCost, setEnabled, setParent, setSizeCache, setValue, setWrapper, unwrapWidget |
| 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, getConcreteWidget, getCost, getEffortEstimate, getPath, getSize, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, getWidgetProperties, hasChildren, isEngaged, isEquivalent, setBag, setCost, setEnabled, setParent, setSizeCache, setWrapper, unwrapWidget |
choice
protected java.awt.Choice choice
elements
protected java.util.Vector elements
ChoiceWidget
public ChoiceWidget(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 all instances of the String type and for enumerable
types (provided they are modifiable); false otherwise
getAwtComponent
public java.awt.Component getAwtComponent(int hints)
- Specified by:
getAwtComponent in interface AwtWidget
- Parameters:
hints - specifies the variant of the widget to be rendered
- Returns:
- a renderable component
makeModel
protected void makeModel(java.awt.Choice widget)
updateSelection
protected void updateSelection(java.lang.Object newValue)
valueChanged
protected void valueChanged(java.beans.PropertyChangeEvent evt)
- Description copied from class:
AbstractWidget
- Subclasses should override this method if they want to update display the
value of the underlying type changes
- Overrides:
valueChanged in class AbstractWidget
- Parameters:
evt - property change event with details
setValue
protected void setValue()
toString
public java.lang.String toString()
- Overrides:
toString in class AbstractWidget