Codota Logo
Element.addClassName
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain Element
private void myMethod () {
Element e =
  • Codota IconDOM.createDiv()
  • Codota IconDOM.createTR()
  • Codota IconDOM.createTable()
  • Smart code suggestions by Codota
}
origin: com.google.gwt/gwt-servlet

public Tab(Widget child) {
 super(Document.get().createDivElement());
 getElement().appendChild(inner = Document.get().createDivElement());
 setWidget(child);
 setStyleName(TAB_STYLE);
 inner.setClassName(TAB_INNER_STYLE);
 getElement().addClassName(CommonResources.getInlineBlockStyle());
}
origin: com.google.gwt/gwt-servlet

/**
 * Construct a new {@link NativeHorizontalScrollbar}.
 * 
 * @param resources the resources used by this widget
 */
public NativeHorizontalScrollbar(Resources resources) {
 setElement(uiBinder.createAndBindUi(this));
 getElement().addClassName(CommonResources.getInlineBlockStyle());
 setHeight(getNativeHeight() + "px");
 // Apply the styles.
 Style style = resources.nativeHorizontalScrollbarStyle();
 style.ensureInjected();
 getScrollableElement().addClassName(style.nativeHorizontalScrollbar());
 // Initialize the implementation.
 ScrollImpl.get().initialize(scrollable, contentDiv);
}
origin: com.google.gwt/gwt-servlet

/**
 * Construct a new {@link NativeVerticalScrollbar}.
 *
 * @param resources the resources used by this widget
 */
public NativeVerticalScrollbar(Resources resources) {
 setElement(uiBinder.createAndBindUi(this));
 getElement().addClassName(CommonResources.getInlineBlockStyle());
 setWidth(getNativeWidth() + "px");
 // Apply the styles.
 Style style = resources.nativeVerticalScrollbarStyle();
 style.ensureInjected();
 getScrollableElement().addClassName(style.nativeVerticalScrollbar());
 // inject style used in uibinder
 UiBinderBundle.INSTANCE.nativeVerticalScrollbarUi().ensureInjected();
 // Initialize the implementation.
 ScrollImpl.get().initialize(scrollable, contentDiv);
}
origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

public void updateSingleTabStyle() {
  if (tabLabels.size() <= 1) {
    tabContainer.addClassName(SINGLE_TAB_CLASS_NAME);
  } else {
    tabContainer.removeClassName(SINGLE_TAB_CLASS_NAME);
  }
}
origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

  @Override
  protected void applyStyles() {
    addStyleName("help-message-inline");
    icon.addClassName("action-dialog-help");
    messageWrapper.addClassName("help-message");
    triangleSVG.addStyleName("triangle blue");
  }
};
origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

  @Override
  public void onMouseOver(MouseOverEvent event) {
    getElement().addClassName("hover");
  }
}, MouseOverEvent.getType());
origin: errai/errai

 @Override
 public void invokeBinding(final Element element, final Annotation annotation) {
  final User user = userCache.getUser();
  final Set<Role> extractedRoles = roleExtractor.extractAllRoles((RestrictedAccess) annotation);
  if (User.ANONYMOUS.equals(user) || !user.getRoles().containsAll(extractedRoles)) {
   element.addClassName(RestrictedAccess.CSS_CLASS_NAME);
  }
  else {
   element.removeClassName(RestrictedAccess.CSS_CLASS_NAME);
  }
 }
});
origin: gwtbootstrap/gwt-bootstrap

  private void classNameToggle(final boolean value,
                 final String className) {
    if (value) {
      getElement().addClassName(className);
    } else {
      getElement().removeClassName(className);
    }
  }
}
origin: GwtMaterialDesign/gwt-material

@Override
public void setSuccessText(String successText) {
  super.setSuccessText(successText);
  removeErrorModifiers();
  valueBoxBase.getElement().addClassName(CssName.VALID);
}
origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

public void closeExpander() {
  element.removeClassName("hover");
  element.removeClassName("open");
  element.addClassName("closed");
  opened = false;
  updateColors();
}
origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

public BadgeIconWidget() {
  setElement(root);
  setStylePrimaryName(CLASSNAME);
  text.addClassName("text");
  root.appendChild(text);
}
origin: com.github.gwtmaterialdesign/gwt-material

@Override
public void setErrorText(String errorText) {
  super.setErrorText(errorText);
  removeErrorModifiers();
  valueBoxBase.getElement().addClassName(CssName.INVALID);
}
origin: com.haulmont.cuba/cuba-web-toolkit

public void setCaptionInline(boolean useInlineCaption) {
  this.useInlineCaption = useInlineCaption;
  if (useInlineCaption) {
    getWrapperElement().addClassName("inline");
  } else {
    getWrapperElement().removeClassName("inline");
  }
}
origin: com.haulmont.cuba/cuba-web-toolkit

public void setEditable(boolean editable) {
  this.editable = editable;
  if (!editable) {
    getElement().addClassName("noedit");
  } else {
    getElement().removeClassName("noedit");
  }
}
origin: com.sksamuel.jqm4gwt/jqm4gwt-library

/**
 * Button's size is very close to image + text size, i.e. minimal paddings around them are used.
 * <b>True</b> by default.
 */
public void setCompact(boolean value) {
  if (value) getElement().addClassName(COMPACT_BTN);
  else getElement().removeClassName(COMPACT_BTN);
}
origin: GwtMaterialDesign/gwt-material

public void updateWaves(boolean enabled, UIObject obj) {
  if (obj instanceof MaterialWidget) {
    MaterialWidget widget = (MaterialWidget) obj;
    if (enabled) {
      if (widget.getWaves() != null) {
        widget.getElement().addClassName(CssName.WAVES_EFFECT);
      }
    } else {
      widget.getElement().removeClassName(CssName.WAVES_EFFECT);
    }
  }
}
origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

private void constructDOM() {
  setElement(root);
  root.appendChild(icon);
  root.appendChild(label);
  root.appendChild(ariaLink);
  root.appendChild(runningIndicator);
  addStyleName("item");
  icon.addClassName("icon");
  label.addClassName("label");
  DOM.sinkEvents(getElement(), Event.MOUSEEVENTS);
}
origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

@Override
protected void construct() {
  super.construct();
  final Element header = getHeader();
  detailsLinkEl.addClassName("link");
  detailsLinkEl.setInnerHTML("[MORE]");  //TODO-TRANSLATE, but not with MessageUtil
  header.appendChild(detailsLinkEl);
}
origin: org.uberfire/uberfire-workbench-client-views-patternfly

void setupCSSLocators(WorkbenchPartPresenter.View view,
               FlowPanel panel) {
  if (view.getPresenter() != null || view.getPresenter().getTitle() != null) {
    panel.getElement().addClassName(CSSLocatorsUtils.buildLocator("qe-list-bar-content",
                                   view.getPresenter().getTitle()));
  }
}
origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

@Override
protected void construct() {
  super.construct();
  Element detailMessageElement = DOM.createDiv();
  detailMessageElement.addClassName("v-shell-message-detail");
  detailMessageElement.setInnerText(getMessage());
  detailsEl.appendChild(detailMessageElement);
  getElement().appendChild(detailsEl);
}
com.google.gwt.user.clientElementaddClassName

Popular methods of Element

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

Popular in Java

  • Making http post requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now