|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.washington.cs.supple.render.AbstractWidget
edu.washington.cs.supple.render.SimpleWidget
edu.washington.cs.supple.wlib.awt.ListWidget
| Field Summary | |
protected java.util.Hashtable |
cells
|
protected java.awt.Button |
dataEdit
|
protected SuppleType |
elementType
|
protected boolean |
exactLength
|
protected java.awt.event.ItemListener |
itemListener
|
protected java.awt.List |
list
|
protected java.awt.ScrollPane |
listPane
|
protected int |
listSize
|
protected boolean |
multipleMode
|
protected java.awt.Panel |
panel
|
protected boolean |
updatingWidget
|
protected VectorType |
vtype
|
| 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 | |
ListWidget(UiObject object,
int listSize)
|
|
| Method Summary | |
protected java.awt.Component |
buildList()
|
void |
disengage()
Used to break the connection between the widget and the underlying ui object |
protected void |
displayDetails()
Used when the underlying object is of UiObjectType or UiObjectValueVectorType it renders the detailed information about the selected values |
void |
engage()
Used to tie the widgets with the underlying ui objects |
protected WidgetDescriptor |
generateWidgetDescriptor()
Subclasses can override this method if their widget descriptor include extra information |
protected java.util.Vector |
getAddDiffs(java.util.Collection oldStuff,
java.util.Collection newStuff)
Creates a list of elements that are present in newStuff but not in oldStuff |
java.awt.Component |
getAwtComponent(int hints)
|
protected java.util.Vector |
getDeleteDiffs(java.util.Collection oldStuff,
java.util.Collection newStuff)
Creates a list of elements that are present in oldStuff but not in newStuff |
float |
getEffortEstimate(ActionDescription a)
This method is hear temporarily until we implement it for all simple widgets |
protected java.awt.event.ItemListener |
getItemListener()
|
int |
getListSize()
Returns the lenght of the list widget rendered; 0 means that the list will be as long as the number of elements in the domain of the object displayed |
protected java.awt.Dimension |
getPreferredSize()
Calculates the preferred size for this widget. |
WidgetProperties |
getWidgetProperties()
Returns the corresponding WidgetProperties |
boolean |
isExactLength()
Returns true if the list widget is precisely the same length as the domain of the underlying object |
protected boolean |
isUpdating()
This method lets you find out if the widget is in the process of updating itself (useful for breaking the cycle of change propagation between the widget and the underlying UiObject) |
protected void |
legalValuesChanged(java.beans.PropertyChangeEvent evt)
reacts to the change in the list of legal values in the underlying object |
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 |
protected void |
setUpdating(boolean b)
|
java.lang.String |
toString()
|
protected void |
updateSelection()
|
protected void |
updateSelection(int startIndex,
int endIndex)
Updates the selection based on the current value of the underlying object; uses the limiting indices to do the work only within small bounds if they are known; bounds are inclusive |
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.SimpleWidget |
childIterator, hasChildren |
| Methods inherited from class edu.washington.cs.supple.render.AbstractWidget |
anotherPropertyChanged, clone, clone, dismissCurrentView, displayDynamic, equals, executeAction, getBag, getConcreteWidget, getConcreteWidget, getCost, getParent, getPath, getSize, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, indexChanged, isEngaged, isEquivalent, 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, getBag, getConcreteWidget, getConcreteWidget, getCost, getPath, getSize, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, hasChildren, isEngaged, isEquivalent, setBag, setCost, setParent, setSizeCache, setWrapper, unwrapWidget |
| Field Detail |
protected int listSize
protected boolean exactLength
protected VectorType vtype
protected SuppleType elementType
protected java.awt.List list
protected java.awt.Panel panel
protected java.awt.ScrollPane listPane
protected java.awt.Button dataEdit
protected java.awt.event.ItemListener itemListener
protected boolean multipleMode
protected boolean updatingWidget
protected java.util.Hashtable cells
| Constructor Detail |
public ListWidget(UiObject object,
int listSize)
object - | Method Detail |
public int getListSize()
public boolean isExactLength()
public WidgetProperties getWidgetProperties()
Widget
getWidgetProperties in interface WidgetgetWidgetProperties in class AbstractWidgetprotected WidgetDescriptor generateWidgetDescriptor()
AbstractWidget
generateWidgetDescriptor in class AbstractWidgetpublic float getEffortEstimate(ActionDescription a)
SimpleWidget
getEffortEstimate in interface WidgetgetEffortEstimate in class SimpleWidgetpublic static boolean rendersObject(UiObject object)
public java.awt.Component getAwtComponent(int hints)
getAwtComponent in interface AwtWidgethints - specifies the variant of the widget to be rendered
protected java.awt.Component buildList()
protected void displayDetails()
protected java.awt.Dimension getPreferredSize()
protected java.awt.event.ItemListener getItemListener()
protected boolean isUpdating()
protected void setUpdating(boolean b)
protected void updateSelection()
protected void updateSelection(int startIndex,
int endIndex)
startIndex - endIndex -
protected java.util.Vector getAddDiffs(java.util.Collection oldStuff,
java.util.Collection newStuff)
oldStuff - old listnewStuff - new list
protected java.util.Vector getDeleteDiffs(java.util.Collection oldStuff,
java.util.Collection newStuff)
oldStuff - old listnewStuff - new list
protected void legalValuesChanged(java.beans.PropertyChangeEvent evt)
legalValuesChanged in class AbstractWidgetevt - property change event with detailsprotected void valueChanged(java.beans.PropertyChangeEvent evt)
AbstractWidget
valueChanged in class AbstractWidgetevt - property change event with detailspublic java.lang.String toString()
toString in class AbstractWidgetpublic void disengage()
Widget
disengage in interface Widgetdisengage in class AbstractWidgetpublic void engage()
Widget
engage in interface Widgetengage in class AbstractWidgetpublic void setEnabled(boolean enabled)
Widget
setEnabled in interface WidgetsetEnabled in class AbstractWidgetenabled - indicates if the underlying object is active
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||