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

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

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

origin: gwtbootstrap3/gwtbootstrap3

  @Override
  public boolean isEnabled() {
    return !uiObject.getElement().hasAttribute(DISABLED);
  }
}
origin: GwtMaterialDesign/gwt-material

/**
 * Gets the value of switch component.
 */
@Override
public Boolean getValue() {
  return input.getElement().hasAttribute("checked");
}
origin: org.gwtbootstrap3/gwtbootstrap3

  @Override
  public boolean isEnabled() {
    return !uiObject.getElement().hasAttribute(DISABLED);
  }
}
origin: org.gwtbootstrap3/gwtbootstrap3

  /**
   * Checks whether or not the UiObject has the element
   *
   * @param attributeName attribute name
   * @return true if has the attribute, false otherwise
   */
  public boolean hasAttribute(final String attributeName) {
    return uiObject.getElement().hasAttribute(attributeName);
  }
}
origin: com.github.gwtmaterialdesign/gwt-material

@Override
public boolean isEnabled() {
  return !uiObject.getElement().hasAttribute("disabled");
}
origin: gwtbootstrap3/gwtbootstrap3

  /**
   * Checks whether or not the UiObject has the element
   *
   * @param attributeName attribute name
   * @return true if has the attribute, false otherwise
   */
  public boolean hasAttribute(final String attributeName) {
    return uiObject.getElement().hasAttribute(attributeName);
  }
}
origin: com.github.gwtmaterialdesign/gwt-material

/**
 * Gets the value of switch component.
 */
@Override
public Boolean getValue() {
  return input.getElement().hasAttribute("checked");
}
origin: com.github.gwtmaterialdesign/gwt-material-addins

/**
 * Check whether the multiple option is enabled
 */
public boolean isMultiple() {
  if (listbox != null) {
    return listbox.getElement().hasAttribute("multiple");
  }
  return false;
}
origin: com.sksamuel.jqm4gwt/jqm4gwt-library

public boolean isIconPosNone() {
  if (!select.getElement().hasAttribute(JQMCommon.DATA_ICONPOS)) return false;
  String v = JQMCommon.getAttribute(select, JQMCommon.DATA_ICONPOS);
  return "".equals(v);
}
origin: org.eclipse.che.core/che-core-ide-app

 @Override
 public void onClick(ClickEvent clickEvent) {
  if (!wrapTextButton.getElement().hasAttribute("disabled") && delegate != null) {
   delegate.wrapTextButtonClicked();
  }
 }
},
origin: org.eclipse.che.core/che-core-ide-app

 @Override
 public void onClick(ClickEvent event) {
  if (!clearOutputsButton.getElement().hasAttribute("disabled") && delegate != null) {
   delegate.clearOutputsButtonClicked();
  }
 }
},
origin: org.eclipse.che.core/che-core-ide-app

 @Override
 public void onClick(ClickEvent event) {
  if (!scrollToBottomButton.getElement().hasAttribute("disabled") && delegate != null) {
   delegate.scrollToBottomButtonClicked();
  }
 }
},
origin: org.eclipse.che.core/che-core-ide-app

 @Override
 public void onClick(ClickEvent event) {
  if (!reRunProcessButton.getElement().hasAttribute("disabled") && delegate != null) {
   delegate.reRunProcessButtonClicked();
  }
 }
},
origin: GwtMaterialDesign/gwt-material

  @Override
  protected <H extends UIObject & HasEnabled> void checkEnabled(HasEnabled widget, H target) {
    super.checkEnabled(widget, target);

    widget.setEnabled(false);
    assertTrue(target.getElement().hasAttribute("onclick"));
    assertEquals("return false", target.getElement().getAttribute("onclick"));

    widget.setEnabled(true);
    assertFalse(target.getElement().hasAttribute("onclick"));
  }
}
origin: com.github.gwtmaterialdesign/gwt-material-addins

  protected void checkSVGWithHeight(MaterialAvatar avatar) {
    final String WIDTH = "50";
    final String HEIGHT = "50";
    avatar.setWidth(WIDTH);
    avatar.setHeight(HEIGHT);
    assertTrue(avatar.getElement().hasAttribute("width"));
    assertEquals(WIDTH, avatar.getElement().getAttribute("width"));
    assertTrue(avatar.getElement().hasAttribute("height"));
    assertEquals(HEIGHT, avatar.getElement().getAttribute("height"));
  }
}
origin: com.github.gwtmaterialdesign/gwt-material-addins

protected void checkStructure(MaterialPopupMenu popupMenu, boolean checkElement) {
  if (checkElement) {
    assertTrue(popupMenu.getElement().hasAttribute("tabindex"));
    assertEquals("0", popupMenu.getElement().getAttribute("tabindex"));
  }
  assertEquals(5, popupMenu.getWidgetCount());
  for (Widget w : popupMenu) {
    assertNotNull(w);
  }
}
origin: GwtMaterialDesign/gwt-material

public void testCaption() {
  // given
  MaterialImage image = getWidget();
  // when / then
  final String CAPTION = "Caption";
  image.setCaption(CAPTION);
  assertEquals(CAPTION, image.getCaption());
  assertTrue(image.getElement().hasAttribute("data-caption"));
  assertEquals(CAPTION, image.getElement().getAttribute("data-caption"));
}
origin: com.github.gwtmaterialdesign/gwt-material-addins

protected void checkValue(MaterialAvatar avatar) {
  // when / then
  final String NAME = "test1";
  final String HASH_CODE = JsAvatar.md5(NAME);
  avatar.setValue(NAME);
  assertEquals(NAME, avatar.getValue());
  assertTrue(avatar.getElement().hasAttribute("data-jdenticon-hash"));
  assertEquals(HASH_CODE, avatar.getElement().getAttribute("data-jdenticon-hash"));
}
origin: GwtMaterialDesign/gwt-material

public void testActivates() {
  // given
  MaterialNavBar navBar = getWidget();
  // when / then
  final String ACTIVATOR = "activator";
  navBar.setActivates(ACTIVATOR);
  assertNotNull(navBar.getActivates());
  assertTrue(navBar.getNavMenu().getElement().hasAttribute("data-activates"));
  assertEquals(ACTIVATOR, navBar.getNavMenu().getElement().getAttribute("data-activates"));
}
origin: com.github.gwtmaterialdesign/gwt-material

public void testActivates() {
  // given
  MaterialNavBar navBar = getWidget();
  // when / then
  final String ACTIVATOR = "activator";
  navBar.setActivates(ACTIVATOR);
  assertNotNull(navBar.getActivates());
  assertTrue(navBar.getNavMenu().getElement().hasAttribute("data-activates"));
  assertEquals(ACTIVATOR, navBar.getNavMenu().getElement().getAttribute("data-activates"));
}
com.google.gwt.user.clientElementhasAttribute

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

  • Reactive rest calls using spring rest template
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top plugins for WebStorm
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