Examples of UnsavedChangesDialog


Examples of org.apache.cayenne.modeler.dialog.UnsavedChangesDialog

     * Returns false if cancel closing the window, true otherwise.
     */
    public boolean checkSaveOnClose() {
        ProjectController projectController = getProjectController();
        if (projectController != null && projectController.isDirty()) {
            UnsavedChangesDialog dialog = new UnsavedChangesDialog(Application.getFrame());
            dialog.show();

            if (dialog.shouldCancel()) {
                // discard changes and DO NOT close
                return false;
            }
            else if (dialog.shouldSave()) {
                // save changes and close
                ActionEvent e = new ActionEvent(
                        this,
                        ActionEvent.ACTION_PERFORMED,
                        "SaveAll");
View Full Code Here

Examples of org.apache.cayenne.modeler.dialog.UnsavedChangesDialog

     * Returns false if cancel closing the window, true otherwise.
     */
    public boolean checkSaveOnClose() {
        ProjectController projectController = getProjectController();
        if (projectController != null && projectController.isDirty()) {
            UnsavedChangesDialog dialog = new UnsavedChangesDialog(Application.getFrame());
            dialog.show();

            if (dialog.shouldCancel()) {
                // discard changes and DO NOT close
                Application.getInstance().setQuittingApplication(false);
                return false;
            }
            else if (dialog.shouldSave()) {
                // save changes and close
                ActionEvent e = new ActionEvent(
                        this,
                        ActionEvent.ACTION_PERFORMED,
                        "SaveAll");
View Full Code Here

Examples of org.apache.cayenne.modeler.dialog.UnsavedChangesDialog

     * Returns false if cancel closing the window, true otherwise.
     */
    public boolean checkSaveOnClose() {
        ProjectController projectController = getProjectController();
        if (projectController != null && projectController.isDirty()) {
            UnsavedChangesDialog dialog = new UnsavedChangesDialog(Application.getFrame());
            dialog.show();

            if (dialog.shouldCancel()) {
                // discard changes and DO NOT close
                return false;
            }
            else if (dialog.shouldSave()) {
                // save changes and close
                ActionEvent e = new ActionEvent(
                        this,
                        ActionEvent.ACTION_PERFORMED,
                        "SaveAll");
View Full Code Here

Examples of org.rstudio.studio.client.workbench.ui.unsaved.UnsavedChangesDialog

         String title,
         ArrayList<UnsavedChangesTarget> dirtyTargets,
         OperationWithInput<UnsavedChangesDialog.Result> saveOperation,
         Command onCancelled)
   {
      new UnsavedChangesDialog(title,
                               dirtyTargets,
                               saveOperation,
                               onCancelled).showModal();
   }
View Full Code Here

Examples of org.rstudio.studio.client.workbench.ui.unsaved.UnsavedChangesDialog

         ArrayList<UnsavedChangesTarget> unsavedSourceDocs =
               sourceShim_.getUnsavedChanges();

         if (unsavedSourceDocs.size() > 0)
         {
            new UnsavedChangesDialog(
                  commandSource,
                  alwaysSaveOption,
                  unsavedSourceDocs,
                  new OperationWithInput<UnsavedChangesDialog.Result>() {
                     @Override
View Full Code Here

Examples of org.rstudio.studio.client.workbench.ui.unsaved.UnsavedChangesDialog

         ArrayList<UnsavedChangesTarget> unsaved =
                                      new ArrayList<UnsavedChangesTarget>();
         if (saveAction == SaveAction.SAVEASK)
            unsaved.add(globalEnvTarget_);
         unsaved.addAll(unsavedSourceDocs);
         new UnsavedChangesDialog(
            caption,
            unsaved,
            new OperationWithInput<UnsavedChangesDialog.Result>() {

               @Override
View Full Code Here

Examples of org.rstudio.studio.client.workbench.ui.unsaved.UnsavedChangesDialog

                                             new HandleUnsavedCommand(true)),
               new HandleUnsavedCommand(false));
      }
      else if (unsavedSourceDocs.size() > 1)
      {
         new UnsavedChangesDialog(
               "Quit R Session",
               unsavedSourceDocs,
               new OperationWithInput<UnsavedChangesDialog.Result>() {
                  @Override
                  public void execute(Result result)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.