use of org.eclipse.nebula.widgets.nattable.layer.InvertedLayer in project nebula.widgets.nattable by eclipse.
the class InvertedLayerExample method createExampleControl.
@Override
public Control createExampleControl(Composite parent) {
DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(5, 10);
DataLayer bodyDataLayer = new DataLayer(bodyDataProvider);
bodyDataLayer.setDefaultRowHeight(100);
SelectionLayer selectionLayer = new SelectionLayer(new ColumnHideShowLayer(new ColumnReorderLayer(bodyDataLayer)));
InvertedLayer invertedLayer = new InvertedLayer(selectionLayer);
ViewportLayer viewportLayer = new ViewportLayer(invertedLayer);
DummyColumnHeaderDataProvider columnHeaderDataProvider = new DummyColumnHeaderDataProvider(bodyDataProvider);
DataLayer columnHeaderDataLayer = new DataLayer(columnHeaderDataProvider);
ILayer columnHeaderLayer = new ColumnHeaderLayer(columnHeaderDataLayer, viewportLayer, selectionLayer);
DefaultRowHeaderDataProvider rowHeaderDataProvider = new DefaultRowHeaderDataProvider(bodyDataProvider);
DataLayer rowHeaderDataLayer = new DataLayer(rowHeaderDataProvider);
rowHeaderDataLayer.setDefaultColumnWidth(40);
ILayer rowHeaderLayer = new RowHeaderLayer(rowHeaderDataLayer, viewportLayer, selectionLayer);
ILayer cornerLayer = new CornerLayer(new DataLayer(new DefaultCornerDataProvider(columnHeaderDataProvider, rowHeaderDataProvider)), rowHeaderLayer, columnHeaderLayer);
GridLayer compositeLayer = new GridLayer(viewportLayer, columnHeaderLayer, rowHeaderLayer, cornerLayer);
return new NatTable(parent, compositeLayer);
}
Aggregations