Class DialogFilterCondition<T>
java.lang.Object
docking.widgets.table.constraint.dialog.DialogFilterCondition<T>
- Type Parameters:
T
- the column type.
This class represents an "or'able" condition in the DialogFilterConditionSet
-
Constructor Summary
ConstructorDescriptionDialogFilterCondition
(DialogFilterConditionSet<T> parentCondition) ConstructorDialogFilterCondition
(DialogFilterConditionSet<T> parent, ColumnConstraint<T> constraint) Constructor when building from an existing ColumnTableFilter -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Deletes this OrFilterCondition from its parent.ColumnConstraint<?>[]
Returns a list of valid constraints for the columnReturn the constraint from the editor.For future expansion, a larger component may be allowed that will be displayed on an entire line below the constraint name.Returns an editor component for use by the user to change the constraint value.Returns the current Constraint for this OrFilterCondition.Returns the name of the current constraint for this OrFilterCondition.boolean
Returns true if the editor has a valid value.void
setSelectedConstraint
(String constraintName) Change the constraint to the constraint with the given name.void
Sets the constraint value from a string.toString()
-
Constructor Details
-
DialogFilterCondition
Constructor- Parameters:
parentCondition
- the parent condition that created this condition.
-
DialogFilterCondition
Constructor when building from an existing ColumnTableFilter- Parameters:
parent
- the parent condition that created this condition.constraint
- the constraint from an existing ColumnTableFilter.
-
-
Method Details
-
getColumnConstraints
Returns a list of valid constraints for the columnUsed by the dialog to populate the constraint comboBox
- Returns:
- a list of valid constraints for the column.
-
getSelectedConstraintName
Returns the name of the current constraint for this OrFilterCondition.- Returns:
- the name of the current constraint for this OrFilterCondition.
-
getSelectedConstraint
Returns the current Constraint for this OrFilterCondition.- Returns:
- the current Constraint for this OrFilterCondition.
-
setSelectedConstraint
Change the constraint to the constraint with the given name.- Parameters:
constraintName
- the name of the constraint to change to.
-
getConstraint
Return the constraint from the editor.- Returns:
- the constraint from the editor.
-
hasValidFilterValue
public boolean hasValidFilterValue()Returns true if the editor has a valid value.- Returns:
- true if the editor has a valid value.
-
getInlineEditorComponent
Returns an editor component for use by the user to change the constraint value. This is the component that the dialog's filter panel will display inline with the constraint name.- Returns:
- an editor component for use by the user to change the constraint value.
-
getDetailEditorComponent
For future expansion, a larger component may be allowed that will be displayed on an entire line below the constraint name.- Returns:
- an editor component for use by the user to change the constraint value.
-
delete
public void delete()Deletes this OrFilterCondition from its parent. If it is the last one in the parent, the parent will then delete itself from its parent and so on. -
setValue
Sets the constraint value from a string. Used for testing.- Parameters:
valueString
- the constraint value as a string that will be parsed.dataSource
- the table's DataSource object.
-
toString
-