Class ColumnFilterData<T>
java.lang.Object
docking.widgets.table.constraint.dialog.ColumnFilterData<T>
- Type Parameters:
T- the column type.
- All Implemented Interfaces:
Comparable<ColumnFilterData<T>>
This class provides all known
ColumnConstraints for a given table column.
Class for maintaining information about a particular table's column for the purpose of
configuring filters based on that column's values. Instances of this class are generated
by examining a table's column types and finding any ColumnConstraints that support
that type. If column constraints are found, a ColumnFilterData is created for that column
which then allows filtering on that columns data via the column constraints mechanism (which
is different than the traditional text filter).
-
Constructor Summary
ConstructorsConstructorDescriptionColumnFilterData(RowObjectFilterModel<?> model, int columnModelIndex, int columnViewIndex, Class<T> columnClass) Constructs a new ColumnFilterData for a table column -
Method Summary
Modifier and TypeMethodDescriptionintintReturns the model index for the column represented by this class.getConstraint(String constraintName) Returns the ColumnConstraint with the given nameColumnConstraint<?>[]Returns the list of applicable constraints for this columnReturns the first constraint in the list.getName()Returns the name of the column represented by this ColumnFilterDataintReturns the view index of the columnbooleanReturns true if the column represented by this data has applicable column filters.voidreplace(ColumnConstraint<T> value) Replace the same named constraint with the given constraint.voidsetViewIndex(int viewIndex) Sets the viewIndextoString()
-
Constructor Details
-
ColumnFilterData
public ColumnFilterData(RowObjectFilterModel<?> model, int columnModelIndex, int columnViewIndex, Class<T> columnClass) Constructs a new ColumnFilterData for a table column- Parameters:
model- the table modelcolumnModelIndex- the model index of the columncolumnViewIndex- the view index of the columncolumnClass- the class (type) of the column
-
-
Method Details
-
setViewIndex
public void setViewIndex(int viewIndex) Sets the viewIndexThis needs to be updated whenever columns are added, deleted, or moved.
- Parameters:
viewIndex- the new view index
-
getViewIndex
public int getViewIndex()Returns the view index of the column- Returns:
- the view index of the column.
-
isFilterable
public boolean isFilterable()Returns true if the column represented by this data has applicable column filters.- Returns:
- true if the column represented by this data has applicable column filters.
-
getConstraints
Returns the list of applicable constraints for this column- Returns:
- the list of applicable constraints for this column
-
getName
Returns the name of the column represented by this ColumnFilterData- Returns:
- the name of the column represented by this ColumnFilterData
-
toString
-
getConstraint
Returns the ColumnConstraint with the given name- Parameters:
constraintName- the name of the constraint to retrieve- Returns:
- the ColumnConstraint with the given name.
-
getColumnModelIndex
public int getColumnModelIndex()Returns the model index for the column represented by this class.- Returns:
- the model index for the column represented by this class.
-
getFirstConstraint
Returns the first constraint in the list.- Returns:
- the constraint
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-
replace
Replace the same named constraint with the given constraint. This allows the column constraint to remember the last used value.- Parameters:
value- the constraint to be used to replace the existing one with the same name.
-