Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.jface.viewers
Interface ICellModifier  view ICellModifier download ICellModifier.java


public interface ICellModifier

A cell modifier is used to access the data model from a cell editor in an abstract way. It offers methods to:

This interface should be implemented by classes that wish to act as cell modifiers.


Method Summary
 boolean canModify(java.lang.Object element, java.lang.String property)
          Checks whether the given property of the given element can be modified.
 java.lang.Object getValue(java.lang.Object element, java.lang.String property)
          Returns the value for the given property of the given element.
 void modify(java.lang.Object element, java.lang.String property, java.lang.Object value)
          Modifies the value for the given property of the given element.
 

Method Detail

canModify

public boolean canModify(java.lang.Object element,
                         java.lang.String property)
Checks whether the given property of the given element can be modified.


getValue

public java.lang.Object getValue(java.lang.Object element,
                                 java.lang.String property)
Returns the value for the given property of the given element. Returns null if the element does not have the given property.


modify

public void modify(java.lang.Object element,
                   java.lang.String property,
                   java.lang.Object value)
Modifies the value for the given property of the given element. Has no effect if the element does not have the given property, or if the property cannot be modified.

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