private void setUpTable ( ) { setSizeFull ( ) ; // expand the table table . setSizeFull ( ) ; // Allow selecting items from the table. table . setSelectable ( false ) ; // Send changes in selection immediately to server. table . setImmediate ( true ) ; // set custom style table . addStyleName ( "example-queries-table" ) ; // put stripes to the table table . addStyleName ( ChameleonTheme . TABLE_STRIPED ) ; // configure columns table . addGeneratedColumn ( COLUMN_OPEN_CORPUS_BROWSER , new ShowCorpusBrowser ( ) ) ; table . addGeneratedColumn ( COLUMN_EXAMPLE_QUERY , new QueryColumn ( ) ) ; table . addGeneratedColumn ( COLUMN_DESCRIPTION , new Table . ColumnGenerator ( ) { @ Override public Object generateCell ( Table source , Object itemId , Object columnId ) { ExampleQuery eQ = ( ExampleQuery ) itemId ; Label l = new Label ( eQ . getDescription ( ) ) ; l . setContentMode ( ContentMode . TEXT ) ; l . addStyleName ( Helper . CORPUS_FONT_FORCE ) ; return l ; } } ) ; table . setVisibleColumns ( new Object [ ] { COLUMN_EXAMPLE_QUERY , COLUMN_DESCRIPTION , COLUMN_OPEN_CORPUS_BROWSER } ) ; table . setColumnExpandRatio ( table . getVisibleColumns ( ) [ 0 ] , 0.40f ) ; table . setColumnExpandRatio ( table . getVisibleColumns ( ) [ 1 ] , 0.40f ) ; table . setColumnHeader ( table . getVisibleColumns ( ) [ 0 ] , "Example Query" ) ; table . setColumnHeader ( table . getVisibleColumns ( ) [ 1 ] , "Description" ) ; table . setColumnHeader ( table . getVisibleColumns ( ) [ 2 ] , "open corpus browser" ) ; }
Sets some layout properties .