List of usage examples for com.google.gwt.user.client Element removeAttribute
@Override
public void removeAttribute(String name)
From source file:com.github.gwtbootstrap.client.ui.base.PlaceholderHelper.java
License:Apache License
/** * Set a placeholder attribute (HTML5) to the element. * /*from www . j av a 2s.c om*/ * @param element the element be set * @param placeholder * the String to show. Use a empty string or null to remove the attribute. */ public void setPlaceholer(Element element, String placeholder) { if (placeholder == null || placeholder.trim().isEmpty()) { element.removeAttribute(Constants.PLACEHOLDER); return; } element.setAttribute(Constants.PLACEHOLDER, placeholder); }
From source file:com.vaadin.terminal.gwt.client.ui.VDragAndDropWrapper.java
License:Open Source License
protected void initDragStartMode() { Element div = getElement(); if (dragStartMode == HTML5) { if (dragStartElement == null) { dragStartElement = getDragStartElement(); dragStartElement.setPropertyBoolean(DRAGGABLE, true); VConsole.log("draggable = " + dragStartElement.getPropertyBoolean(DRAGGABLE)); hookHtml5DragStart(dragStartElement); VConsole.log("drag start listeners hooked."); }//from ww w . j av a2 s. c om } else { dragStartElement = null; if (div.hasAttribute(DRAGGABLE)) { div.removeAttribute(DRAGGABLE); } } }
From source file:fr.putnami.pwt.core.widget.client.base.AbstractHTMLPanel.java
License:Open Source License
@Override public void addAndReplaceElement(Widget widget, com.google.gwt.user.client.Element toReplace) { this.addEditor(widget); String elementId = toReplace.getId(); this.children.put(widget, elementId); toReplace.removeAttribute("id"); super.addAndReplaceElement(widget, toReplace); }
From source file:org.bonitasoft.forms.client.view.common.DOMUtils.java
License:Open Source License
/** * clean the body attributes/*w ww . java 2 s . com*/ */ protected void cleanBodyAttributes() { final Element bodyElement = RootPanel.getBodyElement(); bodyElement.removeAttribute("class"); bodyElement.removeAttribute("style"); bodyElement.removeAttribute("onload"); }
From source file:org.bonitasoft.web.toolkit.client.ui.component.core.AbstractComponent.java
License:Open Source License
/** * Define the tooltip to display on mouse over this component. * // w w w . j a v a2s . c o m * @param tooltip * The tooltip to display. * @return This method returns "this" to allow cascading calls. */ public final AbstractComponent setTooltip(final String tooltip) { this.tooltip = tooltip; if (isGenerated()) { if (tooltip == null) { for (final Element e : getElements()) { e.removeAttribute("title"); } } else { for (final Element e : getElements()) { e.setAttribute("title", tooltip); } } } return this; }