Public Member Functions | |
SetSubjectDialog (CjdbcGui gui) | |
void | actionPerformed (ActionEvent e) |
Definition at line 48 of file SetSubjectDialog.java.
|
Creates a new
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 }
|
|
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 }
|