Class StringColumnConstraint
java.lang.Object
docking.widgets.table.constraint.StringColumnConstraint
- All Implemented Interfaces:
ColumnConstraint<String>, Comparable<ColumnConstraint<String>>
- Direct Known Subclasses:
StringContainsColumnConstraint, StringEndsWithColumnConstraint, StringMatchesColumnConstraint, StringStartsWithColumnConstraint
Base class for various String constraints.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStringColumnConstraint(String patternString) Constructs a new StringColumnConstraint using the given pattern and patternString, using the default hint text that explains that you can use globbing characters.protectedStringColumnConstraint(String patternString, String errorMessage) Constructs a new StringColumnConstraint using the given pattern and patternString. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(String value, TableFilterContext context) Compares value against the current constraint value to determine acceptance; true if value satisfies the constraints' value, false otherwiseabstract ColumnConstraint<String> subclasses must override to generate new versions of themselves but with a new pattern string.booleanprotected Patternprotected abstract PatterngenerateMatchesPattern(String value) Returns the column type that this constraint can be used to filter.Returns the "value" of the constraint in string formreturns a description of the constraint suitable for displaying in a tooltipgetEditor(ColumnData<String> columnDataSource) Returns a ColumnConstraintEditor which will provide gui components for users to edit the constraint values.getGroup()Returns a "group" string that is used to logically group column constraints for presentation to the usergetHighlightMatcher(String value) Returns the pattern string for this constraint.inthashCode()booleanisValidPatternString(String value) parseConstraintValue(String newValue, Object dataSource) Parses the constraint value string for deserialization purposes.toString()Methods inherited from interface ColumnConstraint
asString, compareTo, getName
-
Field Details
-
matchesPattern
-
-
Constructor Details
-
StringColumnConstraint
Constructs a new StringColumnConstraint using the given pattern and patternString.- Parameters:
patternString- the user entered string to form the pattern used to accept column values.errorMessage- the text to display in an empty editor textfield.
-
StringColumnConstraint
Constructs a new StringColumnConstraint using the given pattern and patternString, using the default hint text that explains that you can use globbing characters.- Parameters:
patternString- the user entered string to form the pattern used to accept column values.
-
-
Method Details
-
getGroup
Description copied from interface:ColumnConstraintReturns a "group" string that is used to logically group column constraints for presentation to the user- Specified by:
getGroupin interfaceColumnConstraint<String>- Returns:
- the group this constraint belongs to.
-
accepts
Description copied from interface:ColumnConstraintCompares value against the current constraint value to determine acceptance; true if value satisfies the constraints' value, false otherwise- Specified by:
acceptsin interfaceColumnConstraint<String>- Parameters:
value- the column value to be tested.context- provides additional information about the table and its data. This allows the filter to base its decision on information other than just the column value.- Returns:
- true if the column value passes the constraint, false otherwise
-
generateMatchesPattern
-
generateFindsPattern
-
getEditor
Description copied from interface:ColumnConstraintReturns a ColumnConstraintEditor which will provide gui components for users to edit the constraint values.- Specified by:
getEditorin interfaceColumnConstraint<String>- Parameters:
columnDataSource- This provides the constraint with access to the column data in the table model as well as the DataProvider of the table (if it has one)- Returns:
- A columnConstraintEditor for editing the constraints value.
-
copy
subclasses must override to generate new versions of themselves but with a new pattern string.- Parameters:
newPatternString- the new string to use for creating the match pattern.- Returns:
- a new ColumnConstraint that is the same type as this constraint but with a new range defined.
-
getPatternString
Returns the pattern string for this constraint.- Returns:
- the pattern string for this constraint.
-
getColumnType
Description copied from interface:ColumnConstraintReturns the column type that this constraint can be used to filter.- Specified by:
getColumnTypein interfaceColumnConstraint<String>- Returns:
- the column type
-
getConstraintValueTooltip
Description copied from interface:ColumnConstraintreturns a description of the constraint suitable for displaying in a tooltip- Specified by:
getConstraintValueTooltipin interfaceColumnConstraint<String>- Returns:
- a description of the constraint.
-
getConstraintValueString
Description copied from interface:ColumnConstraintReturns the "value" of the constraint in string formThis is used for serializing the constraint.
- Specified by:
getConstraintValueStringin interfaceColumnConstraint<String>- Returns:
- the "value" of the constraint in string form.
-
parseConstraintValue
Description copied from interface:ColumnConstraintParses the constraint value string for deserialization purposes.- Specified by:
parseConstraintValuein interfaceColumnConstraint<String>- Parameters:
newValue- the value of the constraint in string form.dataSource- the DataSource from the Table.- Returns:
- a new ColumnConstraint
-
toString
-
hashCode
-
equals
-
getHighlightMatcher
-
isValidPatternString
-