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
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.-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor
configRegistry, conversionEditErrorHandler, dataValidator, dialog, displayConverter, editDialogSettings, editHandler, layerCell, parent, validationEditErrorHandlerFields 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close/dispose the containedControlorg.eclipse.swt.widgets.FileDialogWill create the dialog instance that should be wrapped by thisAbstractDialogCellEditor.org.eclipse.swt.widgets.FileDialogReturns the current value in this editor prior to conversion.booleanisClosed()intopen()Opens this dialog, creating it first if it has not yet been created.voidsetEditorValue(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
-
Constructor Details
-
FileDialogCellEditor
public FileDialogCellEditor()
-
-
Method Details
-
open
public int open()Description copied from interface:ICellEditDialogOpens 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:
openin interfaceICellEditDialog- Specified by:
openin classAbstractDialogCellEditor- Returns:
- the return code
-
createDialogInstance
public org.eclipse.swt.widgets.FileDialog createDialogInstance()Description copied from class:AbstractDialogCellEditorWill 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:
createDialogInstancein classAbstractDialogCellEditor- Returns:
- The dialog instance that should be wrapped by this
AbstractDialogCellEditor
-
getDialogInstance
public org.eclipse.swt.widgets.FileDialog getDialogInstance()- Specified by:
getDialogInstancein classAbstractDialogCellEditor- Returns:
- The current dialog instance that is wrapped by this
AbstractDialogCellEditor
-
getEditorValue
Description copied from interface:ICellEditorReturns 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:
getEditorValuein interfaceICellEditor- Specified by:
getEditorValuein classAbstractDialogCellEditor- Returns:
- The current value in this editor prior to conversion.
-
setEditorValue
Description copied from interface:ICellEditorSets the given value to editor control. This method is used to put the display values to the wrapped editor.- Specified by:
setEditorValuein interfaceICellEditor- Specified by:
setEditorValuein classAbstractDialogCellEditor- Parameters:
value- The display value to set to the wrapped editor control.
-
close
public void close()Description copied from interface:ICellEditorClose/dispose the containedControl- Specified by:
closein interfaceICellEditor- Specified by:
closein classAbstractDialogCellEditor
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceICellEditor- Specified by:
isClosedin classAbstractDialogCellEditor- Returns:
trueif this editor has been closed already,falseif it is still open
-