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

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

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

  • 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.extjs/gxt

/**
 * Returns the element's style name.
 * 
 * @return the style name
 */
public String getStyleName() {
 return dom.getClassName();
}
origin: com.extjs/gxt

/**
 * Checks if the specified CSS style name exists on this element's DOM node.
 * 
 * @param style the style name
 * @return true if the style name exists, else false
 */
public boolean hasStyleName(String style) {
 String cls = dom.getClassName();
 return (" " + cls + " ").indexOf(" " + style + " ") != -1 ? true : false;
}
origin: com.extjs/gxt

private String getColorFromElement(Element elem) {
 String className = elem.getClassName();
 if (className.indexOf("color-") != -1) {
  return className.substring(className.indexOf("color-") + 6, className.indexOf("color-") + 12);
 }
 return null;
}
origin: org.vaadin.addons/dragdroplayouts

/**
 * Resolve if widget is a Vaadin Caption
 * 
 * @param w
 *            Widget to check
 * @return True if the widget is a caption widget, false otherwise
 */
public static boolean isCaption(Widget w) {
  return w instanceof VCaption || w instanceof VFormLayout.Caption
      || w instanceof TabCaption
      || w.getElement().getClassName().contains("v-panel-caption");
}
origin: com.haulmont.cuba/cuba-web-toolkit

/**
 * Resolve if widget is a Vaadin Caption
 * 
 * @param w
 *            Widget to check
 * @return True if the widget is a caption widget, false otherwise
 */
public static boolean isCaption(Widget w) {
  return w instanceof VCaption || w instanceof VFormLayout.Caption
      || w instanceof TabCaption
      || w.getElement().getClassName().contains("v-panel-caption");
}
origin: com.extjs/gxt

@Override
protected void handleMouseClick(GridEvent<M> e) {
 if (e.getTarget().getClassName().equals("x-grid3-row-checker")) {
  return;
 }
 super.handleMouseClick(e);
}
origin: fr.putnami.pwt/pwt

protected AbstractComposite(AbstractComposite source) {
  this.handlerManager = new HandlerManager(source.handlerManager, this);
  this.handlerManager.resetSinkEvents();
  this.styleToClone = source.getElement().getClassName();
}
origin: com.extjs/gxt

protected void onMouseDown(GridEvent<?> e) {
 if (e.getTarget().getClassName().equals("x-grid3-row-expander")) {
  e.stopEvent();
  El row = e.getTarget(".x-grid3-row", 15);
  toggleRow(row);
 }
}
origin: Putnami/putnami-web-toolkit

protected AbstractComposite(AbstractComposite source) {
  this.handlerManager = new HandlerManager(source.handlerManager, this);
  this.handlerManager.resetSinkEvents();
  this.styleToClone = source.getElement().getClassName();
}
origin: fr.putnami.pwt/pwt

public static void cloneStyle(Widget target, Widget source) {
  target.getElement().setClassName(source.getElement().getClassName());
}
origin: Putnami/putnami-web-toolkit

public static void cloneStyle(Widget target, Widget source) {
  target.getElement().setClassName(source.getElement().getClassName());
}
origin: GwtMaterialDesign/gwt-material

  protected void applyCollapsibleProgress(boolean isShow) {
    MaterialCollapsibleItem item = (MaterialCollapsibleItem) uiObject;
    MaterialCollapsibleBody body = (MaterialCollapsibleBody) item.getWidget(1);
    if (uiObject.getElement().getClassName().contains(CssName.ACTIVE)) {
      if (isShow) {
        body.setDisplay(Display.NONE);
        item.add(progress);
      } else {
        body.setDisplay(Display.BLOCK);
        progress.removeFromParent();
      }
    }
  }
}
origin: com.github.gwtmaterialdesign/gwt-material

  protected void applyCollapsibleProgress(boolean isShow) {
    MaterialCollapsibleItem item = (MaterialCollapsibleItem) uiObject;
    MaterialCollapsibleBody body = (MaterialCollapsibleBody) item.getWidget(1);
    if (uiObject.getElement().getClassName().contains(CssName.ACTIVE)) {
      if (isShow) {
        body.setDisplay(Display.NONE);
        item.add(progress);
      } else {
        body.setDisplay(Display.BLOCK);
        progress.removeFromParent();
      }
    }
  }
}
origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

public void update() {
  text.setInnerText(data.getLabel());
  if (data.getIconFontId() != null) {
    icon.setClassName("v-icon");
    if (data.getIconFontId() != null && !data.getIconFontId().isEmpty()) {
      icon.addClassName(data.getIconFontId());
    }
  } else if (iconImage != null) {
    iconImage.setUri(data.getResourceUrl());
  }
  if (isEnabled() && root.getClassName().contains(ApplicationConnection.DISABLED_CLASSNAME)) {
    root.removeClassName(ApplicationConnection.DISABLED_CLASSNAME);
  } else if (!isEnabled() && !root.getClassName().contains(ApplicationConnection.DISABLED_CLASSNAME)) {
    root.addClassName(ApplicationConnection.DISABLED_CLASSNAME);
  }
}
origin: kiegroup/appformer

  public void setUiPart(final UIPart uiPart) {
    if (uiPart != null) {
      this.uiPart = uiPart;
      this.widget = uiPart.getWidget().asWidget();
      this.widget.getElement().getStyle().setFloat(Style.Float.LEFT);
      this.widget.getElement().getStyle().setOverflow(Style.Overflow.HIDDEN);
      this.style = this.widget.getElement().getClassName();

      container.clear();
      container.add(widget);
    } else {
      this.uiPart = null;
      this.widget = null;
      this.style = null;
      container.clear();
    }
  }
}
origin: com.extjs/gxt

@Override
protected void handleMouseDown(GridEvent<M> e) {
 if (e.getEvent().getButton() == Event.BUTTON_LEFT && e.getTarget().getClassName().equals("x-grid3-row-checker")) {
  M m = listStore.getAt(e.getRowIndex());
  if (m != null) {
   if (isSelected(m)) {
    deselect(m);
   } else {
    select(m, true);
   }
  }
 } else {
  super.handleMouseDown(e);
 }
}
origin: com.github.gwtmaterialdesign/gwt-material

public void testTypes() {
  // given
  MaterialTab tab = getWidget();
  // when / then
  tab.setType(TabType.DEFAULT);
  assertEquals(TabType.DEFAULT, tab.getType());
  assertTrue(tab.getElement().getClassName().contains(TabType.DEFAULT.getCssName()));
  tab.setType(TabType.ICON);
  assertEquals(TabType.ICON, tab.getType());
  assertTrue(tab.getElement().hasClassName(TabType.ICON.getCssName()));
}
origin: GwtMaterialDesign/gwt-material

public void testTypes() {
  // given
  MaterialTab tab = getWidget();
  // when / then
  tab.setType(TabType.DEFAULT);
  assertEquals(TabType.DEFAULT, tab.getType());
  assertTrue(tab.getElement().getClassName().contains(TabType.DEFAULT.getCssName()));
  tab.setType(TabType.ICON);
  assertEquals(TabType.ICON, tab.getType());
  assertTrue(tab.getElement().hasClassName(TabType.ICON.getCssName()));
}
origin: GwtMaterialDesign/gwt-material

public void testProgressBar() {
  // given
  MaterialNavBar navBar = getWidget();
  // when / then
  navBar.showProgress(ProgressType.INDETERMINATE);
  assertTrue(navBar.getNavWrapper().getWidget(2) instanceof MaterialProgress);
  assertEquals(navBar.getNavWrapper().getWidget(2).getElement().getClassName(), CssName.PROGRESS);
  MaterialProgress progress = (MaterialProgress) navBar.getNavWrapper().getWidget(2);
  assertEquals(ProgressType.INDETERMINATE, progress.getType());
  navBar.hideProgress();
  assertFalse(progress.isAttached());
}
origin: com.github.gwtmaterialdesign/gwt-material

public void testProgressBar() {
  // given
  MaterialNavBar navBar = getWidget();
  // when / then
  navBar.showProgress(ProgressType.INDETERMINATE);
  assertTrue(navBar.getNavWrapper().getWidget(2) instanceof MaterialProgress);
  assertEquals(navBar.getNavWrapper().getWidget(2).getElement().getClassName(), CssName.PROGRESS);
  MaterialProgress progress = (MaterialProgress) navBar.getNavWrapper().getWidget(2);
  assertEquals(ProgressType.INDETERMINATE, progress.getType());
  navBar.hideProgress();
  assertFalse(progress.isAttached());
}
com.google.gwt.user.clientElementgetClassName

Popular methods of Element

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

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • startActivity (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
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