Class AbstractEditErrorHandler
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.edit.editor.AbstractEditErrorHandler
-
- All Implemented Interfaces:
IEditErrorHandler
- Direct Known Subclasses:
DialogErrorHandling
,DiscardValueErrorHandling
,LoggingErrorHandling
,RenderErrorHandling
public abstract class AbstractEditErrorHandler extends Object implements IEditErrorHandler
Abstract implementation ofIEditErrorHandler
that by default calls the underlyingIEditErrorHandler
to handle the error. This allows chaining ofIEditErrorHandler
s to support multiple error handling behaviour, e.g. displaying the error in a dialog and log the error.
-
-
Field Summary
Fields Modifier and Type Field Description protected IEditErrorHandler
underlyingErrorHandler
The underlyingIEditErrorHandler
-
Constructor Summary
Constructors Constructor Description AbstractEditErrorHandler(IEditErrorHandler underlyingErrorHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
displayError(ICellEditor cellEditor, Exception e)
If an error occurs on conversion/validation of data, this method will be called for showing that error to the user.void
displayError(ICellEditor cellEditor, IConfigRegistry configRegistry, Exception e)
If an error occurs on conversion/validation of data, this method will be called for showing that error to the user.void
removeError(ICellEditor cellEditor)
Will remove styling or other decorations that indicate that an error occurred.
-
-
-
Field Detail
-
underlyingErrorHandler
protected IEditErrorHandler underlyingErrorHandler
The underlyingIEditErrorHandler
-
-
Constructor Detail
-
AbstractEditErrorHandler
public AbstractEditErrorHandler(IEditErrorHandler underlyingErrorHandler)
- Parameters:
underlyingErrorHandler
- The underlyingIEditErrorHandler
-
-
Method Detail
-
removeError
public void removeError(ICellEditor cellEditor)
Will remove styling or other decorations that indicate that an error occurred. Only necessary to implement if the error handler adds special styling or decorations on error.This implementation will call its underlying
IEditErrorHandler
.- Specified by:
removeError
in interfaceIEditErrorHandler
- Parameters:
cellEditor
- TheICellEditor
to remove the error styling from.
-
displayError
public void displayError(ICellEditor cellEditor, Exception e)
If an error occurs on conversion/validation of data, this method will be called for showing that error to the user. Usually the message contained within the givenException
will be shown to the user.This implementation will call its underlying
IEditErrorHandler
.- Specified by:
displayError
in interfaceIEditErrorHandler
- Parameters:
cellEditor
- TheICellEditor
on which the conversion/validation error occurred. Needed to add error styling or special handling.e
- TheException
that contains information about the conversion/validation error. Used to show a more detailed description on the error to the user.
-
displayError
public void displayError(ICellEditor cellEditor, IConfigRegistry configRegistry, Exception e)
If an error occurs on conversion/validation of data, this method will be called for showing that error to the user. Usually the message contained within the givenException
will be shown to the user.This implementation will call its underlying
IEditErrorHandler
.- Specified by:
displayError
in interfaceIEditErrorHandler
- Parameters:
cellEditor
- TheICellEditor
on which the conversion/validation error occurred. Needed to add error styling or special handling.configRegistry
- TheIConfigRegistry
to get additional context information.e
- TheException
that contains information about the conversion/validation error. Used to show a more detailed description on the error to the user.
-
-