Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.viewers
Interface ICellModifier


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:

  • to check if a a model element's property can be edited or not
  • retrieve a value a model element's property
  • to store a cell editor's value back into the model element's property

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


Method Summary
 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.
 

Method Detail

canModify

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

Parameters:
element - the element
property - the property
Returns:
true if the property can be modified, and false if it is not modifiable

getValue

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

Parameters:
element - the element
property - the property
Returns:
the property value

modify

void modify(
Object element,
            
String property,
            
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
 

Parameters:
element - the model element or SWT Item (see above)
property - the property
value - the new property value
See Also:
Item

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire