예제 #1
0
    @Override
    public int compare(UserListElement o1, UserListElement o2) {
      if (o1.getUserNamed() instanceof UIUser && o2.getUserNamed() instanceof UIUser) {
        QQUser user1 = (QQUser) o1.getUserNamed().getEntity();
        QQUser user2 = (QQUser) o2.getUserNamed().getEntity();
        if (user1.getStatus() == user2.getStatus()) {
          return user1.getNickname().compareTo(user2.getNickname());
        }

        List<QQStatus> orders = new ArrayList<QQStatus>();
        orders.add(QQStatus.ONLINE);
        orders.add(QQStatus.AWAY);
        orders.add(QQStatus.CALLME);
        orders.add(QQStatus.BUSY);
        orders.add(QQStatus.SLIENT);
        orders.add(QQStatus.HIDDEN);
        orders.add(QQStatus.OFFLINE);
        return orders.indexOf(user1.getStatus()) - orders.indexOf(user2.getStatus());
      }
      return 0;
    }
예제 #2
0
 public void checkSendSessionMsg() {
   UserListElement userElt = (UserListElement) memberList.getSelectedValue();
   checkSendSessionMsg((QQStranger) userElt.getUserNamed().getUser());
 }