Tool Panel Technical Reference
Summary
- Tool Panel State and Tool Panel Options are used to set up Tool Panels at design-time
- Run-time access to Tool Panels is through Tool Panel API
Tool Panel State
The Tool Panel State contains 2 collections:
| Property | Type | Description | Default |
|---|---|---|---|
| ModuleButtons | AdaptableModuleButtons | AdapTable Module Buttons visible in ToolPanel | Empty Array |
| ToolPanels | AdaptableToolPanelDefinition[] | Adaptable Tool Panels which are viaible | ToolPanels for all available Modules (subject to Entitlement rules) |
A Tool Panel is defined as follows:
| Property | Type | Description | Default |
|---|---|---|---|
| Name | AdaptableToolPanel | string | ToolPanel name - either an Adaptable Module or a Custom ToolPanel (defined in ToolPanel Options) | |
| VisibilityMode | 'expanded' | 'collapsed' | Whether the ToolPanel is 'expanded' or 'collapsed' | 'collapsed' |
Tool Panel Options
The Tool Panel Options section is used to set up the Tool Panel.
| Property | Type | Description | Default |
|---|---|---|---|
| customButtons | AdaptableButton<ToolPanelButtonContext>[] | ToolPanel Buttons provided by Users which perform custom behaviour | |
| customToolPanels | CustomToolPanel[] | ToolPanels provided by Users which contain custom content | |
| showToolPanelsDropdown | boolean | Display the Tool Panels dropdown | true |
Tool Panel API
The Tool Panel API section provides run-time access to the Tool Panel.
| Method | Returns | Description |
|---|---|---|
| closeAdapTableToolPanel() | void | Closes the Tool Panel section (irrespective of which toolpanel is showing) |
| getCustomToolPanelButtons() | AdaptableButton<ToolPanelButtonContext>[] | Retrieves all Custom Tool Panel Buttons defined in ToolPanelOptions |
| getCustomToolPanelByName(name) | CustomToolPanel | undefined | Retrieves the CustomToolPanel with the given name (or undefined if no match is found) |
| getCustomToolPanels() | CustomToolPanel[] | Retrieves all Custom Tool Panels defined in ToolPanelOptions |
| getModuleButtons() | AdaptableModuleButtons | Sets the Module buttons from the Adaptable ToolPanel |
| getToolPanelState() | ToolPanelState | Retrieves Tool Panel section from Tool Panel State |
| openAdapTableToolPanel() | void | Opens the Adaptable ToolPanel Component |
| setAdaptableToolPanelVisibilityMode(adaptableToolPanel, visibilityMode) | void | Sets the given Adaptable ToolPanel with the provided visibilityMode (expanded / collapsed) |
| setCustomToolPanelVisibilityMode(customToolPanelName, visibilityMode) | void | Sets the Custom ToolPanel with the given name with the provided visibilityMode (expanded / collapsed) |
| setModuleButtons(moduleButtons) | void | Sets the Module buttons in the Adaptable ToolPanel |
| showToolPanelPopup() | void | Opens Settings Panel with Tool Panel section selected and visible |