edu.washington.cs.supple.wlib.java2
Class AbstractComboBoxWidget
java.lang.Object
edu.washington.cs.supple.render.AbstractWidget
edu.washington.cs.supple.render.SimpleWidget
edu.washington.cs.supple.wlib.java2.AbstractComboBoxWidget
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.EventListener, java.beans.PropertyChangeListener, SwingWidget, UnwrappedWidget, Widget
- Direct Known Subclasses:
- LegalValuesComboBoxWidget, LikelyValuesComboBoxWidget
- public abstract class AbstractComboBoxWidget
- extends SimpleWidget
- implements SwingWidget
- Author:
- kgajos
|
Method Summary |
javax.swing.JComponent |
getSwingComponent(int hints)
|
WidgetProperties |
getWidgetProperties()
Returns the corresponding WidgetProperties |
protected javax.swing.ComboBoxModel |
makeComboBoxModel()
|
protected javax.swing.ComboBoxModel |
makeComboBoxModel(java.util.Vector data)
|
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)
This method is exposed only so that wrappers can access it; others should
stay away |
java.lang.String |
toString()
|
protected void |
updateModel()
|
protected void |
updateSelection()
|
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, indexChanged, isEngaged, isEquivalent, legalValuesChanged, likelyValuesChanged, propertyChange, reportActionExecutionEvent, reportValueChangedEvent, setBag, setCost, 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, hasChildren, isEngaged, isEquivalent, setBag, setCost, setParent, setSizeCache, setWrapper, unwrapWidget |
LIKELY_VALS
public static final int LIKELY_VALS
- See Also:
- Constant Field Values
LEGAL_VALS
public static final int LEGAL_VALS
- See Also:
- Constant Field Values
mode
protected int mode
cbox
protected javax.swing.JComboBox cbox
stateVar
protected StateVar stateVar
AbstractComboBoxWidget
public AbstractComboBoxWidget(UiObject object,
int mode)
- Parameters:
object - mode - mode of operation -- should the list contain likely values,
legal values, or both
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 String type and for enumerable
types (provided they are modifiable); false otherwise
getSwingComponent
public javax.swing.JComponent getSwingComponent(int hints)
- Specified by:
getSwingComponent in interface SwingWidget
- Parameters:
hints - specifies the variant of the widget to be rendered
- Returns:
- a renderable component
makeComboBoxModel
protected javax.swing.ComboBoxModel makeComboBoxModel()
makeComboBoxModel
protected javax.swing.ComboBoxModel makeComboBoxModel(java.util.Vector data)
updateModel
protected void updateModel()
updateSelection
protected void updateSelection()
setEnabled
public void setEnabled(boolean enabled)
- Description copied from interface:
Widget
- This method is exposed only so that wrappers can access it; others should
stay away
- Specified by:
setEnabled in interface Widget- Overrides:
setEnabled in class AbstractWidget
- Parameters:
enabled - indicates if the underlying object is active
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
toString
public java.lang.String toString()
- Overrides:
toString in class AbstractWidget