From 6b6380c90455064894e62be9bb5731be0cc49f19 Mon Sep 17 00:00:00 2001 From: yukihane Date: Sat, 17 Sep 2011 21:41:35 +0900 Subject: [PATCH] =?utf8?q?login=E6=83=85=E5=A0=B1=E3=82=92=E4=BD=BF?= =?utf8?q?=E7=94=A8=E3=81=99=E3=82=8B=E3=81=8Bcookie=E3=82=92=E4=BD=BF?= =?utf8?q?=E7=94=A8=E3=81=99=E3=82=8B=E3=81=8B=E3=81=AE=E9=81=B8=E6=8A=9E?= =?utf8?q?=E8=82=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../src/yukihane/inqubus/gui/ConfigDialog.java | 34 +++++++++++++--------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/frontend/src/yukihane/inqubus/gui/ConfigDialog.java b/frontend/src/yukihane/inqubus/gui/ConfigDialog.java index aeae92e..13bef37 100644 --- a/frontend/src/yukihane/inqubus/gui/ConfigDialog.java +++ b/frontend/src/yukihane/inqubus/gui/ConfigDialog.java @@ -59,10 +59,8 @@ public class ConfigDialog extends JDialog { final JTabbedPane tabbedPane = new JTabbedPane(); final JPanel pnlNetwork = new JPanel(); final JPanel pnlAccount = new JPanel(); - final JLabel lblMail = new JLabel(); fldMail = new JTextField(); fldPassword.setEchoChar('*'); - final JLabel lblPassword = new JLabel(); final JPanel pnlProxy = new JPanel(); cbProxyUse = new JCheckBox(); final JLabel lblProxyHost = new JLabel(); @@ -106,29 +104,35 @@ public class ConfigDialog extends JDialog { pnlAccount.setBorder(BorderFactory.createTitledBorder("アカウント")); - lblMail.setText("ID(メールアドレス)"); - - lblPassword.setText("パスワード"); + final JRadioButton btnAccount = new JRadioButton("次の情報を使用してログインする"); + final JLabel lblMail = new JLabel("ID(メールアドレス)"); + final JLabel lblPassword = new JLabel("パスワード"); GroupLayout gl_pnlAccount = new GroupLayout(pnlAccount); pnlAccount.setLayout(gl_pnlAccount); - gl_pnlAccount.setHorizontalGroup( - gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING) + gl_pnlAccount.setHorizontalGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(btnAccount) .addGroup(gl_pnlAccount.createSequentialGroup() .addContainerGap() + .addGap(10) .addGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(lblMail) - .addComponent(lblPassword)) + .addComponent(lblPassword) + ) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(fldPassword, GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE) - .addComponent(fldMail, GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE)) - .addContainerGap()) + .addComponent(fldMail, GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE) + ) + .addContainerGap() + ) ); gl_pnlAccount.setVerticalGroup( gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(gl_pnlAccount.createSequentialGroup() .addContainerGap() + .addComponent(btnAccount) + .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(lblMail) .addComponent(fldMail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) @@ -140,7 +144,7 @@ public class ConfigDialog extends JDialog { ); - final JCheckBox cbxCookie = new JCheckBox("ブラウザのログイン情報を使用してアクセスする"); + final JRadioButton btnLoginCookie = new JRadioButton("ブラウザのログイン情報を使用してアクセスする"); final JRadioButton btnCookieIe = new JRadioButton("IE(7以降) (Windows)"); final JRadioButton btnCookieFirefox = new JRadioButton("Firefox(4以降) (Windows)"); final JRadioButton btnCookieChrome = new JRadioButton("Google Chrome (Windows)"); @@ -151,6 +155,10 @@ public class ConfigDialog extends JDialog { final JButton btnCookie = new JButton("..."); btnCookie.addActionListener(new FileChooseActionListener(this, JFileChooser.DIRECTORIES_ONLY, fldCookie)); + final ButtonGroup grpLoginType = new ButtonGroup(); + grpLoginType.add(btnAccount); + grpLoginType.add(btnLoginCookie); + final ButtonGroup grpCookie = new ButtonGroup(); grpCookie.add(btnCookieIe); grpCookie.add(btnCookieFirefox); @@ -167,7 +175,7 @@ public class ConfigDialog extends JDialog { glCookie.setAutoCreateGaps(true); glCookie.setHorizontalGroup(glCookie.createParallelGroup() - .addComponent(cbxCookie) + .addComponent(btnLoginCookie) .addGroup(glCookie.createSequentialGroup() .addGap(10) .addGroup(glCookie.createParallelGroup() @@ -186,7 +194,7 @@ public class ConfigDialog extends JDialog { ); glCookie.setVerticalGroup(glCookie.createSequentialGroup() - .addComponent(cbxCookie) + .addComponent(btnLoginCookie) .addComponent(btnCookieIe) .addComponent(btnCookieFirefox) .addComponent(btnCookieChrome) -- 2.11.0