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

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

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

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DatabasePopUpMenu (CjdbcGui gui, DatabaseObject database)
DatabaseObject getDatabaseName ()
void actionPerformed (ActionEvent e)

Detailed Description

This class defines a DatabasePopUpMenu

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 41 of file DatabasePopUpMenu.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.gui.popups.DatabasePopUpMenu.DatabasePopUpMenu CjdbcGui  gui,
DatabaseObject  database
 

Creates a new DatabasePopUpMenu.java object

Parameters:
gui link to the main gui
database referenced db

Definition at line 52 of file DatabasePopUpMenu.java.

00053   {
00054     super(gui);
00055     this.database = database;
00056     this.databaseName = database.getName();
00057     this.add(new JMenuItem(GuiCommands.COMMAND_DISPLAY_XML_DATABASE))
00058         .addActionListener(this);
00059     this.add(new JMenuItem(GuiCommands.COMMAND_ENABLE_ALL)).addActionListener(
00060         this);
00061     this.add(new JMenuItem(GuiCommands.COMMAND_DISABLE_ALL)).addActionListener(
00062         this);
00063     this.add(new JMenuItem(GuiCommands.COMMAND_SHUTDOWN_DATABASE))
00064         .addActionListener(this);
00065     this.add(new JMenuItem(GuiCommands.COMMAND_VIEW_SQL_STATS))
00066         .addActionListener(this);
00067     this.add(new JMenuItem(GuiCommands.COMMAND_VIEW_CACHE_CONTENT))
00068         .addActionListener(this);
00069     this.add(new JMenuItem(GuiCommands.COMMAND_VIEW_RECOVERY_LOG))
00070         .addActionListener(this);
00071     this.add(new JMenuItem(GuiCommands.COMMAND_MONITOR_DATABASE))
00072         .addActionListener(this);
00073   }


Member Function Documentation

void org.objectweb.cjdbc.console.gui.popups.DatabasePopUpMenu.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 88 of file DatabasePopUpMenu.java.

References org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionDatabaseDisableAll(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionDatabaseEnableAll(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionDisplayShutdownFrame(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadXmlDatabase(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionStartMonitor(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionViewCache(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionViewCacheStats(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionViewRecoveryLog(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionViewSQLStats().

00089   {
00090     String action = e.getActionCommand();
00091 
00092     if (action.equals(GuiCommands.COMMAND_ENABLE_ALL))
00093     {
00094       gui.publicActionDatabaseEnableAll(databaseName);
00095     }
00096     else if (action.equals(GuiCommands.COMMAND_DISABLE_ALL))
00097     {
00098       gui.publicActionDatabaseDisableAll(databaseName);
00099     }
00100     else if (action.equals(GuiCommands.COMMAND_SHUTDOWN_DATABASE))
00101     {
00102       gui.publicActionDisplayShutdownFrame(database);
00103     }
00104     else if (action.equals(GuiCommands.COMMAND_DISPLAY_XML_DATABASE))
00105     {
00106       gui.publicActionLoadXmlDatabase(databaseName);
00107     }
00108     else if (action.equals(GuiCommands.COMMAND_VIEW_CACHE_CONTENT))
00109     {
00110       gui.publicActionViewCache(databaseName);
00111     }
00112     else if (action.equals(GuiCommands.COMMAND_VIEW_SQL_STATS))
00113     {
00114       gui.publicActionViewSQLStats(databaseName);
00115     }
00116     else if (action.equals(GuiCommands.COMMAND_VIEW_CACHE_STATS))
00117     {
00118       gui.publicActionViewCacheStats(databaseName);
00119     }
00120     else if (action.equals(GuiCommands.COMMAND_VIEW_RECOVERY_LOG))
00121     {
00122       gui.publicActionViewRecoveryLog(databaseName);
00123     }
00124     else if (action.equals(GuiCommands.COMMAND_MONITOR_DATABASE))
00125     {
00126       gui.publicActionStartMonitor(database.getControllerName(), false, true,
00127           false);
00128     }
00129   }

DatabaseObject org.objectweb.cjdbc.console.gui.popups.DatabasePopUpMenu.getDatabaseName  ) 
 

Returns the database value.

Returns:
Returns the database.

Definition at line 80 of file DatabasePopUpMenu.java.

00081   {
00082     return database;
00083   }


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