Class 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 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 column

        Used 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 class java.lang.Object