public class InfiniteScrollAdapter extends Object
Modifier and Type | Method and Description |
---|---|
void |
addMoreComponents(Component[] components,
boolean areThereMore)
Invoke this method to add additional components to the container, if you use
addComponent/removeComponent you will get undefined behavior.
|
static void |
addMoreComponents(Container cnt,
Component[] components,
boolean areThereMore)
Invoke this method to add additional components to the container, if you use
addComponent/removeComponent you will get undefined behavior.
|
static InfiniteScrollAdapter |
createInfiniteScroll(Container cont,
Runnable fetchMore)
Creates an instance of the InfiniteScrollAdapter that will invoke the fetch more
callback to fetch additional components, once that method completes its task it
should add the components via the addMoreComponents() invocation.
|
static InfiniteScrollAdapter |
createInfiniteScroll(Container cont,
Runnable fetchMore,
boolean fetchOnCreate)
Creates an instance of the InfiniteScrollAdapter that will invoke the fetch more
callback to fetch additional components, once that method completes its task it
should add the components via the addMoreComponents() invocation.
|
public static InfiniteScrollAdapter createInfiniteScroll(Container cont, Runnable fetchMore)
cont
- the container to bind, it MUST be empty and must be scrollable on the Y axisfetchMore
- a callback that will be invoked on the EDT to fetch more data (do not block this method)public static InfiniteScrollAdapter createInfiniteScroll(Container cont, Runnable fetchMore, boolean fetchOnCreate)
cont
- the container to bind, it MUST be empty and must be scrollable on the Y axisfetchMore
- a callback that will be invoked on the EDT to fetch more data (do not block this method)fetchOnCreate
- if true the fetchMore callback is called upon calling this methodpublic static void addMoreComponents(Container cnt, Component[] components, boolean areThereMore)
cnt
- container to add the components tocomponents
- the components to addareThereMore
- whether additional components existpublic void addMoreComponents(Component[] components, boolean areThereMore)
components
- the components to addareThereMore
- whether additional components exist