1 24 25 package org.objectweb.cjdbc.console.gui.popups; 26 27 import java.awt.event.ActionEvent ; 28 29 import javax.swing.JMenuItem ; 30 31 import org.objectweb.cjdbc.console.gui.CjdbcGui; 32 import org.objectweb.cjdbc.console.gui.constants.GuiCommands; 33 import org.objectweb.cjdbc.console.gui.objects.ConfigurationFileObject; 34 35 41 public class ConfigurationFilePopUpMenu extends AbstractPopUpMenu 42 { 43 private ConfigurationFileObject cfo; 44 45 51 public ConfigurationFilePopUpMenu(CjdbcGui gui, ConfigurationFileObject cfo) 52 { 53 super(gui); 54 this.cfo = cfo; 55 this.add(new JMenuItem (GuiCommands.COMMAND_REMOVE_CONFIGURATION_FILE)) 56 .addActionListener(this); 57 } 58 59 62 public void actionPerformed(ActionEvent e) 63 { 64 String action = e.getActionCommand(); 65 if (action.equals(GuiCommands.COMMAND_REMOVE_CONFIGURATION_FILE)) 66 { 67 gui.publicActionRemoveConfigurationFile(cfo); 68 } 69 else if (action.equals(GuiCommands.COMMAND_SELECT_XML_FILE)) 70 { 71 gui.publicActionSelectNewConfigurationFile(cfo.getFilePath()); 72 } 73 } 74 } 75 | Popular Tags |