Class FilterRowComboBoxCellEditor

  • All Implemented Interfaces:
    ICellEditor

    public class FilterRowComboBoxCellEditor
    extends ComboBoxCellEditor
    Specialisation of ComboBoxCellEditor that can only be created using an IComboBoxDataProvider. Will show a multiselect combobox with checkboxes and uses the FilterNatCombo as underlying control.
    See Also:
    FilterRowComboBoxDataProvider
    • Method Detail

      • createEditorControl

        public NatCombo createEditorControl​(org.eclipse.swt.widgets.Composite parent)
        Description copied from interface: ICellEditor
        Creates the editor control that is wrapped by this ICellEditor. Will use the style configurations in ConfigRegistry for styling the control.
        Specified by:
        createEditorControl in interface ICellEditor
        Overrides:
        createEditorControl in class ComboBoxCellEditor
        Parameters:
        parent - The Composite that will be the parent of the new editor control. Can not be null
        Returns:
        The created editor control that is wrapped by this ICellEditor.
      • setCanonicalValue

        public void setCanonicalValue​(Object canonicalValue)
        Description copied from class: ComboBoxCellEditor
        This implementation overrides the default implementation because of the special handling for comboboxes. It can handle multi selection and needs to transfer the converted values into a String array so the values in the combobox can be selected.
        Specified by:
        setCanonicalValue in interface ICellEditor
        Overrides:
        setCanonicalValue in class ComboBoxCellEditor
        Parameters:
        canonicalValue - The canonical value to be set to the wrapped editor control.
      • commit

        public boolean commit​(SelectionLayer.MoveDirectionEnum direction,
                              boolean closeAfterCommit)
        Description copied from interface: ICellEditor
        Commits the current value of this editor. Will first try to convert the current value. Then it is checked if the validation should be executed which can be specified via parameter. If that succeeds and the value can be committed to the data model, the editor will be closed afterwards.
        Specified by:
        commit in interface ICellEditor
        Overrides:
        commit in class AbstractCellEditor
        Parameters:
        direction - The direction the selection within the NatTable should move after commit has finished.
        closeAfterCommit - flag to tell whether this editor needs to closed after the commit or if it should stay open.
        Returns:
        true if the commit operation succeeded, false if the current value could not be committed. A value might not be committed for example if the conversion or the validation failed.