Coverage Report - org.homeunix.thecave.buddi.view.menu.items.EditEditAccountTypes
 
Classes in this File Line Coverage Branch Coverage Complexity
EditEditAccountTypes
44%
4/9
N/A
1.333
 
 1  
 /*
 2  
  * Created on Aug 6, 2007 by wyatt
 3  
  */
 4  
 package org.homeunix.thecave.buddi.view.menu.items;
 5  
 
 6  
 import java.awt.event.ActionEvent;
 7  
 
 8  
 import org.homeunix.thecave.buddi.i18n.keys.MenuKeys;
 9  
 import org.homeunix.thecave.buddi.model.prefs.PrefsModel;
 10  
 import org.homeunix.thecave.buddi.view.AccountTypeListFrame;
 11  
 import org.homeunix.thecave.buddi.view.MainFrame;
 12  
 
 13  
 import ca.digitalcave.moss.swing.MossMenuItem;
 14  
 import ca.digitalcave.moss.swing.exception.WindowOpenException;
 15  
 
 16  
 public class EditEditAccountTypes extends MossMenuItem{
 17  
         public static final long serialVersionUID = 0;
 18  
         
 19  
         //This has to be a AccountFrame, as we need to get selected accounts.
 20  
         public EditEditAccountTypes(MainFrame frame) {
 21  29974
                 super(frame, PrefsModel.getInstance().getTranslator().get(MenuKeys.MENU_EDIT_EDIT_ACCOUNT_TYPES));
 22  29974
         }
 23  
         
 24  
         @Override
 25  
         public void updateMenus() {
 26  169470
                 super.updateMenus();
 27  169470
         }
 28  
         
 29  
         @Override
 30  
         public void actionPerformed(ActionEvent e) {
 31  0
                 ((MainFrame) getFrame()).getDocument().startBatchChange();
 32  
 
 33  
                 try {
 34  0
                         new AccountTypeListFrame((MainFrame) getFrame()).openWindow();
 35  
                 }
 36  0
                 catch (WindowOpenException woe){}
 37  
                 
 38  0
                 ((MainFrame) getFrame()).getDocument().finishBatchChange();
 39  0
         }
 40  
 }