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

org.objectweb.cjdbc.console.gui.frames.jmxdesktop.SetSubjectDialog Class Reference

Collaboration diagram for org.objectweb.cjdbc.console.gui.frames.jmxdesktop.SetSubjectDialog:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SetSubjectDialog (CjdbcGui gui)
void actionPerformed (ActionEvent e)

Detailed Description

This class defines a SetSubjectDialog

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 48 of file SetSubjectDialog.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.gui.frames.jmxdesktop.SetSubjectDialog.SetSubjectDialog CjdbcGui  gui  ) 
 

Creates a new SetSubjectDialog object

Exceptions:
java.awt.HeadlessException 

Definition at line 60 of file SetSubjectDialog.java.

00061   {
00062     super(gui, "Set Subject", true);
00063     GuiConstants.centerComponent(this, 300, 100);
00064 
00065     this.getContentPane().setLayout(new BorderLayout());
00066     this.getContentPane().setLayout(new GridLayout(3, 2));
00067 
00068     user = new JTextField("");
00069     JLabel userLabel = new JLabel("User");
00070     this.getContentPane().add(userLabel);
00071     this.getContentPane().add(user);
00072 
00073     password = new JTextField("");
00074     JLabel passwordLabel = new JLabel("Password");
00075     this.getContentPane().add(passwordLabel);
00076     this.getContentPane().add(password);
00077 
00078     JButton ok = new JButton(GuiTranslate
00079         .get("frame.ok"));
00080     ok.setActionCommand(GuiCommands.COMMAND_CONFIRM_ACTION);
00081     ok.addActionListener(this);
00082     this.getContentPane().add(ok);
00083 
00084     JButton cancel = new JButton(GuiTranslate
00085         .get("frame.cancel"));
00086     cancel.setActionCommand(GuiCommands.COMMAND_CANCEL_ACTION);
00087     cancel.addActionListener(this);
00088     this.getContentPane().add(cancel);
00089 
00090     this.validate();
00091     this.gui = gui;
00092     this.setVisible(true);
00093 
00094   }


Member Function Documentation

void org.objectweb.cjdbc.console.gui.frames.jmxdesktop.SetSubjectDialog.actionPerformed ActionEvent  e  ) 
 

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

Definition at line 99 of file SetSubjectDialog.java.

References org.objectweb.cjdbc.console.gui.CjdbcGui.getCurrentJmxClient(), and org.objectweb.cjdbc.console.jmx.RmiJmxClient.setCurrentSubject().

00100   {
00101     if (e.getActionCommand().equalsIgnoreCase(
00102         GuiCommands.COMMAND_CONFIRM_ACTION))
00103     {
00104       gui.getCurrentJmxClient().setCurrentSubject(user.getText(),
00105           password.getText());
00106       this.setVisible(false);
00107     }
00108     else if (e.getActionCommand().equalsIgnoreCase(
00109         GuiCommands.COMMAND_CANCEL_ACTION))
00110     {
00111       this.setVisible(false);
00112     }
00113   }


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