// Copyright (c) 1995, 1996 Regents of the University of California. // File: ActionQuit.java // Classes: ActionQuit // Original Author: Kedar Patankar // Date 21 Jan 1997 package uci.graphedit; import gjt.DialogClient; import java.awt.Dialog; import java.util.Vector; /**Action to close all windows and exit the application.*/ public class ActionQuit extends Action implements DialogClient { public ActionQuit(Editor e) { super(e);} public String name() { return "Quit Application"; } public void doIt() { Vector v=_editor.get_outStanding(); if(v.size()<=0) shutDown(); String s="Can't quit. There exist some unsaved files"; MessageDialog md = new MessageDialog (_editor,this,"Northeastern AP-Studio",s); md.show(); } public void undoIt() { } public void dialogDismissed(Dialog dl){} private void shutDown() { _editor.close(); System.exit(0); } } /* end class ActionQuit */