public Object get(int i, int j)
{
if (i >= rows.size())
return null;
User u = (User)rows.get(i);
if (u == null)
return null;
switch (j) {
case NAME:
return u.getName();
case SERVER:
return u.getServer().getHost() + ":" + u.getServer().getPort();
case FILE_COUNT:
return new Integer(u.getFileCount());
case LINK_SPEED:
return (new LinkSpeed(u.getLinkSpeed())).toString();
case LEVEL:
return u.getLevel();
case STATUS:
return IUser.STATUS_MSGS[u.getStatus()];
case DOWNLOAD_COUNT:
return new Integer(u.getDownloadCount());
case UPLOAD_COUNT:
return new Integer(u.getUploadCount());
case CLIENT_INFO:
return u.getClientInfo();
case LAST_SEEN:
long l = u.getLastSeen();
return new Long((l > 0) ? l : -1);
case CONNECT_DURATION:
return new Integer(u.getConnectDuration());
default:
return "";
}
}