use of org.eclipse.nebula.widgets.nattable.copy.command.InternalCopyDataCommandHandler 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.command.InternalCopyDataCommandHandler in project nebula.widgets.nattable by eclipse.
the class FillHandleConfiguration method configureTypedLayer.
@Override
public void configureTypedLayer(NatTable natTable) {
// initialization works here because configureLayer() is executed before
// configureUiBindings()
this.clipboard = natTable.getInternalCellClipboard();
this.painter = new FillHandleLayerPainter();
this.selectionLayer.setLayerPainter(this.painter);
this.selectionLayer.addLayerListener(new FillHandleMarkupListener(this.selectionLayer));
this.selectionLayer.registerCommandHandler(new InternalCopyDataCommandHandler(this.selectionLayer, this.clipboard));
this.selectionLayer.registerCommandHandler(new FillHandlePasteCommandHandler(this.selectionLayer, this.clipboard));
}
Aggregations