com.ibm.commons.swt.data.editors.support
Interface ITableEditorValuePopulator


public interface ITableEditorValuePopulator

A populator interface used in conjunction with the TableEditor class. The populator is used to create rows in the table based on the value of a property.


Method Summary
 java.lang.String getValueFromTable(org.eclipse.swt.widgets.Table table)
          Given the entire table this method is responsible for calculating the value of the attribute associated with the property editor.
 int getValueSelectionEvent()
          Determines the type of events that qualify as selection events.
 boolean isChecked(org.eclipse.swt.widgets.TableItem item, java.lang.String attrValue)
          Returns whether or not a particular row in the table should be checked based on the attribute value.

The table must be of type SWT.CHECK
 boolean isSelected(org.eclipse.swt.widgets.TableItem item, java.lang.String attrValue)
          Returns whether or not the row should be selected based on the attribute value.
 

Method Detail

isChecked

boolean isChecked(org.eclipse.swt.widgets.TableItem item,
                  java.lang.String attrValue)
Returns whether or not a particular row in the table should be checked based on the attribute value.

The table must be of type SWT.CHECK

Parameters:
item - the table row
attrValue - the value of the attribute associated with the row
Returns:
true if the row is to be checked
See Also:
AbstractTableEditor

isSelected

boolean isSelected(org.eclipse.swt.widgets.TableItem item,
                   java.lang.String attrValue)
Returns whether or not the row should be selected based on the attribute value.

Parameters:
item - the table row
attrValue - the value of the attribute associated with the row
Returns:
true if the row is to be selected

getValueSelectionEvent

int getValueSelectionEvent()
Determines the type of events that qualify as selection events. If this method returns SWT.CHECK then check events will cause particular rows to be selected.

Returns:

getValueFromTable

java.lang.String getValueFromTable(org.eclipse.swt.widgets.Table table)
Given the entire table this method is responsible for calculating the value of the attribute associated with the property editor. This method will typically be called when the editor's stopEdit method is called (com.ibm.commons.swt.data.editors.api.AbstractTableEditor.stopEdit(CompositeEditor))

Parameters:
table - the editor's table control
Returns:
the value that should be set in the model