Example usage for com.google.gwt.i18n.client BidiUtils setDirectionOnElement

List of usage examples for com.google.gwt.i18n.client BidiUtils setDirectionOnElement

Introduction

In this page you can find the example usage for com.google.gwt.i18n.client BidiUtils setDirectionOnElement.

Prototype

public static void setDirectionOnElement(Element elem, Direction direction) 

Source Link

Document

Sets the directionality property for an element.

Usage

From source file:cc.alcina.framework.gwt.client.widget.Para.java

License:Apache License

public void setDirection(Direction direction) {
    BidiUtils.setDirectionOnElement(getElement(), direction);
}

From source file:com.extjs.gxt.ui.client.widget.form.TextField.java

License:sencha.com license

@Override
public void setDirection(Direction direction) {
    BidiUtils.setDirectionOnElement(getElement(), direction);
}

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 {/*from  w  ww .j  av  a2  s .c o m*/
        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");
    }
}

From source file:com.sencha.gxt.widget.core.client.form.ValueBaseField.java

License:sencha.com license

/**
 * Sets the directionality for a widget.
 * //from  w  w w.  j  a v  a2  s. co m
 * @param direction RTL if the directionality should be set to right-to-left, LTR if the directionality should be set
 *          to left-to-right DEFAULT if the directionality should not be explicitly set
 */
@Override
public void setDirection(Direction direction) {
    BidiUtils.setDirectionOnElement(getElement(), direction);
}