desktop/desktop-sample/src/main/java/cz/xelfi/quoridor/desktop/sample/LoginPanel.java
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/desktop/desktop-sample/src/main/java/cz/xelfi/quoridor/desktop/sample/LoginPanel.java Tue Sep 14 08:30:37 2010 +0200
1.3 @@ -0,0 +1,86 @@
1.4 +/*
1.5 + * To change this template, choose Tools | Templates
1.6 + * and open the template in the editor.
1.7 + */
1.8 +
1.9 +package cz.xelfi.quoridor.desktop.sample;
1.10 +
1.11 +/**
1.12 + *
1.13 + * @author Jaroslav Tulach
1.14 + */
1.15 +class LoginPanel extends javax.swing.JPanel {
1.16 +
1.17 + /** Creates new form LoginPanel */
1.18 + public LoginPanel() {
1.19 + initComponents();
1.20 + }
1.21 +
1.22 + /** This method is called from within the constructor to
1.23 + * initialize the form.
1.24 + * WARNING: Do NOT modify this code. The content of this method is
1.25 + * always regenerated by the Form Editor.
1.26 + */
1.27 + @SuppressWarnings("unchecked")
1.28 + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
1.29 + private void initComponents() {
1.30 +
1.31 + loginLabel = new javax.swing.JLabel();
1.32 + login = new javax.swing.JTextField();
1.33 + passwordLabel = new javax.swing.JLabel();
1.34 + password = new javax.swing.JPasswordField();
1.35 +
1.36 + loginLabel.setText(org.openide.util.NbBundle.getMessage(LoginPanel.class, "LoginPanel.loginLabel.text")); // NOI18N
1.37 +
1.38 + login.setText(org.openide.util.NbBundle.getMessage(LoginPanel.class, "LoginPanel.login.text")); // NOI18N
1.39 +
1.40 + passwordLabel.setText(org.openide.util.NbBundle.getMessage(LoginPanel.class, "LoginPanel.passwordLabel.text")); // NOI18N
1.41 +
1.42 + password.setText(org.openide.util.NbBundle.getMessage(LoginPanel.class, "LoginPanel.password.text")); // NOI18N
1.43 +
1.44 + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
1.45 + this.setLayout(layout);
1.46 + layout.setHorizontalGroup(
1.47 + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1.48 + .addGroup(layout.createSequentialGroup()
1.49 + .addContainerGap()
1.50 + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1.51 + .addComponent(loginLabel)
1.52 + .addComponent(passwordLabel))
1.53 + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1.54 + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1.55 + .addComponent(password, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
1.56 + .addComponent(login, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE))
1.57 + .addContainerGap())
1.58 + );
1.59 + layout.setVerticalGroup(
1.60 + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1.61 + .addGroup(layout.createSequentialGroup()
1.62 + .addContainerGap()
1.63 + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1.64 + .addComponent(loginLabel)
1.65 + .addComponent(login, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1.66 + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
1.67 + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1.68 + .addComponent(passwordLabel)
1.69 + .addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1.70 + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1.71 + );
1.72 + }// </editor-fold>//GEN-END:initComponents
1.73 +
1.74 +
1.75 + // Variables declaration - do not modify//GEN-BEGIN:variables
1.76 + private javax.swing.JTextField login;
1.77 + private javax.swing.JLabel loginLabel;
1.78 + private javax.swing.JPasswordField password;
1.79 + private javax.swing.JLabel passwordLabel;
1.80 + // End of variables declaration//GEN-END:variables
1.81 +
1.82 + public String getLogin() {
1.83 + return login.getText();
1.84 + }
1.85 +
1.86 + public String getPassword() {
1.87 + return new String(password.getPassword());
1.88 + }
1.89 +}