Class DialogFilterRow

java.lang.Object
docking.widgets.table.constraint.dialog.DialogFilterRow

public class DialogFilterRow extends Object
This class represents a major "and-able" row in the dialog's filter panel. It is associated with a single column at any given time. It has a single DialogFilterConditionSet which is typed on the ColumnType. If the column changes, it will create a new condition set for the new Column.

The DialogFilterRow and the DialogFilterConditionSet classes work together to represent a row in the dialog's filter panel. The row is untyped since the associated column can change. The DialogFilterConditionSet is typed on the column's value type which allows it to take advantage of Java's templating for type safety.

  • Constructor Details

    • DialogFilterRow

      public DialogFilterRow(ColumnFilterDialogModel<?> dialogModel, LogicOperation logicOperation)
      Constructor with the first column selected
      Parameters:
      dialogModel - the model that created this filter row.
      logicOperation - the logic operation for how this filter row is combined with previous rows.
    • DialogFilterRow

      public DialogFilterRow(ColumnFilterDialogModel<?> dialogModel, ColumnConstraintSet<?,T> columnFilter)
      Constructor when constructing the model from an exiting filter.
      Parameters:
      dialogModel - the model that created this class.
      columnFilter - A column filter from the existing filter.
  • Method Details

    • setColumnData

      public void setColumnData(ColumnFilterData<?> columnData)
      Sets the column for this filter row.
      Parameters:
      columnData - the data for the column.
    • getLogicOperation

      public LogicOperation getLogicOperation()
      Returns the LogicOperation that specifies how this DialogFilterRow relates to previous rows.
      Returns:
      the LogicOperation for this row.
    • getAllColumnData

      public List<ColumnFilterData<?>> getAllColumnData()
      Method for the dialog to use to get the columns for the comboBox
      Returns:
      all the columns available to be filtered in the table.
    • getColumnFilterData

      public ColumnFilterData<?> getColumnFilterData()
      Gets the current ColumnData for this filter row.
      Returns:
      the current ColumnData for this filter row.
    • hasValidFilterValue

      public boolean hasValidFilterValue()
      Pass through for checking filter condition validity.
      Returns:
      true if valid, false otherwise.
    • getFilterConditions

      public List<DialogFilterCondition<?>> getFilterConditions()
      Returns a list of the "or-able" constraints configured for this column.
      Returns:
      a list of the "or-able" constraints configured for this column.
    • addFilterCondition

      public DialogFilterCondition<?> addFilterCondition()
      Adds a new DialogFilterCondition to this filter row.
      Returns:
      the newly created condition.
    • toString

      public String toString()
      Overrides:
      toString in class Object