Last updated

API / geotoolkit / gauges / axis / Region / Region

Class: Region

axis.Region.Region

An axis region is a segment within axis range which has to be differentiated from the rest of the axis. Examples are the critical section of the pressure gauge or the red segment of the tachometer in your car.
A region can be highlighted by a different fillstyle and/or by a different linestyle than other parts of the gauge.
Multiple regions can be added. Not to be used as a value fill, because axes have a different mechanism for that purpose.

Implements

Table of contents

Constructors
Methods
Css Properties
Name Type Description
fillstylestringFill style of the range
fillstyleFillStyleFill style of the range
fillstyle-colorstringColor in CSS form
fillstyle-evenoddmodebooleanEven-odd fill mode
fillstyle-fillpatternPatternPattern
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
fillstyle-fillpattern-patternnamestringName of this pattern for indexing
fillstyle-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
fillstyle-foregroundstringForeground color
fillstyle-patternPatternPattern
highnumberUpper bound of the range
linecapCapStyleCan be 'butt', 'square', or 'round'
linestylestringLine style of the range
linestyleLineStyleLine style of the range
linestyle-colorstringColor in CSS form
linestyle-fillstringOptional fill style to be used to fill lines generated with this style
linestyle-fillFillStyleOptional fill style to be used to fill lines generated with this style
linestyle-linecapCapStyleThe line cap style
linestyle-linedashoffsetnumberLine dash offset of dashed line
linestyle-linejoinJoinStyleThe line join style
linestyle-pixelsnapmodebooleanPixel Snap Mode, default(
linestyle-scalablebooleanTrue if width should depend on transformation
linestyle-unitstringOptional unit for the width
linestyle-widthnumber | stringThe line thickness
lownumberMaximum value Lower bound of the range
namestringName of the region
staticbooleanDefines if the range is static
visiblebooleanDefines if the range is visible and should be rendered

Contents

Constructors

new Region(low, high, lineStyle, fillStyle)

new Region(low?, high?, lineStyle?, fillStyle?)

Parameters

Name Type Description
Optional lownumber | OptionsLower bound or object with parameters
Optional highnumberUpper bound of the range
Optional lineStyleLineStyleLine style of the range
Optional fillStyleFillStyleFill style of the range
Methods

connectStyle

connectStyle(style, type, callback): Region

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

Region

this

Implementation of

IStyleListener.connectStyle


disconnectStyle

disconnectStyle(style, type, callback): Region

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

Region

this

Implementation of

IStyleListener.disconnectStyle


getClassName

getClassName(): string

Returns

string


getCssClass

getCssClass(): string

Returns class name for css reference

Returns

string


getFillStyle

getFillStyle(): FillStyle

Returns fill style set for the region

Returns

FillStyle


getHigh

getHigh(): number

Gets highest limit of the region

Returns

number


getLineStyle

getLineStyle(): LineStyle

Returns line style set for the region

Returns

LineStyle


getLow

getLow(): number

Gets lowest limit of the region

Returns

number


getName

getName(): string

Returns the current name of the region

Returns

string


getProperties

getProperties(): OptionsOut

Returns properties pertaining to this object

Returns

OptionsOut

properties


getRange

getRange(): Range

Sets range that defines this region

Returns

Range


getVisible

getVisible(): boolean

Gets visibility status

Returns

boolean


isStatic

isStatic(): boolean

Returns true if the region is static and visible at all times

Returns

boolean


setFillStyle

setFillStyle(fillStyle, merge?): Region

Sets fill style set for the region

Parameters

Name Type Description
fillStyleTypea new fill style
Optional mergebooleantrue if you want to merge lineStyle with existing attribute, false by default

Returns

Region


setHigh

setHigh(high): Region

Sets highest limit of the region

Parameters

Name Type Description
highnumberNew upper bound

Returns

Region


setLineColor

setLineColor(color): Region

Sets line style set for the region

Parameters

Name Type Description
colorstring | RgbaColorNew color of the line

Returns

Region


setLineStyle

setLineStyle(lineStyle, merge?): Region

Sets line style set for the region

Parameters

Name Type Description
lineStyleTypeline style or options
Optional mergebooleantrue if you want to merge lineStyle with existing attribute, false by default

Returns

Region


setLow

setLow(low): Region

Sets lowest limit of the region

Parameters

Name Type Description
lownumberNew lower bound

Returns

Region


setName

setName(name): Region

Sets the name of the region

Parameters

Name Type Description
namestringNew name for the region

Returns

Region

this


setProperties

setProperties(props?): Region

Sets properties pertaining to this object

Parameters

Name Type Description
Optional propsOptionsproperties

Returns

Region


setRange

setRange(range): Region

Sets range that defines this region

Parameters

Name Type Description
rangeRangeNew range with min and max values

Returns

Region


setStatic

setStatic(isStatic): Region

Sets a flag defining if the region should be static and visible at all times

Parameters

Name Type Description
isStaticbooleanTrue

Returns

Region


setVisible

setVisible(visible): Region

Sets visible flag for the range

Parameters

Name Type Description
visiblebooleanVisibility flag

Returns

Region


getClassName

Static getClassName(): string

Returns

string