//}
private void init() {
// Create columns for server manager
TableColumnExt name = new TableColumnExt();
name.setIdentifier(UIConstants.SERVER_LIST_NAME_COLUMN_ID);
name.setModelIndex(ServerListTableModel.SERVER_NAME);
name.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_NAME_COLUMN_ID));
name.setHeaderValue("Name");
name.setCellRenderer(new ServerNameTableCellRenderer());
name.setComparator(new GeneralComparator("getName"));
table_columns.add(name);
//server_tab_column_model.addColumn( name );
TableColumnExt cc = new TableColumnExt();
cc.setIdentifier(UIConstants.SERVER_LIST_CC_COLUMN_ID);
cc.setModelIndex(ServerListTableModel.CC);
cc.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_CC_COLUMN_ID));
cc.setHeaderValue("CC");
cc.setCellRenderer(new CCTableCellRenderer());
table_columns.add(cc);
TableColumnExt flag = new TableColumnExt();
flag.setIdentifier(UIConstants.SERVER_LIST_FLAG_COLUMN_ID);
flag.setModelIndex(ServerListTableModel.FLAG);
flag.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_FLAG_COLUMN_ID));
flag.setHeaderValue("Flag");
flag.setCellRenderer(new FlagTableCellRenderer());
table_columns.add(flag);
TableColumnExt ip = new TableColumnExt();
ip.setModelIndex(ServerListTableModel.SERVER_IP);
ip.setIdentifier(UIConstants.SERVER_LIST_IP_COLUMN_ID);
ip.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_IP_COLUMN_ID));
ip.setHeaderValue("IP");
ip.setCellRenderer(new IPTableCellRenderer());
ip.setComparator(new GeneralComparator("getAddressAsInt"));
table_columns.add(ip);
//server_tab_column_model.addColumn( ip );
TableColumnExt desc = new TableColumnExt();
desc.setModelIndex(ServerListTableModel.DESCRIPTION);
desc.setIdentifier(UIConstants.SERVER_LIST_DESCRIPTION_COLUMN_ID);
desc.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_DESCRIPTION_COLUMN_ID));
desc.setHeaderValue("Description");
desc.setCellRenderer(new DescTableCellRenderer());
desc.setComparator(new GeneralComparator("getDesc"));
table_columns.add(desc);
//server_tab_column_model.addColumn( desc );
TableColumnExt ping = new TableColumnExt();
ping.setModelIndex(ServerListTableModel.PING);
ping.setIdentifier(UIConstants.SERVER_LIST_PING_COLUMN_ID);
ping.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_PING_COLUMN_ID));
ping.setHeaderValue("Ping");
ping.setCellRenderer(new PingTableCellRenderer());
ping.setComparator(new GeneralComparator("getPing"));
table_columns.add(ping);
//server_tab_column_model.addColumn( ping );
TableColumnExt users = new TableColumnExt();
users.setModelIndex(ServerListTableModel.USERS);
users.setIdentifier(UIConstants.SERVER_LIST_USERS_COLUMN_ID);
users.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_USERS_COLUMN_ID));
users.setHeaderValue("Users");
users.setCellRenderer(new UsersTableCellRenderer());
users.setComparator(new GeneralComparator("getNumUsers"));
table_columns.add(users);
//server_tab_column_model.addColumn( users );
TableColumnExt max_users = new TableColumnExt();
max_users.setModelIndex(ServerListTableModel.MAX_USERS);
max_users.setIdentifier(UIConstants.SERVER_LIST_MAX_USERS_COLUMN_ID);
max_users.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_MAX_USERS_COLUMN_ID));
max_users.setHeaderValue("Max users");
max_users.setCellRenderer(new MaxUsersTableCellRenderer());
max_users.setComparator(new GeneralComparator("getMaxUsers"));
table_columns.add(max_users);
//server_tab_column_model.addColumn(max_users);
TableColumnExt files = new TableColumnExt();
files.setModelIndex(ServerListTableModel.FILES);
files.setIdentifier(UIConstants.SERVER_LIST_FILES_COLUMN_ID);
files.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_FILES_COLUMN_ID));
files.setHeaderValue("Files");
files.setCellRenderer(new FilesTableCellRenderer());
files.setComparator(new GeneralComparator("getNumFiles"));
table_columns.add(files);
//server_tab_column_model.addColumn(files);
TableColumnExt soft_limit = new TableColumnExt();
soft_limit.setModelIndex(ServerListTableModel.SOFT_LIMIT);
soft_limit.setIdentifier(UIConstants.SERVER_LIST_SOFT_LIMIT_COLUMN_ID);
soft_limit.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_SOFT_LIMIT_COLUMN_ID));
soft_limit.setHeaderValue("Soft limit");
soft_limit.setCellRenderer(new SoftLimitTableCellRenderer());
soft_limit.setComparator(new GeneralComparator("getSoftLimit"));
table_columns.add(soft_limit);
//server_tab_column_model.addColumn(soft_limit);
TableColumnExt hard_limit = new TableColumnExt();
hard_limit.setModelIndex(ServerListTableModel.HARD_LIMIT);
hard_limit.setIdentifier(UIConstants.SERVER_LIST_HARD_LIMIT_COLUMN_ID);
hard_limit.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_HARD_LIMIT_COLUMN_ID));
hard_limit.setHeaderValue("Hard limit");
hard_limit.setCellRenderer(new HardLimitTableCellRenderer());
hard_limit.setComparator(new GeneralComparator("getHardLimit"));
table_columns.add(hard_limit);
//server_tab_column_model.addColumn(hard_limit);
TableColumnExt version = new TableColumnExt();
version.setModelIndex(ServerListTableModel.VERSION);
version.setIdentifier(UIConstants.SERVER_LIST_VERSION_COLUMN_ID);
version.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_VERSION_COLUMN_ID));
version.setHeaderValue("Version");
version.setCellRenderer(new VersionTableCellRenderer());
version.setComparator(new GeneralComparator("getVersion"));
//version.setVisible(false);
table_columns.add(version);
//server_tab_column_model.addColumn(version);
TableColumnExt static_col = new TableColumnExt();
static_col.setModelIndex(ServerListTableModel.STATIC);
static_col.setIdentifier(UIConstants.SERVER_LIST_STATIC_COLUMN_ID);
static_col.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_STATIC_COLUMN_ID));
static_col.setHeaderValue("Static");
static_col.setCellRenderer(new StaticTableCellRenderer());
static_col.setComparator(new GeneralComparator("isStatic"));
table_columns.add(static_col);
TableColumnExt down = new TableColumnExt();
down.setModelIndex(ServerListTableModel.DOWN);
down.setIdentifier(UIConstants.SERVER_LIST_DOWN_COLUMN_ID);
down.setVisible(_pref.isColumnVisible(UIConstants.SERVER_LIST_DOWN_COLUMN_ID));
down.setHeaderValue("Down");
down.setCellRenderer(new DownTableCellRenderer());
down.setComparator(new GeneralComparator("isDown"));
table_columns.add(down);
super.buildColumns(new ServerListTableModel());