edu.washington.cs.supple.wlib.awt
Class LabelWidget
java.lang.Object
edu.washington.cs.supple.render.AbstractWidget
edu.washington.cs.supple.render.SimpleWidget
edu.washington.cs.supple.wlib.awt.LabelWidget
- All Implemented Interfaces:
- AwtWidget, java.lang.Cloneable, java.util.EventListener, java.beans.PropertyChangeListener, UnwrappedWidget, Widget
- public class LabelWidget
- extends SimpleWidget
- implements AwtWidget
- Author:
- Jing Jing Long
| Methods inherited from class edu.washington.cs.supple.render.AbstractWidget |
anotherPropertyChanged, clone, clone, disengage, dismissCurrentView, displayDynamic, engage, equals, executeAction, getBag, getConcreteWidget, getConcreteWidget, getCost, getParent, getPath, getSize, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, isEngaged, isEquivalent, legalValuesChanged, likelyValuesChanged, propertyChange, reportActionExecutionEvent, reportValueChangedEvent, setBag, setCost, setEnabled, setParent, setSizeCache, setValue, setWrapper, 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 |
childIterator, clone, clone, disengage, engage, getBag, getConcreteWidget, getConcreteWidget, getCost, getEffortEstimate, getPath, getSize, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, hasChildren, isEngaged, isEquivalent, setBag, setCost, setEnabled, setParent, setSizeCache, setWrapper, unwrapWidget |
label
protected java.awt.Label label
curHints
protected int curHints
labelLength
protected int labelLength
LabelWidget
public LabelWidget(UiObject object)
- Parameters:
object -
LabelWidget
public LabelWidget(UiObject object,
int labelLength)
LabelWidget
public LabelWidget(UiObject object,
WidgetDescriptor wd,
WidgetFactory f)
generateWidgetDescriptor
protected WidgetDescriptor generateWidgetDescriptor()
- Description copied from class:
AbstractWidget
- Subclasses can override this method if their widget descriptor include
extra information
- Overrides:
generateWidgetDescriptor in class AbstractWidget
- Returns:
- a new widget descriptor for this widge
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 instances of types that are not modifiable and have and
index
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
makeLabelText
protected java.lang.String makeLabelText(java.lang.String value,
int hints)
makeLabelText
protected java.lang.String makeLabelText(int hints)
indexChanged
protected void indexChanged(java.beans.PropertyChangeEvent evt)
- Description copied from class:
AbstractWidget
- Subclasses should override this method if they want to update display the
index of the underlying type changes
- Overrides:
indexChanged in class AbstractWidget
- Parameters:
evt - property change event with details
toString
public java.lang.String toString()
- Overrides:
toString in class AbstractWidget