|
|||||||||||
| 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.java2.ContainerSwingWidget
| Field Summary | |
protected javax.swing.JButton |
actionButton
|
static int |
LEFT
|
static java.lang.String |
LIST_PLACEMENT_PROPERTY
|
static java.lang.String |
LISTING_WIDGET_PROPERTY
|
protected SwingWidget |
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 | |
ContainerSwingWidget(UiObject object)
|
|
ContainerSwingWidget(UiObject object,
SwingWidget lWidget,
int placement)
|
|
ContainerSwingWidget(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(javax.swing.JComponent 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 |
protected javax.swing.JComponent |
getComponentForChild(UiObject object,
int hints)
Returns the Swing 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 |
SwingWidget |
getListingWidget()
|
java.awt.Dimension |
getSize(int hints)
|
javax.swing.JComponent |
getSwingComponent(int hints)
For regular container types, it returns the result of calling makeSwingContainer. |
WidgetProperties |
getWidgetProperties()
Returns the corresponding WidgetProperties |
boolean |
hasListingWidget()
Lets you easily check if this container widget has a listing built in |
protected javax.swing.JButton |
makeActionButton(java.lang.String label,
java.awt.event.ActionListener listener)
A convenience method for creating buttons |
protected javax.swing.JComponent |
makeActionButtons(int hints)
Creates a panel with appropriate action buttons |
protected javax.swing.JComponent |
makeSwingContainer(int hints)
To be overriden by children (unless they override getSwingComponent) |
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 |
setEnabled(boolean enabled)
This method is exposed only so that wrappers can access it; others should stay away |
void |
setListingWidget(SwingWidget 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, 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, setParent, setSizeCache, setWrapper, unwrapWidget |
| Field Detail |
protected SwingWidget listingWidget
protected javax.swing.JButton actionButton
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 ContainerSwingWidget(UiObject object)
object -
public ContainerSwingWidget(UiObject object,
SwingWidget lWidget,
int placement)
public ContainerSwingWidget(UiObject object,
WidgetDescriptor wd,
WidgetFactory f)
throws java.lang.Exception
| Method Detail |
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 AbstractContainerWidgetprotected WidgetDescriptor generateWidgetDescriptor()
AbstractWidget
generateWidgetDescriptor in class AbstractWidgetpublic 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 javax.swing.JComponent getSwingComponent(int hints)
getSwingComponent in interface SwingWidgethints - specifies the variant of the widget to be rendered
protected javax.swing.JComponent makeSwingContainer(int hints)
hints - rendering hints
protected javax.swing.JComponent makeActionButtons(int hints)
hints - TODO
protected javax.swing.JButton 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 javax.swing.JComponent getComponentForChild(UiObject object,
int hints)
object - descriptionhints - rendering hints
protected boolean addChildren(javax.swing.JComponent container,
int hints)
container - The container to hold the childrenhints - rendering hints
public boolean hasListingWidget()
public SwingWidget getListingWidget()
public void setListingWidget(SwingWidget 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 AbstractContainerWidgetpublic void setEnabled(boolean enabled)
Widget
setEnabled in interface WidgetsetEnabled in class AbstractWidgetenabled - indicates if the underlying object is active
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||