Example usage for com.google.gwt.dom.client LabelElement getInnerText

List of usage examples for com.google.gwt.dom.client LabelElement getInnerText

Introduction

In this page you can find the example usage for com.google.gwt.dom.client LabelElement getInnerText.

Prototype

@Override
    public String getInnerText() 

Source Link

Usage

From source file:org.eclipse.che.ide.ui.listbox.CustomListBox.java

License:Open Source License

/**
 * Gets the text associated with the item at the specified index.
 *
 * @param index//from  www  .  j  a va2s. com
 *         the index of the item whose text is to be retrieved
 * @return the text associated with the item
 * @throws IndexOutOfBoundsException
 *         if the index is out of range
 */
public String getItemText(int index) {
    checkIndex(index);
    final Element optionElement = (Element) optionsPanel.getElement().getChild(index);
    final LabelElement labelElement = (LabelElement) optionElement.getElementsByTagName("label").getItem(0);

    return labelElement.getInnerText();
}