Package net.sourceforge.sijaf.dialogs

Examples of net.sourceforge.sijaf.dialogs.ConfirmActionModel


    String secondaryLabel =
            "There are some changes to your work " +
            "which have not been saved. " +
            "You will loose the changes if you continue.\n" +
            "Continue anyway?";
    ConfirmActionModel actModel =
            new ConfirmActionModel(mainLabel, secondaryLabel);
    return actModel;
  }
View Full Code Here


    return actModel;
  }

  public void beginNewFileAction() {
    if (isDirty()) {
      ConfirmActionModel actModel = getNewConfirmActionModel();
      ConfirmActionReceiver actReceiver = new ConfirmNewActionReceiver();
      ConfirmActionCtrl actCtrl =
              new ConfirmActionCtrl(actModel, mainFrame, actReceiver);
      actCtrl.showDialog();
    } else {
View Full Code Here

    modelUpdated(this.model);
  }

  public void beginOpenFileAction() {
    if (isDirty()) {
      ConfirmActionModel actModel = getNewConfirmActionModel();
      ConfirmActionReceiver actReceiver = new ConfirmOpenActionReceiver();
      ConfirmActionCtrl actCtrl =
              new ConfirmActionCtrl(actModel, mainFrame, actReceiver);
      actCtrl.showDialog();
    } else {
View Full Code Here

    String mainLabel = "Caution";
    String secondaryLabel =
            "The file you specified already exists. " +
            "You will loose the contents of this file if you continue.\n" +
            "Continue anyway?";
    ConfirmActionModel actModel =
            new ConfirmActionModel(mainLabel, secondaryLabel);
    return actModel;
  }
View Full Code Here

    return actModel;
  }

  private void checkOverwriteFile(File file) {
    if (file.exists()) {
      ConfirmActionModel actModel = getOverwriteConfirmActionModel();
      ConfirmActionReceiver actReceiver =
              new ConfirmOverwriteActionReceiver(file);
      ConfirmActionCtrl actCtrl =
              new ConfirmActionCtrl(actModel, mainFrame, actReceiver);
      actCtrl.showDialog(); // will call performSaveAction() on OK
View Full Code Here

    if (this.model.getDataFile() != null) {
      cancelButtonLabel = "Save";
    } else {
      cancelButtonLabel = "Save As...";
    }
    ConfirmActionModel actModel =
      new ConfirmActionModel(mainLabel, secondaryLabel,
          confirmButtonLabel, cancelButtonLabel);
    return actModel;
  }
View Full Code Here

    return actModel;
  }

  public void beginQuitAction() {
    if (isDirty()) {
      ConfirmActionModel actModel = getQuitConfirmActionModel();
      ConfirmActionReceiver actReceiver = new ConfirmQuitActionReceiver();
      ConfirmActionCtrl actCtrl =
              new ConfirmActionCtrl(actModel, mainFrame, actReceiver);
      actCtrl.showDialog();
    } else {
View Full Code Here

    }
  }

  private void checkOverwriteFileOnQuit(File file) {
    if (file.exists()) {
      ConfirmActionModel actModel = getOverwriteConfirmActionModel();
      ConfirmActionReceiver actReceiver =
              new ConfirmOverwriteOnQuitActionReceiver(file);
      ConfirmActionCtrl actCtrl =
              new ConfirmActionCtrl(actModel, mainFrame, actReceiver);
      actCtrl.showDialog(); // will call performSaveAction() on OK
View Full Code Here

TOP

Related Classes of net.sourceforge.sijaf.dialogs.ConfirmActionModel

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.