public final class ColumnType
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ColumnType.ColumnTypeHandler
Defines a class that applies settings for a specific column type.
|
static class |
ColumnType.DefaultColumnTypeHandler
Default handler that is used to apply settings + registering
datahandler/cellrenderer and potentially label and alt texts.
|
Constructor and Description |
---|
ColumnType() |
Modifier and Type | Method and Description |
---|---|
static void |
apply(MutableColumn col)
Applies the registered
ColumnType.ColumnTypeHandler based on the value of
the Column Type setting. |
static ColumnType.ColumnTypeHandler |
getColumnTypeHandler(java.lang.String columnType)
Get the
ColumnType.ColumnTypeHandler for the specified column type. |
static java.lang.String[] |
getRegisteredColumnTypes()
Returns all the registered column types.
|
static void |
register(java.lang.String columnType,
java.lang.Class<? extends DataHandler> dataHandlerClass,
java.lang.Class<? extends CellRenderer> cellRendererClass)
Register default data handler and cell renderer classes for a particular
column type.
|
static void |
register(java.lang.String columnType,
ColumnType.ColumnTypeHandler handler)
Register a column type.
|
static void |
register(java.lang.String columnType,
java.util.Map<java.lang.String,java.lang.Object> settings)
Register default settings for a particular column type.
|
public static void register(java.lang.String columnType, ColumnType.ColumnTypeHandler handler)
columnType
- The column type.handler
- The handler for the column type.public static void register(java.lang.String columnType, java.util.Map<java.lang.String,java.lang.Object> settings)
columnType
- The column type.settings
- The settings that should be applied on the column.public static void register(java.lang.String columnType, java.lang.Class<? extends DataHandler> dataHandlerClass, java.lang.Class<? extends CellRenderer> cellRendererClass)
columnType
- The column type.dataHandlerClass
- The data handler class that will be set.cellRendererClass
- The cell renderer class that will be set.public static void apply(MutableColumn col)
ColumnType.ColumnTypeHandler
based on the value of
the Column Type
setting. If no handler has been registered
for the Column Type, no action will be taken on the settings.col
- The column.public static ColumnType.ColumnTypeHandler getColumnTypeHandler(java.lang.String columnType)
ColumnType.ColumnTypeHandler
for the specified column type.columnType
- The column type.ColumnType.ColumnTypeHandler
.public static java.lang.String[] getRegisteredColumnTypes()
Copyright © Technia AB. All Rights Reserved.