Class TableViewUtil
java.lang.Object
org.knime.core.webui.node.view.table.TableViewUtil
- Author:
- Konrad Amtenbrink, KNIME GmbH, Berlin, Germany, Christian Albrecht, KNIME GmbH, Konstanz, Germany, Marc Bux, KNIME GmbH, Berlin, Germany, Martin Horn, KNIME GmbH, Konstanz, Germany
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateInitialDataService(Supplier<TableViewViewSettings> settingsSupplier, Supplier<org.knime.core.node.BufferedDataTable> tableSupplier, Supplier<Set<org.knime.core.data.RowKey>> selectionSupplier, String tableId) createInitialDataService(Supplier<TableViewViewSettings> settingsSupplier, Supplier<org.knime.core.node.BufferedDataTable> tableSupplier, Supplier<Set<org.knime.core.data.RowKey>> selectionSupplier, String tableId, Runnable onDeactivate, Runnable onDispose) static org.knime.core.util.Pair<InitialDataService<TableViewInitialData>,Supplier<RpcDataService>> createInitialDataServiceWithRPCDataService(Supplier<TableViewViewSettings> settingsSupplier, Supplier<org.knime.core.node.BufferedDataTable> tableSupplier, Supplier<Set<org.knime.core.data.RowKey>> selectionSupplier, String tableId, Runnable onDeactivate, Runnable onDispose) This method must be used instead of constructing the initial data service and the RPC data service individually if there are settings which influence what tables are cached within theTableViewDataService.static RpcDataServicecreateRpcDataService(TableViewDataService tableViewDataService, String tableId) static TableViewDataServicecreateTableViewDataService(Supplier<org.knime.core.node.BufferedDataTable> tableSupplier, Supplier<Set<org.knime.core.data.RowKey>> selectionSupplier, String tableId) static voidregisterRendererRegistryCleanup(String tableId, org.knime.core.node.workflow.NodeContainer nc) Method that is to be called when creating aTableNodeViewand that registers the to-be-visualized table's unique id with the globalDataValueImageRendererRegistry.static StringtoTableId(org.knime.core.node.workflow.NodeID nodeID) Helper to return a proper table id from a node id.
-
Field Details
-
PAGE
The page representing the table view.
-
-
Method Details
-
createRpcDataService
public static RpcDataService createRpcDataService(TableViewDataService tableViewDataService, String tableId) - Parameters:
tableViewDataService-tableId-- Returns:
- a new table view data service instance
-
createTableViewDataService
public static TableViewDataService createTableViewDataService(Supplier<org.knime.core.node.BufferedDataTable> tableSupplier, Supplier<Set<org.knime.core.data.RowKey>> selectionSupplier, String tableId) - Parameters:
tableSupplier- supplying the input tableselectionSupplier- supplying the currently selected row keys (for update of totalSelected when filtering); ornullif no selecting is showntableId-- Returns:
- the
TableViewDataServiceassociated to the node
-
createInitialDataService
public static InitialDataService<TableViewInitialData> createInitialDataService(Supplier<TableViewViewSettings> settingsSupplier, Supplier<org.knime.core.node.BufferedDataTable> tableSupplier, Supplier<Set<org.knime.core.data.RowKey>> selectionSupplier, String tableId) - Parameters:
settingsSupplier-tableSupplier-selectionSupplier-tableId-- Returns:
- the table view initial data service
-
createInitialDataService
public static InitialDataService<TableViewInitialData> createInitialDataService(Supplier<TableViewViewSettings> settingsSupplier, Supplier<org.knime.core.node.BufferedDataTable> tableSupplier, Supplier<Set<org.knime.core.data.RowKey>> selectionSupplier, String tableId, Runnable onDeactivate, Runnable onDispose) - Parameters:
settingsSupplier-tableSupplier-selectionSupplier-tableId-onDeactivate-onDispose-- Returns:
- the table view initial data service
-
createInitialDataServiceWithRPCDataService
public static org.knime.core.util.Pair<InitialDataService<TableViewInitialData>,Supplier<RpcDataService>> createInitialDataServiceWithRPCDataService(Supplier<TableViewViewSettings> settingsSupplier, Supplier<org.knime.core.node.BufferedDataTable> tableSupplier, Supplier<Set<org.knime.core.data.RowKey>> selectionSupplier, String tableId, Runnable onDeactivate, Runnable onDispose) This method must be used instead of constructing the initial data service and the RPC data service individually if there are settings which influence what tables are cached within theTableViewDataService. E.g. the first of such settings is "showSelectedRowsOnly". The returned pair uses the same instance ofTableViewDataServiceImplso that the RPC data service caches stay in sync with the initial data supplied to the front-end. Otherwise methods which rely on these caches likeTableViewDataService.getCopyContent(org.knime.core.webui.node.view.table.data.TableViewDataService.SpecialColumnConfig, org.knime.core.webui.node.view.table.data.TableViewDataService.SpecialColumnConfig, boolean, java.lang.String[], int, int)andTableViewDataService.getCurrentRowKeys()can return wrong data.- Parameters:
settingsSupplier-tableSupplier-selectionSupplier-tableId-onDeactivate-onDispose-- Returns:
- the table view initial data service
-
registerRendererRegistryCleanup
public static void registerRendererRegistryCleanup(String tableId, org.knime.core.node.workflow.NodeContainer nc) Method that is to be called when creating aTableNodeViewand that registers the to-be-visualized table's unique id with the globalDataValueImageRendererRegistry.- Parameters:
tableId- a globally unique id to be able to uniquely identify the images belonging to the table used herenc- the node where the clean-up callback is being registered
-
toTableId
Helper to return a proper table id from a node id.- Parameters:
nodeID-- Returns:
- a table id (which is globally unique, because the node id is)
-