Last updated

API / geotoolkit / gauges / LinearGauge / LinearGauge

Class: LinearGauge

gauges.LinearGauge.LinearGauge

Implements a class which defines a linear gauge. Linear gauge is a rectangular shape (possibly with round corners), which represents a range of data. If horizontal - range is represented from left to right, if vertical, range is represented from bottom to top (always from min to max). The linear gauge supports adding one axis which can be placed on either sides of the main shape, or in the center. A indicator fill and a needle are the tools which are used to visualize the current value of the gauge. Fill is filling the gauge shape from min to the current value on the axis. Needle positions itself on the current value on top of the indicator shape.

Hierarchy

Table of contents

Constructors
Methods
addAlarmaddAxisaddCssClass
addCustomComponentaddIndicatorRegionaddInvalidateHandler
addRegionapplyOpacityapplyResponsiveStyle
checkCollisioncleanAlarmsclearAxes
clearRegionscloneconnectStyle
copyConstructordisconnectStyledisplayRegions
disposeenableClippingenableEventPropagation
enumerateNodesexecutefilter
getAlarmgetAlarmsgetAnimation
getAnimationStylegetAnimationTimegetAxes
getAxisgetAxisPropertiesgetBackgroundStyle
getBoundsgetClassNamegetClipStyle
getCssgetCssClassgetCssClasses
getCssTransformgetCustomComponentgetCustomComponents
getFunctionRegistrygetIdgetInvalidateMethod
getLayoutStylegetLocalTransformgetMarginsStyle
getNamegetNamePropertiesgetNeedleProperties
getOpacitygetOpacityBlendModegetOrientation
getParentgetPropertiesgetProperty
getPropertyKeysgetRangegetRegion
getRenderingFiltergetResponsiveStylegetRoot
getScaleScrollStrategygetSceneTransformgetTag
getValuegetValuePropertiesgetVisible
getWorldTransformgetZIndexhasAxis
hasCssClasshasEventListenerhideRegions
invalidateinvalidateParentisDisposed
isEventPropagationEnabledisNotificationEnabledisSelectable
isSilentnotifyoff
ononParentChangedonVisibilityChanged
postRenderingpreRenderingregisterAnimationStyle
removeAlarmremoveAxisremoveCssClass
removeCustomComponentremoveIndicatorRegionremoveInvalidateHandler
removeRegionrenderrenderAsync
rotatescalesetAnimation
setAnimationStylesetAnimationTimesetAxisProperties
setBackgroundStylesetBoundssetClipStyle
setCsssetCssClasssetCssTransform
setFunctionRegistrysetIdsetLayoutStyle
setLocalTransformsetMarginsStylesetName
setNamePropertiessetNeedlesetNeedleProperties
setNotificationsetOpacitysetProperties
setPropertysetRangesetRegionSize
setRenderingFiltersetResponsiveStylesetScaleScrollStrategy
setSelectablesetSilentsetTag
setValuesetValuePropertiessetVisible
setZIndexsheartoString
translateunregisterAnimationStyleupdateSceneTransformation
updateStateupdateTimeStampenableSceneGraphNotification
findParentgetClassNameisSceneGraphNotificationEnabled
Css Properties
Name Type Description
animationfunctionFunctionsName of an easing function in function registry which will define the animation behavior
animationtimenumber
backgroundBackgroundStyleOptionsProperties for rectangular background of the gauge
background-fillstylestringBackground fillstyle
background-fillstyleFillStyleBackground fillstyle
background-fillstyle-colorstringColor in CSS form
background-fillstyle-evenoddmodebooleanEven-odd fill mode
background-fillstyle-fillpatternPatternPattern
background-fillstyle-fillpattern-containernamestringAn optional container name, which creates an image pattern. This parameter is used for serialization if you want to save are reference to pattern instead of the pattern itself
background-fillstyle-fillpattern-patternnamestringName of this pattern for indexing
background-fillstyle-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
background-fillstyle-foregroundstringForeground color
background-fillstyle-patternPatternPattern
background-linestylestringBackground linestyle
background-linestyleLineStyleBackground linestyle
background-linestyle-colorstringColor in CSS form
background-linestyle-fillstringOptional fill style to be used to fill lines generated with this style
background-linestyle-fillFillStyleOptional fill style to be used to fill lines generated with this style
background-linestyle-linecapCapStyleThe line cap style
background-linestyle-linedashoffsetnumberLine dash offset of dashed line
background-linestyle-linejoinJoinStyleThe line join style
background-linestyle-pixelsnapmodebooleanPixel Snap Mode, default(
background-linestyle-scalablebooleanTrue if width should depend on transformation
background-linestyle-unitstringOptional unit for the width
background-linestyle-widthnumber | stringThe line thickness
background-visiblebooleanBackground visibility
boundsRectBounds of the gauge in parent model limits. Will override x,y,widht,height
bounds-heightnumberHeight
bounds-readonlybooleanReadonly
bounds-widthnumberWidth
bounds-xnumberLeft
bounds-ynumberTop
clippingbooleanContainer group clipping
clipstyleClipStyleClipping style
clipstyle-evenoddbooleanTrue if evenodd mode is on ('nonzero' mode otherwise)
clipstyle-geometryGraphicsPathClipping geometry
clipstyle-geometry-boundsRectBounds
clipstyleGraphicsPathClipping style
cssclassstringThe css class name of this node
csscursorstringCSS cursor associated with node
cssstylestringCSS style to be applied to inserted elements
fillstylestringA new fill style
fillstyleFillStyleA new fill style
heightnumberHeight of the gauge in its parent model limits
idstring | numberId of the node, its a unique identifier
indicatorIndicatorOptionsProperties pertaining to indicator and its fill
indicator-backgroundfillstringFill style of the background of indicator
indicator-backgroundfillFillStyleFill style of the background of indicator
indicator-backgroundlinestringLine style of the background of indicator
indicator-backgroundlineLineStyleLine style of the background of indicator
indicator-cornerradiusnumber | stringCorner radius of the indicator shape in CSS notation, relative to the width of the shape. (50% will create a circle)
indicator-fillpositionDynamicElementPositionLayer position of the fill
indicator-fillwidthnumber | stringFill width
indicator-heightnumber | stringHeight of the indicator in CSS format, relative to the gauge height
indicator-valuefillstylestringFill style of the value fill in the indicator
indicator-valuefillstyleFillStyleFill style of the value fill in the indicator
indicator-valuelinestylestringLine style of the value fill in the indicator
indicator-valuelinestyleLineStyleLine style of the value fill in the indicator
indicator-widthnumber | stringWidth of the indicator in CSS format, relative to the gauge width
linestylestringLine style
linestyleLineStyleLine style
localtransformTransformationLocal transformation
localtransform-dxnumberX axis translation
localtransform-dynumberY axis translation
localtransform-xxnumberX scale
localtransform-xynumberXy skew
localtransform-yxnumberYx skew
localtransform-yynumberY scale
marginsnumber | stringIt has properties for specifying the margins for each side
namestringName of the node. It is often used for debugging purposes or to simplify queries
namestyleNameOptionsProperties of the test displaying name of the gauge
namestyle-alignmentAnchorTypeDefines where in the region the name text will be positioned
namestyle-colorstringColor of name text
namestyle-displaystrategyValueDisplayStrategiesA display strategy to define how the name text fits the region it is rendered in
namestyle-fontstringFont of name text
namestyle-positionRegionsRegion in which to render the name text
namestyle-propertiesOptionsSee
namestyle-properties-cssclassstringThe css class name of this node
namestyle-properties-idstring | numberId of the node, its a unique identifier
namestyle-properties-namestringName of the node. It is often used for debugging purposes or to simplify queries
namestyle-properties-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
namestyle-properties-taganyCustom information associated with node. It is a user object which can be used by client code to store information or attach an application object to the shape
namestyle-properties-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
namestyle-properties-z-indexnumberDefine node z-index
namestyle-propertiesOptionsSee
namestyle-properties-clipstyleClipStyleClipping style
namestyle-properties-clipstyleGraphicsPathClipping style
namestyle-properties-csscursorstringCSS cursor associated with node
namestyle-properties-cssstylestringCSS style to be applied to inserted elements
namestyle-properties-localtransformTransformationLocal transformation
namestyle-properties-marginsnumber | stringIt has properties for specifying the margins for each side
namestyle-properties-opacitynumberNode opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context
namestyle-properties-opacityblendmodeBlendModeNode opacity mode to blend it
namestyle-properties-scalescrollstrategyScaleScrollStrategyScale scroll strategy
namestyle-properties-scalescrollstrategy-enabledbooleanEnable flag
namestyle-properties-transformstringAdditional CSS transformation applied to node or 'none'
namestyle-properties-transformTransformationAdditional CSS transformation applied to node or 'none'
namestyle-propertiesOptionsSee
namestyle-properties-fillstylestringStyle applied on fill
namestyle-properties-fillstyleFillStyleStyle applied on fill
namestyle-properties-linestylestringStyle applied on outline
namestyle-properties-linestyleLineStyleStyle applied on outline
namestyle-propertiesOptionsSee
namestyle-properties-alignmentAnchorTypeAlignment according to the anchor point
namestyle-properties-axnumberAnchor x position
namestyle-properties-aynumberAnchor y position
namestyle-properties-heightnumberShape height
namestyle-properties-ispointingupbooleanDefines whether the shape is always pointing up
namestyle-properties-layoutstyleLayoutStyleLayout style to specify how to lay out shape
namestyle-properties-layoutstyle-constraintSizeConstraintLayout constrains
namestyle-properties-layoutstyle-flexgrownumberNumber specifying how much the item will grow relative to the rest of the items inside the same container
namestyle-properties-layoutstyle-flexshrinknumberNumber specifying how much the item will shrink relative to the rest of the items inside the same container
namestyle-properties-layoutstyle-floatstringFloat position
namestyle-properties-layoutstyle-positionstringLayout position
namestyle-properties-layoutstyle-sizenumber | stringLayout size
namestyle-properties-maxdimensionDimensionMaximum size for rendering
namestyle-properties-maxdimension-heightnumberHeight of dimension
namestyle-properties-maxdimension-widthnumberWidth of dimension or properties
namestyle-properties-mindimensionDimensionMinimum size for rendering
namestyle-properties-preserveaspectratiobooleanPreserve aspect ratio of the anchored shape
namestyle-properties-preservereadingorientationbooleanPreserve reading orientation for local transform
namestyle-properties-preserverightanglebooleanPreserve right angle for local transformation
namestyle-properties-rotationanglenumberRotation angle at anchor
namestyle-properties-sizeisindevicespacebooleanIs coordinate in device space
namestyle-properties-useminmaxdimensionsbooleanUse the min max dimensions to limit visual size
namestyle-properties-widthnumberShape width
namestyle-propertiesOptionsSee
namestyle-properties-autosizebooleanAutomatically fit shape bounds to text size, default is true Set it to false if you have more than one paragraph inside with different alignment
namestyle-properties-ellipsisstringstringString ellipsis that renders if ellipsis is true
namestyle-properties-paddingnumber
namestyle-properties-paddingstylenumber | stringInner padding style in device coordinates
namestyle-properties-radiusnumberBorder radius in device coordinates
namestyle-properties-showellipsisbooleanEllipsis flag
namestyle-properties-sizemodeSizeModeText size mode, default value depends on width and height settings
namestyle-properties-textstringText to display
namestyle-properties-textstylestringTextStyle to display
namestyle-properties-textstyleTextStyleTextStyle to display
namestyle-properties-textstyle-alignmentAlignmentStyleAlignment
namestyle-properties-textstyle-autosizebooleanAuto font size on high definition display
namestyle-properties-textstyle-backgroundstringBackground style
namestyle-properties-textstyle-backgroundFillStyleBackground style
namestyle-properties-textstyle-baselineBaseLineStyleBase line
namestyle-properties-textstyle-colorstringColor in CSS form
namestyle-properties-textstyle-fillFillStyleText fill style
namestyle-properties-textstyle-fontstringFont see
namestyle-properties-textstyle-fonturlstringThe place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword
namestyle-properties-textstyle-lineheightstring | numberLine height
namestyle-properties-textstyle-multilinebooleanAllow multi-line text
namestyle-properties-textstyle-outlinestringOutline style
namestyle-properties-textstyle-outlineLineStyleOutline style
namestyle-properties-textstyle-overflowwrapOverflowWrapStyleOverflow wrap
namestyle-properties-textstyle-strikethroughstringStrikethrough style
namestyle-properties-textstyle-strikethroughLineStyleStrikethrough style
namestyle-properties-textstyle-textoverflowTextOverflowStyleText overflow
namestyle-properties-textstyle-underlinestringUnderline style
namestyle-properties-textstyle-underlineLineStyleUnderline style
namestyle-properties-textstyle-underlineoffsetstring | numberUnderline offset distance
namestyle-properties-textstyle-whitespaceWhiteSpaceStyleWhite space
namestyle-properties-textstyle-wordbreakWordBreakStyleWord break
namestyle-properties-texttransformTransformText-transform (uppercase, lowercase, capitalize)
namestyle-properties-userheightnumberHeight
namestyle-properties-userwidthnumberWidth
namestyle-textstylestringText style of the name text. If provided, overrides font and color
namestyle-textstyleTextStyleText style of the name text. If provided, overrides font and color
namestyle-visiblebooleanVisibility of the name text
needleNeedleOptionsJSON with needle properties
needle-geometryGroupA group containing the geometry of the needle
needle-geometry-automodellimitsmodebooleanAuto model limits mode
needle-geometry-boundsRectDefine position of the group in the parent
needle-geometry-clippingbooleanEnable clipping, this does not consider the clipstyle, it is related to bounds-clipping
needle-geometry-clipstyleClipStyleClipping style
needle-geometry-clipstyleGraphicsPathClipping style
needle-geometry-contentorientationOrientationContent orientation
needle-geometry-cssclassstringThe css class name of this node
needle-geometry-csscursorstringCSS cursor associated with node
needle-geometry-cssstylestringCSS style to be applied to inserted elements
needle-geometry-fillstylestringFill style
needle-geometry-fillstyleFillStyleFill style
needle-geometry-horizontalflipbooleanHorizontal axis goes from right to left
needle-geometry-idstring | numberId of the node, its a unique identifier
needle-geometry-infinitybooleanMode to render outside the model limits
needle-geometry-layoutstyleLayoutStyleLayout style to be used for parent layout
needle-geometry-linestylestringLine style
needle-geometry-linestyleLineStyleLine style
needle-geometry-localtransformTransformationLocal transformation
needle-geometry-marginsnumber | stringIt has properties for specifying the margins for each side
needle-geometry-modellimitsRectDefine inner model coordinates of the group
needle-geometry-namestringName of the node. It is often used for debugging purposes or to simplify queries
needle-geometry-opacitynumberNode opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context
needle-geometry-opacityblendmodeBlendModeNode opacity mode to blend it
needle-geometry-paddingnumber | stringIt has properties for specifying the padding for each side
needle-geometry-pickingchildrenbooleanEnable picking children
needle-geometry-scalescrollstrategyScaleScrollStrategyScale scroll strategy
needle-geometry-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
needle-geometry-taganyCustom information associated with node. It is a user object which can be used by client code to store information or attach an application object to the shape
needle-geometry-transformstringAdditional CSS transformation applied to node or 'none'
needle-geometry-transformTransformationAdditional CSS transformation applied to node or 'none'
needle-geometry-verticalflipbooleanVertical axis goes from bottom to top
needle-geometry-viewcachebooleanView cache to cache child nodes
needle-geometry-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
needle-geometry-z-indexnumberDefine node z-index
needle-heightnumber | string
needle-widthnumber | stringWidth of needle in CSS format (height if gauge is horizontal)
opacitynumberNode opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context
opacityblendmodeBlendModeNode opacity mode to blend it
orientationOrientationOrientation of the gauge
rangeRangeRange displayed by this gauge
range-highnumberUpper range boundary
range-lownumberLower range boundary
range-maxnumber
range-minnumber
scalescrollstrategyScaleScrollStrategyScale scroll strategy
selectablebooleanSelectable node, a boolean to determine if selection should consider this node
taganyCustom information associated with node. It is a user object which can be used by client code to store information or attach an application object to the shape
transformstringAdditional CSS transformation applied to node or 'none'
transformTransformationAdditional CSS transformation applied to node or 'none'
unitsstringUnits in which data is represented in this gauge
valuenumberValue of the gauge to set at initiation
valuestyleValueOptionsProperties of the test displaying name of the gauge
valuestyle-alignmentAnchorTypeDefines where in the region the value text will be positioned
valuestyle-colorstringColor of name text
valuestyle-displaystrategyValueDisplayStrategiesA display strategy to define how the value text fits the region it is rendered in
valuestyle-fontstringFont of value text
valuestyle-formatstringFormat of value to set on number formatter
valuestyle-positionRegionsRegion in which to render the name text
valuestyle-propertiesOptionsSee
valuestyle-propertiesOptionsSee
valuestyle-propertiesOptionsSee
valuestyle-propertiesOptionsSee
valuestyle-propertiesOptionsSee
valuestyle-textstylestringText style of the value text. If provided, overrides font and color
valuestyle-textstyleTextStyleText style of the value text. If provided, overrides font and color
valuestyle-visiblebooleanVisibility of the value text
visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
widthnumberWidth of the gauge in its parent model limits
xnumberX coordinate of left top corner of the gauge in its parent model limits
ynumberY coordinate of left top corner of the gauge in its parent model limits
z-indexnumberDefine node z-index

Contents

Constructors

new LinearGauge(options)

new LinearGauge(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

NumericGauge.constructor

Methods

addAlarm

addAlarm(alarm): LinearGauge

Adds an alarm to the axis. Alarm handler will be called every time value set on the axis falls within alarm's range

Parameters

Name Type Description
alarmAlarm | Alarm[]An alarm to add

Returns

LinearGauge

Inherited from

NumericGauge.addAlarm


addAxis

addAxis(name, axis, props?): LinearGauge

Adds an axis to the gauge

Parameters

Name Type Description
namestringName of the new axis
axisAxisTypeNew axis to add
Optional propsAxisOptionsJSON with axis properties

Returns

LinearGauge


addCssClass

addCssClass(cssclass): LinearGauge

Adds new css class to node

Parameters

Name Type Description
cssclassstring | string[]css class name('s)

Returns

LinearGauge

this

Inherited from

NumericGauge.addCssClass


addCustomComponent

addCustomComponent(component, region, layer): LinearGauge

Adds a custom component to provided specified region. A custom component is a group with any geometry inside. The group bounds will be changed to fit the region it is added to. To maintain the size of your custom group it is better to add a custom region to the gauge.

Parameters

Name Type Description
componentGroup<Node>A group with custom shape(s)
regionstringName of the region to add component to. If such region does not exist nothing will happen and the custom shape will not be added
layerstringname of gauge layer to add component

Returns

LinearGauge

Inherited from

NumericGauge.addCustomComponent


addIndicatorRegion

addIndicatorRegion(name, region?): void

Adds a region, or an array of regions to the gauge. Regions of indicator are indexed by the name that you provide. if no such name has been passed into the method, it will be impossible to do any further manipulations with this region.

Parameters

Name Type Description
namestring | string[] | Region | Region[]Name of the region to add or a region which has the name set to it
Optional regionRegion | Region[]Region(s) to add

Returns

void


addInvalidateHandler

addInvalidateHandler(handler): LinearGauge

Add invalidate handler

Deprecated

since 4.0, use Node.on instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

LinearGauge

this

Inherited from

NumericGauge.addInvalidateHandler


addRegion

addRegion(name, region?): LinearGauge

Adds a new region to the gauge. Region is a rectangular area on the gauge defined by x, y, width and height all set in CSS format.

Throws

When name is not provided to the custom region

Parameters

Name Type Description
namestring | OptionsName of the region or a json with region parameters (including name)
Optional regionOptionsJSON with region parameters

Returns

LinearGauge

Inherited from

NumericGauge.addRegion


applyOpacity

Protected applyOpacity(context): LinearGauge

This method is called to apply opacity if it is specified on the rendering context. The default implementation sets global alpha on the rendering context

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

LinearGauge

this

Inherited from

NumericGauge.applyOpacity


applyResponsiveStyle

Protected applyResponsiveStyle(): void

Apply a responsive style rules it is exists

Returns

void

Inherited from

NumericGauge.applyResponsiveStyle


checkCollision

checkCollision(context): boolean

Check if gauge falls within visible area on the screen

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

boolean

true if object is inside of rendarable area

Inherited from

NumericGauge.checkCollision


cleanAlarms

cleanAlarms(): LinearGauge

Removes all attached alarms

Returns

LinearGauge

this

Inherited from

NumericGauge.cleanAlarms


clearAxes

clearAxes(): void

Clears linear gauge axes

Returns

void


clearRegions

clearRegions(): LinearGauge

Removes all the regions from the scene

Returns

LinearGauge


clone

clone(): Node

All subclasses should override copyConstructor or provide custom implementation for this method

Returns

Node

clone

Inherited from

NumericGauge.clone


connectStyle

connectStyle(style, type, callback): LinearGauge

Connects style.

This convenience method subscribes a listener to given style for the specified type.
And automatically un-subscribes listener if node is disposed to prevent memory leaks

Parameters

Name Type Description
styleEventDispatcherconnect style
typestringtype of event or property
callbackAttributeCallback<EventDispatcher>function to be called

Returns

LinearGauge

this

Inherited from

NumericGauge.connectStyle


copyConstructor

Protected copyConstructor(gauge): LinearGauge

Copy constructor function Used to clone gauge

Parameters

Name Type Description
gaugeLinearGaugegauge for cloning

Returns

LinearGauge

Overrides

NumericGauge.copyConstructor


disconnectStyle

disconnectStyle(style, type, callback): LinearGauge

Disconnect style
This convenience method un-subscribes a listener to given style for the specified type.

Parameters

Name Type Description
styleEventDispatcherconnect style
typestringtype of event or property
callbackAttributeCallback<EventDispatcher>function to be called

Returns

LinearGauge

this

Inherited from

NumericGauge.disconnectStyle


displayRegions

displayRegions(name?): LinearGauge

Debug method to display regions of the gauge in different colors

Parameters

Name Type Description
Optional namestringIf you want to display only one region, pass its name here

Returns

LinearGauge

Inherited from

NumericGauge.displayRegions


dispose

dispose(): void

Disposes this node, once disposes a node should not be used anymore.
Clear all listeners, and disconnect styles to avoid memory leaks.
Also aggressively 'cleanup' this node by setting some of its members to null.

Returns

void

Inherited from

NumericGauge.dispose


enableClipping

enableClipping(clipping): LinearGauge

Sets innergroup clipping

Parameters

Name Type Description
clippingbooleanclipping

Returns

LinearGauge

Inherited from

NumericGauge.enableClipping


enableEventPropagation

enableEventPropagation(enable): LinearGauge

Enable event propagation from the node hierarchy from bottom to top

This option is similar to DOM Event bubbling, which allows to get any event from child node. By default it is disabled for better performance.

Example

import {Group} from '@int/geotoolkit/scene/Group';
import {Events as SceneEvents} from '@int/geotoolkit/scene/Node';
const parentGroup = new Group()
.setName('ParentGroup')
.enableEventPropagation(true);
const childGroup = new Group()
.setName('ChildGroup');

parentGroup.addChild(childGroup);
parentGroup.on(SceneEvents.Invalidate, (eventName, sender, args) => {
// Got notifications from all children of parent group
});
childGroup.invalidate();

Parameters

Name Type Description
enablebooleanenable

Returns

LinearGauge

this

Inherited from

NumericGauge.enableEventPropagation


enumerateNodes

enumerateNodes(callback, target?): void

Enumerate children nodes

Parameters

Name Type Description
callbackCallback<Node | CustomComponent | Alarm>callback
Optional targetQueryBuilder<any>target

Returns

void

Inherited from

NumericGauge.enumerateNodes


execute

execute(delegate): LinearGauge

Executes delegate and return the result. It allows us to keep all initialization calls in one place,
and we do not need to scroll up or down in IDE to find how and where it was initialized.

Example

// All setters (.setName() for example) returns reference to the this.
// In order to modify inner object like LineStyle or Pattern, to get this object (property) we should call getter to get object reference.
// Then modify it as shown below in Option 1 or you can use execute methods shown in Option 2.
import {Group} from '@int/geotoolkit/scene/Group';
import {Rect} from '@int/geotoolkit/util/Rect';
// Option 1
const group = new Group()
.setName('MyGroup')
.setBounds(new Rect(0, 0, 42, 16))
.enableClipping(true)
.setTag({'type': 'sometype'});

group.getLineStyle().setPattern('pattern');
return group;

// Options 2 ( using execute method )
return group
.execute(function () {
this.getLineStyle()
.setPattern("pattern");
});

Parameters

Name Type Description
delegate(this: LinearGauge) => voidFunction to execute

Returns

LinearGauge

The result if any or this

Inherited from

NumericGauge.execute

execute<T>(delegate): T

Type parameters

Name
T

Parameters

Name Type
delegate(this: LinearGauge) => T

Returns

T

Inherited from

NumericGauge.execute


filter

Protected filter(context): boolean

Filter node

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

boolean

flag filter flag ("true" to render node; "false" otherwise)

Inherited from

NumericGauge.filter


getAlarm

getAlarm(name): Alarm

Gets the alarm referenced by provided name or index. If alarm name is not set or no such index exists, null will be returned.

Parameters

Name Type Description
namestring | numberName of alarm or its index in iterator

Returns

Alarm

Inherited from

NumericGauge.getAlarm


getAlarms

getAlarms(filter?): Iterator<Alarm>

Gets an iterator over existing alarms in the gauge

Parameters

Name Type Description
Optional filter(item: Alarm) => booleana filter function. Returns all axes if not provided

Returns

Iterator<Alarm>

Inherited from

NumericGauge.getAlarms


getAnimation

getAnimation(): string

Returns the name of animation function associated with this gauge

Returns

string

Inherited from

NumericGauge.getAnimation


getAnimationStyle

getAnimationStyle(): AnimationStyle

Return animation style

Returns

AnimationStyle

animationStyle current animation style

Inherited from

NumericGauge.getAnimationStyle


getAnimationTime

getAnimationTime(): number

Returns time in which a full animation cycle is finished (in seconds)

Returns

number

Inherited from

NumericGauge.getAnimationTime


getAxes

getAxes(filter?): Iterator<Group<Node>>

Returns an iterator over existing axes groups in this gauge

Parameters

Name Type Description
Optional filter(item: Group<Node>) => booleana filter function. Returns all axes groups if null

Returns

Iterator<Group<Node>>


getAxis

getAxis(name): Axis

Gets an axis by its name or index from axes iterator

Parameters

Name Type Description
namestring | numberName of the axis or its index

Returns

Axis


getAxisProperties

getAxisProperties(name?): AxisOptions | Record<string, AxisOptions>

Gets properties pertaining to axis of the gauge

Parameters

Name Type Description
Optional namestringName of the axis to get properties. If null, properties will be retrieved from all axes

Returns

AxisOptions | Record<string, AxisOptions>

properties, empty if no axis of name 'name' exists


getBackgroundStyle

getBackgroundStyle(): BackgroundStyleOptionsOut

Returns background styles

Returns

BackgroundStyleOptionsOut

Inherited from

NumericGauge.getBackgroundStyle


getBounds

getBounds(): Rect

Returns current bounds of the gauge

Returns

Rect

Inherited from

NumericGauge.getBounds


getClassName

getClassName(): string

Returns

string

Inherited from

NumericGauge.getClassName


getClipStyle

getClipStyle(): ClipStyle

Gets the current clipping style

Returns

ClipStyle

clipping style

Inherited from

NumericGauge.getClipStyle


getCss

getCss(): CssStyle

Return CSS style

Returns

CssStyle

Inherited from

NumericGauge.getCss


getCssClass

getCssClass(): string

Returns css class name to be used to apply CSS style

Returns

string

the css class name

Inherited from

NumericGauge.getCssClass


getCssClasses

getCssClasses(): string[]

Gets list of css class names which applied to this node

Returns

string[]

Inherited from

NumericGauge.getCssClasses


getCssTransform

getCssTransform(): string

Returns CSS transformation

Returns

string

Inherited from

NumericGauge.getCssTransform


getCustomComponent

getCustomComponent(index): Group<Node>

Returns a registered custom component by its index

Parameters

Name Type Description
indexstring | numberIndex or name of the component to return

Returns

Group<Node>

Null if no such index exists

Inherited from

NumericGauge.getCustomComponent


getCustomComponents

getCustomComponents(filter?): Iterator<Group<Node>>

Return iterator on registered custom components

Parameters

Name Type Description
Optional filter(item: Group<Node>) => booleana filter function. Returns all nodes if null

Returns

Iterator<Group<Node>>

Inherited from

NumericGauge.getCustomComponents


getFunctionRegistry

getFunctionRegistry(): FunctionRegistry

Returns function registry which provides handlers for gauges animation and alarms

Returns

FunctionRegistry

registry New registry to set

Inherited from

NumericGauge.getFunctionRegistry


getId

getId(): string | number

Returns the associated identifier of the node

Returns

string | number

The node's id

Inherited from

NumericGauge.getId


getInvalidateMethod

Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>

Gets invalidate method

Returns

AttributeCallback<EventDispatcher>

method to invalidate this object

Inherited from

NumericGauge.getInvalidateMethod


getLayoutStyle

getLayoutStyle(): LayoutStyle<string | number>

Returns the current layout of the gauge

Returns

LayoutStyle<string | number>

Inherited from

NumericGauge.getLayoutStyle


getLocalTransform

getLocalTransform(): Transformation

Retrieves the transformation of bounds to parent

Returns

Transformation

transform the local transform.

Inherited from

NumericGauge.getLocalTransform


getMarginsStyle

getMarginsStyle(): SpaceStyle<string | number>

Return margins style

Returns

SpaceStyle<string | number>

Inherited from

NumericGauge.getMarginsStyle


getName

getName(): string

Returns the node name

Returns

string

The node name

Inherited from

NumericGauge.getName


getNameProperties

getNameProperties(): NameOptionsOut

Gets properties of value text

Returns

NameOptionsOut

Inherited from

NumericGauge.getNameProperties


getNeedleProperties

getNeedleProperties(): Required<NeedleOptions>

Returns properties pertaining to needle shape of the gauge

Returns

Required<NeedleOptions>

properties


getOpacity

getOpacity(): number

Returns current node opacity

Returns

number

opacity

Inherited from

NumericGauge.getOpacity


getOpacityBlendMode

getOpacityBlendMode(): BlendMode

Returns current node opacity

Returns

BlendMode

opacity blend mode

Inherited from

NumericGauge.getOpacityBlendMode


getOrientation

getOrientation(): Orientation

Returns orientation of the gauge.

Returns

Orientation


getParent

getParent(): Node

Return parent node

Returns

Node

parent node

Inherited from

NumericGauge.getParent


getProperties

getProperties(): OptionsOut

Gets properties pertaining to Linear Gauge

Returns

OptionsOut

properties

Overrides

NumericGauge.getProperties


getProperty

getProperty(name): any

Gets dynamic property by name. These properties can be used as a property bags

Parameters

Name Type Description
namestringproperty name

Returns

any

Inherited from

NumericGauge.getProperty


getPropertyKeys

getPropertyKeys(): string[]

Returns known properties keys

Returns

string[]

Inherited from

NumericGauge.getPropertyKeys


getRange

getRange(): Range

Returns range displayed by this range

Returns

Range


getRegion

getRegion(name): Region

Returns the region registered with provided name.

Parameters

Name Type Description
namestringName of the region to return

Returns

Region

Inherited from

NumericGauge.getRegion


getRenderingFilter

getRenderingFilter(): IFilter

Return filter to be used for rendering and picking

Returns

IFilter

current filter

Inherited from

NumericGauge.getRenderingFilter


getResponsiveStyle

getResponsiveStyle(): ResponsiveStyle

Return responsive style

Returns

ResponsiveStyle

Inherited from

NumericGauge.getResponsiveStyle


getRoot

getRoot(): Node

Returns root node.
If node doesn't have parent then it returns itself.

Returns

Node

the root node

Inherited from

NumericGauge.getRoot


getScaleScrollStrategy

getScaleScrollStrategy(): Delegate

Gets scale scroll strategy

Returns

Delegate

scale scroll strategy

Inherited from

NumericGauge.getScaleScrollStrategy


getSceneTransform

getSceneTransform(): Transformation

Returns transformation from node to root scene

Returns

Transformation

a transformation from node to root scene

Inherited from

NumericGauge.getSceneTransform


getTag

getTag(): any

Returns the object associated with the node by user.

Returns

any

The node's user-object

Inherited from

NumericGauge.getTag


getValue

getValue(): number

Returns the current value of the axis

Returns

number

Inherited from

NumericGauge.getValue


getValueProperties

getValueProperties(): ValueOptionsOut

Gets properties of value text

Returns

ValueOptionsOut

Format of value to set on number formatter

Inherited from

NumericGauge.getValueProperties


getVisible

getVisible(): boolean

Return visibility of the node

Returns

boolean

true if node is visible

Inherited from

NumericGauge.getVisible


getWorldTransform

getWorldTransform(): Transformation

Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.

Returns

Transformation

transform the world transform.

Inherited from

NumericGauge.getWorldTransform


getZIndex

getZIndex(): number

Returns node z-index (null if not set)

Returns

number

Inherited from

NumericGauge.getZIndex


hasAxis

hasAxis(axis): boolean

Checks if the gauge contains specified axis

Parameters

Name Type Description
axisstring | Axis | Group<Node>The axis or its name

Returns

boolean


hasCssClass

hasCssClass(cssClass): boolean

Check if node has specified css class

Parameters

Name Type Description
cssClassstringcss class name

Returns

boolean

Inherited from

NumericGauge.hasCssClass


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

NumericGauge.hasEventListener


hideRegions

hideRegions(): LinearGauge

Hides the regions displayed for debug reasons

Returns

LinearGauge

Inherited from

NumericGauge.hideRegions


invalidate

invalidate(bounds?, force?): LinearGauge

Invalidate area of the shape. This method invalidates parent by default. invalidated from parent to root node.

Parameters

Name Type Description
Optional boundsRectbounds of the invalid rectangle in the inner node coordinates
Optional forcebooleantrue if parent should be invalidated immediately if null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed

Returns

LinearGauge

this

Inherited from

NumericGauge.invalidate


invalidateParent

Protected invalidateParent(bounds?, force?): LinearGauge

Invalidate parent and notify all listeners. NOTE: Don't keep arguments of the event, because instance can be changed

Fires

Events.Invalidate

Parameters

Name Type Description
Optional boundsRectbounds of the invalid rectangle in the inner node coordinates
Optional forcebooleanforce rendering

Returns

LinearGauge

this

Inherited from

NumericGauge.invalidateParent


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

NumericGauge.isDisposed


isEventPropagationEnabled

isEventPropagationEnabled(): boolean

Return true if event propagation is enabled from child to parent

Returns

boolean

Inherited from

NumericGauge.isEventPropagationEnabled


isNotificationEnabled

isNotificationEnabled(): boolean

return state of notification

Returns

boolean

current notification state

Inherited from

NumericGauge.isNotificationEnabled


isSelectable

isSelectable(): boolean

Returns true if node can be picked/selected.

Returns

boolean

The selectable flag

Inherited from

NumericGauge.isSelectable


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

NumericGauge.isSilent


notify

notify<E>(type, source, args?): LinearGauge

Notify listeners of the Node

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event
sourceNumericGaugesource who called the event
Optional argsEventMap[E]event arguments

Returns

LinearGauge

this

Inherited from

NumericGauge.notify


off

off<E>(type?, callback?): LinearGauge

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: LinearGauge, args: EventMap[E]) => voidfunction to be called

Returns

LinearGauge

this

Inherited from

NumericGauge.off


on

on<E>(type, callback): LinearGauge

Attach listener on event that will be called whenever the specified event is delivered to the target

If the callback function is already in the list of event listeners for this target, the function is not added a second time.

If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: LinearGauge, args: EventMap[E]) => voidto be called

Returns

LinearGauge

this

Inherited from

NumericGauge.on


onParentChanged

Protected onParentChanged(node): LinearGauge

This method is called when parent changes. Do not call it directly.

Parameters

Name Type Description
nodeNodenode to change parent

Returns

LinearGauge

this

Inherited from

NumericGauge.onParentChanged


onVisibilityChanged

Protected onVisibilityChanged(): void

This method is called if visibility is changed. Send event Events.VisibilityChanged

Returns

void

Inherited from

NumericGauge.onVisibilityChanged


postRendering

Protected postRendering(context): void

To be called after rendering. Call this method if you override method render

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

void

Inherited from

NumericGauge.postRendering


preRendering

Protected preRendering(context): void

Occurs before rendering this method sets clipping by default. Call this method if you override method render

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

void

Inherited from

NumericGauge.preRendering


registerAnimationStyle

registerAnimationStyle(root): void

Register animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

NumericGauge.registerAnimationStyle


removeAlarm

removeAlarm(name): LinearGauge

Removes an alarm by its name, index, or instance of alarm. The alarm will never be called again and reference to it will be removed. Does nothing if no such alarm has been added before

Parameters

Name Type Description
namestring | number | AlarmName of alarm or its index in iterator

Returns

LinearGauge

this

Inherited from

NumericGauge.removeAlarm


removeAxis

removeAxis(name): LinearGauge

Removes an axis from the gauge. If no such axis exists, nothing will be done.

Parameters

Name Type Description
namestring | numberName of the axis or its index

Returns

LinearGauge


removeCssClass

removeCssClass(cssclass): LinearGauge

Removes css class from node

Parameters

Name Type Description
cssclassstring | string[]css class name('s)

Returns

LinearGauge

this

Inherited from

NumericGauge.removeCssClass


removeCustomComponent

removeCustomComponent(component): LinearGauge

Removes a registered custom component from the gauge. If such component was not registered, does nothing.

Parameters

Name Type Description
componentnumber | Group<Node>The component which has to be deleted, or its index in iterator.

Returns

LinearGauge

Inherited from

NumericGauge.removeCustomComponent


removeIndicatorRegion

removeIndicatorRegion(name): void

Removes an earlier added region from the indicator

Parameters

Name Type Description
namestring | Regionregion name or region

Returns

void


removeInvalidateHandler

removeInvalidateHandler(handler): LinearGauge

Remove invalidate handler

Deprecated

since 4.0, use Node.off instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

LinearGauge

this

Inherited from

NumericGauge.removeInvalidateHandler


removeRegion

removeRegion(name): LinearGauge

Deletes a region from the layout. Only custom added regions can be removed. Will do nothing if no such region was registered

Parameters

Name Type Description
namestringName of the region

Returns

LinearGauge

Inherited from

NumericGauge.removeRegion


render

render(context): LinearGauge

Renders node

Parameters

Name Type Description
contextRenderingContextThe rendering context to be used to draw the node

Returns

LinearGauge

Inherited from

NumericGauge.render


renderAsync

renderAsync(context, callback): void

Render node in asynchronous mode. Default implementation creates call method "render" inside

Parameters

Name Type Description
contextRenderingContextThe rendering context to be used to draw the node
callback() => voidcallback function

Returns

void

Inherited from

NumericGauge.renderAsync


rotate

rotate(theta, x, y): LinearGauge

Rotate bounds around a given coordinate

Parameters

Name Type Description
thetanumberangle to rotate node, in radians
xnumberx coordinate to rotate around
ynumbery coordinate to rotate around

Returns

LinearGauge

this

Inherited from

NumericGauge.rotate


scale

scale(xx, yy): LinearGauge

Scale node

Parameters

Name Type Description
xxnumberx scale factor
yynumbery scale factor

Returns

LinearGauge

this

Inherited from

NumericGauge.scale


setAnimation

setAnimation(name): LinearGauge

Sets the name of animation function in function registry corresponding to this axis

Parameters

Name Type Description
namestringName of the function. This function has to be registered in the registry, otherwise no animation will be applied.

Returns

LinearGauge

Inherited from

NumericGauge.setAnimation


setAnimationStyle

setAnimationStyle(animationStyle): LinearGauge

Sets animation style

Parameters

Name Type Description
animationStyleTypeanimation style

Returns

LinearGauge

Inherited from

NumericGauge.setAnimationStyle


setAnimationTime

setAnimationTime(time): LinearGauge

Sets time required to accomplish a full animation run in between two values (in seconds)

Parameters

Name Type Description
timenumberTime in seconds to perform the animation

Returns

LinearGauge

this

Inherited from

NumericGauge.setAnimationTime


setAxisProperties

setAxisProperties(name, props): LinearGauge

Sets properties pertaining to axis of the gauge

Parameters

Name Type Description
namestringName of the axis to apply properties. Name can also be passed inside props JSON.
propsAxisOptionsproperties

Returns

LinearGauge

this


setBackgroundStyle

setBackgroundStyle(props): LinearGauge

Sets background styles

Parameters

Name Type Description
propsBackgroundStyleOptionsobject containing background styles

Returns

LinearGauge

Inherited from

NumericGauge.setBackgroundStyle


setBounds

setBounds(bounds): LinearGauge

Sets bounds to the gauge

Parameters

Name Type Description
boundsRectNew bounds

Returns

LinearGauge

Inherited from

NumericGauge.setBounds


setClipStyle

setClipStyle(style): LinearGauge

Sets a new clipping style

Parameters

Name Type Description
styleGraphicsPath | ClipStyle | Optionsa new clipping style

Returns

LinearGauge

this

Inherited from

NumericGauge.setClipStyle


setCss

setCss(style, merge?): LinearGauge

Sets CSS style. This style will be applied for all inserted elements

Parameters

Name Type Description
styleTypeCSS style to be applied to inserted elements
Optional mergebooleanmerge flag

Returns

LinearGauge

this

Inherited from

NumericGauge.setCss


setCssClass

setCssClass(name): LinearGauge

Sets css class name of the node to be used to apply CSS style

Parameters

Name Type Description
namestringcss class name of the node

Returns

LinearGauge

this

Inherited from

NumericGauge.setCssClass


setCssTransform

setCssTransform(transform): LinearGauge

Set CSS transformation

Parameters

Name Type Description
transformstring | Transformationtransformation css transformation instruction or Transformation instance

Returns

LinearGauge

this

Inherited from

NumericGauge.setCssTransform


setFunctionRegistry

setFunctionRegistry(registry): LinearGauge

Sets function registry which will provide handlers for gauges animation and alarms

Parameters

Name Type Description
registryFunctionRegistryNew registry to set

Returns

LinearGauge

Inherited from

NumericGauge.setFunctionRegistry


setId

setId(id): LinearGauge

Allows the user to associate any identifier

Parameters

Name Type Description
idstring | numberobject id

Returns

LinearGauge

this

Inherited from

NumericGauge.setId


setLayoutStyle

setLayoutStyle(layoutStyle, merge?): LinearGauge

Specify desired layout style

Parameters

Name Type Description
layoutStyleLayoutStyle<string | number> | Options<string | number>desired layout style
Optional mergebooleantrue if you want to merge layoutStyle with existing attribute, false by default

Returns

LinearGauge

Inherited from

NumericGauge.setLayoutStyle


setLocalTransform

setLocalTransform(localTransform): LinearGauge

Sets local transformation to be used to transform from local to parent coordinate

Parameters

Name Type Description
localTransformTransformationlocal transformation for this node

Returns

LinearGauge

Inherited from

NumericGauge.setLocalTransform


setMarginsStyle

setMarginsStyle(margins, merge?): LinearGauge

Sets margins style

Parameters

Name Type Description
marginsType<string | number>margins style
Optional mergebooleantrue if you want to merge marginsStyle with existing attribute, false by default

Returns

LinearGauge

this

Inherited from

NumericGauge.setMarginsStyle


setName

setName(name): LinearGauge

Sets the name of the gauge

Parameters

Name Type Description
namestringThe new gauge name

Returns

LinearGauge

Inherited from

NumericGauge.setName


setNameProperties

setNameProperties(props): LinearGauge

Sets properties pertaining to text representing gauge name

Parameters

Name Type Description
propsNameOptionsObject with properties

Returns

LinearGauge

Inherited from

NumericGauge.setNameProperties


setNeedle

setNeedle(params): LinearGauge

Sets the needle for the axis

Parameters

Name Type Description
paramsObjectJSON with needle properties
Optional params.centerPoint
Optional params.geometryGroup<Node>

Returns

LinearGauge

this


setNeedleProperties

setNeedleProperties(props): LinearGauge

Sets properties pertaining to needle shape of the gauge

Parameters

Name Type Description
propsNeedleOptionsproperties

Returns

LinearGauge


setNotification

setNotification(notify, force?): LinearGauge

set notification state

Parameters

Name Type Description
notifybooleanflag set to invalidate parent or not
Optional forcebooleantrue if parent should be invalidated immediately

Returns

LinearGauge

this

Inherited from

NumericGauge.setNotification


setOpacity

setOpacity(opacity, blendMode?): LinearGauge

Sets node opacity

Parameters

Name Type Description
opacitynumbernode opacity from 0 to 1
Optional blendModeBlendModeopacity blend mode. If it is normal, opacity will be replaced.

Returns

LinearGauge

this

Inherited from

NumericGauge.setOpacity


setProperties

setProperties(props?): LinearGauge

Sets properties pertaining to linear gauge and its components.

Parameters

Name Type Description
Optional propsOptionsproperties

Returns

LinearGauge

Overrides

NumericGauge.setProperties


setProperty

setProperty(name, value): LinearGauge

Sets dynamic property by name

Parameters

Name Type Description
namestringproperty name
valueanyproperty value

Returns

LinearGauge

this

Inherited from

NumericGauge.setProperty


setRange

setRange(range): LinearGauge

Sets range displayed by this gauge

Parameters

Name Type Description
rangeRangethe range to set

Returns

LinearGauge

setRange(min, max): LinearGauge

Sets range displayed by this gauge

Parameters

Name Type Description
minnumberLower bounds of the range
maxnumberHigher bound of the range

Returns

LinearGauge


setRegionSize

setRegionSize(regionType, size): LinearGauge

For North, South sides sets height, for East and West sets width, for custom regions sets x, y, width and height

Parameters

Name Type Description
regionTypestringName of the region
sizestring | number | RegionWidth or height of a side in CSS format, or an object with properties for custom regions

Returns

LinearGauge

Inherited from

NumericGauge.setRegionSize


setRenderingFilter

setRenderingFilter(filter): LinearGauge

Sets filter to be applied before rendering and picking

Parameters

Name Type Description
filterIFilterfilter to set

Returns

LinearGauge

this

Inherited from

NumericGauge.setRenderingFilter


setResponsiveStyle

setResponsiveStyle(style): LinearGauge

Sets responsive style.

Parameters

Name Type Description
styleOptions | ResponsiveStyleresponsive style

Returns

LinearGauge

this

Inherited from

NumericGauge.setResponsiveStyle


setScaleScrollStrategy

setScaleScrollStrategy(strategy?): LinearGauge

Sets scale scroll strategy

Parameters

Name Type Description
Optional strategyDelegatescale scroll strategy

Returns

LinearGauge

this

Inherited from

NumericGauge.setScaleScrollStrategy


setSelectable

setSelectable(selectable): LinearGauge

Allows to select node. If node is not selectable then child node is not selectable.

Parameters

Name Type Description
selectablebooleanflag to allow node selection

Returns

LinearGauge

this

Inherited from

NumericGauge.setSelectable


setSilent

setSilent(bool): LinearGauge

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

LinearGauge

this

Inherited from

NumericGauge.setSilent


setTag

setTag(tag): LinearGauge

Allows the user to associate any arbitrary object with the node.

Parameters

Name Type Description
taganyThe object to be associated with the node.

Returns

LinearGauge

this

Inherited from

NumericGauge.setTag


setValue

setValue(val, skipAnimation?): LinearGauge

Sets current value of the gauge

Parameters

Name Type Description
valnumberNew value for the gauge
Optional skipAnimationbooleanSpecifies if animation should be avoided

Returns

LinearGauge

this

Overrides

NumericGauge.setValue


setValueProperties

setValueProperties(props): LinearGauge

Sets properties pertaining to text representing gauge value

Parameters

Name Type Description
propsValueOptionsObject with properties

Returns

LinearGauge

Inherited from

NumericGauge.setValueProperties


setVisible

setVisible(value): LinearGauge

Sets visibility of the node. Send event Events.VisibilityChanged

Parameters

Name Type Description
valuebooleanflag specifying visibility of the node

Returns

LinearGauge

this

Inherited from

NumericGauge.setVisible


setZIndex

setZIndex(value): LinearGauge

Sets z-index for node (set null for default)

Parameters

Name Type Description
valuenumberindex determining node z-position

Returns

LinearGauge

this

Inherited from

NumericGauge.setZIndex


shear

shear(shx, shy): LinearGauge

Shear this node's bounds

Parameters

Name Type Description
shxnumberx-axis shear
shynumbery-axis shear

Returns

LinearGauge

this

Inherited from

NumericGauge.shear


toString

toString(): string

Returns a string representation of this object (generally the classname)

Returns

string

A string representation

Inherited from

NumericGauge.toString


translate

translate(tx, ty): LinearGauge

Translate bounds

Parameters

Name Type Description
txnumberx translation
tynumbery translation

Returns

LinearGauge

this

Inherited from

NumericGauge.translate


unregisterAnimationStyle

unregisterAnimationStyle(root): void

Unregister animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

NumericGauge.unregisterAnimationStyle


updateSceneTransformation

updateSceneTransformation(): LinearGauge

Update scene transformation

Returns

LinearGauge

this

Inherited from

NumericGauge.updateSceneTransformation


updateState

updateState(regions?, changes?): LinearGauge

Update state. These methods reset node state and update state for children. this method is useful to refresh a scene graph

Parameters

Name Type Description
Optional regionsRect[]optional array to return invalid rectangles in the parent coordinates
Optional changesStateChangesoptional parameter to specify a reason of changes

Returns

LinearGauge

this

Inherited from

NumericGauge.updateState


updateTimeStamp

Protected updateTimeStamp(): LinearGauge

Update time stamp to indicate that Node or Children has been changed.

Returns

LinearGauge

this

Inherited from

NumericGauge.updateTimeStamp


enableSceneGraphNotification

Static enableSceneGraphNotification(enabled): void

Enable / disable all notifications

Parameters

Name Type Description
enabledbooleansets if this object sends notifications

Returns

void

Inherited from

NumericGauge.enableSceneGraphNotification


findParent

Static findParent<T>(node, classType, filter?): InstanceType<T>

Find root of the node with specified type

Type parameters

NameType
Textends Constructor<any>

Parameters

Name Type Description
nodeNodenode to start search
classTypeTtype of the class to search for
Optional filter(node: Node) => booleanadditional filter to apply

Returns

InstanceType<T>

Inherited from

NumericGauge.findParent

Static findParent(node, classType, filter?): Node

Find root of the node with specified type

Parameters

Name Type Description
nodeNodenode to start search
classTypestringinterface name to search for
Optional filter(node: Node) => booleanadditional filter to apply

Returns

Node

Inherited from

NumericGauge.findParent


getClassName

Static getClassName(): string

Returns

string

Inherited from

NumericGauge.getClassName


isSceneGraphNotificationEnabled

Static isSceneGraphNotificationEnabled(): boolean

Return status of the global notification for all nodes.

Returns

boolean

Inherited from

NumericGauge.isSceneGraphNotificationEnabled