Last updated

API / geotoolkit / report / elements / TextNode / TextNode

Class: TextNode

elements.TextNode.TextNode

Define representation of text element to be parsed

Hierarchy

Implements

Table of contents

Constructors
Methods

Contents

Constructors

new TextNode(nodeName, nodeType, nodeValue)

new TextNode(nodeName?, nodeType?, nodeValue?)

Parameters

Name Type Description
Optional nodeNamestringnode name
Optional nodeTypenumbernode type
Optional nodeValuestringnode value

Overrides

EventDispatcher.constructor

Methods

addChild

addChild(node): TextNode

Add a child text node

Parameters

Name Type Description
nodeTextNode | TextNode[] | Iterator<TextNode>the child node to be added

Returns

TextNode


dispose

dispose(): void

Dispose.

Returns

void

Inherited from

EventDispatcher.dispose


getChild

getChild(i): TextNode

Return node by index

Parameters

Name Type Description
inumberindex of the node

Returns

TextNode

child


getChildrenCount

getChildrenCount(): number

Return number of child nodes

Returns

number


getClassName

getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName


getCssClass

getCssClass(): string

Returns css class name to be used to apply CSS style

Returns

string

the css class name


getDomElement

getDomElement(): Element

Returns DOM element

Returns

Element

return DOM element

Implementation of

IElement.getDomElement


getElementParser

getElementParser(): NodeParser

Returns

NodeParser


getElementStyle

getElementStyle(elementStyle): any

Returns element style

Parameters

Name Type Description
elementStylestringelement style

Returns

any

return element style

Implementation of

IElement.getElementStyle


getId

getId(): string | number

Returns the associated identifier of the node

Returns

string | number

The node's id


getName

getName(): string

Returns the node name

Returns

string

The node name


getParent

getParent(): TextNode

Get parent text node

Returns

TextNode

parent


getProperty

getProperty(name): any

Gets dynamic property by name. These properties can be used as a property bags

Parameters

Name Type Description
namestringproperty name

Returns

any


getText

getText(): string

Returns text

Returns

string

text


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

EventDispatcher.hasEventListener


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

EventDispatcher.isDisposed


isEmpty

isEmpty(): boolean

Return node state, checl if it is empty or not

Returns

boolean


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

EventDispatcher.isSilent


isSimple

isSimple(): boolean

Return node state, is it a simple text with
only or not

Returns

boolean


notify

notify(type, source, args?): TextNode

Notify listeners

Parameters

Name Type Description
typestringevent types
sourceanyof the event
Optional argsanyarguments of the event

Returns

TextNode

this

Inherited from

EventDispatcher.notify


off

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.

Parameters

Name Type Description
Optional typestringtype of the event
Optional callbackEventListenerfunction to be called

Returns

TextNode

this

Inherited from

EventDispatcher.off

off<E>(type, callback): TextNode

Type parameters

NameType
Eextends string

Parameters

Name Type
typeE
callback(eventType: E, sender: TextNode, args: EventMap[E]) => void

Returns

TextNode

Inherited from

EventDispatcher.off


on

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.

Parameters

Name Type Description
typestringtype of event or property
callbackEventListenerto be called
Optional optionsOptionsoptions of subscription

Returns

TextNode

this

Inherited from

EventDispatcher.on

on<E>(type, callback, options?): TextNode

Type parameters

NameType
Eextends string

Parameters

Name Type
typeE
callback(eventType: E, sender: TextNode, args: EventMap[E]) => void
Optional optionsOptions

Returns

TextNode

Inherited from

EventDispatcher.on


onDomElementChanged

Protected onDomElementChanged(eventType, sender, eventArgs): TextNode

Update element from domElement

Parameters

Name Type Description
eventTypestringevent type
senderElement
eventArgsNodeEventArgsargument args

Returns

TextNode


rebuildDomLayout

rebuildDomLayout(): TextNode

Rebuild DOM Layout

Returns

TextNode

this

Implementation of

IElement.rebuildDomLayout


removeChild

removeChild(node): TextNode

Remove child node

Parameters

Name Type Description
nodeTextNode | TextNode[]node or array of nodes to be removed

Returns

TextNode

this


setCssClass

setCssClass(cssClass): TextNode

Sets css class name of the node to be used to apply CSS style

Parameters

Name Type Description
cssClassstringcss class name of the node

Returns

TextNode

this


setDomElement

setDomElement(domElement): TextNode

Set DOM element

Parameters

Name Type Description
domElementElementDOM element

Returns

TextNode

this

Implementation of

IElement.setDomElement


setElementParser

setElementParser(elementParser): TextNode

Parameters

Name Type
elementParserNodeParser

Returns

TextNode


setElementStyle

setElementStyle(elementStyle, styleValue): TextNode

Set element style

Parameters

Name Type Description
elementStyleElementStyleelement style
styleValueElementStylestyle value

Returns

TextNode

this

Implementation of

IElement.setElementStyle


setId

setId(id): TextNode

Allows the user to associate any identifier

Parameters

Name Type Description
idstring | numberobject id

Returns

TextNode

this


setInlineElement

setInlineElement(inlineElement): TextNode

Set inline element

Parameters

Name Type Description
inlineElementInlineElementinline element

Returns

TextNode

this


setName

setName(name): TextNode

Sets name of the node

Parameters

Name Type Description
namestringThe node name

Returns

TextNode

this


setNotification

setNotification(notify): TextNode

set notification state

Parameters

Name Type Description
notifybooleanflag set to invalidate parent or not

Returns

TextNode

this

Implementation of

IElement.setNotification


setParent

setParent(parent): TextNode

Set parent text node

Parameters

Name Type Description
parentTextNodeparent

Returns

TextNode


setSilent

setSilent(bool): TextNode

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

TextNode

this

Implementation of

IElement.setSilent

Inherited from

EventDispatcher.setSilent


setText

setText(text): TextNode

Set text

Parameters

Name Type Description
textstringtext

Returns

TextNode

this


setVisible

setVisible(visible): TextNode

empty stub

Parameters

Name Type
visibleboolean

Returns

TextNode


getClassName

Static getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName