ContextToolExtension

Interface

The extension interface for ContextTool extension point.

Inheritance: ContextToolExtensionBaseExtension

Properties

Hide inherited properties
PropertyTypeNotes
(propsLayoutContextToolProps) => boolean

Check whether this tool is checked.

(propsLayoutContextToolProps) => boolean

Check whether this tool is disabled.

() => string

Return group id.

() => ComponentClass<SVGAttributes<SVGElement>any>

Return the icon.

(propsLayoutContextToolProps) => FunctionComponent<any> | ComponentClass<anyany>

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.

(propsLayoutContextToolProps) => string

Return the title.

id
inherited
string

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

index
inherited
number

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

label
inherited
string

The extension label.

name
inherited
string

The extension name.

(propsLayoutContextToolProps, evt?MouseEvent<anyMouseEvent>) => void

OnClick callback.

boolean

Check whether this tool should be opened by default when the toolbar opened.

(propsLayoutContextToolProps) => boolean

Check whether this tool is visible.

widgetId
inherited
string

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

checked

optional
Interface Property
checked: (propsLayoutContextToolProps) => boolean

Check whether this tool is checked.

Type declaration
    function(propsLayoutContextToolProps): boolean
    Parameters
    ParameterType
    props
    LayoutContextToolProps
    Returns 
    boolean

disabled

optional
Interface Property
disabled: (propsLayoutContextToolProps) => boolean

Check whether this tool is disabled.

Type declaration
    function(propsLayoutContextToolProps): boolean
    Parameters
    ParameterType
    props
    LayoutContextToolProps
    Returns 
    boolean

getGroupId

Interface Property
getGroupId: () => string

Return group id.

Type declaration
    function(): string
    Returns 
    string

getIcon

Interface Property
getIcon: () => ComponentClass<SVGAttributes<SVGElement>any>

Return the icon.

Type declaration
    function(): ComponentClass<SVGAttributes<SVGElement>any>
    Returns 
    ComponentClass<SVGAttributes<SVGElement>any>

getSettingPanel

Interface Property
getSettingPanel: (propsLayoutContextToolProps) => FunctionComponent<any> | ComponentClass<anyany>

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.

Type declaration
    function(propsLayoutContextToolProps): FunctionComponent<any> | ComponentClass<anyany>
    Parameters
    ParameterType
    props
    LayoutContextToolProps
    Returns 
    FunctionComponent<any> | ComponentClass<anyany>

getTitle

Interface Property
getTitle: (propsLayoutContextToolProps) => string

Return the title.

Type declaration
    function(propsLayoutContextToolProps): string
    Parameters
    ParameterType
    props
    LayoutContextToolProps
    Returns 
    string

id

inheritedinherited
Interface Property
id: string

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

Inherited from BaseExtension.id

index

optionalinheritedinherited
Interface Property
index: number

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

Inherited from BaseExtension.index

label

optionalinheritedinherited
Interface Property
label: string

The extension label.

Inherited from BaseExtension.label

name

optionalinheritedinherited
Interface Property
name: string

The extension name.

Inherited from BaseExtension.name

onClick

optional
Interface Property
onClick: (propsLayoutContextToolProps, evt?MouseEvent<anyMouseEvent>) => void

OnClick callback.

Type declaration
    function(propsLayoutContextToolProps, evt?MouseEvent<anyMouseEvent>): void
    Parameters
    ParameterType
    props
    LayoutContextToolProps
    evt
    MouseEvent<anyMouseEvent>
    Returns 
    void

openWhenAdded

optional
Interface Property
openWhenAdded: boolean

Check whether this tool should be opened by default when the toolbar opened.

visible

optional
Interface Property
visible: (propsLayoutContextToolProps) => boolean

Check whether this tool is visible.

Type declaration
    function(propsLayoutContextToolProps): boolean
    Parameters
    ParameterType
    props
    LayoutContextToolProps
    Returns 
    boolean

widgetId

optionalinheritedinherited
Interface Property
widgetId: string

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

Inherited from BaseExtension.widgetId

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