Java Code Examples for com.google.gwt.dom.client.Element#setPropertyBoolean()

The following examples show how to use com.google.gwt.dom.client.Element#setPropertyBoolean() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContentElement.java    From swellrt with Apache License 2.0 5 votes vote down vote up
/**
 * Mark implementation elements that aren't transparent as part of a
 * a complex implementation structure.
 *
 * @param element
 */
public static void walkImpl(Element element) {
  for (Node n = element.getFirstChild(); n != null;) {
    if (DomHelper.isTextNode(n)) {
      n = n.getNextSibling();
    } else {
      Element e = n.cast();
      if (!NodeManager.isTransparent(e)) {
        e.setPropertyBoolean(COMPLEX_IMPLEMENTATION_MARKER, true);
      }
      walkImpl(e);
      n = n.getNextSibling();
    }
  }
}
 
Example 2
Source File: ContentElement.java    From incubator-retired-wave with Apache License 2.0 5 votes vote down vote up
/**
 * Mark implementation elements that aren't transparent as part of a
 * a complex implementation structure.
 *
 * @param element
 */
public static void walkImpl(Element element) {
  for (Node n = element.getFirstChild(); n != null;) {
    if (DomHelper.isTextNode(n)) {
      n = n.getNextSibling();
    } else {
      Element e = n.cast();
      if (!NodeManager.isTransparent(e)) {
        e.setPropertyBoolean(COMPLEX_IMPLEMENTATION_MARKER, true);
      }
      walkImpl(e);
      n = n.getNextSibling();
    }
  }
}
 
Example 3
Source File: NodeManager.java    From swellrt with Apache License 2.0 2 votes vote down vote up
/**
 * Sets or clears the value returned by
 * {@link #mayContainSelectionEvenWhenDeep(Element)}
 */
public static void setMayContainSelectionEvenWhenDeep(Element e, boolean may) {
  e.setPropertyBoolean(MAY_CONTAIN_SELECTION, may);
}
 
Example 4
Source File: DomUtils.java    From gwt-traction with Apache License 2.0 2 votes vote down vote up
/**
    * It's enough to just set the disabled attribute on the
    * element, but we want to also add a "disabled" class so that we can
    * style it.
    *
    * At some point we'll just be able to use .button:disabled, 
    * but that doesn't work in IE8-
    */
   public static void setEnabled(Element element, boolean enabled) {
       element.setPropertyBoolean("disabled", !enabled);
setStyleName(element, "disabled", !enabled);
   }
 
Example 5
Source File: NodeManager.java    From incubator-retired-wave with Apache License 2.0 2 votes vote down vote up
/**
 * Sets or clears the value returned by
 * {@link #mayContainSelectionEvenWhenDeep(Element)}
 */
public static void setMayContainSelectionEvenWhenDeep(Element e, boolean may) {
  e.setPropertyBoolean(MAY_CONTAIN_SELECTION, may);
}