List of usage examples for com.google.gwt.query.client GQuery $
public static GQuery $(String selectorOrHtml, Widget context)
From source file:com.arcbees.gquery.tooltip.client.contactcell.ShowMorePagerPanel.java
License:Apache License
/** * Construct a new {@link ShowMorePagerPanel}. *//* w w w. jav a 2 s .c o m*/ public ShowMorePagerPanel() { init(); // Handle scroll events. scrollable.addDomHandler(new ScrollHandler() { public void onScroll(ScrollEvent event) { // If scrolling up, ignore the event. int oldScrollPos = lastScrollPos; lastScrollPos = scrollable.getElement().getScrollTop(); if (oldScrollPos >= lastScrollPos) { return; } HasRows display = getDisplay(); if (display == null) { return; } int maxScrollTop = scrollable.getWidget().getOffsetHeight() - scrollable.getOffsetHeight(); if (lastScrollPos >= maxScrollTop) { // We are near the end, so increase the page size. int newPageSize = Math.min(display.getVisibleRange().getLength() + incrementSize, display.getRowCount()); //all children will be replaced, ensure to destroy existing tooltip in order to avoid ghost // tooltips GQuery.$(".tooltipable", (Widget) display).as(Tooltip.Tooltip).destroy(); display.setVisibleRange(0, newPageSize); } } }, ScrollEvent.getType()); }
From source file:org.bonitasoft.web.toolkit.client.ui.component.form.AbstractForm.java
License:Open Source License
public void resetErrors() { GQuery.$("div.alert_message", getElement()).remove(); }