Interface ICellEditDialog
- All Known Implementing Classes:
AbstractDialogCellEditor,CellEditDialog,FileDialogCellEditor,TickUpdateCellEditDialog
public interface ICellEditDialog
Interface for dialogs that can be used as editing dialogs in NatTable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey to specify a custom message for the to be shown in the dialog.static final StringKey to specify a custom shell icon of the dialog.static final StringKey to specify the location where the dialog should be shown.static final StringKey to specify whether the dialog should be resizable or not.static final StringKey to specify the size of the dialog.static final StringKey to specify a custom shell title of the dialog. -
Method Summary
Modifier and TypeMethodDescriptioncalculateValue(Object currentValue, Object processValue) In casegetEditType()returns an edit type for processing values, this method should implemented to do that transformation.intopen()Opens this dialog, creating it first if it has not yet been created.voidsetDialogSettings(Map<String, Object> editDialogSettings) Allows to customize the appearance of the dialog.
-
Field Details
-
DIALOG_SHELL_TITLE
Key to specify a custom shell title of the dialog. The value needs to be aString.- See Also:
-
DIALOG_SHELL_ICON
Key to specify a custom shell icon of the dialog. The value needs to be anImage.- See Also:
-
DIALOG_SHELL_LOCATION
Key to specify the location where the dialog should be shown. Will be interpreted byCellEditDialog.getInitialLocation(Point)The value needs to be aPoint.- See Also:
-
DIALOG_SHELL_SIZE
Key to specify the size of the dialog. Will be interpreted byCellEditDialog.getInitialSize()The value needs to be aPoint.- See Also:
-
DIALOG_SHELL_RESIZABLE
Key to specify whether the dialog should be resizable or not. Will not be interpreted byCellEditDialog.isResizable()because it is called on instantiating the dialog in the constructor of the super class. It will modify the set shell style bits instead. The value needs to be aBoolean.- See Also:
-
DIALOG_MESSAGE
Key to specify a custom message for the to be shown in the dialog. The value needs to be aString.- See Also:
-
-
Method Details
-
getCommittedValue
Object getCommittedValue()- Returns:
- The canonical value that was committed to the editor control.
-
getEditType
EditTypeEnum getEditType()- Returns:
- The edit type that has impact on how the set value will be
updated to the data model. By default
EditTypeEnum.SETis returned, which will simply set the committed value to the data model. Every other edit type will do some calculation based on the committed value and the current value in the data model.
-
calculateValue
In casegetEditType()returns an edit type for processing values, this method should implemented to do that transformation.- Parameters:
currentValue- The current value for the cell before data model updateprocessValue- The value committed to the editor that should be used for calculation on the current value.- Returns:
- The value that should be used to update the data model.
-
open
int open()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.
- Returns:
- the return code
-
setDialogSettings
Allows to customize the appearance of the dialog. This method will be called by the framework at creation time of the dialog via theCellEditDialogFactory.The map containing the settings can be registered to the
IConfigRegistryfor the keyEditConfigAttributes.EDIT_DIALOG_SETTINGS. The keys that are valid for this map are specified below.- Parameters:
editDialogSettings- Map containing the settings to customize the edit dialog appearance.- See Also:
-