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

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

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

origin: jqm4gwt/jqm4gwt

/**
 * @return - true if event was initiated by passed collapsible (useful in case of nested collapsibles,
 *           because event is bubbling up to parent collapsibles).
 */
public boolean isInitiatedBy(JQMCollapsible collapsible) {
  if (collapsible == null) return false;
  return collapsible.getElement().equals(initiatedBy);
}
origin: gwtbootstrap/gwt-bootstrap

private TabLink findTabLink(Element e) {
  for (TabLink tabLink : tabLinkList)
    if (tabLink.getAnchor().getElement().equals(e))
      return tabLink;
  return null;
}
origin: org.overlord/overlord-commons-gwt

/**
 * Remove a single row and all its widgets from the table
 *
 * @param rowIndex which row to add to (0 based, excluding thead)
 */
public void deleteRow(int rowIndex){
  Element rowElem=rowElements.get(rowIndex);
  NodeList<Node> tds= rowElem.getChildNodes();
  for(int i=0;i<tds.getLength();i++){
    Element td=tds.getItem(i).cast();
    for(Widget widget:wrapperMap.keySet()){
      if(wrapperMap.get(widget).equals(td)){
        remove(widget);
        break;
      }
    }
  }
  this.tbody.removeChild(rowElem);
  rowElements.remove(rowIndex);
}
origin: com.github.gwtmaterialdesign/gwt-material-table

protected T getModelByRowElement(Element rowElement) {
  for(RowComponent<T> row : rows) {
    if(row.isRendered() && row.getWidget().getElement().equals(rowElement)) {
      return row.getData();
    }
  }
  return null;
}
origin: com.github.gwtmaterialdesign/gwt-material-table

protected int getRowIndexByElement(Element rowElement) {
  for(RowComponent<T> row : rows) {
    if(row.isRendered() && row.getWidget().getElement().equals(rowElement)) {
      return row.getIndex();
    }
  }
  return -1;
}
origin: GwtMaterialDesign/gwt-material-table

protected int getRowIndexByElement(Element rowElement) {
  for(RowComponent<T> row : rows) {
    if(row.isRendered() && row.getWidget().getElement().equals(rowElement)) {
      return row.getIndex();
    }
  }
  return -1;
}
origin: GwtMaterialDesign/gwt-material-table

protected T getModelByRowElement(Element rowElement) {
  for(RowComponent<T> row : rows) {
    if(row.isRendered() && row.getWidget().getElement().equals(rowElement)) {
      return row.getData();
    }
  }
  return null;
}
origin: com.googlecode.gwt-test-utils/gwt-test-utils

@PatchMethod
static int findDividerIndex(StackPanel panel, Element child) {
  WidgetCollection children = GwtReflectionUtils.getPrivateFieldValue(panel, "children");
  for (int i = 0; i < children.size(); i++) {
    if (children.get(i).getElement().equals(child)) {
      return i;
    }
  }
  return -1;
}
origin: gwt-test-utils/gwt-test-utils

@PatchMethod
static int findDividerIndex(StackPanel panel, Element child) {
  WidgetCollection children = GwtReflectionUtils.getPrivateFieldValue(panel, "children");
  for (int i = 0; i < children.size(); i++) {
    if (children.get(i).getElement().equals(child)) {
      return i;
    }
  }
  return -1;
}
origin: net.sf.advanced-gwt/advanced-gwt

/**
 * Searches for the td element strting from the clicked element to upper levels of the DOM tree.
 *
 * @param clickElement is an element that is clicked.
 * @return a found element or <code>null</code> if the clicked element is not the td tag and not nested
 *         into any td.
 */
protected Element getCellElement(Element clickElement) {
  while (clickElement != null && !"td".equalsIgnoreCase(clickElement.getTagName()))
    clickElement = DOM.getParent(clickElement);
  if (clickElement == null)
    return null;
  Element tr = DOM.getParent(clickElement);
  Element tbody = DOM.getParent(tr);
  Element table = DOM.getParent(tbody);
  if (getElement().equals(table))
    return clickElement;
  else
    return getCellElement(table);
}
origin: com.haulmont.cuba/cuba-web-toolkit

public void showContextMenuPopup(int left, int top) {
  if (this.customContextMenu instanceof HasWidgets) {
    if (!((HasWidgets) this.customContextMenu).iterator().hasNext()) {
      // there are no actions to show
      return;
    }
  }
  // Store the currently focused element, which will be re-focused when
  // context menu is closed
  Element focusedElement = WidgetUtil.getFocusedElement();
  this.customContextMenuPopup = Tools.createCubaTableContextMenu();
  this.customContextMenuPopup.setOwner(table);
  this.customContextMenuPopup.setWidget(this.customContextMenu);
  this.customContextMenuPopup.addCloseHandler(e -> {
    Element currentFocus = WidgetUtil.getFocusedElement();
    if (focusedElement != null && (currentFocus == null
        || customContextMenuPopup.getElement().isOrHasChild(currentFocus)
        || RootPanel.getBodyElement().equals(currentFocus))) {
      focusedElement.focus();
    }
    customContextMenuPopup = null;
  });
  Tools.showPopup(this.customContextMenuPopup, left, top);
}
origin: com.haulmont.cuba/cuba-web-toolkit

public void showCustomPopup() {
  if (this.customPopupWidget != null) {
    if (this.customPopupWidget instanceof HasWidgets) {
      if (!((HasWidgets) this.customPopupWidget).iterator().hasNext()) {
        // there are no component to show
        return;
      }
    }
    // Store the currently focused element, which will be re-focused when
    // context menu is closed
    Element focusedElement = WidgetUtil.getFocusedElement();
    this.customPopupOverlay = Tools.createCubaTablePopup(this.customPopupAutoClose);
    this.customPopupOverlay.setOwner(table);
    this.customPopupOverlay.setWidget(this.customPopupWidget);
    this.customPopupOverlay.addCloseHandler(e -> {
      Element currentFocus = WidgetUtil.getFocusedElement();
      if (focusedElement != null && (currentFocus == null
          || customPopupOverlay.getElement().isOrHasChild(currentFocus)
          || RootPanel.getBodyElement().equals(currentFocus))) {
        focusedElement.focus();
      }
      customPopupOverlay = null;
    });
    Tools.showPopup(this.customPopupOverlay, this.lastClickClientX, this.lastClickClientY);
  }
}
origin: com.allen-sauer.gwt.dnd/gwt-dnd

@Override
public void dragStart() {
 if (!GWT.isScript()) {
  if (DOMUtil.getClientHeight(boundaryPanel.getElement()) == 0) {
   if (boundaryPanel.getElement().equals(RootPanel.getBodyElement())) {
    DOMUtil.reportFatalAndThrowRuntimeException("boundary panel (= the BODY element) has zero height;"
      + " dragging cannot occur inside an AbsolutePanel that has a height of zero pixels;"
      + " you can often remedy this quite easily by adding the following line of"
      + " CSS to your application's stylesheet:" + " BODY, HTML { height: 100%; }");
   }
  }
 }
 resetCache();
 if (dragHandlers != null) {
  dragHandlers.fireDragStart(dragStartEvent);
  dragStartEvent = null;
 }
 context.draggable.addStyleName(DragClientBundle.INSTANCE.css().dragging());
 assert dragStartEvent == null;
}
origin: com.haulmont.cuba/cuba-web-toolkit

public void showPresentationEditorPopup(Event event, Widget presentationsEditIcon) {
  if (event.getEventTarget().cast() == presentationsEditIcon.getElement() && tableWidget.isEnabled()) {
    this.presentationsEditorPopup = new VOverlay();
    this.presentationsEditorPopup.setStyleName("c-table-prefs-editor");
    this.presentationsEditorPopup.setOwner(table);
    this.presentationsEditorPopup.setWidget(this.presentationsMenu);
    // Store the currently focused element, which will be re-focused when
    // context menu is closed
    Element focusedElement = WidgetUtil.getFocusedElement();
    this.presentationsEditorPopup.addCloseHandler(e -> {
      Element currentFocus = WidgetUtil.getFocusedElement();
      if (focusedElement != null && (currentFocus == null
          || presentationsEditorPopup.getElement().isOrHasChild(currentFocus)
          || RootPanel.getBodyElement().equals(currentFocus))) {
        focusedElement.focus();
      }
      presentationsEditorPopup = null;
    });
    this.presentationsEditorPopup.setAutoHideEnabled(true);
    this.presentationsEditorPopup.showRelativeTo(presentationsEditIcon);
  }
}
com.google.gwt.user.clientElementequals

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

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JComboBox (javax.swing)
  • JTextField (javax.swing)
  • 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