Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu Class Reference

Inheritance diagram for org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BackendPopUpMenu (CjdbcGui gui, BackendObject bo)
final JMenuItem getBackendCheckpoint ()
final JMenuItem getBackendCreate ()
final JMenuItem getBackendRemove ()
void actionPerformed (ActionEvent e)
final JMenuItem getBackendBackup ()
final JMenuItem getBackendDisable ()
final JMenuItem getBackendEnable ()
final JMenuItem getBackendRestore ()

Package Attributes

JMenuItem backendRemove
JMenuItem backendCreate
JMenuItem backendCheckpoint
JMenuItem backendUnsetCheckpoint
JMenuItem backendEnable
JMenuItem backendDisable
JMenuItem backendRestore
JMenuItem backendBackup
JMenuItem backendTestConnection
JMenu monitor

Detailed Description

This class defines a BackendPopUpMenu

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 49 of file BackendPopUpMenu.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu.BackendPopUpMenu CjdbcGui  gui,
BackendObject  bo
 

Creates a new BackendPopUpMenu object

Parameters:
gui the referenced gui
bo the backend object

Definition at line 72 of file BackendPopUpMenu.java.

00073   {
00074     super(gui);
00075     this.bo = bo;
00076 
00077     JSeparator separator = new JSeparator();
00078 
00079     backendRemove = new JMenuItem(GuiCommands.COMMAND_BACKEND_REMOVE);
00080     backendCreate = new JMenuItem(GuiCommands.COMMAND_BACKEND_CREATE_NEW);
00081     backendCheckpoint = new JMenuItem(
00082         GuiCommands.COMMAND_BACKEND_SET_CHECKPOINT);
00083     backendEnable = new JMenuItem(GuiConstants.BACKEND_STATE_ENABLED);
00084     backendDisable = new JMenuItem(GuiConstants.BACKEND_STATE_DISABLED);
00085     backendRestore = new JMenuItem(GuiConstants.BACKEND_STATE_RESTORE);
00086     backendBackup = new JMenuItem(GuiConstants.BACKEND_STATE_BACKUP);
00087     backendTestConnection = new JMenuItem(
00088         GuiCommands.COMMAND_BACKEND_TEST_CONNECTION);
00089     backendUnsetCheckpoint = new JMenuItem(
00090         GuiCommands.COMMAND_BACKEND_UNSET_CHECKPOINT);
00091 
00092     this.add(backendRemove).addActionListener(this);
00093     this.add(backendCreate).addActionListener(this);
00094     this.add(backendCheckpoint).addActionListener(this);
00095     this.add(backendUnsetCheckpoint).addActionListener(this);
00096     this.add(backendTestConnection).addActionListener(this);
00097     this.add(separator);
00098     this.add(backendEnable).addActionListener(this);
00099     this.add(backendDisable).addActionListener(this);
00100     this.add(backendRestore).addActionListener(this);
00101     this.add(backendBackup).addActionListener(this);
00102     this.add(separator);
00103 
00104     buildMonitorMenu();
00105   }


Member Function Documentation

void org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu.actionPerformed ActionEvent  e  )  [virtual]
 

See also:
java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)

Implements org.objectweb.cjdbc.console.gui.popups.AbstractPopUpMenu.

Definition at line 163 of file BackendPopUpMenu.java.

References org.objectweb.cjdbc.console.jmx.RmiJmxClient.getDataCollectorProxy(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionExecuteBackendDrop(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionNewBackendPrompt(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionRemoveBackend(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionSetCheckpoint(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionTestBackendConnection(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionUnSetCheckpoint().

00164   {
00165     String action = e.getActionCommand();
00166     if (action.startsWith("graph"))
00167     {
00168       RmiJmxClient controllerMBean = bo.getJmxClient();
00169       DataCollectorMBean dataCollectorMBean;
00170       try
00171       {
00172         dataCollectorMBean = controllerMBean.getDataCollectorProxy();
00173         MonitoringConsole.graph(action, dataCollectorMBean, -1, 3600, 1000, 1,
00174             null);
00175         return;
00176       }
00177       catch (Exception e1)
00178       {
00179         e1.printStackTrace();
00180         return;
00181       }
00182     }
00183 
00184     if (action.equals(GuiCommands.COMMAND_BACKEND_REMOVE))
00185     {
00186       gui.publicActionRemoveBackend(bo);
00187     }
00188     else if (action.equals(GuiCommands.COMMAND_BACKEND_CREATE_NEW))
00189     {
00190       gui.publicActionNewBackendPrompt(bo);
00191     }
00192     else if (action.equals(GuiCommands.COMMAND_BACKEND_SET_CHECKPOINT))
00193     {
00194       gui.publicActionSetCheckpoint(bo);
00195     }
00196     else if (action.equals(GuiCommands.COMMAND_BACKEND_TEST_CONNECTION))
00197     {
00198       gui.publicActionTestBackendConnection(bo);
00199     }
00200     else if (action.equals(GuiCommands.COMMAND_BACKEND_UNSET_CHECKPOINT))
00201     {
00202       gui.publicActionUnSetCheckpoint(bo);
00203     }
00204     else
00205     {
00206       gui.publicActionExecuteBackendDrop(action, bo.getName());
00207     }
00208 
00209   }

final JMenuItem org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu.getBackendBackup  ) 
 

Returns the backendBackup value.

Returns:
Returns the backendBackup.

Definition at line 216 of file BackendPopUpMenu.java.

00217   {
00218     return backendBackup;
00219   }

final JMenuItem org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu.getBackendCheckpoint  ) 
 

Returns the backendCheckpoint value.

Returns:
Returns the backendCheckpoint.

Definition at line 135 of file BackendPopUpMenu.java.

00136   {
00137     return backendCheckpoint;
00138   }

final JMenuItem org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu.getBackendCreate  ) 
 

Returns the backendCreate value.

Returns:
Returns the backendCreate.

Definition at line 145 of file BackendPopUpMenu.java.

00146   {
00147     return backendCreate;
00148   }

final JMenuItem org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu.getBackendDisable  ) 
 

Returns the backendDisable value.

Returns:
Returns the backendDisable.

Definition at line 226 of file BackendPopUpMenu.java.

00227   {
00228     return backendDisable;
00229   }

final JMenuItem org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu.getBackendEnable  ) 
 

Returns the backendEnable value.

Returns:
Returns the backendEnable.

Definition at line 236 of file BackendPopUpMenu.java.

00237   {
00238     return backendEnable;
00239   }

final JMenuItem org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu.getBackendRemove  ) 
 

Returns the backendRemove value.

Returns:
Returns the backendRemove.

Definition at line 155 of file BackendPopUpMenu.java.

00156   {
00157     return backendRemove;
00158   }

final JMenuItem org.objectweb.cjdbc.console.gui.popups.BackendPopUpMenu.getBackendRestore  ) 
 

Returns the backendRestore value.

Returns:
Returns the backendRestore.

Definition at line 246 of file BackendPopUpMenu.java.

00247   {
00248     return backendRestore;
00249   }


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:02:33 2005 for C-JDBC by  doxygen 1.3.9.1