+ Object tdat[][] = new Object[wsUrls.size()][2];
+ int r = 0;
+ for (String url : wsUrls)
+ {
+ int status = Jws2Discoverer.getDiscoverer().getServerStatusFor(url);
+ tdat[r][1] = Integer.valueOf(status);
+ tdat[r++][0] = url;
+ }
+
+ wsList.setModel(new WsUrlTableModel(tdat));
+ wsList.getColumn(MessageManager.getString("label.status"))
+ .setMinWidth(10);
+ }
+
+ private class JabaWSStatusRenderer extends JPanel
+ implements TableCellRenderer
+ {
+ public JabaWSStatusRenderer()
+ {
+ setOpaque(true);
+ setMinimumSize(new Dimension(10, 10));
+ // setText(" ");
+
+ }
+
+ /**
+ * render an Integer reflecting service status as a colour and symbol
+ */
+
+ @Override
+ public Component getTableCellRendererComponent(JTable arg0,
+ Object status, boolean isSelected, boolean hasFocus, int row,
+ int column)
+ {
+ Color c;
+ String t = new String("");
+ switch (((Integer) status).intValue())
+ {
+ case 1:
+ // cb.setSelected(true);
+ // cb.setBackground(
+ c = Color.green;
+ break;
+ case 0:
+ // cb.setSelected(true);
+ // cb.setBackground(
+ c = Color.lightGray;
+ break;
+ case -1:
+ // cb.setSelected(false);
+ // cb.setBackground(
+ c = Color.red;
+ break;
+ default:
+ // cb.setSelected(false);
+ // cb.setBackground(
+ c = Color.orange;
+ }
+ setBackground(c);
+ // setText(t);
+ return this;
+
+ }
+
+ }
+
+ private class WsUrlTableModel extends AbstractTableModel
+ {
+
+ private Object[][] data;
+
+ private String[] columnNames = new String[] {
+ MessageManager.getString("label.service_url"),
+ MessageManager.getString("label.status") };
+
+ public WsUrlTableModel(Object[][] tdat)
+ {
+ this.data = tdat;
+ }
+
+ @Override
+ public int getColumnCount()
+ {
+ return 2;
+ }
+
+ @Override
+ public String getColumnName(int column)
+ {
+ return columnNames[column];
+ }
+
+ @Override
+ public int getRowCount()
+ {
+ if (data == null)
+ {
+ return 0;
+ }
+ return data.length;
+ }
+
+ @Override
+ public java.lang.Class<?> getColumnClass(int columnIndex)
+ {
+ return getValueAt(0, columnIndex).getClass();
+ };
+
+ @Override
+ public Object getValueAt(int rowIndex, int columnIndex)
+ {
+ return data[rowIndex][columnIndex];
+ }
+
+ }
+
+ private void updateRsbsList()
+ {
+ sbrsList.setListData(rsbsUrls);