From ef671f022d8b48acfb63c59fddbb54e73d2883cd Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Sat, 16 Oct 2010 09:06:49 +0000 Subject: [PATCH] Introduced new icon for master password dialogs. Changed icon for authorization request with the new padlock icon. --- resources/images/images.properties | 2 +- resources/images/impl/gui/common/padlock.gif | Bin 3094 -> 0 bytes resources/images/impl/gui/common/padlock.png | Bin 0 -> 2826 bytes .../gui/utils/MasterPasswordInputDialog.java | 48 +++++++--- .../MasterPasswordChangeDialog.java | 83 +++++++++++------- 5 files changed, 88 insertions(+), 45 deletions(-) delete mode 100644 resources/images/impl/gui/common/padlock.gif create mode 100644 resources/images/impl/gui/common/padlock.png diff --git a/resources/images/images.properties b/resources/images/images.properties index de7584b23..a229135ca 100644 --- a/resources/images/images.properties +++ b/resources/images/images.properties @@ -68,7 +68,7 @@ service.gui.icons.MOVE_CONTACT=resources/images/impl/gui/common/moveContact.png service.gui.icons.ADD_CONTACT_DIALOG_ICON=resources/images/impl/gui/common/addContactDialogIcon.png service.gui.icons.RENAME_DIALOG_ICON=resources/images/impl/gui/common/renameDialogIcon.png service.gui.icons.BROWSER_ICON=resources/images/impl/gui/common/browser16x16.png -service.gui.icons.AUTHORIZATION_ICON=resources/images/impl/gui/common/padlock.gif +service.gui.icons.AUTHORIZATION_ICON=resources/images/impl/gui/common/padlock.png service.gui.icons.INCOMING_CALL=resources/images/impl/gui/common/incomingCall.png service.gui.icons.OUTGOING_CALL=resources/images/impl/gui/common/outgoingCall.png service.gui.icons.MISSED_CALL=resources/images/impl/gui/common/missedCall.png diff --git a/resources/images/impl/gui/common/padlock.gif b/resources/images/impl/gui/common/padlock.gif deleted file mode 100644 index adaabafe8394a57f7e29f4207efe38f864a1bdee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3094 zcmV+x4C(VnNk%w1VOIcG0Oo%H|F$XVP6PkMssHG=|CJp7q-OuDh5wmY|Cwa|j2O6C z4*!@r|Ics!+sXOj)Bl%8q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qmZQV#*#tIhyFG-1;{&^osBPWh8(d*z!Z za}%mg0>M*&321-1X>Ps;#bcqg}l|N7X^zV@Zh{phdW4|Cwc6Cfb` zi>uub$xeP4Ah3Ka+#w3^kH7rqPyhPcU;Z-4zy9}shyME?4mR)v6c7STPKYW zWB>w85CS2yshI+V%eAtJ6_=kY_hj`c+jt~d{J8)+FPyhe` diff --git a/resources/images/impl/gui/common/padlock.png b/resources/images/impl/gui/common/padlock.png new file mode 100644 index 0000000000000000000000000000000000000000..9c91c6d7f0eaa726c39b04c0f3069b7c89500b0b GIT binary patch literal 2826 zcmV+l3-$DgP)qQHvj+t8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H13WrHVK~#90-J4x(9Mu)af9KB3+PmwoP2$*zO-RZ|5*JF7LZNCa z)T)qxib_gQTUD))3aTnUP@$?XJoKS`;HB+LQ&a&`ABxg1R3s=+DnUyhK!lo>4+j!b z67t~?CwAh^e$U*~hgsXZ>-Fx=+D;&UX?Az+ojLcMv*(<9?zuCfs?@{uo{@ypw{fSl z_S##dqkEfl^ju{UYmz3p)?ge^1$6E^Bx6CTYA=85{BJ;QxepXApR<5w`L|Y|H@PP$ zs`|N%J$G!pbYkC&nwxqB_-AT#JX=prsi%PHJtKFyLpMGe+k8i#c*(j7`dB~%f~oiL zC&teD$6viSH9G!8?Il$TnBFt8+H?&*61)1VyPP$fFDS1ojbL(|!aGksp}Fbrr$)!m z%(l-dV0zC;zmwWD)^XiE!{Wv+8lx)-n>kJXwO=36QtpP-==danJKHJo)T6PHyN3~j z20jRg)Q=AzH>e6INM|3ht#@5sc;oShf!$EHfayIW-;8a!bFVvaU3iBm$VKFMC7^(Y zLKP1@jX&}4Z>2`Ze=k$N+S)6fz3<1b|3M0ILcxu_sJyNitN{g^IZ1x(u_@paF0jL0 zdreB!f?C8VT%z)av!@{O)tK&et898=hYM^s-NRsmve|2SF26)kjt9=_&DiwBb{FGb zZ<76BeJ~1k1*A7FCee>1)?yN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bFfVoL)dd4 zP(1WE?75@Z^aO}ty4PcRFDG{8PE7a0>Q5^$$+ZAz(M38NDWLka{$gkaVAChayzn6Y zu~(@|Mg+vMs1IX6V6>IXyGZ&KewN*9e+X+t0RwvN<$uN`7kB;c=mWJXM+NF6LapE2D!dI}Ao-Pt&>+^FzMG(9+ix*FpK5QgW-`>E z&NSG>1=@6x*ycO%F1r!`!@UHjo5E5&`W20%X zc|~X;fhdr~TD(p7<88V>YzT57CM>NjBO1w2+jl{N;G%Hqm(-Vx2thDfadX!J-l3e zFAKCVL*cEx07%?#KM$B)3p6|Y!w+H4zq9g^wTSFXKMS)>QJiF{DgTv-o(Ks*k<#0D z<4?S_vXV7{7SEG;;X#TAo(95ohQxx%iO@8V0??8J(qN;pa`4hgN(XmSI(RScWw+q; zk6^m$KPRxP2#WY;4iKDrll<7DVNC%rT_xOsy6;6*K}%Jeqth<%I`Cxxn|E;{R$ZQal}i6wfYr=ma^45(xSKnS-gR4OF4|qR|W6aU0{q^1?1ewnVvX`cUc-| zO%9t$qgfX%8J3hXHbMu0A~B03e4J#laRsObHdm#9u~`L#of!|CcQEnj`}rnO!X#RA zpNj>XbE_VX0LBdPJP@XL3Z=unbFU0tQb$>~ifY^p@VqI%L-#F)u*0D3MQZ!3x!LZ5%Ewxg~BAbgP;xE0u5KDJTL7(WJ>CQR_g%E$AS cFHBeB|MvB>0!)-Z`2YX_07*qoM6N<$g2a17bN~PV literal 0 HcmV?d00001 diff --git a/src/net/java/sip/communicator/impl/gui/utils/MasterPasswordInputDialog.java b/src/net/java/sip/communicator/impl/gui/utils/MasterPasswordInputDialog.java index 29d5a7ede..f5e886f34 100644 --- a/src/net/java/sip/communicator/impl/gui/utils/MasterPasswordInputDialog.java +++ b/src/net/java/sip/communicator/impl/gui/utils/MasterPasswordInputDialog.java @@ -49,9 +49,8 @@ public class MasterPasswordInputDialog private JButton cancelButton; private JTextArea infoTextArea; private JTextArea errorTextArea; - private JPanel textFieldsPanel; private JPanel buttonsPanel; - private JPanel mainPanel; + private JPanel dataPanel; /** * Builds the dialog. @@ -67,6 +66,12 @@ private MasterPasswordInputDialog() this.setModal(true); this.setResizable(false); + JPanel mainPanel = new JPanel(new BorderLayout(10, 10)); + mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + + mainPanel.add(createIconComponent(), BorderLayout.WEST); + mainPanel.add(dataPanel); + this.getContentPane().add(mainPanel); this.pack(); @@ -83,9 +88,8 @@ private MasterPasswordInputDialog() */ private void initComponents() { - mainPanel = new TransparentPanel(); - mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.PAGE_AXIS)); - mainPanel.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8)); + dataPanel = new TransparentPanel(); + dataPanel.setLayout(new BoxLayout(dataPanel, BoxLayout.Y_AXIS)); // info text infoTextArea = new JTextArea(); @@ -115,8 +119,6 @@ public void actionPerformed(ActionEvent arg0) okButton.doClick(); } }); - textFieldsPanel = new TransparentPanel(new GridLayout(0, 1, 8, 8)); - textFieldsPanel.add(currentPasswdField); // OK and cancel buttons okButton = new JButton(resources.getI18NString("service.gui.OK")); @@ -129,7 +131,8 @@ public void actionPerformed(ActionEvent arg0) "service.gui.CANCEL")); cancelButton.addActionListener(this); - buttonsPanel = new TransparentPanel(new FlowLayout(FlowLayout.CENTER)); + buttonsPanel = new TransparentPanel( + new FlowLayout(FlowLayout.RIGHT, 0, 5)); buttonsPanel.add(okButton); buttonsPanel.add(cancelButton); @@ -143,13 +146,13 @@ public void actionPerformed(ActionEvent arg0) */ private void rebuildMainPanel(boolean includeErrorMsg) { - mainPanel.removeAll(); + dataPanel.removeAll(); if (includeErrorMsg) - mainPanel.add(errorTextArea); - mainPanel.add(infoTextArea); - mainPanel.add(textFieldsPanel); - mainPanel.add(buttonsPanel); + dataPanel.add(errorTextArea); + dataPanel.add(infoTextArea); + dataPanel.add(currentPasswdField); + dataPanel.add(buttonsPanel); } /** @@ -250,4 +253,23 @@ public void keyPressed(KeyEvent arg0) public void keyTyped(KeyEvent arg0) { } + + /** + * Creates the icon component to show on the left of this dialog. + * + * @return the created component + */ + private static Component createIconComponent() + { + JPanel wrapIconPanel = new JPanel(new BorderLayout()); + + JLabel iconLabel = new JLabel(); + + iconLabel.setIcon(GuiActivator.getResources() + .getImage("service.gui.icons.AUTHORIZATION_ICON")); + + wrapIconPanel.add(iconLabel, BorderLayout.NORTH); + + return wrapIconPanel; + } } diff --git a/src/net/java/sip/communicator/plugin/securityconfig/masterpassword/MasterPasswordChangeDialog.java b/src/net/java/sip/communicator/plugin/securityconfig/masterpassword/MasterPasswordChangeDialog.java index ee97d1fcf..25e2e2835 100644 --- a/src/net/java/sip/communicator/plugin/securityconfig/masterpassword/MasterPasswordChangeDialog.java +++ b/src/net/java/sip/communicator/plugin/securityconfig/masterpassword/MasterPasswordChangeDialog.java @@ -74,7 +74,7 @@ interface MasterPasswordExecutable private JPanel labelsPanel; private JPanel buttonsPanel; private JPanel qualityPanel; - private JPanel mainPanel; + private JPanel dataPanel; /** * The ResourceManagementService used by this instance to access @@ -94,10 +94,16 @@ private MasterPasswordChangeDialog() this.setTitle( resources.getI18NString( "plugin.securityconfig.masterpassword.MP_TITLE")); - this.setMinimumSize(new Dimension(350, 300)); - this.setPreferredSize(new Dimension(350, 300)); + this.setMinimumSize(new Dimension(450, 320)); + this.setPreferredSize(new Dimension(450, 320)); this.setResizable(false); + JPanel mainPanel = new JPanel(new BorderLayout(10, 10)); + mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + + mainPanel.add(createIconComponent(), BorderLayout.WEST); + mainPanel.add(dataPanel); + this.getContentPane().add(mainPanel); this.pack(); @@ -124,8 +130,8 @@ private MasterPasswordChangeDialog() */ private void initComponents() { - mainPanel = new TransparentPanel(new BorderLayout(10, 10)); - mainPanel.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8)); + dataPanel = new TransparentPanel(new BorderLayout(10, 10)); + dataPanel.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 8)); // info text infoTextArea = new JTextArea(); @@ -135,23 +141,18 @@ private void initComponents() infoTextArea.setWrapStyleWord(true); infoTextArea.setFont(infoTextArea.getFont().deriveFont(Font.BOLD)); infoTextArea.setText( - resources.getI18NString("plugin.securityconfig.masterpassword.INFO_TEXT")); + resources.getI18NString( + "plugin.securityconfig.masterpassword.INFO_TEXT")); // label fields labelsPanel = new TransparentPanel(new GridLayout(0, 1, 8, 8)); - labelsPanel.add( - new JLabel( - resources.getI18NString( - "plugin.securityconfig.masterpassword.CURRENT_PASSWORD"))); - labelsPanel.add( - new JLabel( - resources.getI18NString( - "plugin.securityconfig.masterpassword.ENTER_PASSWORD"))); - labelsPanel.add( - new JLabel( - resources.getI18NString( - "plugin.securityconfig.masterpassword.REENTER_PASSWORD"))); + labelsPanel.add(new JLabel(resources.getI18NString( + "plugin.securityconfig.masterpassword.CURRENT_PASSWORD"))); + labelsPanel.add(new JLabel(resources.getI18NString( + "plugin.securityconfig.masterpassword.ENTER_PASSWORD"))); + labelsPanel.add(new JLabel(resources.getI18NString( + "plugin.securityconfig.masterpassword.REENTER_PASSWORD"))); // password fields ActionListener clickOkButton = new ActionListener() @@ -166,10 +167,8 @@ public void actionPerformed(ActionEvent e) .getCredentialsStorageService() .isUsingMasterPassword()) { - currentPasswdField - = new JTextField( - resources.getI18NString( - "plugin.securityconfig.masterpassword.MP_NOT_SET")); + currentPasswdField = new JTextField(resources.getI18NString( + "plugin.securityconfig.masterpassword.MP_NOT_SET")); currentPasswdField.setEnabled(false); } else @@ -207,22 +206,25 @@ public void actionPerformed(ActionEvent e) qualityPanel = new TransparentPanel(); qualityPanel.setLayout(new BoxLayout(qualityPanel, BoxLayout.Y_AXIS)); - qualityPanel.add( - new JLabel( - resources.getI18NString( - "plugin.securityconfig.masterpassword.PASSWORD_QUALITY_METER"))); + + JLabel qualityMeterLabel = new JLabel(resources.getI18NString( + "plugin.securityconfig.masterpassword.PASSWORD_QUALITY_METER")); + qualityMeterLabel.setAlignmentX(CENTER_ALIGNMENT); + + qualityPanel.add(qualityMeterLabel); qualityPanel.add(passwordQualityBar); qualityPanel.add(Box.createVerticalStrut(15)); - buttonsPanel = new TransparentPanel(new FlowLayout(FlowLayout.CENTER)); + buttonsPanel = new TransparentPanel( + new FlowLayout(FlowLayout.RIGHT, 0, 5)); buttonsPanel.add(okButton); buttonsPanel.add(cancelButton); qualityPanel.add(buttonsPanel); - mainPanel.add(infoTextArea, BorderLayout.NORTH); - mainPanel.add(labelsPanel, BorderLayout.WEST); - mainPanel.add(textFieldsPanel, BorderLayout.CENTER); - mainPanel.add(qualityPanel, BorderLayout.SOUTH); + dataPanel.add(infoTextArea, BorderLayout.NORTH); + dataPanel.add(labelsPanel, BorderLayout.WEST); + dataPanel.add(textFieldsPanel, BorderLayout.CENTER); + dataPanel.add(qualityPanel, BorderLayout.SOUTH); } /** @@ -384,4 +386,23 @@ public void setCallback(MasterPasswordExecutable callbackInstance) { this.callback = callbackInstance; } + + /** + * Creates the icon component to show on the left of this dialog. + * + * @return the created component + */ + private static Component createIconComponent() + { + JPanel wrapIconPanel = new JPanel(new BorderLayout()); + + JLabel iconLabel = new JLabel(); + + iconLabel.setIcon(SecurityConfigActivator.getResources() + .getImage("service.gui.icons.AUTHORIZATION_ICON")); + + wrapIconPanel.add(iconLabel, BorderLayout.NORTH); + + return wrapIconPanel; + } }