edu.washington.cs.supple.wlib.awt
Class TabContainerWidget

java.lang.Object
  extended byedu.washington.cs.supple.render.AbstractWidget
      extended byedu.washington.cs.supple.render.AbstractContainerWidget
          extended byedu.washington.cs.supple.wlib.awt.ContainerAwtWidget
              extended byedu.washington.cs.supple.wlib.awt.TabContainerWidget
All Implemented Interfaces:
AwtWidget, java.lang.Cloneable, ContainerWidget, java.util.EventListener, java.beans.PropertyChangeListener, UnwrappedWidget, Widget

public class TabContainerWidget
extends ContainerAwtWidget

Author:
Jing Jing Long

Field Summary
protected  java.util.Hashtable components
           
protected  TabPanel tabbedPane
           
protected  java.util.Hashtable tabMappings
           
protected static boolean test
           
 
Fields inherited from class edu.washington.cs.supple.wlib.awt.ContainerAwtWidget
LEFT, LIST_PLACEMENT_PROPERTY, LISTING_WIDGET_PROPERTY, listingWidget, listPlacement, TOP
 
Fields inherited from class edu.washington.cs.supple.render.AbstractContainerWidget
children, containerType
 
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
TabContainerWidget(UiObject object)
           
 
Method Summary
protected  boolean addTabs(TabPanel pane, int hints)
           
 java.awt.Component getAwtComponent(int hints)
          For regular container types, it returns the result of calling makeAwtContainer.
 float getEffortEstimate(ActionDescription a)
           
 java.awt.Dimension getSize(int hints)
           
 WidgetProperties getWidgetProperties()
          Returns the corresponding WidgetProperties
 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.
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
 java.lang.String toString()
           
 
Methods inherited from class edu.washington.cs.supple.wlib.awt.ContainerAwtWidget
addActionButtonSize, addChildren, disengage, engage, generateWidgetDescriptor, getComponentForChild, getConcreteWidget, getContainerSize, getListingWidget, hasListingWidget, makeActionButton, makeActionButtons, makeAwtContainer, setListingWidget
 
Methods inherited from class edu.washington.cs.supple.render.AbstractContainerWidget
childIterator, getChild, getChildFor, getMaxChildSize, getMaxChildSize, getMinChildSize, getSumChildSize, getSumChildSize, hasChildren, setChildren
 
Methods inherited from class edu.washington.cs.supple.render.AbstractWidget
anotherPropertyChanged, clone, clone, dismissCurrentView, displayDynamic, equals, executeAction, getBag, getConcreteWidget, getCost, getParent, getPath, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, indexChanged, 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, getBag, getConcreteWidget, getCost, getPath, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, hasChildren, isEngaged, isEquivalent, setBag, setCost, setEnabled, setParent, setSizeCache, setWrapper, unwrapWidget
 

Field Detail

components

protected java.util.Hashtable components

tabMappings

protected java.util.Hashtable tabMappings

tabbedPane

protected TabPanel tabbedPane

test

protected static boolean test
Constructor Detail

TabContainerWidget

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

getWidgetProperties

public WidgetProperties getWidgetProperties()
Description copied from interface: Widget
Returns the corresponding WidgetProperties

Specified by:
getWidgetProperties in interface Widget
Overrides:
getWidgetProperties in class ContainerAwtWidget
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 all coumpound objects whose children have labels; false otherwise

getAwtComponent

public java.awt.Component getAwtComponent(int hints)
Description copied from class: ContainerAwtWidget
For regular container types, it returns the result of calling makeAwtContainer. for action parameters type, it creates a larger panel with an action button

Specified by:
getAwtComponent in interface AwtWidget
Overrides:
getAwtComponent in class ContainerAwtWidget

addTabs

protected boolean addTabs(TabPanel pane,
                          int hints)

getSize

public java.awt.Dimension getSize(int hints)
Specified by:
getSize in interface Widget
Overrides:
getSize in class ContainerAwtWidget

makeVisible

public void makeVisible(UiObject target)
Description copied from class: AbstractContainerWidget
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
Overrides:
makeVisible in class AbstractContainerWidget
Parameters:
target - the vhild object that should be made visible

getEffortEstimate

public float getEffortEstimate(ActionDescription a)

toString

public java.lang.String toString()
Overrides:
toString in class ContainerAwtWidget