edu.washington.cs.supple.render
Class AbstractPopupWidget
java.lang.Object
edu.washington.cs.supple.render.AbstractWidget
edu.washington.cs.supple.render.SimpleWidget
edu.washington.cs.supple.render.AbstractPopupWidget
- All Implemented Interfaces:
- java.lang.Cloneable, ContainerWidget, java.util.EventListener, PopupWidget, java.beans.PropertyChangeListener, UnwrappedWidget, Widget
- Direct Known Subclasses:
- CardWidget, PopupAwtWidget, PopupSwingWidget
- public abstract class AbstractPopupWidget
- extends SimpleWidget
- implements PopupWidget
- Author:
- kgajos
|
Method Summary |
java.util.Iterator |
childIterator()
|
void |
disengage()
Used to break the connection between the widget and the underlying ui
object |
void |
engage()
Used to tie the widgets with the underlying ui objects |
protected void |
ensureBestWidget()
|
protected Widget |
getChildWidget()
|
float |
getCost()
Returns the cost assigned to this widget instance |
float |
getEffortEstimate(ActionDescription a)
This method is hear temporarily until we implement it for all
simple widgets |
boolean |
hasChildren()
|
void |
makeVisible(UiObject target)
This piece of functionality is necessary for interfaces
with shortcuts -- it forces the container widget to
make a particular child visible; this base implementation
assumes that widgets are rendered side by side so it only makes
sure that the target is a legal child. |
protected boolean |
satisfiesConstraints(Widget w)
|
void |
setChildren(java.util.Hashtable h)
Called by the WidgetBag when the solution is finalized |
| Methods inherited from class edu.washington.cs.supple.render.AbstractWidget |
anotherPropertyChanged, clone, clone, dismissCurrentView, displayDynamic, equals, executeAction, generateWidgetDescriptor, getBag, getConcreteWidget, getConcreteWidget, getParent, getPath, getSize, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, getWidgetProperties, indexChanged, isEngaged, isEquivalent, legalValuesChanged, likelyValuesChanged, propertyChange, rendersObject, reportActionExecutionEvent, reportValueChangedEvent, setBag, setCost, setEnabled, setParent, setSizeCache, setValue, setWrapper, toString, 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 |
clone, clone, getBag, getConcreteWidget, getConcreteWidget, getPath, getSize, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, getWidgetProperties, isEngaged, isEquivalent, setBag, setCost, setEnabled, setParent, setSizeCache, setWrapper, unwrapWidget |
availableWidgets
protected java.util.Vector availableWidgets
bestWidget
protected Widget bestWidget
widgetOverhead
protected java.awt.Dimension widgetOverhead
AbstractPopupWidget
public AbstractPopupWidget(UiObject object)
- Parameters:
object -
getCost
public float getCost()
- Description copied from interface:
Widget
- Returns the cost assigned to this widget instance
- Specified by:
getCost in interface Widget- Overrides:
getCost in class AbstractWidget
- Returns:
- the cost of assigning this widget to its corresponding ui object
ensureBestWidget
protected void ensureBestWidget()
engage
public void engage()
- Description copied from interface:
Widget
- Used to tie the widgets with the underlying ui objects
- Specified by:
engage in interface Widget- Overrides:
engage in class AbstractWidget
disengage
public void disengage()
- Description copied from interface:
Widget
- Used to break the connection between the widget and the underlying ui
object
- Specified by:
disengage in interface Widget- Overrides:
disengage in class AbstractWidget
satisfiesConstraints
protected boolean satisfiesConstraints(Widget w)
getChildWidget
protected Widget getChildWidget()
- Returns:
- the child widget if there is one and it is known; null otherwise
childIterator
public java.util.Iterator childIterator()
- Specified by:
childIterator in interface Widget- Overrides:
childIterator in class SimpleWidget
hasChildren
public boolean hasChildren()
- Specified by:
hasChildren in interface Widget- Overrides:
hasChildren in class SimpleWidget
makeVisible
public void makeVisible(UiObject target)
- Description copied from interface:
ContainerWidget
- This piece of functionality is necessary for interfaces
with shortcuts -- it forces the container widget to
make a particular child visible; this base implementation
assumes that widgets are rendered side by side so it only makes
sure that the target is a legal child.
- Specified by:
makeVisible in interface ContainerWidget
- Parameters:
target - the vhild object that should be made visible
setChildren
public void setChildren(java.util.Hashtable h)
- Description copied from interface:
ContainerWidget
- Called by the WidgetBag when the solution is finalized
- Specified by:
setChildren in interface ContainerWidget
- Parameters:
h - a mapping from UiObjects to child widgets
getEffortEstimate
public float getEffortEstimate(ActionDescription a)
- Description copied from class:
SimpleWidget
- This method is hear temporarily until we implement it for all
simple widgets
- Specified by:
getEffortEstimate in interface Widget- Overrides:
getEffortEstimate in class SimpleWidget