|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
GWTApplication.client.LabelListBox
class LabelListBox
This is a composite widget which comprises of a list box and a label. It's a convenience class which binds together two types of widgets which are commonly used together. I have purposefully not reimplemented all of the methods associated with the sub widgets simply to make the task of coding the class simpler.
| Field Summary | |
|---|---|
static int |
HORIZONTAL_ALIGNMENT
Whether the two widgets should be stacked horizontally |
com.google.gwt.user.client.ui.Label |
label
This is the label which is associated with the list box. |
com.google.gwt.user.client.ui.ListBox |
listBox
This is a list box which will contain all of the options which can may be selected by the user |
static int |
VERTICAL_ALIGNMENT
Whether the two widgets should be stacked vertically |
| Constructor Summary | |
|---|---|
LabelListBox(int Alignment)
This is the constructor which will generate a panel which contains both the label and the list box |
|
| Method Summary | |
|---|---|
java.lang.String |
getSelectedItemText()
This will return the value of the item which has been selected in the list |
boolean |
setSelectedItem(java.lang.String ItemToSelect)
This will be used to select the item which is specified in the list |
void |
setWidth(java.lang.String labelWidth,
java.lang.String listBoxWidth)
This method permits the caller to set the width of both the label and the list box at the same time. |
| Methods inherited from class com.google.gwt.user.client.ui.Composite |
|---|
getElement, getWidget, initWidget, isAttached, onAttach, onDetach, setWidget |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
doAttachChildren, doDetachChildren, getParent, onBrowserEvent, onLoad, onUnload, removeFromParent, setElement |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int VERTICAL_ALIGNMENT
public static final int HORIZONTAL_ALIGNMENT
public com.google.gwt.user.client.ui.ListBox listBox
public com.google.gwt.user.client.ui.Label label
| Constructor Detail |
|---|
LabelListBox(int Alignment)
Alignment - Whether the widgets should be arranged horizontally or
vertically. Should be one of VERTICAL_ALIGNMENT or
HORIZONTAL_ALIGNMENT.| Method Detail |
|---|
public java.lang.String getSelectedItemText()
public boolean setSelectedItem(java.lang.String ItemToSelect)
ItemToSelect - This is the item in the list which is to be
selected by default.
public void setWidth(java.lang.String labelWidth,
java.lang.String listBoxWidth)
labelWidth - this is the length of the label which must be expressed in valid CSS unitslistBoxWidth - this is the length of the list box which must be expressed in valid CSS units
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||