ContextToolExtension

Interface

The extension interface for ContextTool extension point.

Inheritance: ContextToolExtensionBaseExtension

Properties

PropertyTypeNotes
string

The unique id. For widget's provided extension, the id pattern is: widgetId + extensionName

index
 optional 
number

If an extension point supports multiple extensions, the index is used to determine the extension order.

name
 optional 
string

The extension name.

widgetId
 optional 
string

The widget id that provides the extension. No widget id means the extension is provided by Jimu.

id

id: string

The unique id. For widget's provided extension, the id pattern is: widgetId + extensionName

index optional

index: number

If an extension point supports multiple extensions, the index is used to determine the extension order.

name optional

name: string

The extension name.

widgetId optional

widgetId: string

The widget id that provides the extension. No widget id means the extension is provided by Jimu.

Methods

MethodReturnsNotes
checked(props)
 optional 
boolean

Check whether this tool is checked.

disabled(props)
 optional 
boolean

Check whether this tool is disabled.

string

Return group id.

ComponentClass<SVGAttributes<SVGElement>any>

Return the icon.

ComponentClass<unknownany>

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?)
 optional 
void

OnClick callback.

visible(props)
 optional 
boolean

Check whether this tool is visible.

checked optional

checked(propsLayoutContextToolProps): boolean

Check whether this tool is checked.

Parameters
ParameterType
props
LayoutContextToolProps
Returns 
boolean

disabled optional

disabled(propsLayoutContextToolProps): boolean

Check whether this tool is disabled.

Parameters
ParameterType
props
LayoutContextToolProps
Returns 
boolean

getGroupId

getGroupId(): string

Return group id.

Returns 
string

getIcon

getIcon(): ComponentClass<SVGAttributes<SVGElement>any>

Return the icon.

Returns 
ComponentClass<SVGAttributes<SVGElement>any>

getSettingPanel

getSettingPanel(propsLayoutContextToolProps): ComponentClass<unknownany>

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
ParameterType
props
LayoutContextToolProps
Returns 
ComponentClass<unknownany>

getTitle

getTitle(propsLayoutContextToolProps): string

Return the title.

Parameters
ParameterType
props
LayoutContextToolProps
Returns 
string

onClick optional

onClick(propsLayoutContextToolProps, evt?MouseEvent<anyMouseEvent>): void

OnClick callback.

Parameters
ParameterType
props
LayoutContextToolProps
evt
MouseEvent<anyMouseEvent>
Returns 
void

visible optional

visible(propsLayoutContextToolProps): boolean

Check whether this tool is visible.

Parameters
ParameterType
props
LayoutContextToolProps
Returns 
boolean

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.