List of usage examples for com.google.gwt.gen2.table.client PagingOptions PagingOptions
public PagingOptions(PagingScrollTable<?> table)
From source file:com.google.gwt.gen2.demo.scrolltable.client.PagingScrollTableDemo.java
License:Apache License
/** * This is the entry point method.//from ww w . j a v a 2 s. co m */ @Override public void onModuleLoad() { instance = this; super.onModuleLoad(); // Create an paging options PagingOptions pagingOptions = new PagingOptions(getPagingScrollTable()); FlexTable layout = getLayout(); layout.insertRow(1); layout.setWidget(1, 1, pagingOptions); }
From source file:org.gss_project.gss.admin.client.ui.FilesTable.java
License:Open Source License
/** * Constructor/*from w ww . ja v a 2 s. co m*/ */ public FilesTable() { super(); pagingScrollTable = createScrollTable(); pagingScrollTable.setHeight("200px"); pagingScrollTable.setScrollPolicy(ScrollPolicy.DISABLED); PagingOptions pagingOptions = new PagingOptions(pagingScrollTable); flexTable.setWidget(0, 0, pagingScrollTable); flexTable.getFlexCellFormatter().setColSpan(0, 0, 2); flexTable.setWidget(1, 0, pagingOptions); countLabel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); vPanel.add(countLabel); vPanel.add(flexTable); vPanel.setWidth("100%"); flexTable.setWidth("100%"); super.initWidget(vPanel); showUsers(new ArrayList<FileHeaderDTO>()); pagingScrollTable.setFooterGenerated(true); }
From source file:org.gss_project.gss.admin.client.ui.FilesTable.java
License:Open Source License
public void showUsers(List<FileHeaderDTO> newList) { countLabel.setText("There are " + newList.size() + " files."); tableModel.setData(newList);/*from w w w.j a va 2 s . c o m*/ tableModel.setRowCount(newList.size()); cachedTableModel.clearCache(); cachedTableModel.setRowCount(newList.size()); pagingScrollTable.gotoPage(0, true); if (newList.size() < 2) flexTable.setWidget(1, 0, new HTML()); else { PagingOptions pagingOptions = new PagingOptions(pagingScrollTable); flexTable.setWidget(1, 0, pagingOptions); } }
From source file:org.gss_project.gss.admin.client.ui.UsersTable.java
License:Open Source License
/** * Constructor/*from w w w . j a va 2 s. c om*/ */ public UsersTable() { super(); pagingScrollTable = createScrollTable(); pagingScrollTable.setHeight("200px"); pagingScrollTable.setScrollPolicy(ScrollPolicy.DISABLED); PagingOptions pagingOptions = new PagingOptions(pagingScrollTable); flexTable.setWidget(0, 0, pagingScrollTable); flexTable.getFlexCellFormatter().setColSpan(0, 0, 2); flexTable.setWidget(1, 0, pagingOptions); countLabel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); vPanel.add(countLabel); vPanel.add(flexTable); vPanel.setWidth("100%"); flexTable.setWidth("100%"); super.initWidget(vPanel); showUsers(new ArrayList<UserDTO>()); pagingScrollTable.setFooterGenerated(true); }
From source file:org.gss_project.gss.admin.client.ui.UsersTable.java
License:Open Source License
/** * * @param newList the list of users to show *//*w w w. j ava2s.c om*/ public void showUsers(List<UserDTO> newList) { countLabel.setText("There are " + newList.size() + " users."); tableModel.setData(newList); tableModel.setRowCount(newList.size()); cachedTableModel.clearCache(); cachedTableModel.setRowCount(newList.size()); pagingScrollTable.gotoPage(0, true); if (newList.size() < 2) flexTable.setWidget(1, 0, new HTML()); else { PagingOptions pagingOptions = new PagingOptions(pagingScrollTable); flexTable.setWidget(1, 0, pagingOptions); } }
From source file:org.kuali.student.common.ui.client.widgets.search.TempSearchBackedTable.java
License:Educational Community License
private PagingOptions createPagingOptions(PagingScrollTable<ResultRow> pagingScrollTable) { PagingOptions pagingOptions = new PagingOptions(pagingScrollTable); pagingOptions.setPixelSize(pagingScrollTable.getOffsetWidth(), pagingOptions.getOffsetHeight()); return pagingOptions; }