Class DialogFilterCondition<T>
- java.lang.Object
-
- docking.widgets.table.constraint.dialog.DialogFilterCondition<T>
-
- Type Parameters:
T
- the column type.
public class DialogFilterCondition<T> extends java.lang.Object
This class represents an "or'able" condition in the DialogFilterConditionSet
-
-
Constructor Summary
Constructors Constructor Description DialogFilterCondition(DialogFilterConditionSet<T> parentCondition)
ConstructorDialogFilterCondition(DialogFilterConditionSet<T> parent, ColumnConstraint<T> constraint)
Constructor when building from an existing ColumnTableFilter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
Deletes this OrFilterCondition from its parent.ColumnConstraint<?>[]
getColumnConstraints()
Returns a list of valid constraints for the columnColumnConstraint<T>
getConstraint()
Return the constraint from the editor.java.awt.Component
getDetailEditorComponent()
For future expansion, a larger component may be allowed that will be displayed on an entire line below the constraint name.java.awt.Component
getInlineEditorComponent()
Returns an editor component for use by the user to change the constraint value.ColumnConstraint<T>
getSelectedConstraint()
Returns the current Constraint for this OrFilterCondition.java.lang.String
getSelectedConstraintName()
Returns the name of the current constraint for this OrFilterCondition.boolean
hasValidFilterValue()
Returns true if the editor has a valid value.void
setSelectedConstraint(java.lang.String constraintName)
Change the constraint to the constraint with the given name.void
setValue(java.lang.String valueString, java.lang.Object dataSource)
Sets the constraint value from a string.java.lang.String
toString()
-
-
-
Constructor Detail
-
DialogFilterCondition
public DialogFilterCondition(DialogFilterConditionSet<T> parentCondition)
Constructor- Parameters:
parentCondition
- the parent condition that created this condition.
-
DialogFilterCondition
public DialogFilterCondition(DialogFilterConditionSet<T> parent, ColumnConstraint<T> constraint)
Constructor when building from an existing ColumnTableFilter- Parameters:
parent
- the parent condition that created this condition.constraint
- the constraint from an existing ColumnTableFilter.
-
-
Method Detail
-
getColumnConstraints
public ColumnConstraint<?>[] 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
public java.lang.String getSelectedConstraintName()
Returns the name of the current constraint for this OrFilterCondition.- Returns:
- the name of the current constraint for this OrFilterCondition.
-
getSelectedConstraint
public ColumnConstraint<T> getSelectedConstraint()
Returns the current Constraint for this OrFilterCondition.- Returns:
- the current Constraint for this OrFilterCondition.
-
setSelectedConstraint
public void setSelectedConstraint(java.lang.String constraintName)
Change the constraint to the constraint with the given name.- Parameters:
constraintName
- the name of the constraint to change to.
-
getConstraint
public ColumnConstraint<T> 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
public java.awt.Component 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
public java.awt.Component 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
public void setValue(java.lang.String valueString, java.lang.Object dataSource)
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-