* @parma value The new value of for the cell in question
*/
public void modify(Object element, String property, Object value)
{
TableItem ti = (TableItem)element;
UserData data = (UserData)ti.getData();
if (property.equals("username"))
{
//update current user to the new name or we lose the ability to
//edit
if (XCDERegisterProvider.getProvider().getCurrentRegister() != null)
XCDERegisterProvider.getProvider().getCurrentRegister().setUsername((String)value);
}
else if (property.equals("colour"))
{
UserData old = new UserData(data);
data.setColour((RGB)value);
ti.setForeground(new Color(ti.getDisplay(),(RGB)value));
XCDERegisterProvider.getProvider().getCurrentRegister().getUserList().updateUserFromServer(old,data);
}
else if (property.equals("build"))
{
UserData old = new UserData(data);
data.setBuild(((Boolean)value).booleanValue());
XCDERegisterProvider.getProvider().getCurrentRegister().getUserList().updateUser(old,data);
}
else if (property.equals("test"))
{
UserData old = new UserData(data);
data.setTest(((Boolean)value).booleanValue());
XCDERegisterProvider.getProvider().getCurrentRegister().getUserList().updateUser(old,data);
}
//notify the backend
viewer.refresh();