List of usage examples for com.google.gwt.query.client.js JsObjectArray create
public static <T> JsObjectArray<T> create()
From source file:com.watopi.chosen.client.SelectParser.java
License:Open Source License
public SelectParser() { optionsIndex = 0; parsed = JsObjectArray.create(); }
From source file:jdramaix.client.ShowMorePagerPanel.java
License:Apache License
private void update() { int currentTopScroll = scrollable.getVerticalScrollPosition(); int bottomScroll = $scrollable.offset().top + $scrollable.innerHeight() + currentTopScroll; JsObjectArray<GQuery> pastElements = JsObjectArray.create(); JsObjectArray<GQuery> futureElements = JsObjectArray.create(); // update current elements GQuery pastElement = $("." + resources.style().item() + ":not(." + resources.style().future() + ")", scrollable);/*from w w w . j a v a 2 s.c o m*/ for (int i = pastElement.length() - 1; i > 0; i--) { GQuery element = pastElement.eq(i); if (isPast(element, bottomScroll)) { break; } else { futureElements.add(element); } } GQuery futureElement = $("." + resources.style().future(), scrollable); for (int i = 0; i < futureElement.length(); i++) { GQuery element = futureElement.eq(i); if (isPast(element, bottomScroll)) { pastElements.add(element); } else { break; } } // avoid browser reflows for (int i = 0; i < pastElements.length(); i++) { pastElements.get(i).removeClass(resources.style().future()); } for (int i = 0; i < futureElements.length(); i++) { futureElements.get(i).addClass(resources.style().future()); } }