use of org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack in project nebula.widgets.nattable by eclipse.
the class PersistenceIntegrationTest method setup.
@Before
public void setup() {
this.natTableFixture = new NatTableFixture(new Shell(), new DummyGridLayerStack() {
@Override
protected void init(IUniqueIndexLayer bodyDataLayer, IUniqueIndexLayer columnHeaderDataLayer, IUniqueIndexLayer rowHeaderDataLayer, IUniqueIndexLayer cornerDataLayer) {
RowReorderLayer rowReorderLayer = new RowReorderLayer(bodyDataLayer);
super.init(rowReorderLayer, columnHeaderDataLayer, rowHeaderDataLayer, cornerDataLayer);
}
});
this.properties = new Properties();
}
use of org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack in project nebula.widgets.nattable by eclipse.
the class SelectionIntegrationTest method setup.
@Before
public void setup() {
this.layerStack = new DummyGridLayerStack(10, 5);
this.selectionLayer = this.layerStack.getBodyLayer().getSelectionLayer();
this.natTable = new NatTableFixture(this.layerStack, 1000, 200, true);
}
use of org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack in project nebula.widgets.nattable by eclipse.
the class CellLabelMouseEventMatcherTest method setUpCustomCellLabel.
@Before
public void setUpCustomCellLabel() {
DummyGridLayerStack gridLayerStack = new DummyGridLayerStack(5, 5);
this.natTableFixture = new NatTableFixture(gridLayerStack);
// Register custom label
DataLayer bodyDataLayer = (DataLayer) gridLayerStack.getBodyDataLayer();
this.natTableFixture.registerLabelOnColumn(bodyDataLayer, 0, TEST_LABEL);
}
use of org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack in project nebula.widgets.nattable by eclipse.
the class _000_Styled_grid method setup.
private NatTable setup(Composite parent) {
DummyGridLayerStack gridLayer = new DummyGridLayerStack();
final NatTable natTable = new NatTable(parent, gridLayer, false);
DataLayer bodyDataLayer = (DataLayer) gridLayer.getBodyDataLayer();
// Add an AggregateConfigLabelAccumulator - we can add other
// accumulators to this as required
AggregateConfigLabelAccumulator aggregrateConfigLabelAccumulator = new AggregateConfigLabelAccumulator();
bodyDataLayer.setConfigLabelAccumulator(aggregrateConfigLabelAccumulator);
ColumnOverrideLabelAccumulator columnLabelAccumulator = new ColumnOverrideLabelAccumulator(bodyDataLayer);
ColumnOverrideLabelAccumulator bodyLabelAccumulator = new ColumnOverrideLabelAccumulator(bodyDataLayer);
aggregrateConfigLabelAccumulator.add(columnLabelAccumulator);
aggregrateConfigLabelAccumulator.add(bodyLabelAccumulator);
// Add a label for the highlighted column
// We will add a style for this label to the config registry in a bit
bodyLabelAccumulator.registerColumnOverrides(2, BODY_LABEL_1);
columnLabelAccumulator.registerColumnOverrides(2, COLUMN_LABEL_1);
// Register a command handler for the StyleEditorDialog
DisplayColumnStyleEditorCommandHandler styleChooserCommandHandler = new DisplayColumnStyleEditorCommandHandler(gridLayer.getBodyLayer().getSelectionLayer(), columnLabelAccumulator, natTable.getConfigRegistry());
DefaultBodyLayerStack bodyLayer = gridLayer.getBodyLayer();
bodyLayer.registerCommandHandler(styleChooserCommandHandler);
// Register the style editor as persistable
// This will persist the style applied to the columns when
// NatTable#saveState is invoked
bodyLayer.registerPersistable(styleChooserCommandHandler);
bodyLayer.registerPersistable(columnLabelAccumulator);
return natTable;
}
use of org.eclipse.nebula.widgets.nattable.layer.stack.DummyGridLayerStack in project nebula.widgets.nattable by eclipse.
the class ZoomedViewportSelectionDataLayerExample method createExampleControl.
@Override
public Control createExampleControl(Composite parent) {
ZoomLayer zoomLayer = new ZoomLayer(new DummyGridLayerStack());
zoomLayer.setZoomFactor(3.0f);
return new NatTable(parent, zoomLayer);
}
Aggregations