|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.washington.cs.supple.render.AbstractWidget
| Field Summary | |
protected WidgetBag |
bag
|
protected float |
cost
|
protected boolean |
engaged
|
protected UiObject |
object
|
protected Widget |
parent
|
protected StateVar |
stateVar
|
protected java.lang.String |
textLabel
|
protected SuppleType |
type
|
protected WidgetDescriptor |
widgetDescriptor
|
protected WidgetWrapper |
wrapper
|
| Fields inherited from interface edu.washington.cs.supple.render.Widget |
MAX_HINT, NO_BORDER, NO_NAME, TOP_LEVEL_WIDGET |
| Constructor Summary | |
AbstractWidget(UiObject object)
|
|
| Method Summary | |
protected void |
anotherPropertyChanged(java.beans.PropertyChangeEvent evt)
If some widgets are looking for other properties, I would prefer them to override this method rather than overriding propertyChange(); this method gets called when the property change event cannot be assigned to any of the known classes |
java.lang.Object |
clone()
|
Widget |
clone(WidgetBag bag)
A convenience method -- clones the widget and sets the value of the owner widget bag (used when cloning widget bags) |
void |
disengage()
Used to break the connection between the widget and the underlying ui object |
protected boolean |
dismissCurrentView()
Allows widgets to dismiss/close the current view |
protected RenderedView |
displayDynamic(UiObject dynObject)
|
void |
engage()
Used to tie the widgets with the underlying ui objects |
boolean |
equals(java.lang.Object o)
|
RenderedView |
executeAction()
A method for executing the corresponding action (if this widget is rendering an action object); |
protected WidgetDescriptor |
generateWidgetDescriptor()
Subclasses can override this method if their widget descriptor include extra information |
WidgetBag |
getBag()
Returns the widget bag containing this widget; widget bags are used in the search process as holders of the possible renderings for each UI element; |
ConcreteWidget |
getConcreteWidget(int hints)
Returns the concrete component (specific to a particular platform) |
ConcreteWidget |
getConcreteWidget(java.io.Serializable renderingContext,
int hints)
Returns the concrete component (specific to a particular platform) |
float |
getCost()
Returns the cost assigned to this widget instance |
protected Widget |
getParent()
|
java.util.Vector |
getPath()
Returns path (from the root) to this widget in the interface (ignoring shortcuts) |
java.awt.Dimension |
getSize(int hints)
|
java.awt.Dimension |
getSizeCache(int hints)
|
java.lang.String |
getTextLabel()
Returns the text label assigned to this widget |
SuppleType |
getType()
Returns the type of the corresponding UI object |
UiObject |
getUiObject()
Returns the corresponding UI object |
WidgetDescriptor |
getWidgetDescriptor()
Returns a descriptor for this widget |
WidgetProperties |
getWidgetProperties()
Returns the corresponding WidgetProperties |
protected void |
indexChanged(java.beans.PropertyChangeEvent evt)
Subclasses should override this method if they want to update display the index of the underlying type changes |
boolean |
isEngaged()
|
boolean |
isEquivalent(Widget w)
Checks if two widgets are equivalent to each other; they are equivalent if they have identical widget descriptors |
protected void |
legalValuesChanged(java.beans.PropertyChangeEvent evt)
Subclasses should override this method if they want to update display in response to the change in the legal values |
protected void |
likelyValuesChanged(java.beans.PropertyChangeEvent evt)
Subclasses should override this method if they want to update display in response to the change in the likely values |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
This method gets called by the type this widget represents whenever changes occur that need to be reflected in the display |
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 |
reportActionExecutionEvent()
A convenient method for reporting that an action has been executed |
protected void |
reportValueChangedEvent(java.lang.Object newValue)
A convenient method for reporting value change events |
void |
setBag(WidgetBag bag)
Sets the enclosing widget bag for this widget |
void |
setCost(float f)
This method is used by the cost function |
void |
setEnabled(boolean enabled)
Subclasses should override this method if they want to respond to the underlying ui objects being active or inactive |
void |
setParent(Widget parent)
Sets the parent widget |
void |
setSizeCache(int hints,
java.awt.Dimension dim)
|
protected void |
setValue(java.lang.Object value)
A method for setting the value for the underlying variable; Only works if the underlying type is a ValueType. |
void |
setWrapper(WidgetWrapper wrapper)
|
java.lang.String |
toString()
|
UnwrappedWidget |
unwrapWidget()
Returns the enclosed widget for wrappers or self for actual widgets |
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 java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.washington.cs.supple.render.Widget |
childIterator, getEffortEstimate, hasChildren |
| Field Detail |
protected java.lang.String textLabel
protected SuppleType type
protected UiObject object
protected StateVar stateVar
protected Widget parent
protected WidgetDescriptor widgetDescriptor
protected float cost
protected boolean engaged
protected transient WidgetBag bag
protected WidgetWrapper wrapper
| Constructor Detail |
public AbstractWidget(UiObject object)
| Method Detail |
public ConcreteWidget getConcreteWidget(int hints)
Widget
getConcreteWidget in interface Widgethints - rendering hints
public java.lang.String getTextLabel()
Widget
getTextLabel in interface Widgetpublic SuppleType getType()
Widget
getType in interface Widgetpublic WidgetProperties getWidgetProperties()
Widget
getWidgetProperties in interface Widgetpublic WidgetDescriptor getWidgetDescriptor()
Widget
getWidgetDescriptor in interface Widgetprotected WidgetDescriptor generateWidgetDescriptor()
protected void setValue(java.lang.Object value)
value - the new valuepublic RenderedView executeAction()
protected void reportValueChangedEvent(java.lang.Object newValue)
newValue - the new value for the corresponding objectprotected void reportActionExecutionEvent()
protected boolean dismissCurrentView()
public UiObject getUiObject()
Widget
getUiObject in interface Widgetpublic static boolean rendersObject(UiObject object)
public float getCost()
Widget
getCost in interface Widgetpublic void setCost(float f)
setCost in interface Widgetf - the cost of assigning this widget to its corresponding ui
objectpublic WidgetBag getBag()
Widget
getBag in interface Widgetpublic void setBag(WidgetBag bag)
setBag in interface Widgetbag - the enclosing widget bagpublic void setParent(Widget parent)
Widget
setParent in interface Widgetparent - the parent widgetprotected Widget getParent()
public java.lang.String toString()
public java.lang.Object clone()
clone in interface Widgetpublic Widget clone(WidgetBag bag)
clone in interface Widgetbag - the new owning widget bag
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpublic void setEnabled(boolean enabled)
setEnabled in interface Widgetenabled - indicates if the underlying object is activeprotected void valueChanged(java.beans.PropertyChangeEvent evt)
evt - property change event with detailsprotected void indexChanged(java.beans.PropertyChangeEvent evt)
evt - property change event with detailsprotected void legalValuesChanged(java.beans.PropertyChangeEvent evt)
evt - property change event with detailsprotected void likelyValuesChanged(java.beans.PropertyChangeEvent evt)
evt - property change event with detailsprotected void anotherPropertyChanged(java.beans.PropertyChangeEvent evt)
evt - public void disengage()
Widget
disengage in interface Widgetpublic void engage()
Widget
engage in interface Widgetpublic boolean isEngaged()
isEngaged in interface Widgetpublic java.util.Vector getPath()
Widget
getPath in interface Widgetprotected RenderedView displayDynamic(UiObject dynObject)
public UnwrappedWidget unwrapWidget()
Widget
unwrapWidget in interface Widgetpublic void setWrapper(WidgetWrapper wrapper)
setWrapper in interface Widget
public ConcreteWidget getConcreteWidget(java.io.Serializable renderingContext,
int hints)
Widget
getConcreteWidget in interface WidgetrenderingContext - extra context information requried by some platformshints - rendering hints
public java.awt.Dimension getSize(int hints)
getSize in interface Widgethints - extra information concerning the variant of the widget that
the size is needed for; at the moment I envision that some
times we will want border-less and nameless versions of the
widget
public java.awt.Dimension getSizeCache(int hints)
getSizeCache in interface Widget
public void setSizeCache(int hints,
java.awt.Dimension dim)
setSizeCache in interface Widgetpublic boolean equals(java.lang.Object o)
public boolean isEquivalent(Widget w)
Widget
isEquivalent in interface Widgetw -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||