0

我认为解决方案将类似于 从 Nattable 中删除行的答案, 但我无法编辑doCommand为需要插入的对象添加一个更多参数,因为这doCommand是一种覆盖方法

public boolean doCommand(ILayer targetLayer, AddRowCommand command) {

            //convert the transported position to the target layer
            if (command.convertToTargetLayer(targetLayer)) {
                //remove the element
                this.bodyData.remove(command.getRowPosition());
                //fire the event to refresh
                targetLayer.fireLayerEvent(new RowInsertEvent(targetLayer, command.getRowPosition()));
                return true;
            }
            return false;
        }
4

1 回答 1

0

您不必修改 doCommand()。您需要修改 AddRowCommand 以传输要添加的对象。

于 2016-02-09T12:40:00.483 回答