edu.washington.cs.supple.wlib.java2
Class SimpleSwingWidget

java.lang.Object
  extended byedu.washington.cs.supple.render.AbstractWidget
      extended byedu.washington.cs.supple.render.SimpleWidget
          extended byedu.washington.cs.supple.wlib.java2.SimpleSwingWidget
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, java.beans.PropertyChangeListener, SwingWidget, UnwrappedWidget, Widget
Direct Known Subclasses:
AbstractCheckBoxListWidget, AbstractSliderWidget, ButtonWidget, ListWidget, ProgressBarWidget, SpinnerWidget, TextAreaWidget, TextFieldWidget

public abstract class SimpleSwingWidget
extends SimpleWidget
implements SwingWidget

Author:
kgajos

Field Summary
protected  javax.swing.JComponent currentComponent
           
protected  javax.swing.JComponent finalComponent
           
 
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
SimpleSwingWidget(UiObject object)
           
 
Method Summary
 void engage()
          Used to tie the widgets with the underlying ui objects
 ConcreteWidget getConcreteWidget(java.io.Serializable renderingContext, int hints)
          Returns the concrete component (specific to a particular platform)
 java.awt.Dimension getSize(int hints)
          Returns the size of the widget as rendered with all of the hints specified in the parameter; uses caching wherever possible
 WidgetProperties getWidgetProperties()
          Returns the corresponding WidgetProperties
protected  void refreshDisplay()
           
 
Methods inherited from class edu.washington.cs.supple.render.SimpleWidget
childIterator, getEffortEstimate, hasChildren
 
Methods inherited from class edu.washington.cs.supple.render.AbstractWidget
anotherPropertyChanged, clone, clone, disengage, dismissCurrentView, displayDynamic, equals, executeAction, generateWidgetDescriptor, getBag, getConcreteWidget, getCost, getParent, getPath, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, 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.wlib.java2.SwingWidget
getSwingComponent
 
Methods inherited from interface edu.washington.cs.supple.render.Widget
childIterator, clone, clone, disengage, getBag, getConcreteWidget, getCost, getEffortEstimate, getPath, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, hasChildren, isEngaged, isEquivalent, setBag, setCost, setEnabled, setParent, setSizeCache, setWrapper, unwrapWidget
 

Field Detail

finalComponent

protected javax.swing.JComponent finalComponent

currentComponent

protected javax.swing.JComponent currentComponent
Constructor Detail

SimpleSwingWidget

public SimpleSwingWidget(UiObject object)
Parameters:
object -
Method Detail

getConcreteWidget

public ConcreteWidget getConcreteWidget(java.io.Serializable renderingContext,
                                        int hints)
Description copied from interface: Widget
Returns the concrete component (specific to a particular platform)

Specified by:
getConcreteWidget in interface Widget
Overrides:
getConcreteWidget in class AbstractWidget

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

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

getSize

public java.awt.Dimension getSize(int hints)
Returns the size of the widget as rendered with all of the hints specified in the parameter; uses caching wherever possible

Specified by:
getSize in interface Widget
Overrides:
getSize in class AbstractWidget

refreshDisplay

protected void refreshDisplay()