mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Updated for minor changes.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@5552 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -28,12 +28,6 @@ import org.jivesoftware.spark.util.ModelUtil;
|
||||
import org.jivesoftware.spark.util.log.Log;
|
||||
import org.jivesoftware.sparkimpl.profile.VCardManager;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.awt.Font;
|
||||
@ -55,6 +49,12 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
/**
|
||||
* Handles all users in the agent application. Each user or chatting user can be referenced from the User
|
||||
* Manager. You would use the UserManager to get visitors in a chat room or secondary agents.
|
||||
@ -453,6 +453,22 @@ public class UserManager {
|
||||
}
|
||||
});
|
||||
|
||||
contactField.getList().addMouseListener(new MouseAdapter() {
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (e.getClickCount() == 2) {
|
||||
if (ModelUtil.hasLength(contactField.getText())) {
|
||||
ContactItem item = (ContactItem)contactMap.get(contactField.getText());
|
||||
if (item != null) {
|
||||
parent.setGlassPane(glassPane);
|
||||
parent.getGlassPane().setVisible(false);
|
||||
contactField.dispose();
|
||||
SparkManager.getChatManager().activateChat(item.getFullJID(), item.getNickname());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
final JPanel mainPanel = new JPanel(new BorderLayout());
|
||||
mainPanel.setLayout(new GridBagLayout());
|
||||
|
||||
Reference in New Issue
Block a user