diff options
author | Yana Stamcheva <yana@jitsi.org> | 2008-11-13 16:36:54 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2008-11-13 16:36:54 +0000 |
commit | bbceee07e541bb6e39ffeb52e10f781dcd617efc (patch) | |
tree | d8a35aaa1bb4278eb4c7cec820ed4550d2d62ecb /src/net/java/sip/communicator/impl/gui/main/contactlist/RenameContactPanel.java | |
parent | aede2603103d99f8a29a1217c83500c88a6e7e30 (diff) | |
download | jitsi-bbceee07e541bb6e39ffeb52e10f781dcd617efc.zip jitsi-bbceee07e541bb6e39ffeb52e10f781dcd617efc.tar.gz jitsi-bbceee07e541bb6e39ffeb52e10f781dcd617efc.tar.bz2 |
UI enhancements.
Diffstat (limited to 'src/net/java/sip/communicator/impl/gui/main/contactlist/RenameContactPanel.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/contactlist/RenameContactPanel.java | 89 |
1 files changed, 49 insertions, 40 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameContactPanel.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameContactPanel.java index 2bc4353..50e6219 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameContactPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameContactPanel.java @@ -1,8 +1,7 @@ /* * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. - * - * Distributable under LGPL license. - * See terms of license at gnu.org. + * + * Distributable under LGPL license. See terms of license at gnu.org. */ package net.java.sip.communicator.impl.gui.main.contactlist; @@ -15,77 +14,87 @@ import net.java.sip.communicator.impl.gui.i18n.*; import net.java.sip.communicator.impl.gui.utils.*; /** - * The <tt>RenameContactPanel</tt> is where the user could change the name of - * a meta contact. + * The <tt>RenameContactPanel</tt> is where the user could change the name of a + * meta contact. * * @author Yana Stamcheva */ -public class RenameContactPanel extends JPanel { +public class RenameContactPanel + extends TransparentPanel +{ + private JLabel uinLabel = + new JLabel(Messages.getI18NString("newName").getText()); - private JLabel uinLabel = new JLabel( - Messages.getI18NString("newName").getText()); - private JTextField textField = new JTextField(); - - private JPanel dataPanel = new JPanel(new BorderLayout(5, 5)); - - private SIPCommMsgTextArea infoLabel = new SIPCommMsgTextArea( - Messages.getI18NString("renameContactWizard").getText()); - - private JLabel infoTitleLabel = new JLabel( - Messages.getI18NString("renameContact").getText()); - - private JLabel iconLabel = new JLabel(new ImageIcon(ImageLoader + + private TransparentPanel dataPanel + = new TransparentPanel(new BorderLayout(5, 5)); + + private SIPCommMsgTextArea infoLabel + = new SIPCommMsgTextArea( + Messages.getI18NString("renameContactWizard").getText()); + + private JLabel infoTitleLabel + = new JLabel(Messages.getI18NString("renameContact").getText()); + + private JLabel iconLabel + = new JLabel(new ImageIcon(ImageLoader .getImage(ImageLoader.RENAME_DIALOG_ICON))); - - private JPanel labelsPanel = new JPanel(new GridLayout(0, 1)); - - private JPanel rightPanel = new JPanel(new BorderLayout()); - + + private TransparentPanel labelsPanel + = new TransparentPanel(new GridLayout(0, 1)); + + private TransparentPanel rightPanel + = new TransparentPanel(new BorderLayout()); + /** * Creates an instance of <tt>RenameContactPanel</tt> and initializes it. */ - public RenameContactPanel(String oldName) { + public RenameContactPanel(String oldName) + { super(new BorderLayout()); - + this.textField.setText(oldName); this.textField.select(0, oldName.length()); - + this.setPreferredSize(new Dimension(500, 200)); - + this.iconLabel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 10)); - + this.infoLabel.setEditable(false); - + this.dataPanel.add(uinLabel, BorderLayout.WEST); - + this.dataPanel.add(textField, BorderLayout.CENTER); - + this.infoTitleLabel.setHorizontalAlignment(JLabel.CENTER); this.infoTitleLabel.setFont(Constants.FONT.deriveFont(Font.BOLD, 18)); - + this.labelsPanel.add(infoTitleLabel); - this.labelsPanel.add(infoLabel); + this.labelsPanel.add(infoLabel); this.labelsPanel.add(dataPanel); - + this.rightPanel.add(labelsPanel, BorderLayout.NORTH); - + this.add(iconLabel, BorderLayout.WEST); this.add(rightPanel, BorderLayout.CENTER); } - + /** * Returns the new name entered by the user. + * * @return the new name entered by the user. */ - public String getNewName(){ + public String getNewName() + { return textField.getText(); } - + /** * Requests the focus in the text field. */ - public void requestFocusInField() { + public void requestFocusInField() + { this.textField.requestFocus(); } } |