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

java.lang.Object
  extended byedu.washington.cs.supple.render.AbstractWidgetWrapper
      extended byedu.washington.cs.supple.wlib.java2.SimpleSwingWidgetWrapper
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, java.beans.PropertyChangeListener, SwingWidget, Widget, WidgetWrapper

public class SimpleSwingWidgetWrapper
extends AbstractWidgetWrapper
implements SwingWidget

Author:
kgajos

Field Summary
protected  AbstractWidget abstractWidget
           
protected  javax.swing.JComponent currentComponent
           
protected  javax.swing.JComponent finalComponent
           
protected  SwingWidget swingWidget
           
 
Fields inherited from class edu.washington.cs.supple.render.AbstractWidgetWrapper
widget
 
Fields inherited from interface edu.washington.cs.supple.render.Widget
MAX_HINT, NO_BORDER, NO_NAME, TOP_LEVEL_WIDGET
 
Constructor Summary
SimpleSwingWidgetWrapper(SwingWidget widget)
           
 
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
 javax.swing.JComponent getSwingComponent(int hints)
           
protected  WidgetWrapper getWrapper(Widget widget)
           
 void refreshDisplay()
           
 
Methods inherited from class edu.washington.cs.supple.render.AbstractWidgetWrapper
childIterator, clone, clone, disengage, equals, getBag, getConcreteWidget, getCost, getEffortEstimate, getPath, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, getWidgetProperties, hasChildren, hashCode, isEngaged, isEquivalent, propertyChange, setBag, setCost, setEnabled, setParent, setSizeCache, setWrapper, toString, unwrapWidget
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.washington.cs.supple.render.Widget
childIterator, clone, clone, disengage, getBag, getConcreteWidget, getCost, getEffortEstimate, getPath, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, getWidgetProperties, hasChildren, isEngaged, isEquivalent, setBag, setCost, setEnabled, setParent, setSizeCache, setWrapper, unwrapWidget
 

Field Detail

swingWidget

protected SwingWidget swingWidget

abstractWidget

protected AbstractWidget abstractWidget

finalComponent

protected transient javax.swing.JComponent finalComponent

currentComponent

protected javax.swing.JComponent currentComponent
Constructor Detail

SimpleSwingWidgetWrapper

public SimpleSwingWidgetWrapper(SwingWidget widget)
Method Detail

getWrapper

protected WidgetWrapper getWrapper(Widget widget)
Specified by:
getWrapper in class AbstractWidgetWrapper

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 AbstractWidgetWrapper
Parameters:
hints -
Returns:

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
Parameters:
renderingContext - extra context information requried by some platforms
hints - rendering hints
Returns:

getSwingComponent

public javax.swing.JComponent getSwingComponent(int hints)
Specified by:
getSwingComponent in interface SwingWidget
Parameters:
hints -
Returns:

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 AbstractWidgetWrapper

refreshDisplay

public void refreshDisplay()