API / geotoolkit / report / elements / TextNode / TextNode
Define representation of text element to be parsed
↳
TextNode
Constructors
Methods
Constructors
• new TextNode(nodeName?, nodeType?, nodeValue?)
| Name | Type | Description |
|---|---|---|
Optional nodeName | string | node name |
Optional nodeType | number | node type |
Optional nodeValue | string | node value |
EventDispatcher.constructor
Methods
▸ addChild(node): TextNode
Add a child text node
▸ dispose(): void
Dispose.
void
▸ getChild(i): TextNode
Return node by index
| Name | Type | Description |
|---|---|---|
i | number | index of the node |
child
▸ getChildrenCount(): number
Return number of child nodes
number
▸ getClassName(): string
string
▸ getCssClass(): string
Returns css class name to be used to apply CSS style
string
the css class name
▸ getDomElement(): Element
Returns DOM element
return DOM element
▸ getElementParser(): NodeParser
▸ getElementStyle(elementStyle): any
Returns element style
| Name | Type | Description |
|---|---|---|
elementStyle | string | element style |
any
return element style
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ getName(): string
Returns the node name
string
The node name
▸ getParent(): TextNode
Get parent text node
parent
▸ 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
▸ getText(): string
Returns text
string
text
▸ 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
EventDispatcher.hasEventListener
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isEmpty(): boolean
Return node state, checl if it is empty or not
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ isSimple(): boolean
Return node state, is it a simple text with
only or not
boolean
▸ notify(type, source, args?): TextNode
Notify listeners
| Name | Type | Description |
|---|---|---|
type | string | event types |
source | any | of the event |
Optional args | any | arguments of the event |
this
▸ off(type?, callback?): TextNode
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 | Description |
|---|---|---|
Optional type | string | type of the event |
Optional callback | EventListener | function to be called |
this
▸ off<E>(type, callback): TextNode
| Name | Type |
|---|---|
E | extends string |
▸ on(type, callback, options?): TextNode
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 | Description |
|---|---|---|
type | string | type of event or property |
callback | EventListener | to be called |
Optional options | Options | options of subscription |
this
▸ on<E>(type, callback, options?): TextNode
| Name | Type |
|---|---|
E | extends string |
| Name | Type |
|---|---|
type | E |
callback | (eventType: E, sender: TextNode, args: EventMap[E]) => void |
Optional options | Options |
▸ Protected onDomElementChanged(eventType, sender, eventArgs): TextNode
Update element from domElement
| Name | Type | Description |
|---|---|---|
eventType | string | event type |
sender | Element | |
eventArgs | NodeEventArgs | argument args |
▸ rebuildDomLayout(): TextNode
Rebuild DOM Layout
this
▸ removeChild(node): TextNode
Remove child node
this
▸ setCssClass(cssClass): TextNode
Sets css class name of the node to be used to apply CSS style
| Name | Type | Description |
|---|---|---|
cssClass | string | css class name of the node |
this
▸ setDomElement(domElement): TextNode
Set DOM element
| Name | Type | Description |
|---|---|---|
domElement | Element | DOM element |
this
▸ setElementParser(elementParser): TextNode
| Name | Type |
|---|---|
elementParser | NodeParser |
▸ setElementStyle(elementStyle, styleValue): TextNode
Set element style
| Name | Type | Description |
|---|---|---|
elementStyle | ElementStyle | element style |
styleValue | ElementStyle | style value |
this
▸ setId(id): TextNode
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setInlineElement(inlineElement): TextNode
Set inline element
| Name | Type | Description |
|---|---|---|
inlineElement | InlineElement | inline element |
this
▸ setName(name): TextNode
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNotification(notify): TextNode
set notification state
| Name | Type | Description |
|---|---|---|
notify | boolean | flag set to invalidate parent or not |
this
▸ setParent(parent): TextNode
Set parent text node
| Name | Type | Description |
|---|---|---|
parent | TextNode | parent |
▸ setSilent(bool): TextNode
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setText(text): TextNode
Set text
| Name | Type | Description |
|---|---|---|
text | string | text |
this
▸ setVisible(visible): TextNode
empty stub
| Name | Type |
|---|---|
visible | boolean |
▸ Static getClassName(): string
string