viewer.setCellEditors(new CellEditor[] { null,
new TextCellEditor(ports) });
ICellModifier cellModifier = new ICellModifier() {
public Object getValue(Object element, String property) {
ServerPort sp = (ServerPort) element;
return sp.getPort() + "";
}
public boolean canModify(Object element, String property) {
return "port".equals(property);
}
public void modify(Object element, String property, Object value) {
Item item = (Item) element;
ServerPort sp = (ServerPort) item.getData();
GeronimoServerDelegate gs = getGeronimoServer();
gs.setInstanceProperty(sp.getId(), (String) value);
changePortNumber(sp.getId(), Integer.parseInt((String) value));
}
};
viewer.setCellModifier(cellModifier);
}