Example #1
0
  /**
   * Saves all data by creating and performing a command. If not, that means we are done and we
   * should give the compound command to the design window.
   *
   * <p>Subclasses that implement {@link #doSave} should probably create a command, call its <code>
   * perform</code> method, and add it to the <var>commands</var> compound command.
   *
   * @param closing passed through to <code>doSave</code>
   */
  protected void save(boolean closing) {
    doSave();
    revertButton.setEnabled(true);

    if (closing && commands.numCommands() > 0) designer.addCommand(commands);
  }
Example #2
0
 /**
  * Constructor.
  *
  * @param designer the window to which this dialog belongs
  * @param title window title
  * @param commandNameKey the {@link jimm.util.I18N} lookup key for the command name
  * @param modal passed on to superclass
  */
 public EditWin(Designer designer, String title, String commandNameKey, boolean modal) {
   super(designer.getFrame(), title, modal);
   this.designer = designer;
   commands = new CompoundCommand(I18N.get(commandNameKey));
 }