src/org/objectweb/cjdbc/console/gui/popups/ControllerPopUpMenu.java

説明を見る。
00001 00025 package org.objectweb.cjdbc.console.gui.popups; 00026 00027 import java.awt.event.ActionEvent; 00028 00029 import javax.swing.JMenuItem; 00030 00031 import org.objectweb.cjdbc.console.gui.CjdbcGui; 00032 import org.objectweb.cjdbc.console.gui.constants.GuiCommands; 00033 import org.objectweb.cjdbc.console.gui.objects.ControllerObject; 00034 00041 public class ControllerPopUpMenu extends AbstractPopUpMenu 00042 { 00043 private ControllerObject controller; 00044 private String controllerName; 00045 00052 public ControllerPopUpMenu(CjdbcGui gui, ControllerObject controller) 00053 { 00054 super(gui); 00055 this.controller = controller; 00056 this.controllerName = controller.getName(); 00057 this.add(new JMenuItem(GuiCommands.COMMAND_ADD_DRIVER)).addActionListener( 00058 this); 00059 this.add(new JMenuItem(GuiCommands.COMMAND_REFRESH_LOGS)) 00060 .addActionListener(this); 00061 this.add(new JMenuItem(GuiCommands.COMMAND_DISPLAY_XML_CONTROLLER)) 00062 .addActionListener(this); 00063 this.add(new JMenuItem(GuiCommands.COMMAND_GET_CONTROLLER_INFO)) 00064 .addActionListener(this); 00065 this.add(new JMenuItem(GuiCommands.COMMAND_SHUTDOWN_CONTROLLER)) 00066 .addActionListener(this); 00067 this.add(new JMenuItem(GuiCommands.COMMAND_CONTROLLER_REPORT)) 00068 .addActionListener(this); 00069 this.add(new JMenuItem(GuiCommands.COMMAND_CONTROLLER_LOG_CONFIGURATION)) 00070 .addActionListener(this); 00071 this.add(new JMenuItem(GuiCommands.COMMAND_CONTROLLER_REMOVE)) 00072 .addActionListener(this); 00073 this.add(new JMenuItem(GuiCommands.COMMAND_CONTROLLER_MONITOR)) 00074 .addActionListener(this); 00075 } 00076 00082 public ControllerObject getController() 00083 { 00084 return controller; 00085 } 00086 00090 public void actionPerformed(ActionEvent e) 00091 { 00092 String action = e.getActionCommand(); 00093 if (action.equals(GuiCommands.COMMAND_ADD_DRIVER)) 00094 { 00095 gui.publicActionLoadDriver(controllerName); 00096 } 00097 else if (action.equals(GuiCommands.COMMAND_REFRESH_LOGS)) 00098 { 00099 gui.publicActionRefreshLogs(controllerName); 00100 } 00101 else if (action.equals(GuiCommands.COMMAND_DISPLAY_XML_CONTROLLER)) 00102 { 00103 gui.publicActionLoadXmlController(controllerName); 00104 } 00105 else if (action.equals(GuiCommands.COMMAND_GET_CONTROLLER_INFO)) 00106 { 00107 gui.publicActionGetControllerInfo(controllerName); 00108 } 00109 else if (action.equals(GuiCommands.COMMAND_SHUTDOWN_CONTROLLER)) 00110 { 00111 gui.publicActionShutdownController(controllerName); 00112 } 00113 else if (action.equals(GuiCommands.COMMAND_CONTROLLER_REPORT)) 00114 { 00115 gui.publicActionControllerReport(controllerName); 00116 } 00117 else if (action.equals(GuiCommands.COMMAND_CONTROLLER_LOG_CONFIGURATION)) 00118 { 00119 gui.publicActionControllerLogConfiguration(controllerName); 00120 } 00121 else if (action.equals(GuiCommands.COMMAND_CONTROLLER_REMOVE)) 00122 { 00123 gui.publicActionControllerRemove(controllerName); 00124 } 00125 else if (action.equals(GuiCommands.COMMAND_CONTROLLER_MONITOR)) 00126 { 00127 gui.publicActionControllerMonitor(controllerName); 00128 } 00129 00130 } 00131 }

CJDBCversion1.0.4に対してTue Oct 12 15:15:58 2004に生成されました。 doxygen 1.3.8