Package uk.gov.nationalarchives.droid.gui.action

Examples of uk.gov.nationalarchives.droid.gui.action.ExitAction$SaveJobCompletionListener


        }

        StopRunningProfilesAction stopRunningAction = new StopRunningProfilesAction(profileManager, droidContext, this);
        if (stopRunningAction.execute()) {
            ProfileSelectionDialog dialog = new SaveAllProfilesDialog(this, droidContext.allDirtyProfiles());
            final ExitAction action = new ExitAction(droidContext, dialog, profileManager);
            action.addPropertyChangeListener(new PropertyChangeListener() {
                @Override
                public void propertyChange(PropertyChangeEvent evt) {
                    if (STATE.equals(evt.getPropertyName()) && evt.getNewValue().equals(SwingWorker.StateValue.DONE)
                            && !action.isCancelled()) {
                       
                       
                        setVisible(false);
                        log.info("Closing DROID.");
                        File tempDir = globalContext.getGlobalConfig().getTempDir();
                        ResourceUtils.attemptToDeleteTempFiles(tempDir);
                        // CHECKSTYLE:OFF
                        System.exit(0);
                        // CHECKSTYLE:ON
                    }
                }
            });

            action.start();
        }
    }
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.gui.action.ExitAction$SaveJobCompletionListener

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.