summaryrefslogtreecommitdiff
path: root/source/com/c2kernel/gui/LoginBox.java
diff options
context:
space:
mode:
authorabranson <andrew.branson@cern.ch>2011-08-04 00:42:34 +0200
committerabranson <andrew.branson@cern.ch>2011-08-04 00:42:34 +0200
commit0ec8481c10cd8277d84c7c1a785483a0a739e5a0 (patch)
tree5f6e5d9ae75193e67e6f3b3dfa488960c5cde1d5 /source/com/c2kernel/gui/LoginBox.java
parent036cbdba66f804743c4c838ed598d6972c4b3e17 (diff)
More code cleanup:
Refactored Entity Proxy Subscription to handle generics better Rewrote RemoteMap to use TreeMap instead of the internal array for order. It now sorts its keys by number if they parse, else as strings. Removed a no-longer-in-progress outcome form class
Diffstat (limited to 'source/com/c2kernel/gui/LoginBox.java')
-rw-r--r--[-rwxr-xr-x]source/com/c2kernel/gui/LoginBox.java31
1 files changed, 23 insertions, 8 deletions
diff --git a/source/com/c2kernel/gui/LoginBox.java b/source/com/c2kernel/gui/LoginBox.java
index f813cef..415469b 100755..100644
--- a/source/com/c2kernel/gui/LoginBox.java
+++ b/source/com/c2kernel/gui/LoginBox.java
@@ -8,11 +8,23 @@ package com.c2kernel.gui;
* @author not attributable
* @version 1.0
*/
-import java.awt.*;
+import java.awt.Dimension;
+import java.awt.Frame;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
-import javax.swing.*;
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JPasswordField;
+import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
import com.c2kernel.common.InvalidDataException;
@@ -150,7 +162,7 @@ public class LoginBox extends JFrame {
OK.setText(Language.translate("OK"));
OK.addActionListener(new Frame2_OK_actionAdapter(this));
OK.setPreferredSize(new Dimension(80,30));
-
+
Cancel.setActionCommand("Cancel");
Cancel.setText(Language.translate("Cancel"));
Cancel.addActionListener(new Frame2_Cancel_actionAdapter(this));
@@ -183,7 +195,7 @@ public class LoginBox extends JFrame {
c.weightx=0;
c.weighty=1;
getContentPane().add(passwordLabel,c);
-
+
initBasicConstraints(c,3,1,1,1);
c.anchor=GridBagConstraints.SOUTH;
c.fill = GridBagConstraints.HORIZONTAL;
@@ -225,7 +237,7 @@ public class LoginBox extends JFrame {
msgPane.add(errorLabel);
msgPane.add(Box.createGlue());
getContentPane().add(msgPane,c);
-
+
((JPanel)getContentPane()).setBorder(new EmptyBorder(0,0,0,5));
pack();
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
@@ -284,7 +296,8 @@ class Frame2_Cancel_actionAdapter implements java.awt.event.ActionListener {
Frame2_Cancel_actionAdapter(LoginBox adaptee) {
this.adaptee = adaptee;
}
- public void actionPerformed(ActionEvent e) {
+ @Override
+public void actionPerformed(ActionEvent e) {
adaptee.Cancel_actionPerformed(e);
}
}
@@ -295,7 +308,8 @@ class Frame2_OK_actionAdapter implements java.awt.event.ActionListener {
Frame2_OK_actionAdapter(LoginBox adaptee) {
this.adaptee = adaptee;
}
- public void actionPerformed(ActionEvent e) {
+ @Override
+public void actionPerformed(ActionEvent e) {
adaptee.OK_actionPerformed(e);
}
}
@@ -306,7 +320,8 @@ class LoginBox_this_keyAdapter extends java.awt.event.KeyAdapter {
LoginBox_this_keyAdapter(LoginBox adaptee) {
this.adaptee = adaptee;
}
- public void keyPressed(KeyEvent e) {
+ @Override
+public void keyPressed(KeyEvent e) {
adaptee.this_keyPressed(e);
}
} \ No newline at end of file