01: /*
02: * $RCSfile: QuitAction.java,v $
03: * @modification $Date: 2001/09/28 19:31:19 $
04: * @version $Id: QuitAction.java,v 1.1 2001/09/28 19:31:19 hfalk Exp $
05: *
06: */
07:
08: package com.memoire.vainstall.builder.action;
09:
10: import com.memoire.vainstall.builder.*;
11:
12: import java.util.Iterator;
13:
14: /**
15: * This action quits the install builder
16: *
17: * @see com.memoire.vainstall.builder.util.AbstractVAIBuilderAction
18: *
19: * @author Henrik Falk
20: * @version $Id: QuitAction.java,v 1.1 2001/09/28 19:31:19 hfalk Exp $
21: */
22: public class QuitAction extends AbstractVAIBuilderAction {
23:
24: /**
25: * Default constructor
26: */
27: public QuitAction() {
28: super ();
29: }
30:
31: /**
32: * Implements the runnit method
33: */
34: public void runnit() {
35:
36: // save any opened projects ?
37: SaveAllProductAction action = new SaveAllProductAction();
38: action.initialize(getController());
39: action.runnit();
40:
41: // close all opened projects
42: Iterator iterator = getController().getProductControllerList()
43: .values().iterator();
44: while (iterator.hasNext() == true) {
45: VAIProductController productController = (VAIProductController) iterator
46: .next();
47:
48: String id = productController.getModel()
49: .getProductDirectory();
50: getController().removeProduct(id);
51: }
52:
53: // save window position
54: getModel().getWindowList().put("VAIBuilderFrame",
55: getController().getFrame().getBounds());
56:
57: getModel().save();
58:
59: System.exit(0);
60: }
61: }
|