Package org.apache.cayenne.modeler.dialog

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


     * 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

     * 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

TOP

Related Classes of org.apache.cayenne.modeler.dialog.UnsavedChangesDialog

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.