Ejemplo n.º 1
0
 @Override
 public UpdateContainer undoIt(Workspace workspace) {
   Node node = workspace.getFactory().getNode(nodeIdArg);
   SuperSelection sel = getSuperSelection(workspace);
   node.setValue(previousValue, previousStatus, workspace.getFactory());
   UpdateContainer uc =
       WorksheetUpdateFactory.createWorksheetHierarchicalAndCleaningResultsUpdates(
           worksheetId, sel);
   uc.add(new NodeChangedUpdate(worksheetId, nodeIdArg, previousValue, previousStatus));
   return uc;
 }
Ejemplo n.º 2
0
 @Override
 public UpdateContainer doIt(Workspace workspace) throws CommandException {
   Node node = workspace.getFactory().getNode(nodeIdArg);
   SuperSelection sel = getSuperSelection(workspace);
   inputColumns.clear();
   outputColumns.clear();
   inputColumns.add(node.getHNodeId());
   outputColumns.add(node.getHNodeId());
   previousValue = node.getValue();
   previousStatus = node.getStatus();
   if (node.hasNestedTable()) {
     throw new CommandException(
         this, "Cell " + nodeIdArg + " has a nested table. It cannot be edited.");
   }
   node.setValue(newValueArg, Node.NodeStatus.edited, workspace.getFactory());
   WorksheetUpdateFactory.detectSelectionStatusChange(worksheetId, workspace, this);
   UpdateContainer uc =
       WorksheetUpdateFactory.createWorksheetHierarchicalAndCleaningResultsUpdates(
           worksheetId, sel);
   uc.add(new NodeChangedUpdate(worksheetId, nodeIdArg, newValueArg, Node.NodeStatus.edited));
   return uc;
 }
Ejemplo n.º 3
0
 public void setValue(String value, NodeStatus status, RepFactory factory) {
   setValue(new StringCellValue(value), status, factory);
 }