Package gg.xp.xivsupport.gui.tables
Class CustomColumn<X>
java.lang.Object
gg.xp.xivsupport.gui.tables.CustomColumn<X>
-
Constructor Summary
ConstructorsConstructorDescriptionCustomColumn(String columnName, Function<X, @Nullable Object> getter) CustomColumn(String columnName, Function<X, @Nullable Object> getter, int fixedWidth) CustomColumn(String columnName, Function<X, @Nullable Object> getter, Consumer<TableColumn> columnConfigurer) Custom table column -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureColumn(TableColumn column) @Nullable VisualFilter<? super X>Returns the filter associated with this column, if any.withExtraConfig(Consumer<TableColumn> extraColumnConfigurer) withFilter(Function<Runnable, VisualFilter<? super X>> filterCreator) Associates a visual filter with this column.
-
Constructor Details
-
CustomColumn
-
CustomColumn
public CustomColumn(String columnName, Function<X, @Nullable Object> getter, Consumer<TableColumn> columnConfigurer) Custom table column- Parameters:
columnName- Name of the columngetter- Function to convert an instance in the table to whatever this column cares about. Note that this is executed **in the table rendering code** so it should under no circumstances involve non-trivial computation or access.columnConfigurer- Lets you configure the column, e.g. to override the renderer.
-
CustomColumn
-
-
Method Details
-
getColumnName
-
getValue
-
configureColumn
-
withExtraConfig
-
withFilter
Associates a visual filter with this column.- Parameters:
filterCreator- a function that creates aVisualFiltergiven a callback to run when the filter is updated.- Returns:
- this column instance for chaining.
-
getFilter
Returns the filter associated with this column, if any.- Parameters:
onUpdate- a callback to run when the filter is updated.- Returns:
- the visual filter, or null if no filter is associated.
-