Example usage for com.google.gwt.dom.client Document createOLElement

List of usage examples for com.google.gwt.dom.client Document createOLElement

Introduction

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

Prototype

public OListElement createOLElement() 

Source Link

Usage

From source file:com.xemantic.tadedon.gwt.user.client.ui.ListPanel.java

License:Apache License

/**
 * Creates new list panel of specified root element {@code type}.
 *
 * @param type the list element type.//  w w  w  .j a  v a 2  s  .  co  m
 */
public @UiConstructor ListPanel(Type type) {
    Document doc = Document.get();
    switch (type) {
    case UL:
        m_listElement = doc.createULElement();
        break;
    case OL:
        m_listElement = doc.createOLElement();
        break;
    default:
        throw new AssertionError("Unknown list element type: " + type);
    }
    setElement(m_listElement);
}