API / geotoolkit / contour / shapes / ContourShape / ContourShape
shapes.ContourShape.ContourShape
The contour shape acts as a container for all the contour visuals. It may receive events from the visuals and may send its own events to the listeners.
↳
ContourShape
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
border | ContourBorderVisual | Border visual properties or new visual |
border-clipstyle | ClipStyle | Clipping style |
border-clipstyle-evenodd | boolean | True if evenodd mode is on ('nonzero' mode otherwise) |
border-clipstyle-geometry | GraphicsPath | Clipping geometry |
border-clipstyle-geometry-bounds | Rect | Bounds |
border-clipstyle-geometry-bounds-height | number | Height |
border-clipstyle-geometry-bounds-readonly | boolean | Readonly |
border-clipstyle-geometry-bounds-width | number | Width |
border-clipstyle-geometry-bounds-x | number | Left |
border-clipstyle-geometry-bounds-y | number | Top |
border-clipstyle | GraphicsPath | Clipping style |
border-colorbehavior | BehaviorType | Color behavior type |
border-colormap | VisualColorMap | Colormap properties |
border-colormap-visual | AbstractVisual | The associated visual |
border-colormap-visual-clipstyle | ClipStyle | Clipping style |
border-colormap-visual-clipstyle | GraphicsPath | Clipping style |
border-colormap-visual-colorbehavior | BehaviorType | Color behavior type |
border-colormap-visual-colormap | VisualColorMap | Colormap properties |
border-colormap-visual-cssclass | string | The css class name of this node |
border-colormap-visual-csscursor | string | CSS cursor associated with node |
border-colormap-visual-cssstyle | string | CSS style to be applied to inserted elements |
border-colormap-visual-fillstyle | string | Style applied on fill |
border-colormap-visual-fillstyle | FillStyle | Style applied on fill |
border-colormap-visual-fillstyle-color | string | Color in CSS form |
border-colormap-visual-fillstyle-evenoddmode | boolean | Even-odd fill mode |
border-colormap-visual-fillstyle-fillpattern | Pattern | Pattern |
border-colormap-visual-fillstyle-fillpattern-containername | string | An 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 |
border-colormap-visual-fillstyle-fillpattern-patternname | string | Name of this pattern for indexing |
border-colormap-visual-fillstyle-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
border-colormap-visual-fillstyle-foreground | string | Foreground color |
border-colormap-visual-fillstyle-pattern | Pattern | Pattern |
border-colormap-visual-id | string | number | Id of the node, its a unique identifier |
border-colormap-visual-linestyle | string | Style applied on outline |
border-colormap-visual-linestyle | LineStyle | Style applied on outline |
border-colormap-visual-linestyle-color | string | Color in CSS form |
border-colormap-visual-linestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
border-colormap-visual-linestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
border-colormap-visual-linestyle-linecap | CapStyle | The line cap style |
border-colormap-visual-linestyle-linedashoffset | number | Line dash offset of dashed line |
border-colormap-visual-linestyle-linejoin | JoinStyle | The line join style |
border-colormap-visual-linestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
border-colormap-visual-linestyle-scalable | boolean | True if width should depend on transformation |
border-colormap-visual-linestyle-unit | string | Optional unit for the width |
border-colormap-visual-linestyle-width | number | string | The line thickness |
border-colormap-visual-localtransform | Transformation | Local transformation |
border-colormap-visual-localtransform-dx | number | X axis translation |
border-colormap-visual-localtransform-dy | number | Y axis translation |
border-colormap-visual-localtransform-xx | number | X scale |
border-colormap-visual-localtransform-xy | number | Xy skew |
border-colormap-visual-localtransform-yx | number | Yx skew |
border-colormap-visual-localtransform-yy | number | Y scale |
border-colormap-visual-margins | number | string | It has properties for specifying the margins for each side |
border-colormap-visual-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
border-colormap-visual-opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
border-colormap-visual-opacityblendmode | BlendMode | Node opacity mode to blend it |
border-colormap-visual-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
border-colormap-visual-scalescrollstrategy-enabled | boolean | Enable flag |
border-colormap-visual-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
border-colormap-visual-tag | any | Custom 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 |
border-colormap-visual-transform | string | Additional CSS transformation applied to node or 'none' |
border-colormap-visual-transform | Transformation | Additional CSS transformation applied to node or 'none' |
border-colormap-visual-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
border-colormap-visual-z-index | number | Define node z-index |
border-cssclass | string | The css class name of this node |
border-csscursor | string | CSS cursor associated with node |
border-cssstyle | string | CSS style to be applied to inserted elements |
border-fillstyle | string | Style applied on fill |
border-fillstyle | FillStyle | Style applied on fill |
border-id | string | number | Id of the node, its a unique identifier |
border-linestyle | string | Style applied on outline |
border-linestyle | LineStyle | Style applied on outline |
border-localtransform | Transformation | Local transformation |
border-margins | number | string | It has properties for specifying the margins for each side |
border-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
border-opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
border-opacityblendmode | BlendMode | Node opacity mode to blend it |
border-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
border-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
border-tag | any | Custom 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 |
border-transform | string | Additional CSS transformation applied to node or 'none' |
border-transform | Transformation | Additional CSS transformation applied to node or 'none' |
border-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
border-z-index | number | Define node z-index |
clipstyle | ClipStyle | Clipping style |
clipstyle | GraphicsPath | Clipping style |
cssclass | string | The css class name of this node |
csscursor | string | CSS cursor associated with node |
cssstyle | string | CSS style to be applied to inserted elements |
fault | ContourFaultVisual | Fault visual properties or new visual |
fault-clipstyle | ClipStyle | Clipping style |
fault-clipstyle | GraphicsPath | Clipping style |
fault-closedlinestyle | string | The closed fault line style |
fault-closedlinestyle | LineStyle | The closed fault line style |
fault-colorbehavior | BehaviorType | Color behavior type |
fault-colormap | VisualColorMap | Colormap properties |
fault-cssclass | string | The css class name of this node |
fault-csscursor | string | CSS cursor associated with node |
fault-cssstyle | string | CSS style to be applied to inserted elements |
fault-faultvisualstyle | number | The fault visual style |
fault-fillstyle | string | Style applied on fill |
fault-fillstyle | FillStyle | Style applied on fill |
fault-id | string | number | Id of the node, its a unique identifier |
fault-linestyle | string | Style applied on outline |
fault-linestyle | LineStyle | Style applied on outline |
fault-localtransform | Transformation | Local transformation |
fault-margins | number | string | It has properties for specifying the margins for each side |
fault-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
fault-opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
fault-opacityblendmode | BlendMode | Node opacity mode to blend it |
fault-openlinestyle | string | The open fault line style |
fault-openlinestyle | LineStyle | The open fault line style |
fault-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
fault-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
fault-tag | any | Custom 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 |
fault-transform | string | Additional CSS transformation applied to node or 'none' |
fault-transform | Transformation | Additional CSS transformation applied to node or 'none' |
fault-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
fault-z-index | number | Define node z-index |
faultpointprecision | number | Fault point comparison precision (measured in grid cells) |
fillstyle | string | Style applied on fill |
fillstyle | FillStyle | Style applied on fill |
gridtomodel | Transformation | The grid to model transformation |
id | string | number | Id of the node, its a unique identifier |
ignoreerroneousdata | boolean | Flag indicating whether grid data changing should be enabled |
isofill | ContourFillVisual | Isofill visual properties or new visual |
isofill-clipstyle | ClipStyle | Clipping style |
isofill-clipstyle | GraphicsPath | Clipping style |
isofill-colorbehavior | BehaviorType | Color behavior type |
isofill-colormap | VisualColorMap | Colormap properties |
isofill-cssclass | string | The css class name of this node |
isofill-csscursor | string | CSS cursor associated with node |
isofill-cssstyle | string | CSS style to be applied to inserted elements |
isofill-fillstyle | string | Style applied on fill |
isofill-fillstyle | FillStyle | Style applied on fill |
isofill-holecolor | string | The color that will be used when rendering opaque holes |
isofill-id | string | number | Id of the node, its a unique identifier |
isofill-linestyle | string | Style applied on outline |
isofill-linestyle | LineStyle | Style applied on outline |
isofill-localtransform | Transformation | Local transformation |
isofill-margins | number | string | It has properties for specifying the margins for each side |
isofill-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
isofill-opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
isofill-opacityblendmode | BlendMode | Node opacity mode to blend it |
isofill-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
isofill-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
isofill-tag | any | Custom 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 |
isofill-transform | string | Additional CSS transformation applied to node or 'none' |
isofill-transform | Transformation | Additional CSS transformation applied to node or 'none' |
isofill-transparentholes | boolean | The flag indicating whether hole transparency is true |
isofill-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
isofill-z-index | number | Define node z-index |
isoline | ContourLineVisual | Isoline visual properties or new visual |
isoline-clipstyle | ClipStyle | Clipping style |
isoline-clipstyle | GraphicsPath | Clipping style |
isoline-colorbehavior | BehaviorType | Color behavior type |
isoline-colormap | VisualColorMap | Colormap properties |
isoline-cssclass | string | The css class name of this node |
isoline-csscursor | string | CSS cursor associated with node |
isoline-cssstyle | string | CSS style to be applied to inserted elements |
isoline-fillstyle | string | Style applied on fill |
isoline-fillstyle | FillStyle | Style applied on fill |
isoline-id | string | number | Id of the node, its a unique identifier |
isoline-indexstep | number | Index step for line visual |
isoline-labelformat | NumberFormat | Label format |
isoline-labelformat-fulllocale | boolean | Specify format how to provide locale |
isoline-labelformat-grouplength | number | Specify group length of numbers |
isoline-labelformat-locale | string | Format locale |
isoline-labelformat-locale | Locale | Format locale |
isoline-labelformat-locale-locale | string | The name of the locale |
isoline-labelformat-locale-numberformat | NumberFormatInfo | Defines number format |
isoline-labelformat-locale-numberformat-dec | string | Defines decimal symbol |
isoline-labelformat-locale-numberformat-group | string | Defines group symbol |
isoline-labelformat-locale-numberformat-infinity | string | Defines infinity text |
isoline-labelformat-locale-numberformat-neg | string | Defines negative symbol |
isoline-labelformat-maximumfractiondigits | number | Specify maximum fraction digits |
isoline-labelformat-minimumfractiondigits | number | Specify minimum fraction digits, have to be less or equal to maximumfractiondigits |
isoline-labelformat-round | boolean | Round number |
isoline-labelingstrategy | AbstractContourLabelingStrategy | Labeling strategy |
isoline-labelingstrategy-labelformat | NumberFormat | Label format |
isoline-labelingstrategy-labelmargin | number | The label margin for specified level |
isoline-labelingstrategy-labelspacing | number | The label spacing for specified level |
isoline-labelingstrategy-textstyle | TextStyle | The text style for specified level |
isoline-labelingstrategy-textstyle-alignment | AlignmentStyle | Alignment |
isoline-labelingstrategy-textstyle-autosize | boolean | Auto font size on high definition display |
isoline-labelingstrategy-textstyle-background | string | Background style |
isoline-labelingstrategy-textstyle-background | FillStyle | Background style |
isoline-labelingstrategy-textstyle-baseline | BaseLineStyle | Base line |
isoline-labelingstrategy-textstyle-color | string | Color in CSS form |
isoline-labelingstrategy-textstyle-fill | FillStyle | Text fill style |
isoline-labelingstrategy-textstyle-font | string | Font see |
isoline-labelingstrategy-textstyle-fonturl | string | The place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword |
isoline-labelingstrategy-textstyle-lineheight | string | number | Line height |
isoline-labelingstrategy-textstyle-multiline | boolean | Allow multi-line text |
isoline-labelingstrategy-textstyle-outline | string | Outline style |
isoline-labelingstrategy-textstyle-outline | LineStyle | Outline style |
isoline-labelingstrategy-textstyle-overflowwrap | OverflowWrapStyle | Overflow wrap |
isoline-labelingstrategy-textstyle-strikethrough | string | Strikethrough style |
isoline-labelingstrategy-textstyle-strikethrough | LineStyle | Strikethrough style |
isoline-labelingstrategy-textstyle-textoverflow | TextOverflowStyle | Text overflow |
isoline-labelingstrategy-textstyle-underline | string | Underline style |
isoline-labelingstrategy-textstyle-underline | LineStyle | Underline style |
isoline-labelingstrategy-textstyle-underlineoffset | string | number | Underline offset distance |
isoline-labelingstrategy-textstyle-whitespace | WhiteSpaceStyle | White space |
isoline-labelingstrategy-textstyle-wordbreak | WordBreakStyle | Word break |
isoline-labelingstrategy-usefontcolorforlabels | boolean | Flag which indicates if font color is used for label text color |
isoline-labelmargin | number | Margin around labels in device coordinates |
isoline-labelspacing | number | Label spacing between nearby labels on a isoline |
isoline-labelsvisible | boolean | Visibility of labels |
isoline-linestyle | string | Style applied on outline |
isoline-linestyle | LineStyle | Style applied on outline |
isoline-linestyle | LineStyle | Style of line that is used to draw the isolines |
isoline-linesvisible | boolean | Visibility of all isolines |
isoline-localtransform | Transformation | Local transformation |
isoline-margins | number | string | It has properties for specifying the margins for each side |
isoline-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
isoline-opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
isoline-opacityblendmode | BlendMode | Node opacity mode to blend it |
isoline-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
isoline-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
isoline-tag | any | Custom 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 |
isoline-textstyle | string | Text style attribute that is used to draw the labels |
isoline-textstyle | TextStyle | Text style attribute that is used to draw the labels |
isoline-transform | string | Additional CSS transformation applied to node or 'none' |
isoline-transform | Transformation | Additional CSS transformation applied to node or 'none' |
isoline-usefontcolorforlabels | boolean | Flag which indicates if font color is used for label text color |
isoline-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
isoline-z-index | number | Define node z-index |
labelsdirection | ContourLabelsDirection | The labels direction |
linestyle | string | Style applied on outline |
linestyle | LineStyle | Style applied on outline |
localtransform | Transformation | Local transformation |
margins | number | string | It has properties for specifying the margins for each side |
maxlabelwidth | number | The max label width |
maxvisiblelevel | number | The last visible scale level |
minvisiblelevel | number | The first visible scale level |
name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
opacityblendmode | BlendMode | Node opacity mode to blend it |
scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
smoothingisolines | boolean | Flag indicating whether isolines are smoothed |
smoothinglabels | boolean | Flag indicating whether labels are smoothed |
suppressintersectinglabels | boolean | The flag indicating whether intersecting labels are suppressed |
tag | any | Custom 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 |
transform | string | Additional CSS transformation applied to node or 'none' |
transform | Transformation | Additional CSS transformation applied to node or 'none' |
visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
z-index | number | Define node z-index |
Methods
▸ addContourListener(contourListener): void
Registers the specified contour listener to receive events from this contour shape.
Deprecated
since 4.0, use .on() instead
| Name | Type | Description |
|---|---|---|
contourListener | AbstractVisual | The contour listener |
void
▸ addCssClass(cssclass): ContourShape
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addInvalidateHandler(handler): ContourShape
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
▸ addVisual(visual, order, refVisual?): void
Add a visual to this contour shape. It may be inserted at the front or the back. If there is no reference visual then valid order parameters include CG_O_FRONT and CG_O_BACK. If there is a reference visual then value order parameters include CG_O_ABOVE and CG_O_BELOW. Throws an exception for invalid order parameters and for null visual/refVisual.
Throws
Error if param is null
| Name | Type | Description |
|---|---|---|
visual | AbstractVisual | The visual to add to this shape. |
order | VisualOrder | The order in which to add the visual. |
Optional refVisual | AbstractVisual | The reference visual. |
void
▸ Protected applyOpacity(context): ContourShape
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
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
this
▸ Protected applyResponsiveStyle(): void
Apply a responsive style rules it is exists
void
▸ checkCollision(context): boolean
Check if this node is within the area being rendered by the context
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
true if object is inside of renderable area
▸ clone(): Node
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ connectStyle(style, type, callback): ContourShape
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
| Name | Type | Description |
|---|---|---|
style | EventDispatcher | connect style |
type | string | type of event or property |
callback | AttributeCallback<EventDispatcher> | function to be called |
this
▸ Protected copyConstructor(src, deepCopy?): ContourShape
Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.
| Name | Type | Description |
|---|---|---|
src | Shape | Source to copy from |
Optional deepCopy | boolean | deep copy |
this
▸ disconnectStyle(style, type, callback): ContourShape
Disconnect style
This convenience method un-subscribes a listener to given style for the specified type.
| Name | Type | Description |
|---|---|---|
style | EventDispatcher | connect style |
type | string | type of event or property |
callback | AttributeCallback<EventDispatcher> | function to be called |
this
▸ 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.
void
▸ enableEventPropagation(enable): ContourShape
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();| Name | Type | Description |
|---|---|---|
enable | boolean | enable |
this
▸ execute(delegate): ContourShape
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");
});| Name | Type | Description |
|---|---|---|
delegate | (this: ContourShape) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: ContourShape) => T |
T
▸ Protected filter(context): boolean
Filter node
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
flag filter flag ("true" to render node; "false" otherwise)
▸ getAnimationStyle(): AnimationStyle
Return animation style
animationStyle current animation style
▸ getBorder(): ContourBorderVisual
Gets first ContourBorderVisual of visuals
[visual] First ContourBorderVisual of visuals
▸ getBoundingBox(): Rect
Gets the bounding box of this contour shape. If projection has been set, then the projected bounding box is returned.
bbox The bounding box of the contour shape.
▸ getBounds(): Rect
Return bounds
bounds
▸ getClassName(): string
string
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
▸ getCss(): CssStyle
Return CSS style
▸ getCssClass(): string
Returns css class name to be used to apply CSS style
string
the css class name
▸ getCssClasses(): string[]
Gets list of css class names which applied to this node
string[]
▸ getCssTransform(): string
Returns CSS transformation
string
▸ getDataSource(): AbstractContourDataSource
Gets the data source which provides grids to the contour.
dataSource The contour data source.
▸ getFault(): ContourFaultVisual
Gets first ContourFaultVisual of visuals
[visual] First ContourFaultVisual of visuals
▸ getFaultPointPrecision(): number
Gets the fault point comparison precision (measured in grid cells)
number
precision The fault point precision.
▸ getFaultsList(): ContourFaultList
Gets the faults.
faults Object that stores the faults for this Contour Shape.
▸ getFillStyle(): FillStyle
Return fill style
fillStyle current fill style
▸ getGrid(): ContourAbstractGrid
Gets the contour grid. (Object that stores grid data for this contour shape)
grid The contour grid.
▸ getGridToModel(): Transformation
Gets the grid to model transform
gridToModel The grid to model transformation.
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ getIgnoreErroneousData(): boolean
Gets the flag for grid data checking. DEFAULT: IgnoreErroneousData=false
boolean
ignore Flag indicating whether grid data changing should be enabled.
▸ Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>
Gets invalidate method
AttributeCallback<EventDispatcher>
method to invalidate this object
▸ getIsofill(): ContourFillVisual
Gets first ContourFillVisual of visuals
[visual] First ContourFillVisual of visuals
▸ getIsoline(): ContourLineVisual
Gets first ContourLineVisual of visuals
[visual] First ContourIsolineVisual of visuals
▸ getLabelsDirection(): ContourLabelsDirection
Gets the labels direction.
direction The labels direction.
▸ getLineStyle(): LineStyle
Return line style
lineStyle current line style
▸ getListeners(): AbstractVisual[]
Gets all the contour listeners.
listeners The contour listeners.
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
▸ getMaxLabelWidth(): number
Gets the max label width.
number
maxLabelWidth The max label width.
▸ getMaxVisibleLevel(): number
Gets the last visible scale level.
number
maxLevel The last visible scale level.
▸ getMinVisibleLevel(): number
Gets the first visible scale level.
number
minLevel The first visible scale level.
▸ getName(): string
Returns the node name
string
The node name
▸ getNonProjectedBoundingBox(tr): Rect
Gets the non-projected bounding box.
| Name | Type | Description |
|---|---|---|
tr | Transformation | The transformation from model to device space. |
bbox The non-projected bounding box of the contour shape.
▸ getNotify(): boolean
Gets the listeners notification flag
Deprecated
since 4.0, use .isSilent() instead
boolean
notify The boolean notification flag.
▸ getOpacity(): number
Returns current node opacity
number
opacity
▸ getOpacityBlendMode(): BlendMode
Returns current node opacity
opacity blend mode
▸ getParent(): Node
Return parent node
parent node
▸ getProjectionBox(modelBox, reverse?): Rect
Converts the model box to the projection box and returns it.
| Name | Type | Description |
|---|---|---|
modelBox | Rect | The model box. |
Optional reverse | boolean | True if reverse projection is requested. |
modelBox
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
Contour shape properties
▸ getProperty(name): any
Gets dynamic property by name. These properties can be used as a property bags
| Name | Type | Description |
|---|---|---|
name | string | property name |
any
▸ getPropertyKeys(): string[]
Returns known properties keys
string[]
▸ getRenderingFilter(): IFilter
Return filter to be used for rendering and picking
current filter
▸ getResponsiveStyle(): ResponsiveStyle
Return responsive style
▸ getRoot(): Node
Returns root node.
If node doesn't have parent then it returns itself.
the root node
▸ getScale(): ContourScale
Gets the contour scale. This is used to determine the data values for the isolines in this Contour Shape
scale The contour scale.
▸ getScaleScrollStrategy(): Delegate
Gets scale scroll strategy
scale scroll strategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
▸ getShapeProjection(): AbstractProjection
Gets the shape projection that is to be used when drawing this shape.
projection The shape projection.
▸ getSmoothingIsolines(): boolean
Gets a flag indicating if isolines are smoothed.
boolean
smoothed Flag indicating whether isolines are smoothed.
▸ getSmoothingIsolinesType(): IsoLineSmoothingType
Returns smoothing type
smoothingType smoothing type
▸ getSmoothingLabels(): boolean
Gets the smoothLabels flag.
boolean
smoothLabels The smoothLabels flag.
▸ getSuppressIntersectingLabels(): boolean
Gets the intersecting labels suppression status. Default is false. This status indicates if contour will render labels without intersecting each other. Default is FALSE. The status is true if labels don't intersect each other.
boolean
suppress The flag indicating whether intersecting labels are suppressed.
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getVisible(): boolean
Return visibility of the node
boolean
true if node is visible
▸ getVisuals(visualClassName): ContourFillVisual[]
Get all fill visuals
| Name | Type |
|---|---|
visualClassName | "geotoolkit.contour.visuals.ContourFillVisual" |
▸ getVisuals(visualClassName): ContourBorderVisual[]
Get all border visuals
| Name | Type |
|---|---|
visualClassName | "geotoolkit.contour.visuals.ContourBorderVisual" |
▸ getVisuals(visualClassName): ContourFaultVisual[]
Get all fault visuals
| Name | Type |
|---|---|
visualClassName | "geotoolkit.contour.visuals.ContourFaultVisual" |
▸ getVisuals(visualClassName): ContourLineVisual[]
Get all isoline visuals
| Name | Type |
|---|---|
visualClassName | "geotoolkit.contour.visuals.ContourLineVisual" |
▸ getVisuals(): AbstractVisual[]
Get all visuals
▸ getVisuals(visualClassName?): AbstractVisual[]
Gets the visuals by theirs classname
| Name | Type | Description |
|---|---|---|
Optional visualClassName | string | Class name of visual |
visuals The visuals.
▸ getWorldTransform(): Transformation
Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.
transform the world transform.
▸ getZIndex(): number
Returns node z-index (null if not set)
number
▸ hasCssClass(cssClass): boolean
Check if node has specified css class
| Name | Type | Description |
|---|---|---|
cssClass | string | css class name |
boolean
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
▸ invalidate(bounds?, force?): ContourShape
Invalidate area of the shape. This method invalidates parent by default. invalidated from parent to root node.
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | bounds of the invalid rectangle in the inner node coordinates |
Optional force | boolean | true 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 |
this
▸ invalidateParent(bounds?, force?): ContourShape
Invalidate bounds
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | if null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed |
Optional force | boolean | flag indicating if the parent must be forcibly invalidated |
this
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isEventPropagationEnabled(): boolean
Return true if event propagation is enabled from child to parent
boolean
Shape.isEventPropagationEnabled
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
▸ isSelectable(): boolean
Returns true if node can be picked/selected.
boolean
The selectable flag
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ notify<E>(type, source, args?): ContourShape
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event |
source | ContourShape | source who called the event |
Optional args | EventMap[E] | event arguments |
this
▸ notifyListeners(args): void
Notifies the registered listeners of an event.
Deprecated
since 4.0, use .notify() instead
| Name | Type | Description |
|---|---|---|
args | ContourEvent | The event to pass to the listeners. |
void
▸ off<E>(type?, callback?): ContourShape
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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: ContourShape, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): ContourShape
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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: ContourShape, args: EventMap[E]) => void | to be called |
this
▸ Protected onParentChanged(node): ContourShape
This method is called when parent changes. Do not call it directly.
| Name | Type | Description |
|---|---|---|
node | Node | node to change parent |
this
▸ Protected onVisibilityChanged(): void
This method is called if visibility is changed. Send event Events.VisibilityChanged
void
▸ Protected postRendering(context): void
To be called after rendering. Call this method if you override method render
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ Protected preRendering(context): void
Occurs before rendering this method sets clipping by default. Call this method if you override method render
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
▸ removeContourListener(contourListener): void
Removes the specified contour listener from receiving events from this contour shape.
Deprecated
since 4.0, use .off() instead
| Name | Type | Description |
|---|---|---|
contourListener | AbstractVisual | The contour listener |
void
▸ removeCssClass(cssclass): ContourShape
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ removeInvalidateHandler(handler): ContourShape
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
▸ removeVisual(visual): void
Remove the specified visual from this contour shape.
Throws
Error if param is null
| Name | Type | Description |
|---|---|---|
visual | AbstractVisual | The visual that is to be removed. |
void
▸ render(renderingContext): void
Renders node
| Name | Type | Description |
|---|---|---|
renderingContext | RenderingContext | The rendering context to be used to draw the node |
void
▸ renderAsync(context, callback): void
Render node in asynchronous mode. Default implementation creates call method "render" inside
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
callback | () => void | callback function |
void
▸ rotate(theta, x, y): ContourShape
Rotate bounds around a given coordinate
| Name | Type | Description |
|---|---|---|
theta | number | angle to rotate node, in radians |
x | number | x coordinate to rotate around |
y | number | y coordinate to rotate around |
this
▸ scale(xx, yy): ContourShape
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ setAnimationStyle(animationStyle): ContourShape
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
▸ setBoundingBox(bbox): ContourShape
Sets the bounding box for the contour shape, in non-projected model space.
| Name | Type | Description |
|---|---|---|
bbox | Rect | Specifies the new bounding box. |
this
▸ setClipStyle(style): ContourShape
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
▸ setCss(style, merge?): ContourShape
Sets CSS style. This style will be applied for all inserted elements
| Name | Type | Description |
|---|---|---|
style | Type | CSS style to be applied to inserted elements |
Optional merge | boolean | merge flag |
this
▸ setCssClass(name): ContourShape
Sets css class name of the node to be used to apply CSS style
| Name | Type | Description |
|---|---|---|
name | string | css class name of the node |
this
▸ setCssTransform(transform): ContourShape
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
▸ setDataSource(dataSource): ContourShape
Sets the data source which provides grids to the contour.
| Name | Type | Description |
|---|---|---|
dataSource | AbstractContourDataSource | The contour data source. |
this
▸ setFaultPointPrecision(precision): ContourShape
Sets the fault point comparison precision (measured in grid cells)
| Name | Type | Description |
|---|---|---|
precision | number | The fault point precision. |
this
▸ setFaultsList(faults): ContourShape
Sets the faults by assigning the Faults property to a new ContourFaultList object storing the faults. If you attempt to assign the Faults property a null value, this will be translated into an empty ContourFaultList.
| Name | Type | Description |
|---|---|---|
faults | ContourFaultList | Object that stores the faults for this Contour Shape. |
this
▸ setFillStyle(fillStyle, merge?): ContourShape
Sets fill style
| Name | Type | Description |
|---|---|---|
fillStyle | Type | a new fill style |
Optional merge | boolean | true if you want to merge fillStyle with existing attribute, false by default |
this
▸ setGrid(grid): ContourShape
Sets the contour grid.(Object that stores grid data for this contour shape). This will throw an exception if grid is set to null.
Throws
Error if grid is null
| Name | Type | Description |
|---|---|---|
grid | ContourAbstractGrid | The contour grid. |
this
▸ setGridToModel(gridToModel): ContourShape
Sets the grid to model transform Throws exception when it is set to null.
Throws
Error if param is null
| Name | Type | Description |
|---|---|---|
gridToModel | Transformation | The grid to model Transformation. |
this
▸ setId(id): ContourShape
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setIgnoreErroneousData(ignore?): ContourShape
Sets the flag for grid data checking. It is recommended to set value to FALSE always. DEFAULT: IgnoreErroneousData=false
| Name | Type | Description |
|---|---|---|
Optional ignore | boolean | Flag indicating whether grid data changing should be enabled. |
this
▸ setLabelsDirection(direction): ContourShape
Sets the labels direction.
| Name | Type | Description |
|---|---|---|
direction | ContourLabelsDirection | The labels direction. |
this
▸ setLineStyle(lineStyle, merge?): ContourShape
Sets line style
| Name | Type | Description |
|---|---|---|
lineStyle | Type | line style or options |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
this
▸ setListeners(listeners): ContourShape
Sets all the contour listeners.
| Name | Type | Description |
|---|---|---|
listeners | AbstractVisual[] | The contour listeners. |
this
▸ setLocalTransform(localTransform, force?): ContourShape
Sets local transformation to be used to transform from local to parent coordinate
| Name | Type | Description |
|---|---|---|
localTransform | Transformation | local transformation for this node |
Optional force | boolean | boolean flag to force update event if transformations are equal, false by default |
this
▸ setMarginsStyle(margins, merge?): ContourShape
Sets margins style
| Name | Type | Description |
|---|---|---|
margins | Type<string | number> | margins style |
Optional merge | boolean | true if you want to merge marginsStyle with existing attribute, false by default |
this
▸ setMaxLabelWidth(maxLabelWidth): ContourShape
Sets the max label width.
| Name | Type | Description |
|---|---|---|
maxLabelWidth | number | The max label width. |
this
▸ setMaxVisibleLevel(maxLevel): ContourShape
Sets the last visible scale level.
| Name | Type | Description |
|---|---|---|
maxLevel | number | The last visible scale level. |
this
▸ setMinVisibleLevel(minLevel): ContourShape
Sets the first visible scale level.
| Name | Type | Description |
|---|---|---|
minLevel | number | The first visible scale level. |
this
▸ setName(name): ContourShape
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNotification(notify, force?): ContourShape
set notification state
| Name | Type | Description |
|---|---|---|
notify | boolean | flag set to invalidate parent or not |
Optional force | boolean | true if parent should be invalidated immediately |
this
▸ setNotify(notify): ContourShape
Sets the listeners notification flag
Deprecated
since 4.0, use .setSilent() instead
| Name | Type | Description |
|---|---|---|
notify | boolean | The boolean notification flag. |
this
▸ setOpacity(opacity, blendMode?): ContourShape
Sets node opacity
| Name | Type | Description |
|---|---|---|
opacity | number | node opacity from 0 to 1 |
Optional blendMode | BlendMode | opacity blend mode. If it is normal, opacity will be replaced. |
this
▸ setProperties(properties?): ContourShape
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options | An object containing the properties to set |
this
▸ setProperty(name, value): ContourShape
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRenderingFilter(filter): ContourShape
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
▸ setResponsiveStyle(style): ContourShape
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
▸ setScale(scale): ContourShape
Sets the contour scale This is used to determine the data values for the isolines in this Contour Shape
| Name | Type | Description |
|---|---|---|
scale | ContourScale | The contour scale. |
this
▸ setScaleScrollStrategy(strategy?): ContourShape
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
▸ setSelectable(selectable): ContourShape
Allows to select node. If node is not selectable then child node is not selectable.
| Name | Type | Description |
|---|---|---|
selectable | boolean | flag to allow node selection |
this
▸ setShapeProjection(projection): ContourShape
Sets the shape projection that is to be used when drawing this shape. Set to null (the default) if you do not wish to use a projection
| Name | Type | Description |
|---|---|---|
projection | AbstractProjection | The shape projection. |
this
▸ setSilent(bool): ContourShape
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setSkipNearPoints(skipNearPoints): ContourShape
Sets skipping of near points when rendering isolines and isofills (to speed up process).
| Name | Type | Description |
|---|---|---|
skipNearPoints | boolean | If true then point skipping will be enabled. |
this
▸ setSmoothingIsolines(smoothing): ContourShape
Sets a flag for indicating if isolines are smoothed.
| Name | Type | Description |
|---|---|---|
smoothing | boolean | IsoLineSmoothingType | Flag indicating whether isolines are smoothed. |
this
▸ setSmoothingLabels(smoothLabels): ContourShape
Sets the smoothLabels flag.
| Name | Type | Description |
|---|---|---|
smoothLabels | boolean | The smoothLabels flag. |
this
▸ setSuppressIntersectingLabels(suppress): ContourShape
Sets the intersecting labels suppression status. This status indicates if contour will render labels without intersecting each other. Default is FALSE. The status is true if labels don't intersect each other.
| Name | Type | Description |
|---|---|---|
suppress | boolean | The flag indicating whether intersecting labels are suppressed. |
this
▸ setTag(tag): ContourShape
Allows the user to associate any arbitrary object with the node.
| Name | Type | Description |
|---|---|---|
tag | any | The object to be associated with the node. |
this
▸ setVisible(value): ContourShape
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setVisuals(visuals): ContourShape
Sets the visuals.
| Name | Type | Description |
|---|---|---|
visuals | AbstractVisual[] | The visuals. |
this
▸ setZIndex(value): ContourShape
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): ContourShape
Shear this node's bounds
| Name | Type | Description |
|---|---|---|
shx | number | x-axis shear |
shy | number | y-axis shear |
this
▸ toString(): string
Returns a string representation of this object (generally the classname)
string
A string representation
▸ translate(tx, ty): ContourShape
Translate bounds
| Name | Type | Description |
|---|---|---|
tx | number | x translation |
ty | number | y translation |
this
▸ unregisterAnimationStyle(root): void
Unregister animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
Shape.unregisterAnimationStyle
▸ updateLineReservation(): void
Updates the line reservations. This is called when something happens which may affect them. E.g. the contour scale changes, a visual's index step changes
void
▸ updateSceneTransformation(): ContourShape
Update scene transformation
this
Shape.updateSceneTransformation
▸ updateState(regions?, changes?): ContourShape
Update state. These methods reset node state and update state for children. this method is useful to refresh a scene graph
| Name | Type | Description |
|---|---|---|
Optional regions | Rect[] | optional array to return invalid rectangles in the parent coordinates |
Optional changes | StateChanges | optional parameter to specify a reason of changes |
this
▸ Protected updateTimeStamp(): ContourShape
Update time stamp to indicate that Node or Children has been changed.
this
▸ visualInvalidated(args): void
This method is called when any of the visuals containing this contour shape are invalidated. In response, this calls the AbstractShape's 'invalidateShape' method, initiating repainting.
Deprecated
since 4.0
| Name | Type | Description |
|---|---|---|
args | VisualEvent | The event from the visual |
void
▸ Static enableSceneGraphNotification(enabled): void
Enable / disable all notifications
| Name | Type | Description |
|---|---|---|
enabled | boolean | sets if this object sends notifications |
void
Shape.enableSceneGraphNotification
▸ Static findParent<T>(node, classType, filter?): InstanceType<T>
Find root of the node with specified type
| Name | Type |
|---|---|
T | extends Constructor<any> |
| Name | Type | Description |
|---|---|---|
node | Node | node to start search |
classType | T | type of the class to search for |
Optional filter | (node: Node) => boolean | additional filter to apply |
InstanceType<T>
▸ Static findParent(node, classType, filter?): Node
Find root of the node with specified type
| Name | Type | Description |
|---|---|---|
node | Node | node to start search |
classType | string | interface name to search for |
Optional filter | (node: Node) => boolean | additional filter to apply |
▸ Static getClassName(): string
string
▸ Static intersectsBounds(bounds, localTransformation, parentInvalidArea, expand?): boolean
Check collision of the shape bounds with parent invalid area
| Name | Type | Description |
|---|---|---|
bounds | Rect | shape bounds |
localTransformation | Transformation | local transformation of the bounds |
parentInvalidArea | Rect | invalid parent area |
Optional expand | Dimension | optional expand the bounds in model coordinate |
boolean
true if bounds intersect the invalid area
▸ Static isSceneGraphNotificationEnabled(): boolean
Return status of the global notification for all nodes.
boolean