public class LazyLoad extends WebPage {
public LazyLoad() {
IColumn[] columns = new IColumn[] {
new PropertyColumn(new Model("col1"), "intValue"),
new PropertyColumn(new Model("col2"), "class") };
ISortableDataProvider dataProvider = new SortableDataProvider() {
public int size() {
return 300000;
}
public IModel model(Object object) {
return new Model((Integer) object);
}
public Iterator iterator(int first, int count) {
return loadEntriesFromDatabase(first, count).iterator();
}
private List<Integer> loadEntriesFromDatabase(int first, int count) {
List<Integer> items = new ArrayList<Integer>();
for (int i = 0; i < count; i++) {
items.add(new Integer(first + i));
}
return items;
}
};
DefaultDataTable t = new DefaultDataTable("t", columns, dataProvider, 3);
add(t);
}
}
Here we are going to see about a simple splash screen example that displays a textview as splash screen & then move to main activity after the splash screen times up.