use of org.eclipse.nebula.widgets.nattable.copy.InternalCellClipboard in project nebula.widgets.nattable by eclipse.
the class FormulaFillHandlePasteTest method setup.
@Before
public void setup() {
InternalCellClipboard clipboard = new InternalCellClipboard();
this.selectionLayer.registerCommandHandler(new InternalCopyDataCommandHandler(this.selectionLayer, clipboard));
this.selectionLayer.registerCommandHandler(new FormulaFillHandlePasteCommandHandler(this.selectionLayer, clipboard, this.formulaDataProvider));
this.natTable.addConfiguration(new DefaultFormulaConfiguration(this.formulaDataProvider, this.selectionLayer, clipboard));
this.natTable.addConfiguration(new AbstractRegistryConfiguration() {
@Override
public void configureRegistry(IConfigRegistry configRegistry) {
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITABLE_RULE, EditableRule.ALWAYS_EDITABLE);
}
});
this.natTable.configure();
}
use of org.eclipse.nebula.widgets.nattable.copy.InternalCellClipboard in project nebula.widgets.nattable by eclipse.
the class FormulaIntegrationTest method setup.
@Before
public void setup() {
this.natTable.addConfiguration(new DefaultFormulaConfiguration(this.formulaDataProvider, this.gridLayerStack.getBodyLayer().getSelectionLayer(), new InternalCellClipboard()));
this.natTable.configure();
this.natTable.addLayerListener(this.listenerFixture);
// enable caching
this.formulaDataProvider.configureCaching(this.gridLayerStack.getBodyDataLayer());
this.dataProvider.setDataValue(0, 0, "5");
this.dataProvider.setDataValue(1, 0, "3");
this.dataProvider.setDataValue(2, 0, "=A1*B1");
this.dataProvider.setDataValue(0, 2, "5");
this.dataProvider.setDataValue(0, 3, "5");
this.dataProvider.setDataValue(0, 4, "=SUM(A3:A4)");
this.dataProvider.setDataValue(1, 2, "3");
this.dataProvider.setDataValue(1, 3, "3");
this.dataProvider.setDataValue(1, 4, "=SUM(B3:B4)");
this.dataProvider.setDataValue(2, 4, "=SUM(A5;B5)");
}
Aggregations