Changeset 43 in tmcsimulator for trunk/src/tmcsim/simulationmanager/actions


Ignore:
Timestamp:
06/23/2016 11:34:59 AM (10 years ago)
Author:
jdalbey
Message:

ExitAction?.java Remove confirmation prompt from exiting Sim Mgr. Enhance Sim Mgr smoke test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/simulationmanager/actions/ExitAction.java

    r2 r43  
    22 
    33import java.awt.event.ActionEvent; 
     4import javax.swing.AbstractAction; 
     5import tmcsim.simulationmanager.SimulationManagerView; 
    46 
    5 import javax.swing.AbstractAction; 
    6 import javax.swing.JOptionPane; 
    7  
    8 import tmcsim.simulationmanager.SimulationManagerView; 
    97/** 
    108 * ExitAction is an AbstractAction that is used for exiting the Simulation 
    11  * Manager application.  When the action is performed, the action prompts the  
    12  * user to confirm the exit, and then disposes of the SimulationManagerView class.  
     9 * Manager application. When the action is performed, the action prompts the 
     10 * user to confirm the exit, and then disposes of the SimulationManagerView 
     11 * class. 
     12 * 
    1313 * @author Matthew Cechini 
     14 * @author jdalbey 06/23/2016 Removed confirmation prompt to simplify system 
     15 * testing. 
    1416 */ 
    1517@SuppressWarnings("serial") 
    16 public class ExitAction extends AbstractAction {     
    17      
    18     /** Reference to the SimulationManagerView object. */ 
     18public class ExitAction extends AbstractAction 
     19{ 
     20 
     21    /** 
     22     * Reference to the SimulationManagerView object. 
     23     */ 
    1924    private SimulationManagerView theSimManagerView = null; 
    20      
    21     /**  
     25 
     26    /** 
    2227     * Constructor. 
     28     * 
    2329     * @param view View class object for the Simulation Manager. 
    2430     */ 
    25     public ExitAction(SimulationManagerView view) { 
     31    public ExitAction(SimulationManagerView view) 
     32    { 
    2633        super("Exit"); 
    27          
    28         theSimManagerView = view;        
     34 
     35        theSimManagerView = view; 
    2936    } 
    30      
    3137 
    32     public void actionPerformed(ActionEvent evt) { 
    33          
    34         if(JOptionPane.showConfirmDialog( 
    35                 null, "Exit Simulation Manager?", "Confirm Exit", 
    36                 JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)  
    37         {    
    38             theSimManagerView.dispose();     
    39         }    
     38    public void actionPerformed(ActionEvent evt) 
     39    { 
     40        theSimManagerView.dispose(); 
     41//        if(JOptionPane.showConfirmDialog( 
     42//                null, "Exit Simulation Manager?", "Confirm Exit", 
     43//                JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) 
     44//        { 
     45//            theSimManagerView.dispose(); 
     46//        } 
    4047    } 
    4148} 
Note: See TracChangeset for help on using the changeset viewer.