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
Fields Modifier and Type Field Description static String
DIALOG_MESSAGE
Key to specify a custom message for the to be shown in the dialog.static String
DIALOG_SHELL_ICON
Key to specify a custom shell icon of the dialog.static String
DIALOG_SHELL_LOCATION
Key to specify the location where the dialog should be shown.static String
DIALOG_SHELL_RESIZABLE
Key to specify whether the dialog should be resizable or not.static String
DIALOG_SHELL_SIZE
Key to specify the size of the dialog.static String
DIALOG_SHELL_TITLE
Key to specify a custom shell title of the dialog.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
calculateValue(Object currentValue, Object processValue)
In casegetEditType()
returns an edit type for processing values, this method should implemented to do that transformation.Object
getCommittedValue()
EditTypeEnum
getEditType()
int
open()
Opens this dialog, creating it first if it has not yet been created.void
setDialogSettings(Map<String,Object> editDialogSettings)
Allows to customize the appearance of the dialog.
-
-
-
Field Detail
-
DIALOG_SHELL_TITLE
static final String DIALOG_SHELL_TITLE
Key to specify a custom shell title of the dialog. The value needs to be aString
.- See Also:
- Constant Field Values
-
DIALOG_SHELL_ICON
static final String DIALOG_SHELL_ICON
Key to specify a custom shell icon of the dialog. The value needs to be anImage
.- See Also:
- Constant Field Values
-
DIALOG_SHELL_LOCATION
static final String 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:
- Constant Field Values
-
DIALOG_SHELL_SIZE
static final String DIALOG_SHELL_SIZE
Key to specify the size of the dialog. Will be interpreted byCellEditDialog.getInitialSize()
The value needs to be aPoint
.- See Also:
- Constant Field Values
-
DIALOG_SHELL_RESIZABLE
static final String 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:
- Constant Field Values
-
DIALOG_MESSAGE
static final String DIALOG_MESSAGE
Key to specify a custom message for the to be shown in the dialog. The value needs to be aString
.- See Also:
- Constant Field Values
-
-
Method Detail
-
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.SET
is 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
Object calculateValue(Object currentValue, Object processValue)
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
void setDialogSettings(Map<String,Object> editDialogSettings)
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
IConfigRegistry
for 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:
DIALOG_SHELL_TITLE
,DIALOG_SHELL_ICON
,DIALOG_SHELL_LOCATION
,DIALOG_SHELL_SIZE
,DIALOG_SHELL_RESIZABLE
,DIALOG_MESSAGE
,EditConfigAttributes.EDIT_DIALOG_SETTINGS
-
-