configRegistry,
columnHeaderDataLayer));
//row
- RowHeaderLayer rowHeaderLayer = new RowHeaderLayer(new DataLayer(rowHeaderDataProvider, 50, 50),
-// DataLayer rowHeaderDataLayer = new DataLayer(rowHeaderDataProvider);
-// RowHeaderLayer rowHeaderLayer = new RowHeaderLayer(rowHeaderDataLayer,
+ DataLayer rowHeaderDataLayer = new DataLayer(rowHeaderDataProvider);
+ RowHeaderLayer rowHeaderLayer = new RowHeaderLayer(rowHeaderDataLayer,
bodyLayer, bodyLayer.getSelectionLayer());
-// rowHeaderDataLayer.setDefaultRowHeight(20);
-// rowHeaderDataLayer.setColumnWidthByPosition(0, 50);
-// rowHeaderDataLayer.setColumnWidthByPosition(1, 200);
-// rowHeaderDataLayer.setColumnWidthByPosition(2, 100);
+ dataLayer.setColumnPercentageSizing(true);
+ dataLayer.setColumnWidthPercentageByPosition(0, 80);
+ dataLayer.setColumnWidthPercentageByPosition(1, 20);
//corner
DefaultCornerDataProvider cornerDataProvider = new DefaultCornerDataProvider(
colHeaderDataProvider, rowHeaderDataProvider);
- CornerLayer cornerLayer = new CornerLayer(new DataLayer(
- cornerDataProvider), rowHeaderLayer, sortHeaderLayer);
+ DataLayer cornerDataLayer = new DataLayer(cornerDataProvider);
+ CornerLayer cornerLayer = new CornerLayer(cornerDataLayer, rowHeaderLayer, sortHeaderLayer);
//grid
GridLayer gridLayer = new GridLayer(bodyLayer, sortHeaderLayer,
rowHeaderLayer, cornerLayer, false);//set autoconfigure to false to get rid of the single click editing
- dataLayer.setColumnPercentageSizing(true);
natTable = new NatTable(bottomComposite, gridLayer, false);
natTable.setConfigRegistry(configRegistry);