|
|||||||||
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
com.maryanovsky.gwtutils.client.ui.DropDownList
public class DropDownList
A simple drop down list. The CSS style names of this widget are
Nested Class Summary | |
---|---|
static interface |
DropDownList.Resources
The interface for the resources required by a drop-down list. |
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Field Summary | |
---|---|
PopupPanel |
popup
The popup. |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
DropDownList()
Creates a new DropDownList which will use a character to
represent the arrow. |
|
DropDownList(DropDownList.Resources resources)
Creates a new DropDownList with the specified DropDownList.Resources . |
Method Summary | |
---|---|
void |
addItem(String item)
Adds an item. |
HandlerRegistration |
addValueChangeHandler(ValueChangeHandler<Integer> handler)
Adds a handler for change of the selected index. |
protected Widget |
createDropDownArrow(DropDownList.Resources resources)
Creates the dropdown arrow widget from the specified resources. |
protected Widget |
createPopupSelectionList()
Creates the widget to be displayed in the popup to select an item. |
String |
getItem(int index)
Returns the item at the specified index. |
int |
getItemCount()
Returns the number of items. |
PopupPanel |
getPopup()
Returns the popup panel in which the items are displayed for selection. |
int |
getSelectedIndex()
Returns the currently selected index; -1 if none. |
void |
insertItem(String item,
int index)
Inserts an item at the specified index. |
void |
removeItem(int index)
Removes the item at the specified index. |
void |
setSelectedIndex(int index)
Sets the item with the specified index to be selected. |
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Field Detail |
---|
public final PopupPanel popup
Constructor Detail |
---|
public DropDownList()
DropDownList
which will use a character to
represent the arrow.
public DropDownList(DropDownList.Resources resources)
DropDownList
with the specified DropDownList.Resources
.
Method Detail |
---|
protected Widget createDropDownArrow(DropDownList.Resources resources)
resources
is not null
, the default
implementation returns an Image
created from the
ImageResource
returned by DropDownList.Resources.dropDownArrowIcon()
.
Otherwise, it returns a label with a down-pointing triangle character.
public HandlerRegistration addValueChangeHandler(ValueChangeHandler<Integer> handler)
addValueChangeHandler
in interface HasValueChangeHandlers<Integer>
public void addItem(String item)
public void insertItem(String item, int index)
public void removeItem(int index)
public String getItem(int index)
public int getItemCount()
public int getSelectedIndex()
public void setSelectedIndex(int index)
public final PopupPanel getPopup()
protected Widget createPopupSelectionList()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |