Example usage for com.google.gwt.i18n.shared WordCountDirectionEstimator get

List of usage examples for com.google.gwt.i18n.shared WordCountDirectionEstimator get

Introduction

In this page you can find the example usage for com.google.gwt.i18n.shared WordCountDirectionEstimator get.

Prototype

public static WordCountDirectionEstimator get() 

Source Link

Document

Get an instance of WordCountDirectionEstimator.

Usage

From source file:com.extjs.gxt.ui.client.widget.menu.MenuItem.java

License:sencha.com license

@Override
protected void onRender(Element target, int index) {
    super.onRender(target, index);
    setElement(DOM.createSpan(), target, index);

    getElement().setAttribute("unselectable", "on");

    if (GXT.isAriaEnabled()) {
        Accessibility.setRole(getElement(), Accessibility.ROLE_MENUITEM);
    } else {/* w  w w  .j a v a  2 s  .  c  om*/
        getElement().setPropertyString("href", "#");
    }

    String s = itemStyle + (subMenu != null ? " x-menu-item-arrow" : "");
    addStyleName(s);

    if (widget != null) {
        setWidget(widget);
    } else {
        setHtml(html);
        if (directionEstimated && html != null && !Util.isEmptyString(html)) {
            BidiUtils.setDirectionOnElement(getElement(),
                    WordCountDirectionEstimator.get().estimateDirection(html));
        }
    }

    if (subMenu != null) {
        Accessibility.setState(getElement(), "aria-haspopup", "true");
    }
}