|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.washington.cs.supple.render.AbstractWidget
edu.washington.cs.supple.render.AbstractContainerWidget
edu.washington.cs.supple.wlib.awt.ContainerAwtWidget
| Field Summary | |
static int |
LEFT
|
static java.lang.String |
LIST_PLACEMENT_PROPERTY
|
static java.lang.String |
LISTING_WIDGET_PROPERTY
|
protected AwtWidget |
listingWidget
|
protected int |
listPlacement
|
static int |
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 | |
ContainerAwtWidget(UiObject object)
|
|
ContainerAwtWidget(UiObject object,
AwtWidget lWidget,
int placement)
|
|
ContainerAwtWidget(UiObject object,
WidgetDescriptor wd,
WidgetFactory f)
|
|
| Method Summary | |
protected java.awt.Dimension |
addActionButtonSize(java.awt.Dimension cdim)
Given the size for the container object, it adds the size for the action button; this method should be overriden by children that change the implementation of makeActionButton |
protected boolean |
addChildren(java.awt.Container container,
int hints)
A convenience method that will add all the children widgets to the specified container. |
void |
disengage()
Used to break the connection between the widget and the underlying ui object |
void |
engage()
Used to tie the widgets with the underlying ui objects |
protected WidgetDescriptor |
generateWidgetDescriptor()
Subclasses can override this method if their widget descriptor include extra information |
java.awt.Component |
getAwtComponent(int hints)
For regular container types, it returns the result of calling makeAwtContainer. |
protected java.awt.Component |
getComponentForChild(UiObject object,
int hints)
Returns the Awt component of a child corresponding to object description and rendered according to the hings |
ConcreteWidget |
getConcreteWidget(java.io.Serializable renderingContext,
int hints)
Returns the concrete component (specific to a particular platform) |
protected java.awt.Dimension |
getContainerSize(int hints)
Unless a child overrides getSize, it should override this method |
AwtWidget |
getListingWidget()
|
java.awt.Dimension |
getSize(int hints)
|
WidgetProperties |
getWidgetProperties()
Returns the corresponding WidgetProperties |
boolean |
hasListingWidget()
Lets you easily check if this container widget has a listing built in |
protected java.awt.Button |
makeActionButton(java.lang.String label,
java.awt.event.ActionListener listener)
A convenience method for creating buttons |
protected java.awt.Component |
makeActionButtons()
Creates a panel with appropriate action buttons |
protected java.awt.Container |
makeAwtContainer(int hints)
To be overriden by children (unless they override getAwtComponent) |
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 |
void |
setListingWidget(AwtWidget listingWidget,
int placement)
|
java.lang.String |
toString()
|
| Methods inherited from class edu.washington.cs.supple.render.AbstractContainerWidget |
childIterator, getChild, getChildFor, getMaxChildSize, getMaxChildSize, getMinChildSize, getSumChildSize, getSumChildSize, hasChildren, makeVisible, 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, getEffortEstimate, getPath, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, hasChildren, isEngaged, isEquivalent, setBag, setCost, setEnabled, setParent, setSizeCache, setWrapper, unwrapWidget |
| Field Detail |
protected AwtWidget listingWidget
protected int listPlacement
public static final int LEFT
public static final int TOP
public static final java.lang.String LISTING_WIDGET_PROPERTY
public static final java.lang.String LIST_PLACEMENT_PROPERTY
| Constructor Detail |
public ContainerAwtWidget(UiObject object)
object -
public ContainerAwtWidget(UiObject object,
AwtWidget lWidget,
int placement)
public ContainerAwtWidget(UiObject object,
WidgetDescriptor wd,
WidgetFactory f)
throws java.lang.Exception
| Method Detail |
protected WidgetDescriptor generateWidgetDescriptor()
AbstractWidget
generateWidgetDescriptor in class AbstractWidget
public ConcreteWidget getConcreteWidget(java.io.Serializable renderingContext,
int hints)
Widget
getConcreteWidget in interface WidgetgetConcreteWidget in class AbstractWidgetpublic WidgetProperties getWidgetProperties()
Widget
getWidgetProperties in interface WidgetgetWidgetProperties in class AbstractContainerWidgetpublic static boolean rendersObject(UiObject object)
public java.awt.Dimension getSize(int hints)
getSize in interface WidgetgetSize in class AbstractWidgetprotected java.awt.Dimension getContainerSize(int hints)
hints - rendering hints
protected java.awt.Dimension addActionButtonSize(java.awt.Dimension cdim)
cdim - the dimensions of the container
public java.awt.Component getAwtComponent(int hints)
getAwtComponent in interface AwtWidgethints - specifies the variant of the widget to be rendered
protected java.awt.Container makeAwtContainer(int hints)
hints - rendering hints
protected java.awt.Component makeActionButtons()
protected java.awt.Button makeActionButton(java.lang.String label,
java.awt.event.ActionListener listener)
label - text label to be put on the buttonlistener - action listener to be added to the button
protected java.awt.Component getComponentForChild(UiObject object,
int hints)
object - descriptionhints - rendering hints
protected boolean addChildren(java.awt.Container container,
int hints)
container - The container to hold the childrenhints - rendering hints
public boolean hasListingWidget()
public AwtWidget getListingWidget()
public void setListingWidget(AwtWidget listingWidget,
int placement)
listingWidget - The listingWidget to set.public java.lang.String toString()
toString in class AbstractContainerWidgetpublic void disengage()
Widget
disengage in interface Widgetdisengage in class AbstractContainerWidgetpublic void engage()
Widget
engage in interface Widgetengage in class AbstractContainerWidget
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||