public void addColumn( Column<T, ?> column, Header<String> header, boolean visible ) { addColumn( new ColumnMeta<T>( column, header, visible ) ); }
/** * Enable or disable the previous page buttons. * @param disabled true to disable, false to enable */ private void setPrevPageButtonsDisabled( boolean disabled ) { firstPage.setDisabled( disabled ); prevPage.setDisabled( disabled ); }
/** * Check if the previous button is disabled. Visible for testing. */ boolean isPreviousButtonDisabled() { return prevPage.isDisabled(); }
/** * Set up table with zero columns. Additional columns can be appended by * overriding <code>addAncillaryColumns()</code> */ protected void doCellTable() { cellTable = new CellTable<T>(); ColumnPicker<T> columnPicker = new ColumnPicker<T>( cellTable ); SortableHeaderGroup<T> sortableHeaderGroup = new SortableHeaderGroup<T>( cellTable ); // Add any additional columns addAncillaryColumns( columnPicker, sortableHeaderGroup ); cellTable.setWidth( "100%" ); columnPickerButton = columnPicker.createToggleButton(); }
/** * Set up table with zero columns. Additional columns can be appended by * overriding <code>addAncillaryColumns()</code> */ protected void doCellTable() { cellTable = new CellTable<T>(); ColumnPicker<T> columnPicker = new ColumnPicker<T>( cellTable ); SortableHeaderGroup<T> sortableHeaderGroup = new SortableHeaderGroup<T>( cellTable ); // Add any additional columns addAncillaryColumns( columnPicker, sortableHeaderGroup ); cellTable.setWidth( "100%" ); columnPickerButton = columnPicker.createToggleButton(); }
/** * Constructor * @param pageSize */ public AbstractPagedTable( int pageSize ) { this.pageSize = pageSize; pager.setDisplay( cellTable ); pager.setPageSize( pageSize ); // } else if ( pager instanceof SimplePager ) { // ( (SimplePager) pager ).setPageSize( pageSize ); // } }
public void addColumn(Column<JarListPageRow, String> column, TextHeader textHeader) { columnPicker.addColumn(column, textHeader, true); }
public AbstractSimpleTable() { doCellTable(); initWidget( makeWidget() ); }
/** * Constructs a TitledTextCell that uses a * {@link TitledTextSafeHtmlRenderer} to render its text. */ public TitledTextCell() { super( TitledTextSafeHtmlRenderer.getInstance() ); }
/** * Construct a widget representing the table */ @Override protected Widget makeWidget() { return uiBinder.createAndBindUi( this ); }
public static TitledTextSafeHtmlRenderer getInstance() { if ( instance == null ) { instance = new TitledTextSafeHtmlRenderer(); } return instance; }
private void addUpdater() { setFieldUpdater(new FieldUpdater<T, Boolean>() { public void update(int index, T object, Boolean value) { cellTable.getSelectionModel().setSelected(object, value); } }); }
/** * Get the number of pages to fast forward based on the current page size. * @return the number of pages to fast forward */ private int getFastForwardPages() { int pageSize = getPageSize(); return pageSize > 0 ? fastForwardRows / pageSize : 0; }
/** * Construct a new TitledTextColumn. */ public TitledTextColumn() { super( new TitledTextCell() ); } }
/** * Construct a {@link SimplePager} with the specified text location. * @param location the location of the text relative to the buttons */ public GuvnorSimplePager( TextLocation location ) { this( location, getDefaultResources(), true, DEFAULT_FAST_FORWARD_ROWS, true ); }
public void update( String s ) { SortableHeader.this.sortableHeaderGroup.headerClicked( SortableHeader.this ); } } );
public void onClick( ClickEvent event ) { nextPage(); } } );
public void addColumn(Column<InboxPageRow, String> column, TextHeader textHeader) { columnPicker.addColumn(column, textHeader, true); }
/** * Enable or disable the next page buttons. * @param disabled true to disable, false to enable */ private void setNextPageButtonsDisabled( boolean disabled ) { nextPage.setDisabled( disabled ); if ( lastPage != null ) { lastPage.setDisabled( disabled ); } }
/** * Check if the next button is disabled. Visible for testing. */ boolean isNextButtonDisabled() { return nextPage.isDisabled(); }