Interface
The extension interface for ContextTool extension point.
Properties
| Property | Type | Notes |
|---|---|---|
idinherited | string | The unique ID. For widget's provided extension, the id pattern is: widgetId + extensionName |
indexinherited | number | If an extension point supports multiple extensions, the index is used to determine the extension order. |
labelinherited | string | The extension label. |
nameinherited | string | The extension name. |
openWhenAdded | boolean | Check whether this tool should be opened by default when the toolbar opened. |
widgetIdinherited | string | The widget ID that provides the extension. No widget id means the extension is provided by Jimu. |
id
id: stringThe unique ID. For widget's provided extension, the id pattern is: widgetId + extensionName
index
index: numberIf an extension point supports multiple extensions, the index is used to determine the extension order.
openWhenAdded
openWhenAdded: booleanCheck whether this tool should be opened by default when the toolbar opened.
widgetId
widgetId: stringThe widget ID that provides the extension. No widget id means the extension is provided by Jimu.
Methods
| Method | Returns | Notes |
|---|---|---|
checked(props) | boolean | Check whether this tool is checked. |
disabled(props) | boolean | Check whether this tool is disabled. |
getGroupId() | string | Return group id. |
getIcon() | ComponentClass<SVGAttributes<SVGElement>> | Return the icon. |
getSettingPanel(props) | FunctionComponent<any> | ComponentClass<any, any> | The setting panel of the tool. Returning null means there is no setting panel for the tool. If the returned value is not null, the setting panel will be rendered. |
getTitle(props) | string | Return the title. |
onClick(props, evt?) | void | OnClick callback. |
visible(props) | boolean | Check whether this tool is visible. |
checked
checked(props: LayoutContextToolProps): booleanCheck whether this tool is checked.
Parameters
| Parameter | Type |
|---|---|
props | LayoutContextToolProps |
Returns
booleandisabled
disabled(props: LayoutContextToolProps): booleanCheck whether this tool is disabled.
Parameters
| Parameter | Type |
|---|---|
props | LayoutContextToolProps |
Returns
booleangetIcon
Interface MethodgetIcon(): ComponentClass<SVGAttributes<SVGElement>>Return the icon.
Returns
ComponentClass<SVGAttributes<SVGElement>>getSettingPanel
Interface MethodgetSettingPanel(props: LayoutContextToolProps): FunctionComponent<any> | ComponentClass<any, any>The setting panel of the tool. Returning null means there is no setting panel for the tool. If the returned value is not null, the setting panel will be rendered.
Parameters
| Parameter | Type |
|---|---|
props | LayoutContextToolProps |
Returns
FunctionComponent<any> | ComponentClass<any, any>getTitle
Interface MethodgetTitle(props: LayoutContextToolProps): stringReturn the title.
Parameters
| Parameter | Type |
|---|---|
props | LayoutContextToolProps |
Returns
string