Class DynamicTableContainsFilter

    • Constructor Detail

      • DynamicTableContainsFilter

        public DynamicTableContainsFilter()
    • Method Detail

      • handlesExpression

        public boolean handlesExpression​(java.lang.String filterExpression)
        Description copied from class: DynamicTableFilterProvider
        Whether this filter provider handles the given filter expression. If true is returned, DynamicTableFilterProvider.keepRecord(int, boolean, String, Object, Map) will be called for each record to determine whether the given record is filtered out or not. If false is returned then the dynamic table model will continue looking for a filter handler. Filter expression should never be null or an all whitespace or empty string since DynamicTableModel has built in logic to handle that before asking filters.
        Specified by:
        handlesExpression in class DynamicTableFilterProvider
        Parameters:
        filterExpression - The expression the user has provided.
        Returns:
        True if this filter should handle this expression. False otherwise.
      • keepRecord

        public boolean keepRecord​(int sourceIndex,
                                  boolean isChecked,
                                  java.lang.String filterExpression,
                                  java.lang.Object record,
                                  java.util.Map<java.lang.String,​java.lang.Object> rowValues)
        Description copied from class: DynamicTableFilterProvider
        If DynamicTableFilterProvider.handlesExpression(String) returns true, this method will be invoked for each record. It should return true for records that should make it into the final collection and false for records that should be filtered out.
        Specified by:
        keepRecord in class DynamicTableFilterProvider
        Parameters:
        sourceIndex - The index of the record in the full un-filtered source collection.
        isChecked - Whether the given record is currently checked
        filterExpression - The filter expression provided by the user. This value should never be null, only whitespace or empty.
        record - The record to inspect and make a decision about.
        rowValues - A map of the values actual represented as columns in the table. Relies on table model's DynamicTableValueCallback.
        Returns:
        True to keep the record, false to filter it out.