Class FileDialogCellEditor

  • All Implemented Interfaces:
    ICellEditor, ICellEditDialog

    public class FileDialogCellEditor
    extends AbstractDialogCellEditor
    This implementation is a proof of concept for special cell editors that wrap dialogs. The FileDialog is wrapped by this implementation. It will open the default file selection dialog on trying to activate the cell editor.
    • Constructor Detail

      • FileDialogCellEditor

        public FileDialogCellEditor()
    • Method Detail

      • open

        public int open()
        Description copied from interface: ICellEditDialog
        Opens this dialog, creating it first if it has not yet been created.

        Specified in here for convenience so we only need to check against this interface for a dialog.

        Specified by:
        open in interface ICellEditDialog
        Specified by:
        open in class AbstractDialogCellEditor
        Returns:
        the return code
      • createDialogInstance

        public org.eclipse.swt.widgets.FileDialog createDialogInstance()
        Description copied from class: AbstractDialogCellEditor
        Will create the dialog instance that should be wrapped by this AbstractDialogCellEditor. Note that you always need to create and return a new instance because on commit or close the dialog will be closed, which disposes the shell of the dialog. Therefore the instance will not be usable after commit/close.
        Specified by:
        createDialogInstance in class AbstractDialogCellEditor
        Returns:
        The dialog instance that should be wrapped by this AbstractDialogCellEditor
      • getEditorValue

        public Object getEditorValue()
        Description copied from interface: ICellEditor
        Returns the current value in this editor prior to conversion. For a text editor that is used to edit integer values, this would mean it returns the text value instead of the converted integer value. This method is only intended to be used internally .
        Specified by:
        getEditorValue in interface ICellEditor
        Specified by:
        getEditorValue in class AbstractDialogCellEditor
        Returns:
        The current value in this editor prior to conversion.
      • setEditorValue

        public void setEditorValue​(Object value)
        Description copied from interface: ICellEditor
        Sets the given value to editor control. This method is used to put the display values to the wrapped editor.
        Specified by:
        setEditorValue in interface ICellEditor
        Specified by:
        setEditorValue in class AbstractDialogCellEditor
        Parameters:
        value - The display value to set to the wrapped editor control.