クラス org.objectweb.cjdbc.console.gui.CjdbcGuiListener

org.objectweb.cjdbc.console.gui.CjdbcGuiListenerのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

説明

This class defines a CjdbcGuiListener

作者:
Nicolas Modrzyk
バージョン:
1.0

CjdbcGuiListener.java47 行で定義されています。

Public メソッド

 CjdbcGuiListener (CjdbcGui gui)
void handleNotification (Notification notification, Object handback)
void mouseClicked (MouseEvent e)
void mousePressed (MouseEvent e)
void mouseReleased (MouseEvent e)
void mouseEntered (MouseEvent e)
void mouseExited (MouseEvent e)
void actionPerformed (ActionEvent e)

Private メソッド

void handleNotification (String type, JmxNotification notification)

Private 変数

CjdbcGui gui


コンストラクタとデストラクタ

org.objectweb.cjdbc.console.gui.CjdbcGuiListener.CjdbcGuiListener CjdbcGui  gui  ) 
 

Creates a new CjdbcGuiListener.java object

引数:
gui the main frame
CjdbcGuiListener.java56 行で定義されています。
00057 { 00058 this.gui = gui; 00059 }


メソッド

void org.objectweb.cjdbc.console.gui.CjdbcGuiListener.actionPerformed ActionEvent  e  ) 
 

参照:
java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
CjdbcGuiListener.java186 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.CjdbcGui.appendDebugText(), org.objectweb.cjdbc.console.gui.CjdbcGuiListener.gui, org.objectweb.cjdbc.console.gui.CjdbcGui.newBackendFrame, org.objectweb.cjdbc.console.gui.CjdbcGui.newControllerFrame, org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionAddController(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionAddControllerView(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionAddXmlFile(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionCleanDebugBuffer(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActioncleanLoggingPane(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionCreateBackendExecute(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadAuthenticatedDatabase(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionQuit(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionSaveConfigurationFile(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionSelectNewController(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionSelectNewDatabase(), org.objectweb.cjdbc.console.gui.CjdbcGui.selectCheckpointFrame, と org.objectweb.cjdbc.console.gui.CjdbcGui.selectShutdownFrame.

00187 { 00188 String action = e.getActionCommand(); 00189 gui.appendDebugText("Got action:" + action); 00190 if (action.equals(GuiCommands.COMMAND_QUIT)) 00191 { 00192 gui.publicActionQuit(); 00193 } 00194 else if (action.equals(GuiCommands.COMMAND_ADD_CONTROLLER)) 00195 { 00196 gui.publicActionAddControllerView(); 00197 } 00198 else if (action.equals(GuiCommands.COMMAND_SAVE_CONFIGURATION_FILE)) 00199 { 00200 gui.publicActionSaveConfigurationFile(); 00201 } 00202 if (action.equals(GuiCommands.COMMAND_CLEAN_LOGGING_PANEL)) 00203 { 00204 gui.publicActioncleanLoggingPane(); 00205 } 00206 else if (action.equals(GuiCommands.COMMAND_ADD_CONFIG_FILE)) 00207 { 00208 gui.publicActionAddXmlFile(); 00209 } 00210 else if (action.equals(GuiCommands.COMMAND_SELECT_CONTROLLER)) 00211 { 00212 String controllerName = ((JButton) e.getSource()).getName(); 00213 gui.appendDebugText("Changed controller selection to:" + controllerName); 00214 gui.publicActionSelectNewController(controllerName); 00215 } 00216 else if (action.equals(GuiCommands.COMMAND_SELECT_DATABASE)) 00217 { 00218 DatabaseObject source = (DatabaseObject) e.getSource(); 00219 String databaseName = source.getName(); 00220 gui.appendDebugText("Changed database selection to:" + databaseName); 00221 gui.publicActionSelectNewDatabase(databaseName); 00222 } 00223 else if (action.equals(GuiCommands.COMMAND_ADD_CONTROLLER_CANCEL)) 00224 { 00225 gui.newControllerFrame.setVisible(false); 00226 } 00227 else if (action.equals(GuiCommands.COMMAND_ADD_CONTROLLER_APPROVE)) 00228 { 00229 gui.publicActionAddController(); 00230 } 00231 else if (action.equals(GuiCommands.COMMAND_SAVE_CONFIGURATION_FILE)) 00232 { 00233 gui.publicActionSaveConfigurationFile(); 00234 } 00235 else if (action.equals(GuiCommands.COMMAND_CLEAN_DEBUG_BUFFER)) 00236 { 00237 gui.publicActionCleanDebugBuffer(); 00238 } 00239 else if (action.equals(GuiCommands.COMMAND_DATABASE_AUTHENTICATE)) 00240 { 00241 gui.publicActionLoadAuthenticatedDatabase(); 00242 } 00243 else if (action.equals(GuiCommands.COMMAND_CREATE_BACKEND_APPROVE)) 00244 { 00245 gui.publicActionCreateBackendExecute(); 00246 } 00247 else if (action.equals(GuiCommands.COMMAND_CREATE_BACKEND_CANCEL)) 00248 { 00249 gui.newBackendFrame.setVisible(false); 00250 } 00251 else if (action.equals(GuiCommands.COMMAND_HIDE_CHECKPOINT_FRAME)) 00252 { 00253 gui.selectCheckpointFrame.hide(); 00254 } 00255 else if (action.equals(GuiCommands.COMMAND_HIDE_SHUTDOWN_FRAME)) 00256 { 00257 gui.selectShutdownFrame.hide(); 00258 } 00259 }

void org.objectweb.cjdbc.console.gui.CjdbcGuiListener.handleNotification String  type,
JmxNotification  notification
[private]
 

CjdbcGuiListener.java91 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.CjdbcGui.actionLoadBackend(), org.objectweb.cjdbc.console.gui.CjdbcGui.actionSetBackendState(), org.objectweb.cjdbc.common.jmx.notifications.JmxNotification.getControllerJmxName(), org.objectweb.cjdbc.common.jmx.notifications.JmxNotification.getDataValue(), org.objectweb.cjdbc.console.gui.CjdbcGuiListener.gui, org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadDumpList(), と org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionRemoveBackendFromGui().

00092 { 00093 if(type.equals(CjdbcNotificationList.VIRTUALDATABASE_BACKEND_ADDED)) 00094 { 00095 String backendName = notification.getDataValue(CjdbcNotificationList.DATA_NAME); 00096 String databaseName = notification.getDataValue(CjdbcNotificationList.DATA_DATABASE); 00097 String controller = notification.getControllerJmxName(); 00098 gui.actionLoadBackend(databaseName,backendName,controller,true); 00099 } 00100 else if(type.equals(CjdbcNotificationList.VIRTUALDATABASE_BACKEND_ENABLED)) 00101 { 00102 String backendName = notification.getDataValue(CjdbcNotificationList.DATA_NAME); 00103 gui.actionSetBackendState(backendName); 00104 } 00105 else if(type.equals(CjdbcNotificationList.VIRTUALDATABASE_BACKEND_DISABLED)) 00106 { 00107 String backendName = notification.getDataValue(CjdbcNotificationList.DATA_NAME); 00108 gui.actionSetBackendState(backendName); 00109 } 00110 else if(type.equals(CjdbcNotificationList.VIRTUALDATABASE_BACKEND_RECOVERING)) 00111 { 00112 String backendName = notification.getDataValue(CjdbcNotificationList.DATA_NAME); 00113 gui.actionSetBackendState(backendName); 00114 } 00115 else if(type.equals(CjdbcNotificationList.VIRTUALDATABASE_BACKEND_BACKINGUP)) 00116 { 00117 String backendName = notification.getDataValue(CjdbcNotificationList.DATA_NAME); 00118 gui.actionSetBackendState(backendName); 00119 } 00120 else if(type.equals(CjdbcNotificationList.VIRTUALDATABASE_BACKEND_DISABLING)) 00121 { 00122 String backendName = notification.getDataValue(CjdbcNotificationList.DATA_NAME); 00123 gui.actionSetBackendState(backendName); 00124 } 00125 else if(type.equals(CjdbcNotificationList.CONTROLLER_VIRTUALDATABASE_NEW_DUMP_LIST)) 00126 { 00127 String controller = notification.getControllerJmxName(); 00128 gui.publicActionLoadDumpList(controller); 00129 } 00130 else if(type.equals(CjdbcNotificationList.VIRTUALDATABASE_BACKEND_REMOVED)) 00131 { 00132 String backendName = notification.getDataValue(CjdbcNotificationList.DATA_NAME); 00133 String controller = notification.getControllerJmxName(); 00134 gui.publicActionRemoveBackendFromGui(backendName,controller); 00135 } 00136 00137 }

void org.objectweb.cjdbc.console.gui.CjdbcGuiListener.handleNotification Notification  notification,
Object  handback
 

Handle jmx notifications

引数:
notification the jmx notification from javax.managerment
handback not used
CjdbcGuiListener.java68 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.CjdbcGui.appendDebugText(), org.objectweb.cjdbc.common.jmx.notifications.JmxNotification.getType(), org.objectweb.cjdbc.console.gui.CjdbcGuiListener.gui, と org.objectweb.cjdbc.common.jmx.notifications.JmxNotification.toString().

00069 { 00070 String xml = (String)notification.getUserData(); 00071 // If the content of the notification is null, just debug it 00072 if(xml==null) 00073 { 00074 gui.appendDebugText("Got notification with null string"); 00075 return; 00076 } 00077 try 00078 { 00079 JmxNotification notif = JmxNotification.createNotificationFromXmlString(xml); 00080 gui.appendDebugText("----- Jmx Notification -------"); 00081 gui.appendDebugText(notif.toString()); 00082 gui.appendDebugText("-----------------------------------"); 00083 handleNotification(notif.getType(),notif); 00084 } 00085 catch (Exception e) 00086 { 00087 gui.appendDebugText("Exception while handling notification",e); 00088 } 00089 }

void org.objectweb.cjdbc.console.gui.CjdbcGuiListener.mouseClicked MouseEvent  e  ) 
 

参照:
java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
CjdbcGuiListener.java142 行で定義されています。
00143 { 00144 00145 00146 }

void org.objectweb.cjdbc.console.gui.CjdbcGuiListener.mouseEntered MouseEvent  e  ) 
 

参照:
java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
CjdbcGuiListener.java169 行で定義されています。
00170 { 00171 00172 }

void org.objectweb.cjdbc.console.gui.CjdbcGuiListener.mouseExited MouseEvent  e  ) 
 

参照:
java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent)
CjdbcGuiListener.java177 行で定義されています。
00178 { 00179 00180 00181 }

void org.objectweb.cjdbc.console.gui.CjdbcGuiListener.mousePressed MouseEvent  e  ) 
 

参照:
java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
CjdbcGuiListener.java151 行で定義されています。
00152 { 00153 00154 00155 }

void org.objectweb.cjdbc.console.gui.CjdbcGuiListener.mouseReleased MouseEvent  e  ) 
 

参照:
java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
CjdbcGuiListener.java160 行で定義されています。
00161 { 00162 00163 00164 }


変数

CjdbcGui org.objectweb.cjdbc.console.gui.CjdbcGuiListener.gui [private]
 

CjdbcGuiListener.java49 行で定義されています。

参照元 org.objectweb.cjdbc.console.gui.CjdbcGuiListener.actionPerformed(), と org.objectweb.cjdbc.console.gui.CjdbcGuiListener.handleNotification().


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:20 2004に生成されました。 doxygen 1.3.8