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 Details

    • FileDialogCellEditor

      public FileDialogCellEditor()
  • Method Details

    • 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
      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
      The dialog instance that should be wrapped by this AbstractDialogCellEditor
    • getDialogInstance

      public org.eclipse.swt.widgets.FileDialog getDialogInstance()
      Specified by:
      getDialogInstance in class AbstractDialogCellEditor
      The current dialog instance that is 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
      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
      value - The display value to set to the wrapped editor control.
    • close

      public void close()
      Description copied from interface: ICellEditor
      Close/dispose the contained Control
      Specified by:
      close in interface ICellEditor
      Specified by:
      close in class AbstractDialogCellEditor
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in interface ICellEditor
      Specified by:
      isClosed in class AbstractDialogCellEditor
      true if this editor has been closed already, false if it is still open