예제 #1
0
 /** {@inheritDoc} */
 @Override
 public void inviteExpired(final Server server, final Invite invite) {
   if (!inviteList.containsKey(server)) {
     inviteList.add(server);
   }
   inviteList.remove(server, invite);
   update();
 }
예제 #2
0
  /** Updates the invite label for the currently active server. */
  private void update() {
    if (activeFrame == null) {
      activeServer = null;
    } else {
      activeServer = activeFrame.getServer();
    }
    if (activeServer != null && !inviteList.containsKey(activeServer)) {
      inviteList.add(activeServer, activeServer.getInvites());
      activeServer.addInviteListener(this);
    }

    if (activeServer == null || inviteList.get(activeServer).isEmpty()) {
      setVisible(false);
      closeDialog();
    } else {
      refreshDialog();
      setVisible(true);
    }
  }