Package org.freeplane.core.undo

Examples of org.freeplane.core.undo.IActor


  }

  // Node: R/W
  public void setLastModifiedAt(final Date date) {
    final Date oldDate = getDelegate().getHistoryInformation().getLastModifiedAt();
    final IActor actor = new IActor() {
      public void act() {
        getDelegate().getHistoryInformation().setLastModifiedAt(date);
      }

      public String getDescription() {
View Full Code Here


  }

  // Node: R/W
  public void setCreatedAt(final Date date) {
    final Date oldDate = getDelegate().getHistoryInformation().getCreatedAt();
    final IActor actor = new IActor() {
      public void act() {
        getDelegate().getHistoryInformation().setCreatedAt(date);
      }

      public String getDescription() {
View Full Code Here

      final ModeController modeController = Controller.getCurrentModeController();
      modeController.undoableResolveParentExtensions(LogicalStyleKeys.NODE_STYLE, existingNode);
      final MMapController mMapController = (MMapController) modeController.getMapController();
      mMapController.deleteNode(existingNode);
      {
        final IActor actor = new IActor() {
          private final boolean wasFolded = existingNode.isFolded();

          public void undo() {
            PersistentNodeHook.removeMapExtensions(existingNode);
            existingNode.setMap(parentMap);
View Full Code Here

     */
    public void visit(final NodeAttributeTableModel model) {
      for (int i = 0; i < model.getRowCount(); i++) {
        if (model.getName(i).equals(name) && model.getValue(i).equals(oldValue)) {
          final int row = i;
          final IActor actor = new SetAttributeValueActor(model, row, newValue);
          Controller.getCurrentModeController().execute(actor, model.getNode().getMap());
        }
      }
    }
View Full Code Here

     */
    public void visit(final NodeAttributeTableModel model) {
      for (int i = 0; i < model.getRowCount(); i++) {
        if (model.getName(i).equals(name)) {
          final int row = i;
          final IActor actor = new RemoveAttributeActor(model, row);
          Controller.getCurrentModeController().execute(actor, model.getNode().getMap());
        }
      }
    }
View Full Code Here

      for (int i = 0; i < model.getRowCount(); i++) {
        if (model.getName(i).equals(oldName)) {
          final int row = i;
          final String name = newName.toString();
          final String oldName = this.oldName.toString();
          final IActor actor = new SetAttributeNameActor(model, name, oldName, row);
          Controller.getCurrentModeController().execute(actor, model.getNode().getMap());
        }
      }
    }
View Full Code Here

     * .modes.attributes.ConcreteAttributeTableModel)
     */
    public void visit(final NodeAttributeTableModel model) {
      for (int i = 0; i < model.getRowCount(); i++) {
        if (model.getName(i).equals(name) && model.getValue(i).equals(value)) {
          final IActor actor = new RemoveAttributeActor(model, i);
          Controller.getCurrentModeController().execute(actor, model.getNode().getMap());
        }
      }
    }
View Full Code Here

  void setEquationUndoable(final LatexExtension model, final String newEquation) {
    final String equation = model.getEquation();
    if (equation.equals(newEquation)) {
      return;
    }
    final IActor actor = new IActor() {
      private final String oldEquation = equation;

      public void act() {
        model.setEquation(newEquation);
        final MapModel map = Controller.getCurrentModeController().getController().getMap();
View Full Code Here

      if (index == -1) {
        if (element.isRestricted()) {
          value = element.getValues().firstElement().toString();
        }
        else {
          final IActor actor = new RegistryAttributeValueActor(element, value, false);
          Controller.getCurrentModeController().execute(actor, map);
        }
      }
    }
    catch (final NoSuchElementException ex) {
      final AttributeRegistry registry = AttributeRegistry.getRegistry(map);
      final IActor nameActor = new RegistryAttributeActor(name, false, false, registry, map);
      Controller.getCurrentModeController().execute(nameActor, map);
      final AttributeRegistryElement element = registry.getElement(name);
      final IActor valueActor = new RegistryAttributeValueActor(element, value, false);
      Controller.getCurrentModeController().execute(valueActor, map);
    }
    final Object newValue = value;
    final IActor actor = new InsertAttributeActor(model, row, name, newValue);
    Controller.getCurrentModeController().execute(actor, map);
  }
View Full Code Here

    final AttributeRegistry attributeRegistry = AttributeRegistry.getRegistry(map);
    try {
      attributeRegistry.getElement(name);
    }
    catch (final NoSuchElementException ex) {
      final IActor actor = new RegistryAttributeActor(name, true, false, attributeRegistry, map);
      Controller.getCurrentModeController().execute(actor, map);
      return;
    }
  }
View Full Code Here

TOP

Related Classes of org.freeplane.core.undo.IActor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.