Interface AbstractWrapperTypeColumnRenderer<T>

Type Parameters:
T - the column type
All Superinterfaces:
GColumnRenderer<T>, TableCellRenderer

public interface AbstractWrapperTypeColumnRenderer<T> extends GColumnRenderer<T>
A convenience interface of GColumnRenderer for primitive-based/wrapper-based renderers. This class implements getFilterString(Object, Settings) to throw an exception, as it should not be called for primitive types.

The basic wrapper types, like Number, and some others, like Date, have special built-in filtering capabilities. Columns whose column type is one of the wrapper classes will not have their getFilterString(Object, Settings) methods called. They can stub out those methods by throwing the exception returned by this method.

  • Method Details

    • getColumnConstraintFilterMode

      default GColumnRenderer.ColumnConstraintFilterMode getColumnConstraintFilterMode()
      Description copied from interface: GColumnRenderer
      Returns the current mode of how column constraints will be used to filter this column

      This method is typically not overridden. This is only needed in rare cases, such as when a column uses a renderer, but does *not* want this column to be filtered using a String column constraint. Or, if a column uses a renderer and wants that text to be available as a filter, along with any other column constraints.

      Specified by:
      getColumnConstraintFilterMode in interface GColumnRenderer<T>
      Returns:
      the mode
    • getFilterString

      default String getFilterString(T t, Settings settings)
      Description copied from interface: GColumnRenderer
      Returns a string that is suitable for use when filtering. The returned String should be an unformatted (e.g., no HTML markup, icons, etc) version of what is on the screen. If the String returned here does not match what the user sees (that which is rendered), then the filtering action may confuse the user.
      Specified by:
      getFilterString in interface GColumnRenderer<T>
      Parameters:
      t - the column type instance
      settings - any settings the converter may need to convert the type
      Returns:
      the unformatted String version of what is rendered in the table cell on screen