Examples of PagingToolbar


Examples of com.gwtext.client.widgets.PagingToolbar

    public static final String USER_NAME_KEY = "userName";
    public static final String TOP_LEVEL_KEY = "topLevel";
    public static final String SEARCH_TEXT_KEY = "searchText";

    public static PagingToolbar getNewPagingToolbar(Store st, int pageSize) {
        final PagingToolbar pagingToolbar = new PagingToolbar(st);
        pagingToolbar.setPageSize(pageSize);
        pagingToolbar.setDisplayInfo(true);
        pagingToolbar.setDisplayMsg("Displaying records {0} - {1} of {2}");
        pagingToolbar.setEmptyMsg("No records to display");

        TextField pageSizeField = new TextField(Integer.toString(pageSize), "pageSize");
        pageSizeField.setWidth(40);
        pageSizeField.setSelectOnFocus(true);
        pageSizeField.addListener(new TextFieldListenerAdapter() {
            @Override
            public void onSpecialKey(Field field, EventObject e) {
                if (e.getKey() == EventObject.ENTER) {
                    try {
                        int pageSize = Integer.parseInt(field.getValueAsString());
                        if(pageSize > 0) {
                            pagingToolbar.setPageSize(pageSize);
                        }
                    } catch (NumberFormatException nfe) {
                        GWT.log("Invalid number in Pagination", nfe);
                    }
                }
            }
        });

        pagingToolbar.doOnRender(new Function() {
            public void execute() {
                try {
                    pagingToolbar.getRefreshButton().hide();
                } catch(IllegalStateException ise) {
                    GWT.log("PagingToolbar.getRefreshButton() called before doOnRender()", ise);
                }
            }
        });

        ToolTip toolTip = new ToolTip("Enter page size");
        toolTip.applyTo(pageSizeField);

        pagingToolbar.addField(pageSizeField);

        return pagingToolbar;
    }
View Full Code Here

Examples of com.gwtext.client.widgets.PagingToolbar

        });

        store = new Store(proxy, reader);
        setStore(store);

        PagingToolbar pToolbar = PaginationUtil.getNewPagingToolbar(store, 20);
        setBottomToolbar(pToolbar);

        addSearchToolbar();

        setStripeRows(true);
View Full Code Here

Examples of com.gwtext.client.widgets.PagingToolbar

        proxy = new WatchedEntitiesProxyImpl();
        store.setDataProxy(proxy);
        store.setSortInfo(new SortState("author", SortDir.ASC));
        store.setGroupField("entity");

        PagingToolbar pToolbar = PaginationUtil.getNewPagingToolbar(store, INITIAL_PAGE_SIZE);
        pToolbar.setPageSize(INITIAL_PAGE_SIZE);

        setBottomToolbar(pToolbar);

        setAutoWidth(true);
        setStripeRows(true);
View Full Code Here

Examples of com.gwtext.client.widgets.PagingToolbar

        ProjectId projectId = getProjectId();
        proxy.resetParams();
        proxy.setProjectId(projectId);
        proxy.setEntityName(entityName);

        PagingToolbar pToolbar = (PagingToolbar) changesGrid.getBottomToolbar();
        store.load(0, pToolbar.getPageSize());
    }
View Full Code Here

Examples of com.gwtext.client.widgets.PagingToolbar

    ArrayReader reader = new ArrayReader(recordDef);
    proxy = new ChangesProxyImpl();
    store = new Store(proxy, reader);

    PagingToolbar pToolbar = PaginationUtil.getNewPagingToolbar(store, 20);

    changesGrid.setBottomToolbar(pToolbar);

    changesGrid.setStore(store);
View Full Code Here

Examples of com.gwtext.client.widgets.PagingToolbar

        ArrayReader reader = new ArrayReader(recordDef);
        proxy = new ChangesProxyImpl();
        store = new Store(proxy, reader);

        PagingToolbar pToolbar = PaginationUtil.getNewPagingToolbar(store, 20);
        this.setBottomToolbar(pToolbar);

        setStore(store);

        if (getStore() == null) {
View Full Code Here

Examples of com.inmethod.grid.toolbar.paging.PagingToolbar

    init();
  }
 
  private void init() {
    addBottomToolbar(new NoRecordsToolbar(this));
    addBottomToolbar(new PagingToolbar(this));
  }
View Full Code Here

Examples of com.sencha.gxt.widget.core.client.toolbar.PagingToolBar

    // collapse();
    // }
  }

  protected PagingToolBar createPagingToolBar(int pageSize) {
    return new PagingToolBar(pageSize);
  }
View Full Code Here

Examples of com.sencha.gxt.widget.core.client.toolbar.PagingToolBar

    // collapse();
    // }
  }

  protected PagingToolBar createPagingToolBar(int pageSize) {
    return new PagingToolBar(pageSize);
  }
View Full Code Here

Examples of com.sencha.gxt.widget.core.client.toolbar.PagingToolBar

          }
        }
      }
    });
   
    toolBar = new PagingToolBar(15);
    toolBar.bind(loader);
    VerticalLayoutContainer con = new VerticalLayoutContainer();
      con.setBorders(true);
      con.add(grid, new VerticalLayoutData(1, 1));
      con.add(toolBar, new VerticalLayoutData(1, 30));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.