@Override public Object construct() { UIComponentRegistry.getContactInfoWindow().display(parent, e); return null; } };
@Override public void mouseDragged(MouseEvent e) { if(timerTask.isNewPopupShown()) { UIComponentRegistry.getContactInfoWindow().dispose(); } mouseDragged = true; } }
private boolean needToChangePopup(MouseEvent e) { ContactInfoWindow contact = UIComponentRegistry.getContactInfoWindow(); int loc = getList().locationToIndex(e.getPoint()); ContactItem item = (ContactItem)getList().getModel().getElementAt(loc); return item == null || contact == null || contact.getContactItem() == null ? true : !contact.getContactItem().getJID().equals(item.getJID()); }
public void mouseExited(MouseEvent mouseEvent) { if (timerTask != null) { TaskEngine.getInstance().cancelScheduledTask(timerTask); } canShowPopup = false; UIComponentRegistry.getContactInfoWindow().dispose(); } });
@Override public void mouseMoved(MouseEvent e) { if (!canShowPopup) { return; } if (e == null) { return; } timerTask.setEvent(e); if (needToChangePopup(e) && timerTask.isNewPopupShown()) { UIComponentRegistry.getContactInfoWindow().dispose(); timerTask.setNewPopupShown(false); } mouseDragged = false; }
public void mouseExited(MouseEvent e) { Object o; try { int loc = contactItemList.locationToIndex(e.getPoint()); if (loc == -1) { return; } o = model.getElementAt(loc); if (!(o instanceof ContactItem)) { UIComponentRegistry.getContactInfoWindow().dispose(); return; } } catch (Exception e1) { Log.error(e1); return; } contactItemList.setCursor(GraphicUtils.DEFAULT_CURSOR); }