public interface ICellModifier
This interface should be implemented by classes that wish to act as cell modifiers.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canModify(Object element,
String property)
Checks whether the given property of the given element can be
modified.
|
Object |
getValue(Object element,
String property)
Returns the value for the given property of the given element.
|
void |
modify(Object element,
String property,
Object value)
Modifies the value for the given property of the given element.
|
boolean canModify(Object element, String property)
element - the elementproperty - the propertytrue if the property can be modified,
and false if it is not modifiableObject getValue(Object element, String property)
null if the element does not have the given property.element - the elementproperty - the propertyvoid modify(Object element, String property, Object value)
Note that it is possible for an SWT Item to be passed instead of the model element. To handle this case in a safe way, use:
if (element instanceof Item) {
element = ((Item) element).getData();
}
// modify the element's property here
element - the model element or SWT Item (see above)property - the propertyvalue - the new property valueItemGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.