List of usage examples for com.google.gwt.gen2.table.client ScrollTable setColumnTruncatable
public void setColumnTruncatable(int column, boolean truncatable)
From source file:com.google.gwt.gen2.demo.scrolltable.client.ScrollTableDemo.java
License:Apache License
/** * Setup the scroll table./*from w ww. ja v a 2s.c o m*/ */ protected AbstractScrollTable createScrollTable() { // Create the three component tables FixedWidthFlexTable headerTable = createHeaderTable(); FixedWidthFlexTable footerTable = createFooterTable(); FixedWidthGrid dataTable = createDataTable(); // Create the scroll table ScrollTable theScrollTable = new ScrollTable(dataTable, headerTable); theScrollTable.setFooterTable(footerTable); // Setup the formatting theScrollTable.setCellPadding(3); theScrollTable.setCellSpacing(0); theScrollTable.setResizePolicy(ScrollTable.ResizePolicy.FILL_WIDTH); // first name theScrollTable.setMinimumColumnWidth(0, 50); theScrollTable.setPreferredColumnWidth(0, 100); theScrollTable.setColumnTruncatable(0, false); // last name theScrollTable.setMinimumColumnWidth(1, 50); theScrollTable.setPreferredColumnWidth(1, 100); theScrollTable.setColumnTruncatable(1, false); // age theScrollTable.setMinimumColumnWidth(2, 35); theScrollTable.setPreferredColumnWidth(2, 35); theScrollTable.setMaximumColumnWidth(2, 35); // gender theScrollTable.setMinimumColumnWidth(3, 45); theScrollTable.setPreferredColumnWidth(3, 45); theScrollTable.setMaximumColumnWidth(3, 45); // race theScrollTable.setMinimumColumnWidth(4, 45); theScrollTable.setPreferredColumnWidth(4, 45); theScrollTable.setMaximumColumnWidth(4, 45); // color theScrollTable.setPreferredColumnWidth(5, 80); // sport theScrollTable.setMinimumColumnWidth(6, 40); theScrollTable.setPreferredColumnWidth(6, 110); // college theScrollTable.setMinimumColumnWidth(7, 50); theScrollTable.setPreferredColumnWidth(7, 180); theScrollTable.setMaximumColumnWidth(7, 250); // year theScrollTable.setPreferredColumnWidth(8, 25); theScrollTable.setColumnTruncatable(8, false); // gpa theScrollTable.setPreferredColumnWidth(9, 35); theScrollTable.setColumnTruncatable(9, false); // id theScrollTable.setPreferredColumnWidth(10, 55); theScrollTable.setColumnTruncatable(10, false); // pin theScrollTable.setPreferredColumnWidth(11, 45); theScrollTable.setColumnTruncatable(11, false); return theScrollTable; }