com.sap.ui.commons.client
Class ComboBoxWidget

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sap.ui.core.client.ControlWidget
              extended by com.sap.ui.commons.client.TextFieldWidget
                  extended by com.sap.ui.commons.client.ComboBoxWidget
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget
Direct Known Subclasses:
DropdownBoxWidget

public class ComboBoxWidget
extends TextFieldWidget

The class ComboBox is the GWT wrapper for the Phoenix control: sap.ui.commons.ComboBox.

The control provides a field that allows end users to either enter some text, or to choose an entry out of a list of pre-defined items. The choosable items can be provided in the form of complete list boxes, single listbox items, or text strings defined for the current application.

For further parameters see {@link com.sap.ui.commons.client.TextField

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: SAP AG)

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
  ComboBoxWidget()
          constructs the class ComboBoxWidget
protected ComboBoxWidget(ComboBox control)
          constructs the class ComboBoxWidget
  ComboBoxWidget(String id)
          constructs the class ComboBoxWidget
 
Method Summary
 void addItem(com.sap.ui.core.client.ListItem item)
          Appends some item to the items-aggregation.
 void bindItems(String path, com.sap.ui.core.client.Element template)
          Binder for aggregation items.
 void destroyItems()
          Destroys all the items in the Items-aggregation.
 ComboBox getControl()
          returns the reference to the Phoenix Control
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.ListItem> getItems()
          Getter for aggregation items Getter for aggregation items.
 String getListBox()
          Using this method, you provide a listbox control.
 int getMaxPopupItems()
          Getter for property maxPopupItems Defines the number of items that shall be displayed at once.
 int indexOfItem(com.sap.ui.core.client.ListItem item)
          Checks for the provided com.sap.ui.core.client.ListItem in the items-aggregation and returns its index if found or -1 otherwise.
 void insertItem(com.sap.ui.core.client.ListItem item, int index)
          Inserts some item into the aggregation named items.
 boolean isDisplaySecondaryValues()
          Getter for property displaySecondaryValues Indicates whether the "additionalText" property that is available for sap.ui.core.ListItem shall be displayed in the list.
 void removeAllItems()
          Removes all the items in the items-aggregation.
 void removeItem(int index)
          Removes the item at position index in the items-aggregation named.
 void setDisplaySecondaryValues(boolean value)
          Setter for property displaySecondaryValues
Default value is: false
 void setListBox(ListBox listBox)
          Using this method, you provide a listbox control.
 void setListBox(String listBox)
          Using this method, you provide a listbox control.
 void setMaxPopupItems(int value)
          Setter for property maxPopupItems
Default value is: 10
 void unbindItems()
          Unbinder for aggregation items.
 
Methods inherited from class com.sap.ui.commons.client.TextFieldWidget
attachChangeEvent, bindValue, bindValue, detachChangeEvent, focus, getAccessibleDescription, getAccessibleName, getAccessibleRole, getDesign, getHelpId, getImeMode, getMaxLength, getTextAlign, getTextDirection, getValue, getValueState, getWidth, isEditable, isEnabled, isRequired, isVisible, setAccessibleDescription, setAccessibleName, setAccessibleRole, setDesign, setEditable, setEnabled, setHelpId, setImeMode, setMaxLength, setRequired, setTextAlign, setTextDirection, setValue, setValueState, setVisible, setWidth, unbindValue
 
Methods inherited from class com.sap.ui.core.client.ControlWidget
destroy, doAttachChildren, doDetachChildren, isDesignTime, wrap
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, 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, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComboBoxWidget

public ComboBoxWidget()
constructs the class ComboBoxWidget


ComboBoxWidget

public ComboBoxWidget(String id)
constructs the class ComboBoxWidget

Parameters:
id - id of the ComboBoxWidget

ComboBoxWidget

protected ComboBoxWidget(ComboBox control)
constructs the class ComboBoxWidget

Parameters:
control - reference to an existing ComboBox
Method Detail

getControl

public ComboBox getControl()
returns the reference to the Phoenix Control

Overrides:
getControl in class TextFieldWidget
Returns:
reference to the Phoenix Control

getMaxPopupItems

public int getMaxPopupItems()
Getter for property maxPopupItems Defines the number of items that shall be displayed at once. If the overall number of list items is higher than the setting, a scrollbar is provided.

Returns:
the value of property maxPopupItems

setMaxPopupItems

public void setMaxPopupItems(int value)
Setter for property maxPopupItems
Default value is: 10

Parameters:
value - int

isDisplaySecondaryValues

public boolean isDisplaySecondaryValues()
Getter for property displaySecondaryValues Indicates whether the "additionalText" property that is available for sap.ui.core.ListItem shall be displayed in the list.

Returns:
the value of property displaySecondaryValues

setDisplaySecondaryValues

public void setDisplaySecondaryValues(boolean value)
Setter for property displaySecondaryValues
Default value is: false

Parameters:
value - boolean

getItems

public com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.ListItem> getItems()
Getter for aggregation items Getter for aggregation items. Allows setting ListItems (see sap.ui.core.ListBox) that shall be displayed in the list.

Returns:
com.sap.ui.core.client.ListItem[]

insertItem

public void insertItem(com.sap.ui.core.client.ListItem item,
                       int index)
Inserts some item into the aggregation named items.

Parameters:
item - the item to insert
index - int the 0-based index the item should be inserted at.

addItem

public void addItem(com.sap.ui.core.client.ListItem item)
Appends some item to the items-aggregation.

Parameters:
item - com.sap.ui.core.client.ListItem the item to add

removeItem

public void removeItem(int index)
Removes the item at position index in the items-aggregation named.

Parameters:
index - int the position of the item to remove.

removeAllItems

public void removeAllItems()
Removes all the items in the items-aggregation.


indexOfItem

public int indexOfItem(com.sap.ui.core.client.ListItem item)
Checks for the provided com.sap.ui.core.client.ListItem in the items-aggregation and returns its index if found or -1 otherwise.

Parameters:
item - the item whose index is looked for.
Returns:
the index of the provided control in the aggregation.

destroyItems

public void destroyItems()
Destroys all the items in the Items-aggregation.


bindItems

public final void bindItems(String path,
                            com.sap.ui.core.client.Element template)
Binder for aggregation items.

Parameters:
path - path to a list in the model
template - the template Element for this aggregation

unbindItems

public final void unbindItems()
Unbinder for aggregation items.


getListBox

public String getListBox()
Using this method, you provide a listbox control. This allows reuse of item lists in different controls. Either a control id can be used as new target, or a control instance.


setListBox

public void setListBox(String listBox)
Using this method, you provide a listbox control. This allows reuse of item lists in different controls. Either a control id can be used as new target, or a control instance.

Parameters:
listBox - String id of the associated com.sap.ui.commons.client.ListBox or null

setListBox

public void setListBox(ListBox listBox)
Using this method, you provide a listbox control. This allows reuse of item lists in different controls. Either a control id can be used as new target, or a control instance.

Parameters:
listBox - An associated com.sap.ui.commons.client.ListBox or null


Copyright © 2011 SAP. All Rights Reserved.