use of org.eclipse.nebula.widgets.nattable.grid.data.DummyBodyDataProvider in project nebula.widgets.nattable by eclipse.
the class RowHeaderSelectionDataLayerExample method createExampleControl.
@Override
public Control createExampleControl(Composite parent) {
DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(1000000, 1000000);
SelectionLayer selectionLayer = new SelectionLayer(new DataLayer(bodyDataProvider));
DataLayer rowHeaderDataLayer = new DataLayer(new DefaultRowHeaderDataProvider(bodyDataProvider));
rowHeaderDataLayer.setDefaultColumnWidth(40);
ILayer rowHeaderLayer = new RowHeaderLayer(rowHeaderDataLayer, selectionLayer, selectionLayer);
CompositeLayer compositeLayer = new CompositeLayer(2, 1);
compositeLayer.setChildLayer(GridRegion.ROW_HEADER, rowHeaderLayer, 0, 0);
compositeLayer.setChildLayer(GridRegion.BODY, selectionLayer, 1, 0);
return new NatTable(parent, compositeLayer);
}
use of org.eclipse.nebula.widgets.nattable.grid.data.DummyBodyDataProvider in project nebula.widgets.nattable by eclipse.
the class CompositeDataLayerExample method createExampleControl.
@Override
public Control createExampleControl(Composite parent) {
ILayer dataLayer = new DataLayer(new DummyBodyDataProvider(1000000, 1000000));
CompositeLayer compositeLayer = new CompositeLayer(1, 1);
compositeLayer.setChildLayer(GridRegion.BODY, dataLayer, 0, 0);
return new NatTable(parent, compositeLayer);
}
use of org.eclipse.nebula.widgets.nattable.grid.data.DummyBodyDataProvider in project nebula.widgets.nattable by eclipse.
the class CompositeLayerPerformanceTest method testGridLayerPerformance.
@Test
public void testGridLayerPerformance() {
DummyBodyDataProvider bodyDataProvider = new DummyBodyDataProvider(1000000, 1000000);
SelectionLayer selectionLayer = new SelectionLayer(new DataLayer(bodyDataProvider));
ViewportLayer viewportLayer = new ViewportLayer(selectionLayer);
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);
layer = new GridLayer(viewportLayer, columnHeaderLayer, rowHeaderLayer, cornerLayer);
}
use of org.eclipse.nebula.widgets.nattable.grid.data.DummyBodyDataProvider in project nebula.widgets.nattable by eclipse.
the class ElementalLayerPerformanceTest method testBigDataLayerPerformance.
@Test
public void testBigDataLayerPerformance() {
layer = new DataLayer(new DummyBodyDataProvider(50, 100));
setExpectedTimeInMillis(250);
}
use of org.eclipse.nebula.widgets.nattable.grid.data.DummyBodyDataProvider in project nebula.widgets.nattable by eclipse.
the class ElementalLayerPerformanceTest method testCompositeDataLayerPerformance.
@Test
public void testCompositeDataLayerPerformance() {
CompositeLayer compositeLayer = new CompositeLayer(1, 1);
compositeLayer.setChildLayer(GridRegion.BODY, new DataLayer(new DummyBodyDataProvider(10, 50)), 0, 0);
layer = compositeLayer;
}
Aggregations