Example usage for com.google.gwt.query.client Predicate Predicate

List of usage examples for com.google.gwt.query.client Predicate Predicate

Introduction

In this page you can find the example usage for com.google.gwt.query.client Predicate Predicate.

Prototype

Predicate

Source Link

Usage

From source file:com.arcbees.gquery.appear.client.Appear.java

License:Apache License

private void refreshScrollEvents() {
    final GQuery body = $(GQuery.body);
    $(new ArrayList<>(impls.keySet())).unbind(Event.ONSCROLL, ON_SCROLL_FUNCTION).filter(new Predicate() {
        @Override//from  w  w  w. jav a  2s.c  o m
        public boolean f(Element e, int index) {
            return body.has(e).length() == 1;
        }
    }).parents().filter(new Predicate() {
        @Override
        public boolean f(Element e, int index) {
            return isScrollable(e);
        }
    }).scroll(ON_SCROLL_FUNCTION);
}