Tabnine Logo
Element.getClassName
Code IndexAdd Tabnine 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)

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

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • startActivity (Activity)
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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