Exemple #1
0
 /**
  * Dodaje kontakt do aktualnie wyświetlanych.
  *
  * @param contact
  */
 public void addContact(final ViewContact contact) {
   final ContactPanel contactPanel = new ContactPanel(contact);
   contactPanels.put(contact, contactPanel);
   if (mouseListener != null) {
     contactPanel.addMouseListener(mouseListener);
   }
   contactsListPanel.add(contactPanel);
 }
Exemple #2
0
 /** Usuwa aktualnego Listenera. */
 public void removeMainWindowListener() {
   if (listener != null) {
     listener = null;
     window.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
     window.removeWindowListener(windowListener);
     for (final ContactPanel contactPanel : contactPanels.values()) {
       contactPanel.removeMouseListener(mouseListener);
     }
   }
 }
Exemple #3
0
 /**
  * Ustawia nowego Listenera. Jeżeli wcześniej był ustawiony Listener to najpierw go usuwa.
  *
  * @param mainWindowListener
  */
 public void setMainWindowListener(final MainWindowListener mainWindowListener) {
   if (listener != null) {
     removeMainWindowListener();
   }
   listener = mainWindowListener;
   window.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
   window.addWindowListener(windowListener);
   for (final ContactPanel contactPanel : contactPanels.values()) {
     contactPanel.addMouseListener(mouseListener);
   }
 }
  private void fillPanel(UserModel model) {
    if (model == null) return;

    resetTitle(model.getLoginname());
    // if it's login user, refresh navbar user name
    if (model.isLogin()) BaseEntryPoint.I.resetLoginUser(model.getFullname());

    //		set display info on left part
    fullname.setText(model.getFullname());

    contacts.setUser(model);
    statusText.setText(StringUtil.trimToEmpty(model.getStatus()));
    this.userUid = model.getUid();

    if (model.getPortrait() != null) {
      // while user update Profile, the portrait won't refresh. See userPortraitUpdated() method
      portrait.clear();
      portrait.setWidget(GwtClientUtils.createUserPortrait(model.getPortrait()));
    }
  }
Exemple #5
0
 /**
  * Aktualizuje dane kontaktu.
  *
  * @param contact
  */
 public void updateContact(final ViewContact contact) {
   final ContactPanel contactPanel = contactPanels.get(contact);
   contactPanel.setTitle(contact.getDisplayName());
   contactPanel.repaint();
 }