From 94ee1be3b294d6a8cf326a362c4ea112117d7c6a Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Mon, 29 May 2006 17:43:30 +0000 Subject: [PATCH] unused method removed --- .../contactlist/ContactRightButtonMenu.java | 31 +++---------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactRightButtonMenu.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactRightButtonMenu.java index d5e9de760..76ae2cca0 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactRightButtonMenu.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactRightButtonMenu.java @@ -40,7 +40,7 @@ public class ContactRightButtonMenu extends JPopupMenu implements .getString("addSubcontact")); private JMenuItem sendMessageItem = new JMenuItem(Messages - .getString("sendMess age"), new ImageIcon(ImageLoader + .getString("sendMessage"), new ImageIcon(ImageLoader .getImage(ImageLoader.SEND_MESSAGE_16x16_ICON))); private JMenuItem sendFileItem = new JMenuItem(Messages @@ -80,6 +80,8 @@ public ContactRightButtonMenu(MainFrame mainFrame, this.contactItem = contactItem; + this.setLocation(getLocation()); + this.init(); } @@ -143,7 +145,7 @@ private void init() { this.addSubcontactMenu.addActionListener(this); this.removeContactItem.addActionListener(this); this.renameContactItem.addActionListener(this); - this.viewHistoryItem.addActionListener(this); + this.viewHistoryItem.addActionListener(this); this.userInfoItem.addActionListener(this); // Disable all menu items that do nothing. @@ -156,31 +158,6 @@ private void init() { this.userInfoItem.setEnabled(false); } - /** - * Returns the related popup location where the menu will appear. - * @return The related popup location where the menu will appear. - */ - public Point getPopupLocation() { - - Component component = this.getInvoker(); - Point point = new Point(); - int x = component.getX(); - int y = component.getY(); - - while (component.getParent() != null) { - - component = component.getParent(); - - x += component.getX(); - y += component.getY(); - } - - point.x = x; - point.y = y + this.getInvoker().getHeight(); - - return point; - } - public void actionPerformed(ActionEvent e) { JMenuItem menuItem = (JMenuItem) e.getSource();