Package docking.widgets.table.constraint
Class StringIsNotEmptyColumnConstraint
java.lang.Object
docking.widgets.table.constraint.StringIsNotEmptyColumnConstraint
- All Implemented Interfaces:
ColumnConstraint<String>,Comparable<ColumnConstraint<String>>
String column constraint for matching when the value is not null and not the empty string.
-
Constructor Summary
Constructors -
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 otherwiseReturns the column type that this constraint can be used to filter.Returns the "value" of the constraint in string formgetEditor(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 usergetName()Returns the name of the constraintparseConstraintValue(String constraintValueString, Object dataSource) Parses the constraint value string for deserialization purposes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface docking.widgets.table.constraint.ColumnConstraint
asString, compareTo, getConstraintValueTooltip
-
Constructor Details
-
StringIsNotEmptyColumnConstraint
public StringIsNotEmptyColumnConstraint()
-
-
Method Details
-
getName
Description copied from interface:ColumnConstraintReturns the name of the constraint- Specified by:
getNamein interfaceColumnConstraint<String>- Returns:
- the name of the constraint.
-
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
-
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
-
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.
-
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.
-
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
public ColumnConstraint<String> parseConstraintValue(String constraintValueString, Object dataSource) Description copied from interface:ColumnConstraintParses the constraint value string for deserialization purposes.- Specified by:
parseConstraintValuein interfaceColumnConstraint<String>- Parameters:
constraintValueString- the value of the constraint in string form.dataSource- the DataSource from the Table.- Returns:
- a new ColumnConstraint
-