Last updated

API / geotoolkit / schematics / labeling / XYLabelingStrategy / XYLabelingStrategy

Class: XYLabelingStrategy

labeling.XYLabelingStrategy.XYLabelingStrategy

Labeling strategy implementation based on XY layout and LocationType enum.

Hierarchy

Table of contents

Constructors
Accessors
Methods
Css Properties
Name Type Description
anchorvaluefixedbooleanAnchor fixed position flag
anchorvalueshiftmultnumberAnchor value shift multiplier
columnsnumberNumber of columns
connectorlocationConnectorLocationTypeConnector location along trajectory
connectorshapeConnectorShapeConnector shape
connectorshape-labeldataLabelData
connectorshape-labeldata-anchortypeAnchorTypeAnchor type
connectorshape-labeldata-nodeComponentNodeComponent node to label
connectorshape-labeldata-node-automodellimitsmodebooleanAuto model limits mode
connectorshape-labeldata-node-boundsRectDefine position of the group in the parent
connectorshape-labeldata-node-bounds-heightnumberHeight
connectorshape-labeldata-node-bounds-readonlybooleanReadonly
connectorshape-labeldata-node-bounds-widthnumberWidth
connectorshape-labeldata-node-bounds-xnumberLeft
connectorshape-labeldata-node-bounds-ynumberTop
connectorshape-labeldata-node-clippingbooleanEnable clipping, this does not consider the clipstyle, it is related to bounds-clipping
connectorshape-labeldata-node-clipstyleClipStyleClipping style
connectorshape-labeldata-node-clipstyle-evenoddbooleanTrue if evenodd mode is on ('nonzero' mode otherwise)
connectorshape-labeldata-node-clipstyle-geometryGraphicsPathClipping geometry
connectorshape-labeldata-node-clipstyle-geometry-boundsRectBounds
connectorshape-labeldata-node-clipstyleGraphicsPathClipping style
connectorshape-labeldata-node-contentorientationOrientationContent orientation
connectorshape-labeldata-node-cssclassstringThe css class name of this node
connectorshape-labeldata-node-csscursorstringCSS cursor associated with node
connectorshape-labeldata-node-cssstylestringCSS style to be applied to inserted elements
connectorshape-labeldata-node-descriptionstringElement description
connectorshape-labeldata-node-fillstylestringFill style
connectorshape-labeldata-node-fillstyleFillStyleFill style
connectorshape-labeldata-node-fillstyle-colorstringColor in CSS form
connectorshape-labeldata-node-fillstyle-evenoddmodebooleanEven-odd fill mode
connectorshape-labeldata-node-fillstyle-fillpatternPatternPattern
connectorshape-labeldata-node-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
connectorshape-labeldata-node-fillstyle-fillpattern-patternnamestringName of this pattern for indexing
connectorshape-labeldata-node-fillstyle-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
connectorshape-labeldata-node-fillstyle-foregroundstringForeground color
connectorshape-labeldata-node-fillstyle-patternPatternPattern
connectorshape-labeldata-node-horizontalflipbooleanHorizontal axis goes from right to left
connectorshape-labeldata-node-idstring | numberId of the node, its a unique identifier
connectorshape-labeldata-node-infinitybooleanMode to render outside the model limits
connectorshape-labeldata-node-layoutstyleLayoutStyleLayout style to be used for parent layout
connectorshape-labeldata-node-layoutstyle-constraintSizeConstraintLayout constrains
connectorshape-labeldata-node-layoutstyle-flexgrownumberNumber specifying how much the item will grow relative to the rest of the items inside the same container
connectorshape-labeldata-node-layoutstyle-flexshrinknumberNumber specifying how much the item will shrink relative to the rest of the items inside the same container
connectorshape-labeldata-node-layoutstyle-floatstringFloat position
connectorshape-labeldata-node-layoutstyle-positionstringLayout position
connectorshape-labeldata-node-layoutstyle-sizenumber | stringLayout size
connectorshape-labeldata-node-linestylestringLine style
connectorshape-labeldata-node-linestyleLineStyleLine style
connectorshape-labeldata-node-linestyle-colorstringColor in CSS form
connectorshape-labeldata-node-linestyle-fillstringOptional fill style to be used to fill lines generated with this style
connectorshape-labeldata-node-linestyle-fillFillStyleOptional fill style to be used to fill lines generated with this style
connectorshape-labeldata-node-linestyle-linecapCapStyleThe line cap style
connectorshape-labeldata-node-linestyle-linedashoffsetnumberLine dash offset of dashed line
connectorshape-labeldata-node-linestyle-linejoinJoinStyleThe line join style
connectorshape-labeldata-node-linestyle-pixelsnapmodebooleanPixel Snap Mode, default(
connectorshape-labeldata-node-linestyle-scalablebooleanTrue if width should depend on transformation
connectorshape-labeldata-node-linestyle-unitstringOptional unit for the width
connectorshape-labeldata-node-linestyle-widthnumber | stringThe line thickness
connectorshape-labeldata-node-localtransformTransformationLocal transformation
connectorshape-labeldata-node-localtransform-dxnumberX axis translation
connectorshape-labeldata-node-localtransform-dynumberY axis translation
connectorshape-labeldata-node-localtransform-xxnumberX scale
connectorshape-labeldata-node-localtransform-xynumberXy skew
connectorshape-labeldata-node-localtransform-yxnumberYx skew
connectorshape-labeldata-node-localtransform-yynumberY scale
connectorshape-labeldata-node-marginsnumber | stringIt has properties for specifying the margins for each side
connectorshape-labeldata-node-modellimitsRectDefine inner model coordinates of the group
connectorshape-labeldata-node-namestringName of the node. It is often used for debugging purposes or to simplify queries
connectorshape-labeldata-node-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
connectorshape-labeldata-node-opacityblendmodeBlendModeNode opacity mode to blend it
connectorshape-labeldata-node-paddingnumber | stringIt has properties for specifying the padding for each side
connectorshape-labeldata-node-pickingchildrenbooleanEnable picking children
connectorshape-labeldata-node-rectboundsRectGeometry bounds
connectorshape-labeldata-node-scalescrollstrategyScaleScrollStrategyScale scroll strategy
connectorshape-labeldata-node-scalescrollstrategy-enabledbooleanEnable flag
connectorshape-labeldata-node-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
connectorshape-labeldata-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
connectorshape-labeldata-node-transformstringAdditional CSS transformation applied to node or 'none'
connectorshape-labeldata-node-transformTransformationAdditional CSS transformation applied to node or 'none'
connectorshape-labeldata-node-verticalflipbooleanVertical axis goes from bottom to top
connectorshape-labeldata-node-viewcachebooleanView cache to cache child nodes
connectorshape-labeldata-node-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
connectorshape-labeldata-node-z-indexnumberDefine node z-index
connectorshape-labeldata-nodeindexnumberThe node virtual index
connectorshape-labeldata-nodeinfostringThe node information
connectorshape-labeldata-xlabelnumberLabel x-position
connectorshape-labeldata-ylabelnumberLabel y-position
connectorshape-linestylestring
connectorshape-linestyleLineStyle
connectorshape-visibleboolean
connectorShapeConnectorShapeConnector shape
defaultalignmentAlignmentTypeAlignment type
defaultlocationLocationType
deltapxnumberDeltaPx
equallyspacedboolean"equally spaced" flag
labelalignmentAlignmentTypeLabel alignment
labelshapeLabelShapeLabel shape
labelshape-clipstyleClipStyleClipping style
labelshape-clipstyleGraphicsPathClipping style
labelshape-cssclassstringThe css class name of this node
labelshape-csscursorstringCSS cursor associated with node
labelshape-cssstylestringCSS style to be applied to inserted elements
labelshape-fillstylestringStyle applied on fill
labelshape-fillstyleFillStyleStyle applied on fill
labelshape-idstring | numberId of the node, its a unique identifier
labelshape-linestylestringStyle applied on outline
labelshape-linestyleLineStyleStyle applied on outline
labelshape-localtransformTransformationLocal transformation
labelshape-marginsnumber | stringIt has properties for specifying the margins for each side
labelshape-namestringName of the node. It is often used for debugging purposes or to simplify queries
labelshape-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
labelshape-opacityblendmodeBlendModeNode opacity mode to blend it
labelshape-scalescrollstrategyScaleScrollStrategyScale scroll strategy
labelshape-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
labelshape-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
labelshape-textstylestringLabel shape textstyle
labelshape-textstyleTextStyleLabel shape textstyle
labelshape-textstyle-alignmentAlignmentStyleAlignment
labelshape-textstyle-autosizebooleanAuto font size on high definition display
labelshape-textstyle-backgroundstringBackground style
labelshape-textstyle-backgroundFillStyleBackground style
labelshape-textstyle-baselineBaseLineStyleBase line
labelshape-textstyle-colorstringColor in CSS form
labelshape-textstyle-fillFillStyleText fill style
labelshape-textstyle-fontstringFont see
labelshape-textstyle-fonturlstringThe place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword
labelshape-textstyle-lineheightstring | numberLine height
labelshape-textstyle-multilinebooleanAllow multi-line text
labelshape-textstyle-outlinestringOutline style
labelshape-textstyle-outlineLineStyleOutline style
labelshape-textstyle-overflowwrapOverflowWrapStyleOverflow wrap
labelshape-textstyle-strikethroughstringStrikethrough style
labelshape-textstyle-strikethroughLineStyleStrikethrough style
labelshape-textstyle-textoverflowTextOverflowStyleText overflow
labelshape-textstyle-underlinestringUnderline style
labelshape-textstyle-underlineLineStyleUnderline style
labelshape-textstyle-underlineoffsetstring | numberUnderline offset distance
labelshape-textstyle-whitespaceWhiteSpaceStyleWhite space
labelshape-textstyle-wordbreakWordBreakStyleWord break
labelshape-transformstringAdditional CSS transformation applied to node or 'none'
labelshape-transformTransformationAdditional CSS transformation applied to node or 'none'
labelshape-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
labelshape-z-indexnumberDefine node z-index
labelShapeLabelShapeLabel shape
labelshapehighlightedLabelShapeHighlighted label shape
modeModeLabeling mode

Contents

Constructors

new XYLabelingStrategy(options)

new XYLabelingStrategy(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

DefaultLabelingStrategy.constructor

Accessors

DefaultColumnNumber

Static get DefaultColumnNumber(): number

Default column number is 3

Returns

number

Methods

calculateLabelAnchorType

Protected calculateLabelAnchorType(locationType, isHorizontal?): AnchorType

Parameters

Name Type Description
locationTypeLocationTypelocation type
Optional isHorizontalbooleanhorizontal flag

Returns

AnchorType

Inherited from

DefaultLabelingStrategy.calculateLabelAnchorType


doLabeling

doLabeling(context, wellBoreNode, options?): LabelData[]

Performs labels and connecting lines layout.

Parameters

Name Type Description
contextRenderingContextrendering context
wellBoreNodeWellBoreNodewell bore node to build the labeling of
Optional optionsDoLabelingOptions & Options & { componentsfilter?: IComponentsFilter ; connectorlocation?: ConnectorLocationType ; defaultalignment?: AlignmentType ; labelinfo?: Function ; mode?: Mode } & { anchorvaluefixed?: boolean ; deltapx?: number ; equallyspaced?: boolean } & { anchorvalueshiftmult?: number ; columns?: number ; labelalignment?: AlignmentType }options

Returns

LabelData[]

an array of label data to render

Overrides

DefaultLabelingStrategy.doLabeling


getActiveComponentsArea

Protected getActiveComponentsArea(): Rect

Returns

Rect

Inherited from

DefaultLabelingStrategy.getActiveComponentsArea


getClassName

getClassName(): string

Returns

string

Inherited from

DefaultLabelingStrategy.getClassName


getLabelsBounds

getLabelsBounds(location): Rect

Gets labeling area(s) bounds

Parameters

Name Type Description
location"Left" | "Top" | "Right" | "Bottom"permitted values: "Left", "Right", "Top" or "Bottom"

Returns

Rect

Inherited from

DefaultLabelingStrategy.getLabelsBounds


getLayoutColumnNumber

getLayoutColumnNumber(): number

Gets layout column number

Returns

number

layout column number


getLegendMode

getLegendMode(): boolean

Gets legend mode

Deprecated

since 4.0. Use WellBoreWithLabels with 'nextlabel' instead.

Returns

boolean

Inherited from

DefaultLabelingStrategy.getLegendMode


getOptions

getOptions(): Required<Options>

Returns strategy options

Returns

Required<Options>

options

Inherited from

DefaultLabelingStrategy.getOptions


getProperties

getProperties(): Required<Options>

Returns properties

Returns

Required<Options>

strategy options

Overrides

DefaultLabelingStrategy.getProperties


setActiveComponentsArea

setActiveComponentsArea(activeComponentsArea): XYLabelingStrategy

Parameters

Name Type
activeComponentsAreaRect

Returns

XYLabelingStrategy

Inherited from

DefaultLabelingStrategy.setActiveComponentsArea


setLabelsBounds

setLabelsBounds(bounds): XYLabelingStrategy

Sets labeling area(s) bounds

Parameters

Name Type Description
boundsPartial<Record<"Left" | "Top" | "Right" | "Bottom", Rect>>labeling area bounds

Returns

XYLabelingStrategy

this

Inherited from

DefaultLabelingStrategy.setLabelsBounds


setLayoutColumnNumber

setLayoutColumnNumber(layoutColumnNumber): XYLabelingStrategy

Sets layout column number. Valid values: 1 (no horizontal layout), 2 or 3.

Throws

if layoutColumnNumber is invalid

Parameters

Name Type Description
layoutColumnNumbernumberlayout column number. Valid values: 1 (no horizontal layout), 2 or 3. Default value: 3.

Returns

XYLabelingStrategy

this


setLegendMode

setLegendMode(mode): XYLabelingStrategy

Sets legend mode

Deprecated

since 4.0. Use WellBoreWithLabels with 'nextlabel' instead.

Parameters

Name Type Description
modebooleanmode

Returns

XYLabelingStrategy

Inherited from

DefaultLabelingStrategy.setLegendMode


setOptions

setOptions(options): XYLabelingStrategy

Sets strategy options (See base class method API for more options)

Parameters

Name Type Description
optionsOptionsstrategy options

Returns

XYLabelingStrategy

this

Overrides

DefaultLabelingStrategy.setOptions


setProperties

setProperties(properties?): XYLabelingStrategy

Sets properties

Parameters

Name Type Description
Optional propertiesOptionsstrategy options

Returns

XYLabelingStrategy

this

Overrides

DefaultLabelingStrategy.setProperties


getClassName

Static getClassName(): string

Returns

string

Inherited from

DefaultLabelingStrategy.getClassName