Tool

Base class for tools.

May be configured with a cls and a handler which is a function (or name of a function) in the owning Panel.

Configs

77

Common

listenersEvents

Float & align

align: start | end= 'end'

Specify 'start' to place the tool before the owner's central element (e.g., the title of the panel).

anchorWidget
centeredWidget
draggableWidget
floatingWidget
xWidget
yWidget

Other

handler: function | String

The function to call when this tool is clicked. May be a function or function name prepended by "up." that is resolvable in an ancestor component (such as an owning Grid, Scheduler, Calendar, Gantt or TaskBoard)

ParameterTypeDescription
handler.eventEvent

The DOM event which activated the tool

handler.panelPanel

The owning Panel of the tool

handler.toolTool

The clicked Tool

Returns: void
href: String

If provided, turns the tool into a link

A ClickRepeater config object to specify how click-and-hold gestures repeat the click action.

columnWidget
rtlRTL
spanWidget

Accessibility

ariaLabelWidget
keyMapKeyMap

CSS

clsWidget
colorWidget
htmlClsWidget
styleWidget
uiWidget

DOM

adoptWidget
appendToWidget
contentWidget
datasetWidget
htmlWidget
idWidget
tagWidget
titleWidget

Layout

alignSelfWidget
dockWidget
flexWidget
heightWidget
hiddenWidget
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
textAlignWidget
weightWidget
widthWidget

Misc

dataFieldWidget
disabledWidget
localeClassLocalizable
localizableLocalizable
maskedWidget
ownerWidget
readOnlyWidget
refWidget
rippleWidget
tabWidget
tooltipWidget

Scrolling

Properties

65

Class hierarchy

isTool: Boolean= truereadonly
Identifies an object as an instance of Tool class, or subclass thereof.
isTool: Boolean= truereadonlystatic
Identifies an object as an instance of Tool class, or subclass thereof.
isDelayableDelayable
isEventsEvents
isKeyMapKeyMap
isLocalizableLocalizable
isWidgetWidget

Accessibility

keyMapKeyMap

CSS

clsWidget

DOM

appendToWidget
contentWidget
datasetWidget
elementWidget
htmlWidget
idWidget
styleWidget

Float & align

xWidget
yWidget

Layout

alignSelfWidget
flexWidget
heightWidget
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
widthWidget

Lifecycle

configBase

Misc

cellInfoWidget
disabledWidget
localeHelperLocalizable
localeManagerLocalizable
readOnlyWidget
refWidget
tabWidget
tooltipWidget

Other

$namestaticWidget
columnWidget
rtlRTL
spanWidget
typestaticWidget

Visibility

hiddenWidget
isVisibleWidget

Widget hierarchy

ownerWidget
parentWidget

Functions

58

Configuration

applyDefaultsstaticBase

Events

Float & align

alignToWidget
setXYWidget
showByWidget
toFrontWidget

Lifecycle

createstaticWidget
destroystaticBase
initClassstaticWidget

Misc

attachTooltipstaticWidget
fromElementstaticWidget
fromSelectorstaticWidget
getByIdstaticWidget
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

composeWidget
createOnFrameDelayable
disableWidget
enableWidget
focusWidget
LstaticLocalizable
maskWidget
onEvents
recomposeWidget
relayAllEvents
triggerEvents
unEvents
unmaskWidget

Visibility

hideWidget
showWidget

Widget hierarchy

closestWidget
containsWidget
ownsWidget
queryWidget
queryAllWidget
upWidget

Events

16

Fires when the default action is performed (the button is clicked)

// Adding a listener using the "on" method
tool.on('action', ({ source, domEvent }) => {

});
ParameterTypeDescription
sourceTool

The Tool

domEventEvent

DOM event

Fires when the tool is clicked

// Adding a listener using the "on" method
tool.on('click', ({ source, domEvent }) => {

});
ParameterTypeDescription
sourceTool

The Tool

domEventEvent

DOM event

catchAllEvents
destroyEvents
focusInWidget
focusOutWidget
hideWidget
paintWidget
readOnlyWidget
recomposeWidget
resizeWidget
showWidget

Event handlers

16

Called when the default action is performed (the button is clicked)

new Tool({
    onAction({ source, domEvent }) {

    }
});
ParameterTypeDescription
sourceTool

The Tool

domEventEvent

DOM event

Called when the tool is clicked

new Tool({
    onClick({ source, domEvent }) {

    }
});
ParameterTypeDescription
sourceTool

The Tool

domEventEvent

DOM event

onDestroyEvents
onFocusInWidget
onHideWidget
onPaintWidget
onResizeWidget
onShowWidget

Typedefs

6

CSS variables

20

Inherited