API / geotoolkit / welllog / header / LogTrackVisualHeader / LogTrackVisualHeader
header.LogTrackVisualHeader.LogTrackVisualHeader
Define header for LogTrack
| Name | Type |
|---|---|
T | extends CompositeNode = LogTrack |
↳
LogTrackVisualHeader
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
adaptiveheight | boolean | Height of the header |
anchortype | AnchorType | Define optional label anchor type |
autobounds | boolean | Automatic calculation of header size on or off |
autolabelrotation | boolean | Define automatic label rotation if track is narrow |
borderlinestyle | string | Border line style |
borderlinestyle | LineStyle | Border line style |
borderlinestyle-color | string | Color in CSS form |
borderlinestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
borderlinestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
borderlinestyle-fill-color | string | Color in CSS form |
borderlinestyle-fill-evenoddmode | boolean | Even-odd fill mode |
borderlinestyle-fill-fillpattern | Pattern | Pattern |
borderlinestyle-fill-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 |
borderlinestyle-fill-fillpattern-patternname | string | Name of this pattern for indexing |
borderlinestyle-fill-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
borderlinestyle-fill-foreground | string | Foreground color |
borderlinestyle-fill-pattern | Pattern | Pattern |
borderlinestyle-linecap | CapStyle | The line cap style |
borderlinestyle-linedashoffset | number | Line dash offset of dashed line |
borderlinestyle-linejoin | JoinStyle | The line join style |
borderlinestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
borderlinestyle-scalable | boolean | True if width should depend on transformation |
borderlinestyle-unit | string | Optional unit for the width |
borderlinestyle-width | number | string | The line thickness |
bounds | Rect | Bounds of the curve in the parent coordinates |
bounds-height | number | Height |
bounds-readonly | boolean | Readonly |
bounds-width | number | Width |
bounds-x | number | Left |
bounds-y | number | Top |
clipstyle | ClipStyle | Clipping style |
clipstyle-evenodd | boolean | True if evenodd mode is on ('nonzero' mode otherwise) |
clipstyle-geometry | GraphicsPath | Clipping geometry |
clipstyle-geometry-bounds | Rect | Bounds |
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 |
depth | number | Depth |
displaymode | string | Display mode |
displaystring | string | Display string |
ellipsisstring | string | String ellipsis that renders if ellipsis is true |
fillstyle | string | The fill style |
fillstyle | FillStyle | The fill style |
horizontalflip | boolean | Flip horizontal from right to left |
id | string | number | Id of the node, its a unique identifier |
ispointingup | boolean | Defines whether the text is always pointing up |
labelrotationangle | number | Define optional label rotation angle relative to header |
layoutstyle | LayoutStyle | Layoutstyle |
layoutstyle-constraint | SizeConstraint | Layout constrains |
layoutstyle-flexgrow | number | Number specifying how much the item will grow relative to the rest of the items inside the same container |
layoutstyle-flexshrink | number | Number specifying how much the item will shrink relative to the rest of the items inside the same container |
layoutstyle-float | string | Float position |
layoutstyle-position | string | Layout position |
layoutstyle-size | number | string | Layout size |
linestyle | string | The line style |
linestyle | LineStyle | The line style |
localtransform | Transformation | Local transformation |
localtransform-dx | number | X axis translation |
localtransform-dy | number | Y axis translation |
localtransform-xx | number | X scale |
localtransform-xy | number | Xy skew |
localtransform-yx | number | Yx skew |
localtransform-yy | number | Y scale |
margins | number | string | It has properties for specifying the margins for each side |
modellimits | Rect | Desired model Limits |
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 |
padding | number | string | It has properties for specifying the padding for each side |
scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
scalescrollstrategy-enabled | boolean | Enable flag |
selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
showellipsis | boolean | Ellipsis flag |
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 |
textstyle | string | The text style |
textstyle | TextStyle | The text style |
textstyle-alignment | AlignmentStyle | Alignment |
textstyle-autosize | boolean | Auto font size on high definition display |
textstyle-background | string | Background style |
textstyle-background | FillStyle | Background style |
textstyle-baseline | BaseLineStyle | Base line |
textstyle-color | string | Color in CSS form |
textstyle-fill | FillStyle | Text fill style |
textstyle-font | string | Font see |
textstyle-fonturl | string | The place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword |
textstyle-lineheight | string | number | Line height |
textstyle-multiline | boolean | Allow multi-line text |
textstyle-outline | string | Outline style |
textstyle-outline | LineStyle | Outline style |
textstyle-overflowwrap | OverflowWrapStyle | Overflow wrap |
textstyle-strikethrough | string | Strikethrough style |
textstyle-strikethrough | LineStyle | Strikethrough style |
textstyle-textoverflow | TextOverflowStyle | Text overflow |
textstyle-underline | string | Underline style |
textstyle-underline | LineStyle | Underline style |
textstyle-underlineoffset | string | number | Underline offset distance |
textstyle-whitespace | WhiteSpaceStyle | White space |
textstyle-wordbreak | WordBreakStyle | Word break |
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 |
Constructors
• new LogTrackVisualHeader<T>(options?)
| Name | Type |
|---|---|
T | extends CompositeNode<Node, T> = LogTrack |
| Name | Type | Description |
|---|---|---|
Optional options | T | Options<T> | visual for logtrack or properties object |
LogVisualTitleHeader<T&gt;.constructor
Methods
▸ addCssClass(cssclass): LogTrackVisualHeader<T>
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
LogVisualTitleHeader.addCssClass
▸ addInvalidateHandler(handler): LogTrackVisualHeader<T>
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
LogVisualTitleHeader.addInvalidateHandler
▸ Protected applyOpacity(context): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.applyOpacity
▸ Protected applyResponsiveStyle(): void
Apply a responsive style rules it is exists
void
LogVisualTitleHeader.applyResponsiveStyle
▸ Protected calculateDesiredHeight(): number
Return header desired height
number
LogVisualTitleHeader.calculateDesiredHeight
▸ checkCollision(context): boolean
Check culling Returns true if object is inside of renderable area
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
LogVisualTitleHeader.checkCollision
▸ checkTextSize(context, text, maxLen): string
Returns biggest text in specified width
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
text | string | Text to calculate the size for |
maxLen | number | max length available for the text |
string
LogVisualTitleHeader.checkTextSize
▸ clone(): LogVisualTitleHeader<T>
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ connectStyle(style, type, callback): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.connectStyle
▸ Protected copyConstructor(src, deepCopy?): LogTrackVisualHeader<T>
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 | LogVisualTitleHeader<T> | Source to copy from |
Optional deepCopy | boolean | deep copy |
this
LogVisualTitleHeader.copyConstructor
▸ disconnectStyle(style, type, callback): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.disconnectStyle
▸ dispose(): void
Dispose node. Clear all listeners and disconnect style to avoid memory leaks
void
▸ drawBorder(context, borderLineStyle?, modelLimits?): LogTrackVisualHeader<T>
Stroke border with specified
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
Optional borderLineStyle | LineStyle | the LineStyle for the border |
Optional modelLimits | Rect | the border bounds |
LogVisualTitleHeader.drawBorder
▸ Protected drawRoundedBox(context, bounds, options?): LogTrackVisualHeader<T>
| Name | Type |
|---|---|
context | RenderingContext |
bounds | Rect |
Optional options | Object |
Optional options.fillstyle | FillStyle |
Optional options.linestyle | LineStyle |
Optional options.radius | number |
LogVisualTitleHeader.drawRoundedBox
▸ Protected drawText(context, x?, y?, text?, style?, alignment?, theta?, maxSize?): void
for internal use only, make text always readable
| Name | Type | Description |
|---|---|---|
context | RenderingContext | rendering context |
Optional x | number | x position to place text |
Optional y | number | y position to place text |
Optional text | string | text to be displayed |
Optional style | TextStyle | text style |
Optional alignment | AnchorType | alignment for placement of text |
Optional theta | number | of rotation |
Optional maxSize | number | Dimension | max size or width |
void
▸ enableEventPropagation(enable): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.enableEventPropagation
▸ execute(delegate): LogTrackVisualHeader<T>
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: LogTrackVisualHeader<T>) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: LogTrackVisualHeader<T>) => T |
T
▸ fillBorder(context, fillStyle?, modelLimits?): LogTrackVisualHeader<T>
Draws a rectangle at the model limits and fill it with specified fillStyle
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
Optional fillStyle | FillStyle | Fill Style for the rectangle |
Optional modelLimits | Rect | rectangle bounds |
LogVisualTitleHeader.fillBorder
▸ Protected filter(context): boolean
Filter node
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
flag filter flag ("true" to render node; "false" otherwise)
▸ getAdaptiveHeight(): boolean
get adaptive height flag
boolean
LogVisualTitleHeader.getAdaptiveHeight
▸ getAnchorType(): AnchorType
Returns title anchor type
title anchor type
LogVisualTitleHeader.getAnchorType
▸ getAnimationStyle(): AnimationStyle
Return animation style
animationStyle current animation style
LogVisualTitleHeader.getAnimationStyle
▸ getAutoLabelRotation(): boolean
Get auto label rotation
boolean
LogVisualTitleHeader.getAutoLabelRotation
▸ getBorderLineStyle(): LineStyle
Gets border line style
LogVisualTitleHeader.getBorderLineStyle
▸ getBounds(): Rect
Return bound in the parent coordinates
LogVisualTitleHeader.getBounds
▸ getClassName(): string
string
LogVisualTitleHeader.getClassName
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
LogVisualTitleHeader.getClipStyle
▸ getContentsArea(transformation?): Rect
Return area without paddings. Model limits are mapped to content area, where children are layout.
| Name | Type | Description |
|---|---|---|
Optional transformation | Transformation | scene transformation |
LogVisualTitleHeader.getContentsArea
▸ getContentsTransform(): Transformation
Return transformation from model to bounds
LogVisualTitleHeader.getContentsTransform
▸ getCss(): CssStyle
Return CSS style
▸ getCssClass(): string
Returns css class name to be used to apply CSS style
string
the css class name
LogVisualTitleHeader.getCssClass
▸ getCssClasses(): string[]
Gets list of css class names which applied to this node
string[]
LogVisualTitleHeader.getCssClasses
▸ getCssTransform(): string
Returns CSS transformation
string
LogVisualTitleHeader.getCssTransform
▸ getDesiredHeight(width?): number
Return header desired height
| Name | Type | Description |
|---|---|---|
Optional width | number | width to fit elements in case wrapping |
number
LogVisualTitleHeader.getDesiredHeight
▸ getDisplayDepth(): number
Returns the displayed depth value
number
LogVisualTitleHeader.getDisplayDepth
▸ getDisplayMode(): string | string[]
Returns the displayed mode value
string | string[]
LogVisualTitleHeader.getDisplayMode
▸ getDisplayString(): string
Returns the displayed value
string
displayString
LogVisualTitleHeader.getDisplayString
▸ getDisplayValue(): number
Returns 0
number
LogVisualTitleHeader.getDisplayValue
▸ getEllipsisString(): string
Get ellipsis text
string
LogVisualTitleHeader.getEllipsisString
▸ getFillStyle(): FillStyle
Return fill style
LogVisualTitleHeader.getFillStyle
▸ getHighlightOptions(): HighlightOptions
Returns highlight options
highlight options
LogVisualTitleHeader.getHighlightOptions
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>
Gets invalidate method
AttributeCallback<EventDispatcher>
method to invalidate this object
LogVisualTitleHeader.getInvalidateMethod
▸ getIsPointingUp(): boolean
Returns true if the text is always pointing up
boolean
true if the text is always pointing up
LogVisualTitleHeader.getIsPointingUp
▸ getLabelRotationAngle(): number
Returns label rotation angle
number
label rotation angle in radians
LogVisualTitleHeader.getLabelRotationAngle
▸ getLayoutStyle(): LayoutStyle<string | number>
Return desired layout style
LayoutStyle<string | number>
LogVisualTitleHeader.getLayoutStyle
▸ getLineStyle(): LineStyle
Return line style
LogVisualTitleHeader.getLineStyle
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
LogVisualTitleHeader.getLocalTransform
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
LogVisualTitleHeader.getMarginsStyle
▸ getModelLimits(): Rect
Return model limits
LogVisualTitleHeader.getModelLimits
▸ getName(): string
Returns the node name
string
The node name
▸ getOpacity(): number
Returns current node opacity
number
opacity
LogVisualTitleHeader.getOpacity
▸ getOpacityBlendMode(): BlendMode
Returns current node opacity
opacity blend mode
LogVisualTitleHeader.getOpacityBlendMode
▸ getPaddingStyle(): SpaceStyle<string | number>
Return padding style
SpaceStyle<string | number>
padding
LogVisualTitleHeader.getPaddingStyle
▸ getParent(): Node
Return parent node
parent node
LogVisualTitleHeader.getParent
▸ getProperties(): OptionsOut<T>
Gets all the properties pertaining to this object
OptionsOut<T>
An object containing the properties to set
LogVisualTitleHeader.getProperties
▸ 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
LogVisualTitleHeader.getProperty
▸ getPropertyKeys(): string[]
Returns known properties keys
string[]
LogVisualTitleHeader.getPropertyKeys
▸ getRenderingFilter(): IFilter
Return filter to be used for rendering and picking
current filter
LogVisualTitleHeader.getRenderingFilter
▸ getResponsiveStyle(): ResponsiveStyle
Return responsive style
LogVisualTitleHeader.getResponsiveStyle
▸ getRoot(): Node
Returns root node.
If node doesn't have parent then it returns itself.
the root node
▸ getScaleScrollStrategy(): Delegate
Gets scale scroll strategy
scale scroll strategy
LogVisualTitleHeader.getScaleScrollStrategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
LogVisualTitleHeader.getSceneTransform
▸ getShowEllipsis(): boolean
Returns ellipsis flag
boolean
LogVisualTitleHeader.getShowEllipsis
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getText(): string
Returns header title
string
title
▸ Protected getTextBoundingBox(context, x?, y?, text?, style?, alignment?, theta?): Rect
Returns bounding box of the text
| Name | Type | Description |
|---|---|---|
context | RenderingContext | rendering context |
Optional x | number | x position to place text |
Optional y | number | y position to place text |
Optional text | string | text to be displayed |
Optional style | TextStyle | text style |
Optional alignment | AnchorType | alignment for placement of text |
Optional theta | number | of rotation |
LogVisualTitleHeader.getTextBoundingBox
▸ Protected getTextShapeHelper(x?, y?, text?, textStyle?, alignment?): Text
Return text shape helper instance
| Name | Type | Description |
|---|---|---|
Optional x | number | x coordinate |
Optional y | number | y coordinate |
Optional text | string | text to display |
Optional textStyle | Type | a new shape text style |
Optional alignment | AnchorType | anchor alignment |
text shape helper
LogVisualTitleHeader.getTextShapeHelper
▸ getTextStyle(): TextStyle
Return a current text style
LogVisualTitleHeader.getTextStyle
▸ getVisible(): boolean
Return visibility of the header
boolean
true if header itself and associated LogVisual is visible
LogVisualTitleHeader.getVisible
▸ getVisual(): T
Gets visual to be used to render header
T
visual
LogVisualTitleHeader.getVisual
▸ getWorldTransform(): Transformation
getWorldTransform retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.
LogVisualTitleHeader.getWorldTransform
▸ getZIndex(): number
Returns node z-index (null if not set)
number
LogVisualTitleHeader.getZIndex
▸ hasCssClass(cssClass): boolean
Check if node has specified css class
| Name | Type | Description |
|---|---|---|
cssClass | string | css class name |
boolean
LogVisualTitleHeader.hasCssClass
▸ 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
LogVisualTitleHeader.hasEventListener
▸ invalidate(bounds?, force?): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.invalidate
▸ invalidateLayout(propagate?): LogTrackVisualHeader<T>
Notify that layout is invalidated. Send event Events.LayoutInvalidated
| Name | Type | Description |
|---|---|---|
Optional propagate | boolean | propagate invalidate layout to parent |
this
LogVisualTitleHeader.invalidateLayout
▸ Protected invalidateParent(bounds?, force?): LogTrackVisualHeader<T>
Invalidate parent and notify all listeners. NOTE: Don't keep arguments of the event, because instance can be changed
Fires
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | bounds of the invalid rectangle in the inner node coordinates |
Optional force | boolean | force rendering |
this
LogVisualTitleHeader.invalidateParent
▸ isAutoBounds(): boolean
Enable automatic bounds. If auto bounds is enabled then it equals to parent model limits
Deprecated
since 4.1, use .getLayoutStyle instead
boolean
LogVisualTitleHeader.isAutoBounds
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
LogVisualTitleHeader.isDisposed
▸ isEventPropagationEnabled(): boolean
Return true if event propagation is enabled from child to parent
boolean
LogVisualTitleHeader.isEventPropagationEnabled
▸ isHorizontalFlip(): boolean
Return true if the representation is flipped horizontally
boolean
horizontal flip
LogVisualTitleHeader.isHorizontalFlip
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
LogVisualTitleHeader.isNotificationEnabled
▸ isRotationNeeded(): boolean
True if labels doesn't fit to header width
boolean
LogVisualTitleHeader.isRotationNeeded
▸ isSelectable(): boolean
Returns true if node can be picked/selected.
boolean
The selectable flag
LogVisualTitleHeader.isSelectable
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ notify<E>(type, source, args?): LogTrackVisualHeader<T>
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event |
source | LogTrackVisualHeader<T> | source who called the event |
Optional args | EventMap[E] | event arguments |
this
▸ off<E>(type?, callback?): LogTrackVisualHeader<T>
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: LogTrackVisualHeader<T>, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): LogTrackVisualHeader<T>
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: LogTrackVisualHeader<T>, args: EventMap[E]) => void | to be called |
this
▸ Protected onParentChanged(node): LogTrackVisualHeader<T>
This method is called when parent changes. Do not call it directly.
| Name | Type | Description |
|---|---|---|
node | Node | node to change parent |
this
LogVisualTitleHeader.onParentChanged
▸ Protected onVisibilityChanged(): void
This method is called if visibility is changed. Send event Events.VisibilityChanged
void
LogVisualTitleHeader.onVisibilityChanged
▸ Protected onVisualChanged(): void
This method is called if visual is changed. Send event Events.VisualChanged
void
LogVisualTitleHeader.onVisualChanged
▸ Protected onVisualChanging(): void
This method is called if visual is changing.
void
LogVisualTitleHeader.onVisualChanging
▸ Protected onVisualStateChanged(type, source): void
void
LogVisualTitleHeader.onVisualStateChanged
▸ 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
LogVisualTitleHeader.postRendering
▸ 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
LogVisualTitleHeader.preRendering
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
LogVisualTitleHeader.registerAnimationStyle
▸ removeCssClass(cssclass): LogTrackVisualHeader<T>
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
LogVisualTitleHeader.removeCssClass
▸ removeInvalidateHandler(handler): LogTrackVisualHeader<T>
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
LogVisualTitleHeader.removeInvalidateHandler
▸ render(inputContext): void
Renders node
| Name | Type | Description |
|---|---|---|
inputContext | 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
LogVisualTitleHeader.renderAsync
▸ rotate(theta, x, y): LogTrackVisualHeader<T>
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): LogTrackVisualHeader<T>
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ setAdaptiveHeight(enable): LogTrackVisualHeader<T>
Set adaptive height flag
| Name | Type | Description |
|---|---|---|
enable | boolean | set adaptive height or not |
this
LogVisualTitleHeader.setAdaptiveHeight
▸ setAnchorType(anchorType): LogTrackVisualHeader<T>
Sets label anchor type
Example
import {AnchorType} from '@int/geotoolkit/util/AnchorType';
header.setAnchorType(AnchorType.BottomCenter);| Name | Type | Description |
|---|---|---|
anchorType | AnchorType | title anchor type |
this
LogVisualTitleHeader.setAnchorType
▸ setAnimationStyle(animationStyle): LogTrackVisualHeader<T>
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
LogVisualTitleHeader.setAnimationStyle
▸ setAutoBounds(enable): LogTrackVisualHeader<T>
Enable or disable auto bounds If auto bounds is enabled then it equals to parent model limits
Deprecated
since 4.1, use .setLayoutStyle instead
| Name | Type | Description |
|---|---|---|
enable | boolean | Enable or disable auto bounds |
LogVisualTitleHeader.setAutoBounds
▸ setAutoLabelRotation(value): LogTrackVisualHeader<T>
Set auto label rotation
| Name | Type | Description |
|---|---|---|
value | boolean | enable automatic label rotation |
this
LogVisualTitleHeader.setAutoLabelRotation
▸ setBorderLineStyle(lineStyle, merge?): LogTrackVisualHeader<T>
Sets border 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
LogVisualTitleHeader.setBorderLineStyle
▸ setBounds(bounds): LogTrackVisualHeader<T>
Sets bounds of the curve in the parent coordinates and set up auto bounds false
| Name | Type | Description |
|---|---|---|
bounds | Rect | bounds of the curve in the parent coordinates |
this
LogVisualTitleHeader.setBounds
▸ setClipStyle(style): LogTrackVisualHeader<T>
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
LogVisualTitleHeader.setClipStyle
▸ setCss(style, merge?): LogTrackVisualHeader<T>
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): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.setCssClass
▸ setCssTransform(transform): LogTrackVisualHeader<T>
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
LogVisualTitleHeader.setCssTransform
▸ setDesiredHeight(value, silent?): LogTrackVisualHeader<T>
Sets desired height of the header as a layoutable object
| Name | Type | Description |
|---|---|---|
value | string | number | desired height to set, use 'auto' for automatic desired height |
Optional silent | boolean | silent setting |
this
LogVisualTitleHeader.setDesiredHeight
▸ setDisplayMode(displayMode): LogTrackVisualHeader<T>
Sets the displayed mode value
| Name | Type | Description |
|---|---|---|
displayMode | string | string[] | header display mode |
LogVisualTitleHeader.setDisplayMode
▸ setDisplayString(displayString): LogTrackVisualHeader<T>
Sets the displayed value
| Name | Type | Description |
|---|---|---|
displayString | string | the displayed value |
LogVisualTitleHeader.setDisplayString
▸ setEllipsisString(ellipsisValue): LogTrackVisualHeader<T>
Sets ellipsis text to string under 15 characters
| Name | Type |
|---|---|
ellipsisValue | string |
this
LogVisualTitleHeader.setEllipsisString
▸ setFillStyle(fillStyle, merge?): LogTrackVisualHeader<T>
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 |
LogVisualTitleHeader.setFillStyle
▸ setHighlightOptions(options): LogTrackVisualHeader<T>
Set highlight options
| Name | Type | Description |
|---|---|---|
options | HighlightOptions | highlight options |
LogVisualTitleHeader.setHighlightOptions
▸ setHorizontalFlip(enable): LogTrackVisualHeader<T>
Set horizontal flip of the representation
| Name | Type | Description |
|---|---|---|
enable | boolean | enable flip flag, if it is null [default] header try to use same property from associated visual |
this
LogVisualTitleHeader.setHorizontalFlip
▸ setId(id): LogTrackVisualHeader<T>
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setIsPointingUp(isPointingUp): LogTrackVisualHeader<T>
Sets whether the text is always pointing up.
| Name | Type | Description |
|---|---|---|
isPointingUp | boolean | flag setting whether the text is always pointing up |
this
LogVisualTitleHeader.setIsPointingUp
▸ setLabelRotationAngle(angle): LogTrackVisualHeader<T>
Sets label rotation angle in radians
Example
// user can customize the label rotation angle
setLabelRotationAngle(-Math.PI / 2)| Name | Type | Description |
|---|---|---|
angle | number | label rotation angle, in radians |
this
LogVisualTitleHeader.setLabelRotationAngle
▸ setLayoutStyle(layoutStyle, merge?): LogTrackVisualHeader<T>
Specify desired layout style
| Name | Type | Description |
|---|---|---|
layoutStyle | LayoutStyle<string | number> | Options<string | number> | desired layout style |
Optional merge | boolean | true if you want to merge layoutStyle with existing attribute, false by default |
LogVisualTitleHeader.setLayoutStyle
▸ setLineStyle(lineStyle, merge?): LogTrackVisualHeader<T>
Sets a 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
LogVisualTitleHeader.setLineStyle
▸ setLocalTransform(localTransform, force?): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.setLocalTransform
▸ setMarginsStyle(margins, merge?): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.setMarginsStyle
▸ setModelLimits(modelLimits): LogTrackVisualHeader<T>
Sets model limits
| Name | Type | Description |
|---|---|---|
modelLimits | Rect | desired model Limits |
LogVisualTitleHeader.setModelLimits
▸ setName(name): LogTrackVisualHeader<T>
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNotification(notify, force?): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.setNotification
▸ setOpacity(opacity, blendMode?): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.setOpacity
▸ setPaddingStyle(paddingStyle, merge?): LogTrackVisualHeader<T>
Sets padding style
| Name | Type | Description |
|---|---|---|
paddingStyle | Type<string | number> | padding style |
Optional merge | boolean | true if you want to merge paddingStyle with existing attribute, false by default |
LogVisualTitleHeader.setPaddingStyle
▸ setProperties(properties?): LogTrackVisualHeader<T>
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options<T> | An object containing the properties to set |
this
LogVisualTitleHeader.setProperties
▸ setProperty(name, value): LogTrackVisualHeader<T>
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
LogVisualTitleHeader.setProperty
▸ setRenderingFilter(filter): LogTrackVisualHeader<T>
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
LogVisualTitleHeader.setRenderingFilter
▸ setResponsiveStyle(style): LogTrackVisualHeader<T>
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
LogVisualTitleHeader.setResponsiveStyle
▸ setScaleScrollStrategy(strategy?): LogTrackVisualHeader<T>
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
LogVisualTitleHeader.setScaleScrollStrategy
▸ setSelectable(selectable): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.setSelectable
▸ setShowEllipsis(showEllipsis): LogTrackVisualHeader<T>
Set show ellipsis
| Name | Type | Description |
|---|---|---|
showEllipsis | boolean | showEllipsis boolean flag that enables/disables ellipsis in case if text is too long |
this
LogVisualTitleHeader.setShowEllipsis
▸ setSilent(bool): LogTrackVisualHeader<T>
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
LogVisualTitleHeader.setSilent
▸ setTag(tag): LogTrackVisualHeader<T>
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
▸ setTextStyle(textStyle, merge?): LogTrackVisualHeader<T>
Sets a current text style
| Name | Type | Description |
|---|---|---|
textStyle | Type | a new shape text style |
Optional merge | boolean | true if you want to merge textStyle with existing attribute, false by default |
this
LogVisualTitleHeader.setTextStyle
▸ setVisible(value): LogTrackVisualHeader<T>
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
LogVisualTitleHeader.setVisible
▸ setVisual(visual): LogTrackVisualHeader<T>
| Name | Type |
|---|---|
visual | T |
LogVisualTitleHeader.setVisual
▸ setZIndex(value): LogTrackVisualHeader<T>
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
LogVisualTitleHeader.setZIndex
▸ shear(shx, shy): LogTrackVisualHeader<T>
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): LogTrackVisualHeader<T>
Translate bounds
| Name | Type | Description |
|---|---|---|
tx | number | x translation |
ty | number | y translation |
this
LogVisualTitleHeader.translate
▸ unregisterAnimationStyle(root): void
Unregister animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
LogVisualTitleHeader.unregisterAnimationStyle
▸ Protected updateGeometry(): LogTrackVisualHeader<T>
LogVisualTitleHeader.updateGeometry
▸ updateSceneTransformation(): LogTrackVisualHeader<T>
Update scene transformation
this
LogVisualTitleHeader.updateSceneTransformation
▸ updateState(regions?, changes?): LogTrackVisualHeader<T>
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
LogVisualTitleHeader.updateState
▸ Protected updateTimeStamp(): LogTrackVisualHeader<T>
Update time stamp to indicate that Node or Children has been changed.
this
LogVisualTitleHeader.updateTimeStamp
▸ Static enableSceneGraphNotification(enabled): void
Enable / disable all notifications
| Name | Type | Description |
|---|---|---|
enabled | boolean | sets if this object sends notifications |
void
LogVisualTitleHeader.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>
LogVisualTitleHeader.findParent
▸ 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 |
LogVisualTitleHeader.findParent
▸ Static getClassName(): string
string
LogVisualTitleHeader.getClassName
▸ Static getDesiredHeight(header, width?): number
Return header desired content height with padding
| Name | Type | Description |
|---|---|---|
header | LogVisualHeader<Node> | header instance |
Optional width | number | available width, for header, to calculate required height |
number
LogVisualTitleHeader.getDesiredHeight
▸ Static isSceneGraphNotificationEnabled(): boolean
Return status of the global notification for all nodes.
boolean