ColumnFilter to allow Strings, disallow Mols?


I'm putting together a DialogComponentColumnFilter.  I'd like it to list all of the StringCell, IntCell and DoubleCells, but not MolCell (and other structure-containing Cells).

I'm using a DataValueColumnFilter(StringValue.class, IntValue.class, DoubleValue.class), but I don't see a way to say "don't include String-derived classes (like MolValue)".  Do I need to write my_own_ColumnFilter, implementing the ColumnFilter interface, or is there a simpler way?


1 Like

Yes, there is. The DialogComponentColumnFilter(..., ColumnFilter) constructor can be used to specify a self-implemented filter that is called from the column filter to display only the columns that match ColumnFilter#includeColumn(DataColumnSpec).

1 Like