KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > sqlprofiler > gui > ExitAction


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software
5  * License version 1.1, a copy of which has been included with this
6  * distribution in the APACHE.txt file. */

7 package org.jahia.sqlprofiler.gui;
8
9 import java.awt.event.ActionEvent JavaDoc;
10 import javax.swing.AbstractAction JavaDoc;
11 import org.apache.log4j.Category;
12
13 /**
14  * Encapsulates the action to exit.
15  *
16  * @author <a HREF="mailto:oliver@puppycrawl.com">Oliver Burn</a>
17  * @version 1.0
18  */

19 class ExitAction
20     extends AbstractAction JavaDoc
21 {
22     /** use to log messages **/
23     private static final Category LOG = Category.getInstance(ExitAction.class);
24     /** The instance to share **/
25     public static final ExitAction INSTANCE = new ExitAction();
26
27     /** Stop people creating instances **/
28     private ExitAction() {}
29
30     /**
31      * Will shutdown the application.
32      * @param aIgnore ignored
33      */

34     public void actionPerformed(ActionEvent JavaDoc aIgnore) {
35         LOG.info("shutting down");
36         System.exit(0);
37     }
38 }
39
Popular Tags