API / geotoolkit / report / dom / elements / Text / Text
Text element
↳
Text
Constructors
Accessors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
backgroundstyle | string | Background style |
backgroundstyle | FillStyle | Background style |
backgroundstyle-color | string | Color in CSS form |
backgroundstyle-evenoddmode | boolean | Even-odd fill mode |
backgroundstyle-fillpattern | Pattern | Pattern |
backgroundstyle-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 |
backgroundstyle-fillpattern-patternname | string | Name of this pattern for indexing |
backgroundstyle-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
backgroundstyle-foreground | string | Foreground color |
backgroundstyle-pattern | Pattern | Pattern |
borderlinestyle | string | Border linestyle |
borderlinestyle | LineStyle | Border linestyle |
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-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 |
borders | string | Borders |
borders | LineStyle | Borders |
cssclass | string | Css class |
flip | boolean | Flip |
layoutstyle | LayoutStyle | Layout style |
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 |
marginstyle | number | string | Margin style |
orientation | Orientation | Orientation |
paddingstyle | number | string | Padding style |
pagebreak | PageBreak | Pagebreak |
textstyle | TextStyle | 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 |
Accessors
• get attributes(): NamedItemMap
Node attributes
Name
module:geotoolkit/report/dom/Node~Node#attributes
AbstractTextElement.attributes
• get childNodes(): NodeList<Node>
The element holding the item.
Name
module:geotoolkit/report/dom/Node~Node#childNodes
AbstractTextElement.childNodes
• get children(): NodeList<Element>
The children property returns a collection of an element's child elements, as an NodeList object.
Name
module:geotoolkit/report/dom/Element~Element#children
AbstractTextElement.children
• get data(): string
Node data
Name
module:geotoolkit/report/dom/Node~Node#data
string
AbstractTextElement.data
• set data(data): void
Node data
Name
module:geotoolkit/report/dom/Node~Node#data
| Name | Type |
|---|---|
data | string |
void
AbstractTextElement.data
• get firstChild(): Node
First child node
Name
module:geotoolkit/report/dom/Node~Node#firstChild
AbstractTextElement.firstChild
• get lastChild(): Node
Last child node
Name
module:geotoolkit/report/dom/Node~Node#lastChild
AbstractTextElement.lastChild
• get localName(): string
Node local name
Name
module:geotoolkit/report/dom/Node~Node#localName
string
AbstractTextElement.localName
• get nextSibling(): Node
Next sibling node
Name
module:geotoolkit/report/dom/Node~Node#nextSibling
AbstractTextElement.nextSibling
• get nodeName(): string
Node name
Name
module:geotoolkit/report/dom/Node~Node#nodeName
string
AbstractTextElement.nodeName
• get nodeType(): NodeType
Node type
Name
module:geotoolkit/report/dom/Node~Node#nodeType
AbstractTextElement.nodeType
• get nodeValue(): string
Node value
Name
module:geotoolkit/report/dom/Node~Node#nodeValue
string
AbstractTextElement.nodeValue
• set nodeValue(value): void
Node value
Name
module:geotoolkit/report/dom/Node~Node#nodeValue
| Name | Type |
|---|---|
value | string |
void
AbstractTextElement.nodeValue
• get ownerDocument(): Document
Node owner document
Name
module:geotoolkit/report/dom/Node~Node#ownerDocument
AbstractTextElement.ownerDocument
• get parentNode(): Node
Parent node
Name
module:geotoolkit/report/dom/Node~Node#parentNode
AbstractTextElement.parentNode
• get previousSibling(): Node
Previous sibling node
Name
module:geotoolkit/report/dom/Node~Node#previousSibling
AbstractTextElement.previousSibling
• get rootNode(): Node
Return root node
Deprecated
since 2022 (3.4) use Node#getRootNode instead
Name
module:geotoolkit/report/dom/Node~Node#rootNode
AbstractTextElement.rootNode
• get tagName(): string
Node tag name
Name
module:geotoolkit/report/dom/Node~Node#tagName
string
AbstractTextElement.tagName
Methods
▸ appendChild(newChild): Text
Add child to the node
| Name | Type | Description |
|---|---|---|
newChild | Node | child to add |
AbstractTextElement.appendChild
▸ clearAttributes(): Text
Clear attributes
AbstractTextElement.clearAttributes
▸ clearNodes(): Text
Remove all child nodes from this node
this
AbstractTextElement.clearNodes
▸ connectStyle(style, type, callback): Text
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
AbstractTextElement.connectStyle
▸ disconnectStyle(style, type, callback): Text
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
AbstractTextElement.disconnectStyle
▸ 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
▸ enumerateNodes(callback, target?): void
Enumerate children nodes
| Name | Type | Description |
|---|---|---|
callback | Callback<Node> | callback |
Optional target | QueryBuilder<any> | target |
void
AbstractTextElement.enumerateNodes
▸ Protected flush(serializationContext?): Text
Flush all changes before saving
| Name | Type | Description |
|---|---|---|
Optional serializationContext | SerializationContext | serialization Context |
▸ getAlignment(): AnchorType
Return text alignment type
▸ getAttribute(name): string
Return attribute value
| Name | Type | Description |
|---|---|---|
name | string | attribute name |
string
AbstractTextElement.getAttribute
▸ getBackgroundStyle(): FillStyle
Return background style
background current background style
AbstractTextElement.getBackgroundStyle
▸ getBorderLineStyle(): LineStyle
Return border line style
AbstractTextElement.getBorderLineStyle
▸ getClassName(): string
string
AbstractTextElement.getClassName
▸ getCssClass(): string
Returns css class name to be used to apply CSS style
string
the css class name
AbstractTextElement.getCssClass
▸ getElementRegistry(): IElementsRegistry
Returns elements Registry
AbstractTextElement.getElementRegistry
▸ getElementTransform(): { name: string ; parameters: string[] }[]
Return array of transformation instructions
{ name: string ; parameters: string[] }[]
array of transformations
AbstractTextElement.getElementTransform
▸ getFlip(): boolean
Return element content flip flag
boolean
element layout orientation
▸ getGuid(): string
Returns element GUID
string
▸ getId(): string
Returns element id
string
▸ getInnerCssStyle(): string
Return collected inner css style
string
inner css style
AbstractTextElement.getInnerCssStyle
▸ getLayoutStyle(): LayoutStyle<string | number>
Return layout style
LayoutStyle<string | number>
layout style
AbstractTextElement.getLayoutStyle
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
margins style
AbstractTextElement.getMarginsStyle
▸ getNodeIndex(): number
Return node index
number
AbstractTextElement.getNodeIndex
▸ getNodeValue(): string
Returns node value
string
AbstractTextElement.getNodeValue
▸ getOrientation(): Orientation
Return element layout orientation
element layout orientation
AbstractTextElement.getOrientation
▸ getPaddingStyle(): SpaceStyle<string | number>
Return padding style
SpaceStyle<string | number>
padding style
AbstractTextElement.getPaddingStyle
▸ getPageBreak(): PageBreak
Returns element page break
page break
AbstractTextElement.getPageBreak
▸ getParent(): Node
Returns parent node
parent
▸ getProperties(): OptionsOut
Gets element properties
props
AbstractTextElement.getProperties
▸ getRootNode(): Node
Return root node
node
AbstractTextElement.getRootNode
▸ getTagName(): string
Returns node tag name
string
AbstractTextElement.getTagName
▸ getText(): string
Return text value
string
text value
▸ getTextStyle(): TextStyle
Return text style
text style
AbstractTextElement.getTextStyle
▸ getTimeStamp(): number
Gets time stamp
number
timeStamp
AbstractTextElement.getTimeStamp
▸ getTransformOrigin(): string
Return transform origin
string
AbstractTextElement.getTransformOrigin
▸ getVisible(): boolean
Get element visible state
boolean
AbstractTextElement.getVisible
▸ hasAttribute(name): boolean
Check if attribute exists
| Name | Type | Description |
|---|---|---|
name | string | attribute name |
boolean
AbstractTextElement.hasAttribute
▸ hasChildNodes(): boolean
Return true if node has children
boolean
AbstractTextElement.hasChildNodes
▸ 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
AbstractTextElement.hasEventListener
▸ indexOfNode(node): number
Returns index of node.
| Name | Type | Description |
|---|---|---|
node | Node | item to get index of |
number
AbstractTextElement.indexOfNode
▸ insertAfter(newChild, refChild): Node
Insert child
AbstractTextElement.insertAfter
▸ insertBefore(newChild, refChild): Node
Insert child
AbstractTextElement.insertBefore
▸ Protected invalidate(): Text
this
AbstractTextElement.invalidate
▸ Protected invalidateDocument(eventArgs): Text
Invalidate root document
| Name | Type | Description |
|---|---|---|
eventArgs | NodeEventArgs | event args |
this
AbstractTextElement.invalidateDocument
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
AbstractTextElement.isDisposed
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ lock(): Text
Lock node
▸ normalize(): Text
Puts the specified node and all of its subtree into a "normalized" form. In a normalized sub-tree, no text nodes in the sub-tree are empty and there are no adjacent text nodes.
this
▸ notify<E>(type, source, args?): Text
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | Element | of the event |
Optional args | EventMap[E] | arguments of the event |
this
▸ off<E>(type?, callback?): Text
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: Text, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): Text
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: Text, args: EventMap[E]) => void | to be called |
this
▸ Protected onParentChanged(): Text
this
AbstractTextElement.onParentChanged
▸ Protected onResetCssProperties(silent): Text
Clean up cached properties
| Name | Type | Description |
|---|---|---|
silent | boolean | silent reset |
this
AbstractTextElement.onResetCssProperties
▸ removeAttribute(name): Text
Remove attribute
| Name | Type | Description |
|---|---|---|
name | string | attribute name |
AbstractTextElement.removeAttribute
▸ removeChild(child): Node
Remove child from node
| Name | Type | Description |
|---|---|---|
child | Node | to remove |
AbstractTextElement.removeChild
▸ replaceChild(newChild, oldChild): Text
Replace child
AbstractTextElement.replaceChild
▸ Protected resetElementStyle(): Text
Reset own styles
AbstractTextElement.resetElementStyle
▸ save(recursive?, serializationContext?): string
Serialize element to xml
| Name | Type | Description |
|---|---|---|
Optional recursive | boolean | save whole dom element structure |
Optional serializationContext | SerializationContext | serialization Context |
string
▸ setAlignment(alignment): Text
Sets the text alignment type.
| Name | Type | Description |
|---|---|---|
alignment | AnchorType | text alignment type |
this
▸ setAttribute(name, value): Text
Set attribute value
| Name | Type | Description |
|---|---|---|
name | string | attribute name |
value | string | attribute value |
AbstractTextElement.setAttribute
▸ setAttributeNode(newAttr): Text
Adds a new Attribute node to the specified element.
| Name | Type | Description |
|---|---|---|
newAttr | Attribute | attribute |
this
AbstractTextElement.setAttributeNode
▸ setBackgroundStyle(backgroundStyle, merge?): Text
Set background style
| Name | Type | Description |
|---|---|---|
backgroundStyle | Type | background style |
Optional merge | boolean | merge flag |
this
AbstractTextElement.setBackgroundStyle
▸ setBorderLineStyle(borderStyle, merge?): Text
Sets border line style Returns this
| Name | Type | Description |
|---|---|---|
borderStyle | Type | BorderStyle | line style or options |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
this
AbstractTextElement.setBorderLineStyle
▸ setCssClass(cssClass): Text
Set css class
| Name | Type | Description |
|---|---|---|
cssClass | string | css class |
AbstractTextElement.setCssClass
▸ Protected setElementRegistry(registry): Text
Set shadow element registry
| Name | Type | Description |
|---|---|---|
registry | IElementsRegistry | elements registry |
AbstractTextElement.setElementRegistry
▸ setElementTransform(transformOrigin, transformation?): void
Set element transform
| Name | Type | Description |
|---|---|---|
transformOrigin | string | transform origin |
Optional transformation | { name: string ; parameters: string[] }[] | transformations array |
void
AbstractTextElement.setElementTransform
▸ setFlip(flip): Text
Set element content flip orientation
| Name | Type | Description |
|---|---|---|
flip | boolean | element content flip |
▸ setGuid(guid): Text
Set node GUID
| Name | Type | Description |
|---|---|---|
guid | string | node GUID |
▸ setLayoutStyle(layout?, merge?, silent?): Text
Sets layout style
| Name | Type | Description |
|---|---|---|
Optional layout | LayoutStyle<string | number> | Options<string | number> | layout style |
Optional merge | boolean | true if you want to merge layoutStyle with existing attribute, false by default |
Optional silent | boolean | silent setting |
AbstractTextElement.setLayoutStyle
▸ setMarginsStyle(margins?, merge?): Text
Sets margins style
| Name | Type | Description |
|---|---|---|
Optional margins | Type<string | number> | margins style |
Optional merge | boolean | true if you want to merge marginsStyle with existing attribute, false by default |
AbstractTextElement.setMarginsStyle
▸ setNodeValue(nodeValue): Text
Set node value
| Name | Type | Description |
|---|---|---|
nodeValue | string | node value |
AbstractTextElement.setNodeValue
▸ setOrientation(orientation): Text
Set element layout orientation
| Name | Type | Description |
|---|---|---|
orientation | Orientation | element layout orientation |
AbstractTextElement.setOrientation
▸ setPaddingStyle(padding?, merge?): Text
Sets padding style
| Name | Type | Description |
|---|---|---|
Optional padding | Type<string | number> | padding style |
Optional merge | boolean | true if you want to merge paddingStyle with existing attribute, false by default |
AbstractTextElement.setPaddingStyle
▸ setPageBreak(pageBreak): Text
Set element page break
| Name | Type | Description |
|---|---|---|
pageBreak | PageBreak | page break style |
this
AbstractTextElement.setPageBreak
▸ setProperties(props): Text
Sets the element properties
| Name | Type | Description |
|---|---|---|
props | Options | props |
this
AbstractTextElement.setProperties
▸ setSilent(bool): Text
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setText(text): Text
Set text value
| Name | Type | Description |
|---|---|---|
text | string | text value |
this
▸ setTextStyle(textStyle, merge?): Text
Sets 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 |
AbstractTextElement.setTextStyle
▸ setVisible(visible): Text
Set element visible state
| Name | Type | Description |
|---|---|---|
visible | boolean | element visibility flag |
AbstractTextElement.setVisible
▸ setXmlContent(xmlValue): Promise<NodeList<Node>>
Set XML content
| Name | Type | Description |
|---|---|---|
xmlValue | string | xml to parse |
promise
AbstractTextElement.setXmlContent
▸ unlock(): Text
Unlock node
▸ updateTimeStamp(): Text
Update time stamp to indicate that style has been changed.
this
AbstractTextElement.updateTimeStamp
▸ Static findParentNode<T>(node, classType): InstanceType<T>
Find root of the node with specified type
| Name | Type |
|---|---|
T | extends Constructable<any> |
| Name | Type | Description |
|---|---|---|
node | Node | node to start search |
classType | T | type of the class to search for or short interface name |
InstanceType<T>
AbstractTextElement.findParentNode
▸ Static findParentNode(node, classType): 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 |
AbstractTextElement.findParentNode
▸ Static getClassName(): string
string