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
Answertopia.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
Class EditingSupport


java.lang.Object
  extended by 
org.eclipse.jface.viewers.EditingSupport
Direct Known Subclasses:
ObservableValueEditingSupport, PropertyEditingSupport

public abstract class EditingSupport
extends Object

EditingSupport is the abstract superclass of the support for cell editing.

Since:
3.3

Constructor Summary
EditingSupport ( ColumnViewer viewer)
           
 
Method Summary
protected abstract  boolean canEdit ( Object element)
          Is the cell editable
protected abstract   CellEditor getCellEditor ( Object element)
          The editor to be shown
protected abstract   Object getValue ( Object element)
          Get the value to set to the editor
  ColumnViewer getViewer ()
           
protected  void initializeCellEditorValue ( CellEditor cellEditor, ViewerCell cell)
          Initialize the editor.
protected  void saveCellEditorValue ( CellEditor cellEditor, ViewerCell cell)
          Save the value of the cell editor back to the model.
protected abstract  void setValue ( Object element, Object value)
          Sets the new value on the given element.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditingSupport

public EditingSupport(
ColumnViewer viewer)
Parameters:
viewer - a new viewer
Method Detail

getCellEditor

protected abstract 
CellEditor getCellEditor(
Object element)
The editor to be shown

Parameters:
element - the model element
Returns:
the CellEditor

canEdit

protected abstract boolean canEdit(
Object element)
Is the cell editable

Parameters:
element - the model element
Returns:
true if editable

getValue

protected abstract 
Object getValue(
Object element)
Get the value to set to the editor

Parameters:
element - the model element
Returns:
the value shown

setValue

protected abstract void setValue(
Object element,
                                 
Object value)
Sets the new value on the given element. Note that implementers need to ensure that getViewer().update(element, null) or similar methods are called, either directly or through some kind of listener mechanism on the implementer's model, to cause the new value to appear in the viewer.

Subclasses should overwrite.

Parameters:
element - the model element
value - the new value

getViewer

public 
ColumnViewer getViewer()
Returns:
the viewer this editing support works for

initializeCellEditorValue

protected void initializeCellEditorValue(
CellEditor cellEditor,
                                         
ViewerCell cell)
Initialize the editor. Frameworks like Databinding can hook in here and provide a customized implementation.

Standard customers should not overwrite this method but getValue(Object)

Parameters:
cellEditor - the cell editor
cell - the cell the editor is working for

saveCellEditorValue

protected void saveCellEditorValue(
CellEditor cellEditor,
                                   
ViewerCell cell)
Save the value of the cell editor back to the model. Frameworks like Databinding can hook in here and provide a customized implementation.

Standard customers should not overwrite this method but setValue(Object, Object)

Parameters:
cellEditor - the cell-editor
cell - the cell the editor is working for

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