jaroslav@268
|
1 |
/**
|
jaroslav@268
|
2 |
* Quoridor server and related libraries
|
jaroslav@268
|
3 |
* Copyright (C) 2009-2010 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
|
jaroslav@268
|
4 |
*
|
jaroslav@268
|
5 |
* This program is free software: you can redistribute it and/or modify
|
jaroslav@268
|
6 |
* it under the terms of the GNU General Public License as published by
|
jaroslav@268
|
7 |
* the Free Software Foundation, either version 3 of the License.
|
jaroslav@268
|
8 |
*
|
jaroslav@268
|
9 |
* This program is distributed in the hope that it will be useful,
|
jaroslav@268
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
jaroslav@268
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
jaroslav@268
|
12 |
* GNU General Public License for more details.
|
jaroslav@268
|
13 |
*
|
jaroslav@268
|
14 |
* You should have received a copy of the GNU General Public License
|
jaroslav@268
|
15 |
* along with this program. Look for COPYING file in the top folder.
|
jaroslav@268
|
16 |
* If not, see http://www.gnu.org/licenses/.
|
jaroslav@263
|
17 |
*/
|
jaroslav@263
|
18 |
|
jaroslav@263
|
19 |
package cz.xelfi.quoridor.desktop.sample;
|
jaroslav@263
|
20 |
|
jaroslav@263
|
21 |
/**
|
jaroslav@263
|
22 |
*
|
jaroslav@263
|
23 |
* @author Jaroslav Tulach
|
jaroslav@263
|
24 |
*/
|
jaroslav@263
|
25 |
class LoginPanel extends javax.swing.JPanel {
|
jaroslav@263
|
26 |
|
jaroslav@263
|
27 |
/** Creates new form LoginPanel */
|
jaroslav@263
|
28 |
public LoginPanel() {
|
jaroslav@263
|
29 |
initComponents();
|
jaroslav@263
|
30 |
}
|
jaroslav@263
|
31 |
|
jaroslav@263
|
32 |
/** This method is called from within the constructor to
|
jaroslav@263
|
33 |
* initialize the form.
|
jaroslav@263
|
34 |
* WARNING: Do NOT modify this code. The content of this method is
|
jaroslav@263
|
35 |
* always regenerated by the Form Editor.
|
jaroslav@263
|
36 |
*/
|
jaroslav@263
|
37 |
@SuppressWarnings("unchecked")
|
jaroslav@263
|
38 |
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
jaroslav@263
|
39 |
private void initComponents() {
|
jaroslav@263
|
40 |
|
jaroslav@263
|
41 |
loginLabel = new javax.swing.JLabel();
|
jaroslav@263
|
42 |
login = new javax.swing.JTextField();
|
jaroslav@263
|
43 |
passwordLabel = new javax.swing.JLabel();
|
jaroslav@263
|
44 |
password = new javax.swing.JPasswordField();
|
jaroslav@263
|
45 |
|
jaroslav@263
|
46 |
loginLabel.setText(org.openide.util.NbBundle.getMessage(LoginPanel.class, "LoginPanel.loginLabel.text")); // NOI18N
|
jaroslav@263
|
47 |
|
jaroslav@263
|
48 |
login.setText(org.openide.util.NbBundle.getMessage(LoginPanel.class, "LoginPanel.login.text")); // NOI18N
|
jaroslav@263
|
49 |
|
jaroslav@263
|
50 |
passwordLabel.setText(org.openide.util.NbBundle.getMessage(LoginPanel.class, "LoginPanel.passwordLabel.text")); // NOI18N
|
jaroslav@263
|
51 |
|
jaroslav@263
|
52 |
password.setText(org.openide.util.NbBundle.getMessage(LoginPanel.class, "LoginPanel.password.text")); // NOI18N
|
jaroslav@263
|
53 |
|
jaroslav@263
|
54 |
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
jaroslav@263
|
55 |
this.setLayout(layout);
|
jaroslav@263
|
56 |
layout.setHorizontalGroup(
|
jaroslav@263
|
57 |
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
jaroslav@263
|
58 |
.addGroup(layout.createSequentialGroup()
|
jaroslav@263
|
59 |
.addContainerGap()
|
jaroslav@263
|
60 |
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
jaroslav@263
|
61 |
.addComponent(loginLabel)
|
jaroslav@263
|
62 |
.addComponent(passwordLabel))
|
jaroslav@263
|
63 |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
jaroslav@263
|
64 |
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
jaroslav@263
|
65 |
.addComponent(password, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE)
|
jaroslav@263
|
66 |
.addComponent(login, javax.swing.GroupLayout.DEFAULT_SIZE, 289, Short.MAX_VALUE))
|
jaroslav@263
|
67 |
.addContainerGap())
|
jaroslav@263
|
68 |
);
|
jaroslav@263
|
69 |
layout.setVerticalGroup(
|
jaroslav@263
|
70 |
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
jaroslav@263
|
71 |
.addGroup(layout.createSequentialGroup()
|
jaroslav@263
|
72 |
.addContainerGap()
|
jaroslav@263
|
73 |
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
jaroslav@263
|
74 |
.addComponent(loginLabel)
|
jaroslav@263
|
75 |
.addComponent(login, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
jaroslav@263
|
76 |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
jaroslav@263
|
77 |
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
jaroslav@263
|
78 |
.addComponent(passwordLabel)
|
jaroslav@263
|
79 |
.addComponent(password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
jaroslav@263
|
80 |
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
jaroslav@263
|
81 |
);
|
jaroslav@263
|
82 |
}// </editor-fold>//GEN-END:initComponents
|
jaroslav@263
|
83 |
|
jaroslav@263
|
84 |
|
jaroslav@263
|
85 |
// Variables declaration - do not modify//GEN-BEGIN:variables
|
jaroslav@263
|
86 |
private javax.swing.JTextField login;
|
jaroslav@263
|
87 |
private javax.swing.JLabel loginLabel;
|
jaroslav@263
|
88 |
private javax.swing.JPasswordField password;
|
jaroslav@263
|
89 |
private javax.swing.JLabel passwordLabel;
|
jaroslav@263
|
90 |
// End of variables declaration//GEN-END:variables
|
jaroslav@263
|
91 |
|
jaroslav@263
|
92 |
public String getLogin() {
|
jaroslav@263
|
93 |
return login.getText();
|
jaroslav@263
|
94 |
}
|
jaroslav@263
|
95 |
|
jaroslav@263
|
96 |
public String getPassword() {
|
jaroslav@263
|
97 |
return new String(password.getPassword());
|
jaroslav@263
|
98 |
}
|
jaroslav@263
|
99 |
}
|