Tabnine Logo
Element.setAttribute
Code IndexAdd Tabnine to your IDE (free)

How to use
setAttribute
method
in
com.google.gwt.user.client.Element

Best Java code snippets using com.google.gwt.user.client.Element.setAttribute (Showing top 20 results out of 828)

origin: kaaproject/kaa

/**
 * Instantiates a new ImageTextButton.
 */
public ImageTextButton(ImageResource imageResource, String text, ClickHandler clickHandler) {
 super();
 if (clickHandler != null) {
  addClickHandler(clickHandler);
 }
 String definedStyles = getElement().getAttribute("style");
 getElement().setAttribute("style", definedStyles + "; vertical-align:middle;");
 this.text = text;
 Element span = DOM.createElement("span");
 span.setInnerText(text);
 DOM.insertChild(getElement(), span, 0);
 Element imageSpan = DOM.createElement("span");
 int spacing;
 if (this.text == null || this.text.trim().equals("")) {
  spacing = 0;
 } else {
  spacing = 16;
 }
 if (imageResource != null) {
  updateImageElementFromImageResource(imageSpan, imageResource, spacing);
 }
 DOM.insertBefore(getElement(), imageSpan, DOM.getFirstChild(getElement()));
}
origin: kaaproject/kaa

getElement().setAttribute("style",
  definedStyles + "; vertical-align:middle;");
Element textElement = DOM.createElement("span");
origin: com.google.gwt/gwt-servlet

/**
 * Sets the title associated with this object. The title is the 'tool-tip'
 * displayed to users when they hover over the object.
 * 
 * @param title the object's new title
 */
public void setTitle(String title) {
 if (title == null || title.length() == 0) {
  getElement().removeAttribute("title");
 } else {
  getElement().setAttribute("title", title);
 }
}
origin: kaaproject/kaa

getColumnFormatter().getElement(2).setAttribute("width", "0px");
detailsTable.getColumnFormatter().getElement(2).setAttribute("width", "0px");
origin: com.google.gwt/gwt-servlet

MenuItem(@IsSafeHtml String text, boolean asHTML) {
 setElement(DOM.createTD());
 setSelectionStyle(false);
 if (asHTML) {
  setHTML(text);
 } else {
  setText(text);
 }
 setStyleName("gwt-MenuItem");
 getElement().setAttribute("id", DOM.createUniqueId());
 // Add a11y role "menuitem"
 Roles.getMenuitemRole().set(getElement());
}
origin: com.google.gwt/gwt-servlet

widget.getElement().setAttribute("tabIndex", "-1");
origin: gwtbootstrap/gwt-bootstrap

/**
 * {@inheritDoc}
 */
@Override
public void setStartDate(String startDate) {
  getElement().setAttribute("data-date-startdate", startDate);
}
origin: gwtbootstrap/gwt-bootstrap

/**
 * Set target collapse selector.
 * @param target selector of target. (eg:#myCollapse)
 */
public void setTarget(String target) {
  this.target = target;
  
  if(widget != null) {
    Element element = widget.getElement();
    element.setAttribute(Constants.DATA_TARGET, target);
  }
}
 
origin: gwtbootstrap/gwt-bootstrap

/**
 * {@inheritDoc}
 */
@Override
public void setEndDate(String endDate) {
  getElement().setAttribute("data-date-enddate", endDate);
}
origin: gwtbootstrap/gwt-bootstrap

/**
 * {@inheritDoc}
 */
@Override
public void setStartView(String mode) {
  getElement().setAttribute("data-date-start-view", mode.toLowerCase());
}
origin: gwtbootstrap/gwt-bootstrap

/**
 * {@inheritDoc}
 */
public void setHref(String href) {
  getElement().setAttribute("href", href);
}
origin: GwtMaterialDesign/gwt-material

@Override
public void setUrl(String url) {
  this.url = url;
  uiObject.getElement().setAttribute("src", url);
}
origin: GwtMaterialDesign/gwt-material

/**
 * Set step attribute to input element.
 *
 * @param step "any" or number like for example 1 or 2.5 or 100, etc...
 */
public void setStep(String step) {
  valueBoxBase.getElement().setAttribute("step", step);
}
origin: com.google.gwt/gwt-servlet

getElement().setAttribute("hideFocus", "true");
origin: gwtbootstrap/gwt-bootstrap

  /**
   * Sets the type of widget to be closed.
   * 
   * @param type
   *            the type of widget to be closed
   */
  public void setType(DismissType type) {
    getElement().setAttribute(Constants.DATA_DISMISS, type.get());
  }
}
origin: GwtMaterialDesign/gwt-material

@Override
public void setPlaceholder(String placeholder) {
  valueBoxBase.getElement().setAttribute("placeholder", placeholder);
  if (!label.getText().isEmpty()) {
    label.setStyleName(CssName.ACTIVE);
  }
}
origin: com.google.gwt/gwt-servlet

emptyTableWidgetContainer.getElement().setAttribute("align", "center");
loadingIndicatorContainer = new FlexTable();
loadingIndicatorContainer.getElement().setAttribute("align", "center");
origin: OpenNMS/opennms

private void initializeInputWidget() {
  m_inputBox = new SearchTextBox();
  m_inputBox.addStyleName("search-input");
  m_inputBox.getElement().setAttribute("placeholder", "Search...");
  m_inputBox.getElement().setAttribute("type", "search");
  m_inputBox.setMaxLength(40);
  m_inputBox.setVisibleLength(40);
  m_inputBox.setValue("");
  setIdIfMissing(m_inputBox, "searchControl.searchInput");
}
origin: gwtbootstrap3/gwtbootstrap3

public void setPrev(final boolean prev) {
  getElement().removeAttribute(Attributes.DATA_SLIDE);
  getElement().setAttribute(Attributes.DATA_SLIDE, Carousel.PREV);
  StyleHelper.toggleStyleName(this, prev, Styles.LEFT);
  icon.addStyleName(Styles.ICON_PREV);
}
origin: gwtbootstrap3/gwtbootstrap3

public void setNext(final boolean next) {
  getElement().removeAttribute(Attributes.DATA_SLIDE);
  getElement().setAttribute(Attributes.DATA_SLIDE, Carousel.NEXT);
  StyleHelper.toggleStyleName(this, next, Styles.RIGHT);
  icon.addStyleName(Styles.ICON_NEXT);
}
com.google.gwt.user.clientElementsetAttribute

Popular methods of Element

  • getStyle
  • appendChild
  • setId
  • getParentElement
  • cast
  • setInnerText
  • getId
  • setInnerHTML
  • addClassName
  • getAttribute
  • getInnerHTML
  • getFirstChildElement
  • getInnerHTML,
  • getFirstChildElement,
  • getInnerText,
  • getClientWidth,
  • removeChild,
  • getChildCount,
  • getOffsetHeight,
  • removeAttribute,
  • removeClassName

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • ImageIO (javax.imageio)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now