Package docking.widgets.table.constraint.dialog

# Class DialogFilterCondition<T>

java.lang.Object
docking.widgets.table.constraint.dialog.DialogFilterCondition<T>

Type Parameters:
  `T` - the column type.

public class DialogFilterCondition<T> extends Object
This class represents an "or'able" condition in the DialogFilterConditionSet

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DialogFilterCondition(DialogFilterConditionSet<T> parentCondition)`
  Constructor
  `DialogFilterCondition(DialogFilterConditionSet<T> parent, ColumnConstraint<T> constraint)`
  Constructor when building from an existing ColumnTableFilter

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `delete()`
  Deletes this OrFilterCondition from its parent.
  `ColumnConstraint<?>[]`
  `getColumnConstraints()`
  Returns a list of valid constraints for the column
  `ColumnConstraint<T>`
  `getConstraint()`
  Return the constraint from the editor.
  `Component`
  `getDetailEditorComponent()`
  For future expansion, a larger component may be allowed that will be displayed on an entire line below the constraint name.
  `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.
  `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(String constraintName)`
  Change the constraint to the constraint with the given name.
  `void`
  `setValue(String valueString, Object dataSource)`
  Sets the constraint value from a string.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### 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 Details

  - ### 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 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(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 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 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(String valueString, 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 String toString()
    Overrides:
      `toString` in class `Object`