Example #1
0
 public void selectItem(Element item) {
   if (selectedItem != null) {
     selectedItem.removeAttribute(SELECTED_ATTRIBUTE);
   }
   selectedItem = item;
   selectedItem.setAttribute(SELECTED_ATTRIBUTE, SELECTED_ATTRIBUTE);
 }
Example #2
0
 @Override
 public void setTitle(String title) {
   Element containerElement = getContainerElement();
   if (title == null || title.length() == 0) {
     containerElement.removeAttribute("title");
   } else {
     containerElement.setAttribute("title", title);
   }
 }
 /**
  * remove gwt positioning and overflow from extra divs, and hope for the best about xbrowser
  * compatibility..
  */
 private Element __fixPositioningAndOverflow(final Element element) {
   if ("body".equalsIgnoreCase(element.getTagName())) {
     return element;
   } else {
     element.setAttribute("style", "");
     element.removeAttribute("style"); // does not work on chrome
     element.setId("extradiv_" + index++);
     return __fixPositioningAndOverflow(element.getParentElement());
   }
 }