mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
SPARK-748 Ctrl-f does not pick up different users with same contact name.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@8390 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -42,12 +42,23 @@ public class JContactItemField extends JPanel {
|
||||
|
||||
private JTextField textField = new JTextField();
|
||||
private DefaultListModel model = new DefaultListModel();
|
||||
private JList list = new JList(model);
|
||||
private JList list;
|
||||
private JWindow popup;
|
||||
private List<ContactItem> items;
|
||||
|
||||
public JContactItemField(List items) {
|
||||
setLayout(new BorderLayout());
|
||||
list = new JList(model) {
|
||||
public String getToolTipText(MouseEvent e) {
|
||||
int row = locationToIndex(e.getPoint());
|
||||
final ContactItem item = (ContactItem)getModel().getElementAt(row);
|
||||
if (item != null) {
|
||||
return item.getJID();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
this.items = items;
|
||||
|
||||
add(textField, BorderLayout.CENTER);
|
||||
|
||||
Reference in New Issue
Block a user