public int getSize() {
return connections.size();
}
public Object getElementAt(int i) {
ConnectionHandler connHandler = connections.get(i);
// Show login (but not password) in the URL
// Note: realm returned by ConnectionHandler does not contain credentials
FileURL clonedRealm = (FileURL)connHandler.getRealm().clone();
Credentials loginCredentials = new Credentials(connHandler.getCredentials().getLogin(), "");
clonedRealm.setCredentials(loginCredentials);
return clonedRealm.toString(true)
+" ("+Translator.get(connHandler.isLocked()?"server_connections_dialog.connection_busy":"server_connections_dialog.connection_idle")+")";
}
});
// Only one list index can be selected at a time
connectionList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);