Class FileDialogCellEditor
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor
-
- org.eclipse.nebula.widgets.nattable.edit.gui.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. TheFileDialog
is wrapped by this implementation. It will open the default file selection dialog on trying to activate the cell editor.
-
-
Field Summary
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor
configRegistry, conversionEditErrorHandler, dataValidator, dialog, displayConverter, editDialogSettings, editHandler, layerCell, parent, validationEditErrorHandler
-
Fields inherited from interface org.eclipse.nebula.widgets.nattable.edit.gui.ICellEditDialog
DIALOG_MESSAGE, DIALOG_SHELL_ICON, DIALOG_SHELL_LOCATION, DIALOG_SHELL_RESIZABLE, DIALOG_SHELL_SIZE, DIALOG_SHELL_TITLE
-
-
Constructor Summary
Constructors Constructor Description FileDialogCellEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close/dispose the containedControl
org.eclipse.swt.widgets.FileDialog
createDialogInstance()
Will create the dialog instance that should be wrapped by thisAbstractDialogCellEditor
.org.eclipse.swt.widgets.FileDialog
getDialogInstance()
Object
getEditorValue()
Returns the current value in this editor prior to conversion.boolean
isClosed()
int
open()
Opens this dialog, creating it first if it has not yet been created.void
setEditorValue(Object value)
Sets the given value to editor control.-
Methods inherited from class org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor
activateAtAnyPosition, activateCell, activateOnTraversal, addEditorControlListeners, calculateControlBounds, calculateValue, commit, commit, commit, createEditorControl, getCanonicalValue, getCanonicalValue, getColumnIndex, getColumnPosition, getCommittedValue, getEditorControl, getEditType, getRowIndex, getRowPosition, openAdjacentEditor, openInline, openMultiEditDialog, removeEditorControlListeners, setCanonicalValue, setDialogSettings, supportMultiEdit, validateCanonicalValue, validateCanonicalValue
-
-
-
-
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 interfaceICellEditDialog
- Specified by:
open
in classAbstractDialogCellEditor
- 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 thisAbstractDialogCellEditor
. 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 classAbstractDialogCellEditor
- Returns:
- The dialog instance that should be wrapped by this
AbstractDialogCellEditor
-
getDialogInstance
public org.eclipse.swt.widgets.FileDialog getDialogInstance()
- Specified by:
getDialogInstance
in classAbstractDialogCellEditor
- Returns:
- 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 interfaceICellEditor
- Specified by:
getEditorValue
in classAbstractDialogCellEditor
- 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 interfaceICellEditor
- Specified by:
setEditorValue
in classAbstractDialogCellEditor
- Parameters:
value
- The display value to set to the wrapped editor control.
-
close
public void close()
Description copied from interface:ICellEditor
Close/dispose the containedControl
- Specified by:
close
in interfaceICellEditor
- Specified by:
close
in classAbstractDialogCellEditor
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfaceICellEditor
- Specified by:
isClosed
in classAbstractDialogCellEditor
- Returns:
true
if this editor has been closed already,false
if it is still open
-
-