dbedit.ui.editor.table
Interface ICellEditor


public interface ICellEditor


Method Summary
 String configure(org.eclipse.swt.widgets.Control parent, String config)
          This method is a callback that will be invoked from ICellEditors configuration visual as well as from the TableEditor.
 String format(Object object, int sqlType)
          Formats an object on this editors specification.
 Object getContent()
           
 void openDialog(org.eclipse.swt.widgets.Control parent)
          Open a dialog to edit the value.
 void setContent(Object value, int sqlType)
           
 

Method Detail

setContent

public void setContent(Object value,
                       int sqlType)

getContent

public Object getContent()

format

public String format(Object object,
                     int sqlType)
Formats an object on this editors specification. The object parameter can be any object (primitives are wrapped as usually) or even null. Note that even if the type of the object is in most cases determined by the sqlType (e.g. if sqlType is equal to java.sql.Types.DATE, the type of the object is java.sql.Date) it not neccessarily is. An ICellEditor can be associated to a specific java type.

Parameters:
object - the object to be formatted
sqlType - the sql type
Returns:
String the formatted object represenation

openDialog

public void openDialog(org.eclipse.swt.widgets.Control parent)
Open a dialog to edit the value.

Parameters:
parent -

configure

public String configure(org.eclipse.swt.widgets.Control parent,
                        String config)
This method is a callback that will be invoked from ICellEditors configuration visual as well as from the TableEditor.

Parameters:
parent - the parent control, if this is null, no configuration dialogs should be displayed
config - the current configuration or null if none
Returns:
the configuration that is associated with the element, may return null