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 34 40 public class ControllerListPopUpMenu extends AbstractPopUpMenu 41 { 42 47 public ControllerListPopUpMenu(CjdbcGui gui) 48 { 49 super(gui); 50 this.gui = gui; 51 this.add(new JMenuItem (GuiCommands.COMMAND_ADD_CONTROLLER)) 52 .addActionListener(this); 53 this.add(new JMenuItem (GuiCommands.COMMAND_REFRESH_CONTROLLER_LIST)) 54 .addActionListener(this); 55 } 56 57 58 59 62 public void actionPerformed(ActionEvent e) 63 { 64 String action = e.getActionCommand(); 65 if (action.equals(GuiCommands.COMMAND_ADD_CONTROLLER)) 66 { 67 gui.publicActionAddControllerView(); 68 } 69 else if (action.equals(GuiCommands.COMMAND_REFRESH_CONTROLLER_LIST)) 70 { 71 gui.publicActionLoadControllerList(); 72 } 73 } 74 } 75 | Popular Tags |