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:asquare.gwt.tk.client.ui.behavior.EventBaseImpl.java

License:Apache License

public boolean didEventOccurIn(UIObject uio) {
    return didEventOccurIn(uio.getElement());
}

From source file:asquare.gwt.tk.client.util.DomUtil.java

License:Apache License

/**
 * Gets the id attribute of the specified UIObject's element.
 * //from   ww  w.  ja v a 2  s . c om
 * @param uio the UIObject
 * @return the id or <code>null</code> if the id attribute is not set
 */
public static String getId(UIObject uio) {
    return getId(uio.getElement());
}

From source file:asquare.gwt.tk.client.util.DomUtil.java

License:Apache License

/**
 * Sets the id attribute of the specified UIObject's root element. Useful if
 * you need to select a specific component in CSS.
 * <p>/*www  . j a  v a  2  s. c  o m*/
 * Usage notes:
 * <ul>
 * <li>The id should not be the same as the history token. See <a
 * href="http://code.google.com/p/google-web-toolkit/issues/detail?id=61">Issue
 * 61</a></li>
 * <li>in some GWT widgets the style element is different than the root
 * element (ex: {@link PopupPanel}). In these cases it is better to use
 * {@link UIObject#addStyleName(String)}</li>
 * </ul>
 * <h3>CSS Selection Example</h3>
 * 
 * <pre>
 *      #fooPackage-barPanel {
 *        border: groove black 1px;
 *        text-align: left;
 *      }
 * </pre>
 * 
 * @param uio the UIObject
 * @param id a unique id. It is a good practice to namespace ids to avoid
 *            future id confilicts, i.e. organization.project.foo.
 */
public static void setId(UIObject uio, String id) {
    setId(uio.getElement(), id);
}

From source file:asquare.gwt.tk.client.util.DomUtil.java

License:Apache License

/**
 * Gets an attribute on the specified UIObject's element.
 * //from w w w .j  a  va2s  . c om
 * @param uio a UIObject
 * @param name an attribute name, in "camelCase"
 * @return value the attribute value, or <code>null</code> if the
 *         attribute is not defined
 */
public static String getAttribute(UIObject uio, String name) {
    return DOM.getElementProperty(uio.getElement(), name);
}

From source file:asquare.gwt.tk.client.util.DomUtil.java

License:Apache License

/**
 * Sets an attribute on the specified UIObject's element. 
 * /*  w  w w. jav  a  2s.c o  m*/
 * @param uio a UIObject
 * @param name the attribute name, in "camelCase"
 * @param value a value
 */
public static void setAttribute(UIObject uio, String name, String value) {
    DOM.setElementProperty(uio.getElement(), name, value);
}

From source file:asquare.gwt.tk.client.util.DomUtil.java

License:Apache License

/**
 * Gets an int attribute on the specified UIObject's element. 
 * //from  w  w  w. j ava  2  s .  c o  m
 * @param uio a UIObject
 * @param name the attribute name, in "camelCase"
 * @return the value, or <code>0</code> if the attribute is not defined
 */
public static int getIntAttribute(UIObject uio, String name) {
    return DOM.getElementPropertyInt(uio.getElement(), name);
}

From source file:asquare.gwt.tk.client.util.DomUtil.java

License:Apache License

/**
 * Sets an int attribute on the specified UIObject's element. 
 * /* www.  ja v a 2 s.c o m*/
 * @param uio a UIObject
 * @param name the attribute name, in "camelCase"
 * @param value an int value
 */
public static void setIntAttribute(UIObject uio, String name, int value) {
    DOM.setElementPropertyInt(uio.getElement(), name, value);
}

From source file:asquare.gwt.tk.client.util.DomUtil.java

License:Apache License

/**
 * Gets a CSS style property for the specified UIObject's element.
 * //from w ww.j  a v  a 2 s  .co  m
 * @param uio a UIObject
 * @param name a CSS style property name, in "camelCase"
 * @return value the style property value, or <code>null</code> if the
 *         property is not set
 */
public static String getStyleAttribute(UIObject uio, String name) {
    return DOM.getStyleAttribute(uio.getElement(), name);
}

From source file:asquare.gwt.tk.client.util.DomUtil.java

License:Apache License

/**
 * Sets a CSS style property for the specified UIObject's element. 
 * /*from ww w.  j a  v a 2  s  . c  om*/
 * @param uio a UIObject
 * @param name a CSS style property name, in "camelCase"
 * @param value a valid CSS property value
 */
public static void setStyleAttribute(UIObject uio, String name, String value) {
    DOM.setStyleAttribute(uio.getElement(), name, value);
}

From source file:asquare.gwt.tk.client.util.DomUtil.java

License:Apache License

/**
 * Gets a CSS style property for the specified UIObject's element.
 * //  ww w  . j a  va2 s. c  o m
 * @param uio a UIObject
 * @param name a CSS style property name, in "camelCase"
 * @return value an int value, or <code>null</code> if the property is not
 *         set
 */
public static int getIntStyleAttribute(UIObject uio, String name) {
    return DOM.getIntStyleAttribute(uio.getElement(), name);
}