aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameGroupPanel.java
diff options
context:
space:
mode:
authorYana Stamcheva <yana@jitsi.org>2006-09-26 19:20:09 +0000
committerYana Stamcheva <yana@jitsi.org>2006-09-26 19:20:09 +0000
commit5b080e2fe2c9d77ebac70986aae6f88da5c1b5d4 (patch)
tree3fd508cefda15c858f196a307fee7ce615351ff1 /src/net/java/sip/communicator/impl/gui/main/contactlist/RenameGroupPanel.java
parentce4d159181c3016bc6599227c9509fe7d6f19fee (diff)
downloadjitsi-5b080e2fe2c9d77ebac70986aae6f88da5c1b5d4.zip
jitsi-5b080e2fe2c9d77ebac70986aae6f88da5c1b5d4.tar.gz
jitsi-5b080e2fe2c9d77ebac70986aae6f88da5c1b5d4.tar.bz2
rename and remove group
Diffstat (limited to 'src/net/java/sip/communicator/impl/gui/main/contactlist/RenameGroupPanel.java')
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/RenameGroupPanel.java86
1 files changed, 86 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameGroupPanel.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameGroupPanel.java
new file mode 100644
index 0000000..e1ee9e0
--- /dev/null
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/RenameGroupPanel.java
@@ -0,0 +1,86 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.impl.gui.main.contactlist;
+
+import java.awt.*;
+import javax.swing.*;
+
+import net.java.sip.communicator.impl.gui.customcontrols.*;
+import net.java.sip.communicator.impl.gui.i18n.*;
+import net.java.sip.communicator.impl.gui.utils.*;
+
+/**
+ * The <tt>RenameGroupPanel</tt> is where the user could change the name of
+ * a meta contact group.
+ *
+ * @author Yana Stamcheva
+ */
+public class RenameGroupPanel extends JPanel {
+
+ private JLabel uinLabel = new JLabel(Messages.getString("newName"));
+
+ private JTextField textField = new JTextField();
+
+ private JPanel dataPanel = new JPanel(new BorderLayout(5, 5));
+
+ private SIPCommMsgTextArea infoLabel
+ = new SIPCommMsgTextArea(Messages.getString("renameGroupInfo"));
+
+ private JLabel infoTitleLabel
+ = new JLabel(Messages.getString("renameGroup"));
+
+ 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());
+
+ /**
+ * Creates an instance of <tt>RenameGroupPanel</tt> and initializes it.
+ */
+ public RenameGroupPanel() {
+ super(new BorderLayout());
+
+ 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(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(){
+ return textField.getText();
+ }
+
+ /**
+ * Requests the focus in the text field.
+ */
+ public void requestFocusInField() {
+ this.textField.requestFocus();
+ }
+}