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.util.DomUtil.java

License:Apache License

/**
 * Sets a CSS style property for the specified UIObject's element. 
 * /*w  w  w  .  java  2 s.c  o m*/
 * @param uio a UIObject
 * @param name a CSS style property name, in "camelCase"
 * @param value an int value
 */
public static void setIntStyleAttribute(UIObject uio, String name, int value) {
    DOM.setIntStyleAttribute(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.
 * /* w  w  w . j a  v a 2 s.  com*/
 * @param uio a UIObject
 * @param name a CSS style property name, in "camelCase"
 * @return value a screen pixel value, or <code>null</code> if the
 *         property is not set
 */
public static int getPixelStyleAttribute(UIObject uio, String name) {
    /*
     * DOM.getIntStyleAttribute() uses parseInt(), 
     * which parses until a non-digit is encountered 
     */
    return DOM.getIntStyleAttribute(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. 
 * //  www  .  jav  a  2  s  . co  m
 * @param uio a UIObject
 * @param name a CSS style property name, in "camelCase"
 * @param value an int value, in screen pixels
 */
public static void setPixelStyleAttribute(UIObject uio, String name, int value) {
    DOM.setStyleAttribute(uio.getElement(), name, value + "px");
}

From source file:asquare.gwt.tk.client.Util.java

License:Apache License

/**
 * Sets the id attribute the specified UIObject's element. Useful if you
 * need to select a specific component in CSS.
 * <h3>CSS Selection Example</h3>
 * //from  www  .j a  v a2  s  .  co  m
 * <pre>
 *     #fooPackage-barPanel {
 *       border: groove black 1px;
 *       text-align: left;
 *     }
 * </pre>
 * 
 * @param id a unique id. It is a good practice to namespace ids to avoid
 *            future id confilicts.
 */
public static void setId(UIObject uio, String id) {
    DOM.setAttribute(uio.getElement(), "id", id);
}

From source file:com.alkacon.geranium.client.util.PositionBean.java

License:Open Source License

/**
 * Collects the position information of the given UI object and returns a position info bean.<p> 
 * /*from  ww w . j  a va2s.c o m*/
 * @param uiObject the object to read the position data from
 * 
 * @return the position data
 */
public static PositionBean generatePositionInfo(UIObject uiObject) {

    return generatePositionInfo(uiObject.getElement());
}

From source file:com.audata.client.util.Print.java

License:Open Source License

public static void it(UIObject obj) {
    it("", obj.getElement().toString());
}

From source file:com.audata.client.util.Print.java

License:Open Source License

public static void it(String style, UIObject obj) {
    it(style, obj.getElement().toString());
}

From source file:com.cubusmail.client.util.PrintManager.java

License:Open Source License

public static void print(UIObject obj) {

    print(obj.getElement().getInnerHTML());
}

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

License:Apache License

/**
 * Applys affix functionality to specified object.
 *
 * @param object Object to "affixnize"/* w w  w  .  j  a v a 2  s  .co m*/
 */
public static void affix(final UIObject object) {
    affix(object.getElement());
}

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

License:Apache License

/**
 * Applys affix functionality to specified object.
 *
 * @param object Object to "affixnize"/*from ww  w.jav  a2  s  .c  om*/
 * @param offset Offset of affix
 */
public static void affix(final UIObject object, final int offset) {
    affix(object.getElement(), offset);
}