Example usage for com.google.gwt.user.client.ui UIObject getElement

List of usage examples for com.google.gwt.user.client.ui UIObject getElement

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui UIObject getElement.

Prototype

public Element getElement() 

Source Link

Document

Gets a handle to the object's underlying DOM element.

Usage

From source file:com.dianaui.universal.core.client.ui.base.mixin.HTMLMixin.java

License:Apache License

public static String getHTML(final UIObject uiObject) {
    return uiObject.getElement().getInnerHTML();
}

From source file:com.dianaui.universal.core.client.ui.base.mixin.HTMLMixin.java

License:Apache License

public static void setHTML(final UIObject uiObject, final String html) {
    uiObject.getElement().setInnerHTML(html);
}

From source file:com.dianaui.universal.core.client.ui.base.mixin.IdMixin.java

License:Apache License

public static String getId(final UIObject uiObject) {
    return uiObject.getElement().getId();
}

From source file:com.dianaui.universal.core.client.ui.base.mixin.IdMixin.java

License:Apache License

public static void setId(final UIObject uiObject, final String id) {
    uiObject.getElement().setId(id);
}

From source file:com.dianaui.universal.core.client.ui.base.mixin.TextMixin.java

License:Apache License

public static String getText(final UIObject uiObject) {
    return uiObject.getElement().getInnerText();
}

From source file:com.dianaui.universal.core.client.ui.base.mixin.TextMixin.java

License:Apache License

public static void setText(final UIObject uiObject, final String text) {
    uiObject.getElement().setInnerText(text);
}

From source file:com.dianaui.universal.core.client.ui.base.mixin.ToggleMixin.java

License:Apache License

public static Toggle getToggle(final UIObject uiObject) {
    final String toggle = uiObject.getElement().getAttribute(Attributes.DATA_TOGGLE);
    return toggle != null && !toggle.equals("") ? Toggle.valueOf(toggle.toUpperCase()) : null;
}

From source file:com.dianaui.universal.core.client.ui.base.mixin.ToggleMixin.java

License:Apache License

public static void setToggle(final UIObject uiObject, final Toggle toggle) {
    if (toggle != null) {
        uiObject.getElement().setAttribute(Attributes.DATA_TOGGLE, toggle.getToggle());
    } else {/*  w  ww  .j ava2s .c o  m*/
        uiObject.getElement().removeAttribute(Attributes.DATA_TOGGLE);
    }
}

From source file:com.dianaui.universal.core.client.ui.ScrollSpy.java

License:Apache License

/**
 * Attaches ScrollSpy to specified object with specified target selector.
 *
 * @param spyOn    Spy on this object/*from   w  w w  .j  av  a  2  s. c o m*/
 * @param selector CSS selector of target element
 * @return scroll spy object
 */
public static ScrollSpy scrollSpy(final UIObject spyOn, final String selector) {
    return new ScrollSpy(spyOn.getElement(), selector);
}

From source file:com.dianaui.universal.core.client.ui.ScrollSpy.java

License:Apache License

/**
 * Attaches ScrollSpy to specified object with specified target element.
 *
 * @param spyOn  Spy on this object//from   ww  w  .  j a v a  2 s  .  c o  m
 * @param target Target element having an ID
 * @return scroll spy object
 */
public static ScrollSpy scrollSpy(final UIObject spyOn, final HasId target) {
    return new ScrollSpy(spyOn.getElement(), target);
}