Package ch.rakudave.jnetmap.controller.command

Examples of ch.rakudave.jnetmap.controller.command.CommandHistory


  private List<MapListener> mapListeners;
  @XStreamConverter(SkippingCollectionConverter.class)
  private List<Notifier> statusListeners;
 
  public Map() {
    history = new CommandHistory(Settings.getInt("commandhistory.size", 20));
    graph = new SparseMultigraph<Device, Connection>();
    layout = new StaticLayout<Device, Connection>(this);
    mapListeners = new LinkedList<MapListener>();
    statusListeners = new LinkedList<Notifier>();
  }
View Full Code Here


  /**
   * @return the history
   */
  public CommandHistory getHistory() {
    if (history == null) history = new CommandHistory(Settings.getInt("commandhistory.size", 20));
    return history;
  }
View Full Code Here

 
  public static Action undo() {
    return new AbstractAction(Lang.getNoHTML("menu.undo"), Icons.get("undo")) {
      @Override
      public void actionPerformed(ActionEvent e) {
        CommandHistory history = Controller.getCurrentMap().getHistory();
        try {
          history.undo();
        } catch (Exception ex) {
          Logger.error("An error occured during the last 'undo'", ex);
        }
      }
    };
View Full Code Here

 
  public static Action redo() {
    return new AbstractAction(Lang.getNoHTML("menu.redo"), Icons.get("redo")) {
      @Override
      public void actionPerformed(ActionEvent e) {
        CommandHistory history = Controller.getCurrentMap().getHistory();
        try {
            history.redo();
          } catch (Exception ex) {
            Logger.error("An error occured during the last 'redo'", ex);
          }
        }
    };
View Full Code Here

TOP

Related Classes of ch.rakudave.jnetmap.controller.command.CommandHistory

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.