Example usage for com.google.gwt.dom.client Element setPropertyObject

List of usage examples for com.google.gwt.dom.client Element setPropertyObject

Introduction

In this page you can find the example usage for com.google.gwt.dom.client Element setPropertyObject.

Prototype

@Override
    public void setPropertyObject(String name, Object value) 

Source Link

Usage

From source file:com.cgxlib.xq.client.impl.AttributeImpl.java

License:Apache License

public void removeAttribute(XQ xq, String key) {
    for (Element e : xq.elements()) {
        if (e.getNodeType() != 1) {
            continue;
        }/*from  ww w.j  a  v  a  2  s.  c o  m*/
        if (JsUtils.hasProperty(e, key)) {
            if (BOOLEAN_ATTR_REGEX.test(key)) {
                e.setPropertyBoolean(key, false);
            } else {
                e.setPropertyObject(key, null);
            }
        }
        e.removeAttribute(key);
    }
}

From source file:org.waveprotocol.wave.client.editor.impl.DiffManager.java

License:Apache License

/**
 * Clear diffs from a document that is being discarded
 * (All it does is clean up backreferences to assist garbage collection)
 */// ww w .j  a va 2 s .co  m
public void clearFast() {
    for (Element e : elements) {
        // Break circular references in browsers with poor gc
        e.setPropertyObject(DIFF_KEY, null);
    }

    elements.clear();
}

From source file:org.waveprotocol.wave.client.editor.impl.NodeManager.java

License:Apache License

/**
 * NOTE(danilatos): This is preliminary/*from w w  w . j a  va 2 s. co m*/
 * Mark the element as a transparent node with the given skip level
 * @param element
 * @param skipType
 */
public static void setTransparency(Element element, Skip skipType) {
    element.setPropertyObject(TRANSPARENCY, skipType);
}

From source file:org.waveprotocol.wave.client.editor.impl.NodeManager.java

License:Apache License

/**
 *
 * @param element//from  w  ww.j a  v a  2  s.c  o  m
 * @param manager
 */
public static void setTransparentBackref(Element element, TransparentManager<?> manager) {
    element.setPropertyObject(TRANSPARENT_BACKREF, manager);
}

From source file:org.waveprotocol.wave.client.editor.impl.NodeManager.java

License:Apache License

/**
 * Puts a back reference to the element into the nodelet.
 * @param nodelet The element to store the back reference. Must not be null.
 * @param element The element to reference.
 *///from w w w.j av a 2 s  .c o  m
public static void setBackReference(Element nodelet, ContentElement element) {
    nodelet.setPropertyObject(BACKREF_NAME, element);
}

From source file:org.waveprotocol.wave.client.editor.webdriver.EditorWebDriverUtil.java

License:Apache License

public static void register(Editor editor, Element container) {
    container.setPropertyObject(EDITOR_WEBDRIVER_PROPERTY, editor);
}

From source file:org.waveprotocol.wave.client.wavepanel.view.dom.BlipMetaDomImpl.java

License:Apache License

public StringSequence getInlineLocators() {
    if (inlineLocators == null) {
        Element content = getContentContainer().getFirstChildElement();
        if (content != null) {
            inlineLocators = (StringSequence) content.getPropertyObject(INLINE_LOCATOR_PROPERTY);
            if (inlineLocators == null) {
                // Note: getAttribute() of a missing attribute does not return null on
                // all browsers.
                if (content.hasAttribute(INLINE_LOCATOR_ATTRIBUTE)) {
                    String serial = content.getAttribute(INLINE_LOCATOR_ATTRIBUTE);
                    inlineLocators = StringSequence.create(serial);
                } else {
                    inlineLocators = StringSequence.create();
                }/*from  ww w . j a  v a2s  .com*/
                content.setPropertyObject(INLINE_LOCATOR_PROPERTY, inlineLocators);
            }
        } else {
            // Leave inlineLocators as null, since the document is not here yet.
        }
    }
    return inlineLocators;
}