Last updated

API / geotoolkit / report / dom / elements / TBody / TBody

Class: TBody

elements.TBody.TBody

Table body element

Hierarchy

Table of contents

Constructors
Accessors
Methods
Css Properties
Name Type Description
backgroundstylestringBackground style
backgroundstyleFillStyleBackground style
backgroundstyle-colorstringColor in CSS form
backgroundstyle-evenoddmodebooleanEven-odd fill mode
backgroundstyle-fillpatternPatternPattern
backgroundstyle-fillpattern-containernamestringAn 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-patternnamestringName of this pattern for indexing
backgroundstyle-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
backgroundstyle-foregroundstringForeground color
backgroundstyle-patternPatternPattern
borderlinestylestringBorder linestyle
borderlinestyleLineStyleBorder linestyle
borderlinestyle-colorstringColor in CSS form
borderlinestyle-fillstringOptional fill style to be used to fill lines generated with this style
borderlinestyle-fillFillStyleOptional fill style to be used to fill lines generated with this style
borderlinestyle-linecapCapStyleThe line cap style
borderlinestyle-linedashoffsetnumberLine dash offset of dashed line
borderlinestyle-linejoinJoinStyleThe line join style
borderlinestyle-pixelsnapmodebooleanPixel Snap Mode, default(
borderlinestyle-scalablebooleanTrue if width should depend on transformation
borderlinestyle-unitstringOptional unit for the width
borderlinestyle-widthnumber | stringThe line thickness
bordersstringBorders
bordersLineStyleBorders
cssclassstringCss class
flipbooleanFlip
layoutstyleLayoutStyleLayout style
layoutstyle-constraintSizeConstraintLayout constrains
layoutstyle-flexgrownumberNumber specifying how much the item will grow relative to the rest of the items inside the same container
layoutstyle-flexshrinknumberNumber specifying how much the item will shrink relative to the rest of the items inside the same container
layoutstyle-floatstringFloat position
layoutstyle-positionstringLayout position
layoutstyle-sizenumber | stringLayout size
marginstylenumber | stringMargin style
orientationOrientationOrientation
paddingstylenumber | stringPadding style
pagebreakPageBreakPagebreak
textstyleTextStyleText style
textstyle-alignmentAlignmentStyleAlignment
textstyle-autosizebooleanAuto font size on high definition display
textstyle-backgroundstringBackground style
textstyle-backgroundFillStyleBackground style
textstyle-baselineBaseLineStyleBase line
textstyle-colorstringColor in CSS form
textstyle-fillFillStyleText fill style
textstyle-fontstringFont see
textstyle-fonturlstringThe place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword
textstyle-lineheightstring | numberLine height
textstyle-multilinebooleanAllow multi-line text
textstyle-outlinestringOutline style
textstyle-outlineLineStyleOutline style
textstyle-overflowwrapOverflowWrapStyleOverflow wrap
textstyle-strikethroughstringStrikethrough style
textstyle-strikethroughLineStyleStrikethrough style
textstyle-textoverflowTextOverflowStyleText overflow
textstyle-underlinestringUnderline style
textstyle-underlineLineStyleUnderline style
textstyle-underlineoffsetstring | numberUnderline offset distance
textstyle-whitespaceWhiteSpaceStyleWhite space
textstyle-wordbreakWordBreakStyleWord break
verticalalignVerticalAlignVertical alignment type

Contents

Constructors

new TBody(options)

new TBody(options)

Parameters

Name Type
optionsOptions

Inherited from

TrContainer.constructor

Accessors

attributes

get attributes(): NamedItemMap

Node attributes

Name

module:geotoolkit/report/dom/Node~Node#attributes

Returns

NamedItemMap

Inherited from

TrContainer.attributes


childNodes

get childNodes(): NodeList<Node>

The element holding the item.

Name

module:geotoolkit/report/dom/Node~Node#childNodes

Returns

NodeList<Node>

Inherited from

TrContainer.childNodes


children

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

Returns

NodeList<Element>

Inherited from

TrContainer.children


data

get data(): string

Node data

Name

module:geotoolkit/report/dom/Node~Node#data

Returns

string

Inherited from

TrContainer.data

set data(data): void

Node data

Name

module:geotoolkit/report/dom/Node~Node#data

Parameters

Name Type
datastring

Returns

void

Inherited from

TrContainer.data


firstChild

get firstChild(): Node

First child node

Name

module:geotoolkit/report/dom/Node~Node#firstChild

Returns

Node

Inherited from

TrContainer.firstChild


lastChild

get lastChild(): Node

Last child node

Name

module:geotoolkit/report/dom/Node~Node#lastChild

Returns

Node

Inherited from

TrContainer.lastChild


localName

get localName(): string

Node local name

Name

module:geotoolkit/report/dom/Node~Node#localName

Returns

string

Inherited from

TrContainer.localName


nextSibling

get nextSibling(): Node

Next sibling node

Name

module:geotoolkit/report/dom/Node~Node#nextSibling

Returns

Node

Inherited from

TrContainer.nextSibling


nodeName

get nodeName(): string

Node name

Name

module:geotoolkit/report/dom/Node~Node#nodeName

Returns

string

Inherited from

TrContainer.nodeName


nodeType

get nodeType(): NodeType

Node type

Name

module:geotoolkit/report/dom/Node~Node#nodeType

Returns

NodeType

Inherited from

TrContainer.nodeType


nodeValue

get nodeValue(): string

Node value

Name

module:geotoolkit/report/dom/Node~Node#nodeValue

Returns

string

Inherited from

TrContainer.nodeValue

set nodeValue(value): void

Node value

Name

module:geotoolkit/report/dom/Node~Node#nodeValue

Parameters

Name Type
valuestring

Returns

void

Inherited from

TrContainer.nodeValue


ownerDocument

get ownerDocument(): Document

Node owner document

Name

module:geotoolkit/report/dom/Node~Node#ownerDocument

Returns

Document

Inherited from

TrContainer.ownerDocument


parentNode

get parentNode(): Node

Parent node

Name

module:geotoolkit/report/dom/Node~Node#parentNode

Returns

Node

Inherited from

TrContainer.parentNode


previousSibling

get previousSibling(): Node

Previous sibling node

Name

module:geotoolkit/report/dom/Node~Node#previousSibling

Returns

Node

Inherited from

TrContainer.previousSibling


rootNode

get rootNode(): Node

Return root node

Deprecated

since 2022 (3.4) use Node#getRootNode instead

Name

module:geotoolkit/report/dom/Node~Node#rootNode

Returns

Node

Inherited from

TrContainer.rootNode


rows

get rows(): NodeList<TrElement>

The rows return an iterable collection of all <tr>elements in a table.

Name

module:geotoolkit/report/dom/elements/TableElement~TableElement#rows

Returns

NodeList<TrElement>

Inherited from

TrContainer.rows


tagName

get tagName(): string

Node tag name

Name

module:geotoolkit/report/dom/Node~Node#tagName

Returns

string

Inherited from

TrContainer.tagName

Methods

appendChild

appendChild(newChild): TBody

Add child to the node

Parameters

Name Type Description
newChildNodechild to add

Returns

TBody

Inherited from

TrContainer.appendChild


clearAttributes

clearAttributes(): TBody

Clear attributes

Returns

TBody

Inherited from

TrContainer.clearAttributes


clearNodes

clearNodes(): TBody

Remove all child nodes from this node

Returns

TBody

this

Inherited from

TrContainer.clearNodes


connectStyle

connectStyle(style, type, callback): TBody

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

Parameters

Name Type Description
styleEventDispatcherconnect style
typestringtype of event or property
callbackAttributeCallback<EventDispatcher>function to be called

Returns

TBody

this

Inherited from

TrContainer.connectStyle


disconnectStyle

disconnectStyle(style, type, callback): TBody

Disconnect style
This convenience method un-subscribes a listener to given style for the specified type.

Parameters

Name Type Description
styleEventDispatcherconnect style
typestringtype of event or property
callbackAttributeCallback<EventDispatcher>function to be called

Returns

TBody

this

Inherited from

TrContainer.disconnectStyle


dispose

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.

Returns

void

Inherited from

TrContainer.dispose


enumerateNodes

enumerateNodes(callback, target?): void

Enumerate children nodes

Parameters

Name Type Description
callbackCallback<Node>callback
Optional targetQueryBuilder<any>target

Returns

void

Inherited from

TrContainer.enumerateNodes


flush

Protected flush(serializationContext?): TBody

Flush all changes before saving

Parameters

Name Type Description
Optional serializationContextSerializationContextserialization Context

Returns

TBody

Inherited from

TrContainer.flush


getAttribute

getAttribute(name): string

Return attribute value

Parameters

Name Type Description
namestringattribute name

Returns

string

Inherited from

TrContainer.getAttribute


getBackgroundStyle

getBackgroundStyle(): FillStyle

Return background style

Returns

FillStyle

background current background style

Inherited from

TrContainer.getBackgroundStyle


getBorderLineStyle

getBorderLineStyle(): LineStyle

Return border line style

Returns

LineStyle

Inherited from

TrContainer.getBorderLineStyle


getClassName

getClassName(): string

Returns

string

Inherited from

TrContainer.getClassName


getCssClass

getCssClass(): string

Returns css class name to be used to apply CSS style

Returns

string

the css class name

Inherited from

TrContainer.getCssClass


getElementRegistry

getElementRegistry(): IElementsRegistry

Returns elements Registry

Returns

IElementsRegistry

Inherited from

TrContainer.getElementRegistry


getElementTransform

getElementTransform(): { name: string ; parameters: string[] }[]

Return array of transformation instructions

Returns

{ name: string ; parameters: string[] }[]

array of transformations

Inherited from

TrContainer.getElementTransform


getFlip

getFlip(): boolean

Return element content flip flag

Returns

boolean

element layout orientation

Inherited from

TrContainer.getFlip


getGuid

getGuid(): string

Returns element GUID

Returns

string

Inherited from

TrContainer.getGuid


getId

getId(): string

Returns element id

Returns

string

Inherited from

TrContainer.getId


getInnerCssStyle

getInnerCssStyle(): string

Return collected inner css style

Returns

string

inner css style

Inherited from

TrContainer.getInnerCssStyle


getLayoutStyle

getLayoutStyle(): LayoutStyle<string | number>

Return layout style

Returns

LayoutStyle<string | number>

layout style

Inherited from

TrContainer.getLayoutStyle


getMarginsStyle

getMarginsStyle(): SpaceStyle<string | number>

Return margins style

Returns

SpaceStyle<string | number>

margins style

Inherited from

TrContainer.getMarginsStyle


getNodeIndex

getNodeIndex(): number

Return node index

Returns

number

Inherited from

TrContainer.getNodeIndex


getNodeValue

getNodeValue(): string

Returns node value

Returns

string

Inherited from

TrContainer.getNodeValue


getOrientation

getOrientation(): Orientation

Return element layout orientation

Returns

Orientation

element layout orientation

Inherited from

TrContainer.getOrientation


getPaddingStyle

getPaddingStyle(): SpaceStyle<string | number>

Return padding style

Returns

SpaceStyle<string | number>

padding style

Inherited from

TrContainer.getPaddingStyle


getPageBreak

getPageBreak(): PageBreak

Returns element page break

Returns

PageBreak

page break

Inherited from

TrContainer.getPageBreak


getParent

getParent(): Node

Returns parent node

Returns

Node

parent

Inherited from

TrContainer.getParent


getProperties

getProperties(): OptionsOut

Gets element properties

Returns

OptionsOut

props

Inherited from

TrContainer.getProperties


getRootNode

getRootNode(): Node

Return root node

Returns

Node

node

Inherited from

TrContainer.getRootNode


getTableElement

getTableElement(): TableElement

Return Table element

Returns

TableElement

Inherited from

TrContainer.getTableElement


getTagName

getTagName(): string

Returns node tag name

Returns

string

Inherited from

TrContainer.getTagName


getTextStyle

getTextStyle(): TextStyle

Return text style

Returns

TextStyle

text style

Inherited from

TrContainer.getTextStyle


getTimeStamp

getTimeStamp(): number

Gets time stamp

Returns

number

timeStamp

Inherited from

TrContainer.getTimeStamp


getTransformOrigin

getTransformOrigin(): string

Return transform origin

Returns

string

Inherited from

TrContainer.getTransformOrigin


getVerticalAlign

getVerticalAlign(): VerticalAlign

Return vertical alignment type

Returns

VerticalAlign

vertical alignment type

Inherited from

TrContainer.getVerticalAlign


getVisible

getVisible(): boolean

Get element visible state

Returns

boolean

Inherited from

TrContainer.getVisible


hasAttribute

hasAttribute(name): boolean

Check if attribute exists

Parameters

Name Type Description
namestringattribute name

Returns

boolean

Inherited from

TrContainer.hasAttribute


hasChildNodes

hasChildNodes(): boolean

Return true if node has children

Returns

boolean

Inherited from

TrContainer.hasChildNodes


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

TrContainer.hasEventListener


indexOfNode

indexOfNode(node): number

Returns index of node.

Parameters

Name Type Description
nodeNodeitem to get index of

Returns

number

Inherited from

TrContainer.indexOfNode


insertAfter

insertAfter(newChild, refChild): Node

Insert child

Parameters

Name Type Description
newChildNodechild to insert
refChildNoderef child

Returns

Node

Inherited from

TrContainer.insertAfter


insertBefore

insertBefore(newChild, refChild): Node

Insert child

Parameters

Name Type Description
newChildNodechild to insert
refChildNoderef child

Returns

Node

Inherited from

TrContainer.insertBefore


invalidate

Protected invalidate(): TBody

Returns

TBody

this

Inherited from

TrContainer.invalidate


invalidateDocument

Protected invalidateDocument(eventArgs): TBody

Invalidate root document

Parameters

Name Type Description
eventArgsNodeEventArgsevent args

Returns

TBody

this

Inherited from

TrContainer.invalidateDocument


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

TrContainer.isDisposed


isSilent

isSilent(): boolean

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

Returns

boolean

Inherited from

TrContainer.isSilent


lock

lock(): TBody

Lock node

Returns

TBody

Inherited from

TrContainer.lock


normalize

normalize(): TBody

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.

Returns

TBody

this

Inherited from

TrContainer.normalize


notify

notify<E>(type, source, args?): TBody

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceElementof the event
Optional argsEventMap[E]arguments of the event

Returns

TBody

this

Inherited from

TrContainer.notify


off

off<E>(type?, callback?): TBody

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.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: TBody, args: EventMap[E]) => voidfunction to be called

Returns

TBody

this

Inherited from

TrContainer.off


on

on<E>(type, callback): TBody

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.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: TBody, args: EventMap[E]) => voidto be called

Returns

TBody

this

Inherited from

TrContainer.on


onParentChanged

Protected onParentChanged(): TBody

Returns

TBody

this

Inherited from

TrContainer.onParentChanged


onResetCssProperties

Protected onResetCssProperties(silent): TBody

Clean up cached properties

Parameters

Name Type Description
silentbooleansilent reset

Returns

TBody

this

Inherited from

TrContainer.onResetCssProperties


removeAttribute

removeAttribute(name): TBody

Remove attribute

Parameters

Name Type Description
namestringattribute name

Returns

TBody

Inherited from

TrContainer.removeAttribute


removeChild

removeChild(child): Node

Remove child from node

Parameters

Name Type Description
childNodeto remove

Returns

Node

Inherited from

TrContainer.removeChild


replaceChild

replaceChild(newChild, oldChild): TBody

Replace child

Parameters

Name Type Description
newChildNodechild to replace with
oldChildNodechild to replace

Returns

TBody

Inherited from

TrContainer.replaceChild


resetElementStyle

Protected resetElementStyle(): TBody

Reset own styles

Returns

TBody

Inherited from

TrContainer.resetElementStyle


save

save(recursive?, serializationContext?): string

Serialize element to xml

Parameters

Name Type Description
Optional recursivebooleansave whole dom element structure
Optional serializationContextSerializationContextserialization Context

Returns

string

Inherited from

TrContainer.save


setAttribute

setAttribute(name, value): TBody

Set attribute value

Parameters

Name Type Description
namestringattribute name
valuestringattribute value

Returns

TBody

Inherited from

TrContainer.setAttribute


setAttributeNode

setAttributeNode(newAttr): TBody

Adds a new Attribute node to the specified element.

Parameters

Name Type Description
newAttrAttributeattribute

Returns

TBody

this

Inherited from

TrContainer.setAttributeNode


setBackgroundStyle

setBackgroundStyle(backgroundStyle, merge?): TBody

Set background style

Parameters

Name Type Description
backgroundStyleTypebackground style
Optional mergebooleanmerge flag

Returns

TBody

this

Inherited from

TrContainer.setBackgroundStyle


setBorderLineStyle

setBorderLineStyle(borderStyle, merge?): TBody

Sets border line style Returns this

Parameters

Name Type Description
borderStyleType | BorderStyleline style or options
Optional mergebooleantrue if you want to merge lineStyle with existing attribute, false by default

Returns

TBody

this

Inherited from

TrContainer.setBorderLineStyle


setCssClass

setCssClass(cssClass): TBody

Set css class

Parameters

Name Type Description
cssClassstringcss class

Returns

TBody

Inherited from

TrContainer.setCssClass


setElementRegistry

Protected setElementRegistry(registry): TBody

Set shadow element registry

Parameters

Name Type Description
registryIElementsRegistryelements registry

Returns

TBody

Inherited from

TrContainer.setElementRegistry


setElementTransform

setElementTransform(transformOrigin, transformation?): void

Set element transform

Parameters

Name Type Description
transformOriginstringtransform origin
Optional transformation{ name: string ; parameters: string[] }[]transformations array

Returns

void

Inherited from

TrContainer.setElementTransform


setFlip

setFlip(flip): TBody

Set element content flip orientation

Parameters

Name Type Description
flipbooleanelement content flip

Returns

TBody

Inherited from

TrContainer.setFlip


setGuid

setGuid(guid): TBody

Set node GUID

Parameters

Name Type Description
guidstringnode GUID

Returns

TBody

Inherited from

TrContainer.setGuid


setLayoutStyle

setLayoutStyle(layout?, merge?, silent?): TBody

Sets layout style

Parameters

Name Type Description
Optional layoutLayoutStyle<string | number> | Options<string | number>layout style
Optional mergebooleantrue if you want to merge layoutStyle with existing attribute, false by default
Optional silentbooleansilent setting

Returns

TBody

Inherited from

TrContainer.setLayoutStyle


setMarginsStyle

setMarginsStyle(margins?, merge?): TBody

Sets margins style

Parameters

Name Type Description
Optional marginsType<string | number>margins style
Optional mergebooleantrue if you want to merge marginsStyle with existing attribute, false by default

Returns

TBody

Inherited from

TrContainer.setMarginsStyle


setNodeValue

setNodeValue(nodeValue): TBody

Set node value

Parameters

Name Type Description
nodeValuestringnode value

Returns

TBody

Inherited from

TrContainer.setNodeValue


setOrientation

setOrientation(orientation): TBody

Set element layout orientation

Parameters

Name Type Description
orientationOrientationelement layout orientation

Returns

TBody

Inherited from

TrContainer.setOrientation


setPaddingStyle

setPaddingStyle(padding?, merge?): TBody

Sets padding style

Parameters

Name Type Description
Optional paddingType<string | number>padding style
Optional mergebooleantrue if you want to merge paddingStyle with existing attribute, false by default

Returns

TBody

Inherited from

TrContainer.setPaddingStyle


setPageBreak

setPageBreak(pageBreak): TBody

Set element page break

Parameters

Name Type Description
pageBreakPageBreakpage break style

Returns

TBody

this

Inherited from

TrContainer.setPageBreak


setProperties

setProperties(props): TBody

Sets the element properties

Parameters

Name Type Description
propsOptionsprops

Returns

TBody

this

Inherited from

TrContainer.setProperties


setSilent

setSilent(bool): TBody

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

TBody

this

Inherited from

TrContainer.setSilent


setText

setText(text): TBody

Set text value

Parameters

Name Type Description
textstringtext value

Returns

TBody

this

Inherited from

TrContainer.setText


setTextStyle

setTextStyle(textStyle, merge?): TBody

Sets text style

Parameters

Name Type Description
textStyleTypea new shape text style
Optional mergebooleantrue if you want to merge textStyle with existing attribute, false by default

Returns

TBody

Inherited from

TrContainer.setTextStyle


setVerticalAlign

setVerticalAlign(verticalAlign): TBody

Set vertical alignment type

Parameters

Name Type Description
verticalAlignVerticalAlignvertical alignment type

Returns

TBody

this

Inherited from

TrContainer.setVerticalAlign


setVisible

setVisible(visible): TBody

Set element visible state

Parameters

Name Type Description
visiblebooleanelement visibility flag

Returns

TBody

Inherited from

TrContainer.setVisible


setXmlContent

setXmlContent(xmlValue): Promise<NodeList<Node>>

Set XML content

Parameters

Name Type Description
xmlValuestringxml to parse

Returns

Promise<NodeList<Node>>

promise

Inherited from

TrContainer.setXmlContent


unlock

unlock(): TBody

Unlock node

Returns

TBody

Inherited from

TrContainer.unlock


updateTimeStamp

updateTimeStamp(): TBody

Update time stamp to indicate that style has been changed.

Returns

TBody

this

Inherited from

TrContainer.updateTimeStamp


findParentNode

Static findParentNode<T>(node, classType): InstanceType<T>

Find root of the node with specified type

Type parameters

NameType
Textends Constructable<any>

Parameters

Name Type Description
nodeNodenode to start search
classTypeTtype of the class to search for or short interface name

Returns

InstanceType<T>

Inherited from

TrContainer.findParentNode

Static findParentNode(node, classType): Node

Find root of the node with specified type

Parameters

Name Type Description
nodeNodenode to start search
classTypestringinterface name to search for

Returns

Node

Inherited from

TrContainer.findParentNode


getClassName

Static getClassName(): string

Returns

string

Inherited from

TrContainer.getClassName