Class FilterRowRegularExpressionConverter
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter
-
- org.eclipse.nebula.widgets.nattable.filterrow.FilterRowRegularExpressionConverter
-
- All Implemented Interfaces:
IDisplayConverter
public class FilterRowRegularExpressionConverter extends DisplayConverter
IDisplayConverter
that is intended to be used for filter row editors that are configured for regular expression evaluation. It will add simplified usage of wildcards for end users by replacing * to the regular expression (.*) and ? to the regular expression (.?).Note:
Note:
As the characters * and ? are replaced to match the corresponding regular expression using thisIDisplayConverter
will suppress the ability to search for those characters completely. If it should be supported to search for those wildcards, implement a custom converter that supports to mask the icons or stick with the default regular expression syntax.
TheFilterRowRegularExpressionConverter
needs to be registered asCellConfigAttributes.DISPLAY_CONVERTER
!configRegistry.registerConfigAttribute( CellConfigAttributes.DISPLAY_CONVERTER, new FilterRowRegularExpressionConverter(), DisplayMode.NORMAL, FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + DataModelConstants.FIRSTNAME_COLUMN_POSITION);
- Since:
- 1.4
-
-
Constructor Summary
Constructors Constructor Description FilterRowRegularExpressionConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
canonicalToDisplayValue(Object canonicalValue)
Convert backing data value to value to be displayed.Object
displayToCanonicalValue(Object displayValue)
Convert from display value to value in the backing data structure.-
Methods inherited from class org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter
canonicalToDisplayValue, displayToCanonicalValue
-
-
-
-
Method Detail
-
displayToCanonicalValue
public Object displayToCanonicalValue(Object displayValue)
Description copied from interface:IDisplayConverter
Convert from display value to value in the backing data structure.NOTE:
The type the display value is converted to must match the type in the setter of the backing bean/row object- Specified by:
displayToCanonicalValue
in interfaceIDisplayConverter
- Specified by:
displayToCanonicalValue
in classDisplayConverter
- Parameters:
displayValue
- The display value that should be converted to the data value that matches the backing data.- Returns:
- The converted value to put to the backing data.
-
canonicalToDisplayValue
public Object canonicalToDisplayValue(Object canonicalValue)
Description copied from interface:IDisplayConverter
Convert backing data value to value to be displayed. Typically converts to a String for display.- Specified by:
canonicalToDisplayValue
in interfaceIDisplayConverter
- Specified by:
canonicalToDisplayValue
in classDisplayConverter
- Parameters:
canonicalValue
- The data value from the backing data.- Returns:
- The converted value to display.
-
-