Last updated

API / geotoolkit / layout / TableLayout / TableLayout

Class: TableLayout

layout.TableLayout.TableLayout

The Layout class provides an abstract class for all layouts in the toolkits. This class defines a virtual API for arranging children nodes using method layout, which has parameter area.

Hierarchy

Table of contents

Constructors
[new TableLayout(options)](/solutions/geotoolkit/apis/classes/geotoolkit.layout.tablelayout.tablelayout.md#new tablelayout(options))[new TableLayout(rowCount, colCount)](/solutions/geotoolkit/apis/classes/geotoolkit.layout.tablelayout.tablelayout.md#new tablelayout(rowcount, colcount))
Methods
Css Properties
Name Type Description
columncountnumberColumncount columncount
directionDirectionDirection of the layout
horizontaldistancenumberHorizontaldistance horizontal distance
rowcountnumberRowcount rowcount
verticaldistancenumberVerticaldistance vertical distance

Contents

Constructors

new TableLayout(options)

new TableLayout(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

Layout.constructor


new TableLayout(rowCount, colCount)

new TableLayout(rowCount?, colCount?)

Parameters

Name Type Description
Optional rowCountnumberA count of rows or propperties object
Optional colCountnumberA count of columns

Overrides

Layout.constructor

Methods

clone

clone(): Layout

All subclasses should override copyConstructor or provide custom implementation for this method

Returns

Layout

Inherited from

Layout.clone


copyConstructor

Protected copyConstructor(src): void

Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.

Parameters

Name Type Description
srcLayoutSource to copy from

Returns

void

Inherited from

Layout.copyConstructor


dispose

dispose(): void

Dispose.

Returns

void

Inherited from

Layout.dispose


getClassName

getClassName(): string

Returns

string

Inherited from

Layout.getClassName


getColumnCount

getColumnCount(): number

Gets the number of columns

Returns

number

columnCount


getDirection

getDirection(): Direction

Gets direction of the layout

Returns

Direction


getHorizontalDistance

getHorizontalDistance(): number

Gets the Horizontal Distance between two columns

Returns

number


getPreferredSize

getPreferredSize(rect, targets?): Rect

Return the preferable size of children. Default implementation returns desired rect

Parameters

Name Type Description
rectRectdesired rect to layout
Optional targetsILayoutable[] | Iterator<ILayoutable>array of nodes supposed to layout

Returns

Rect

Inherited from

Layout.getPreferredSize


getProperties

getProperties(): Options

Gets all the properties pertaining to this object

Returns

Options

properties An object containing the properties of the layout

Overrides

Layout.getProperties


getRowCount

getRowCount(): number

Gets the number of Rows

Returns

number

rowCount


getVerticalDistance

getVerticalDistance(): number

Gets the Vertical Distance between two rows

Returns

number


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

Layout.hasEventListener


invalidateLayout

invalidateLayout(): TableLayout

Notify that layout is invalidated. Send event Events.LayoutInvalidated

Returns

TableLayout

this

Inherited from

Layout.invalidateLayout


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

Layout.isDisposed


isSilent

isSilent(): boolean

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

Returns

boolean

Inherited from

Layout.isSilent


layout

layout(layoutRect?, targets?): TableLayout

Performs layout operation

Parameters

Name Type Description
Optional layoutRectRectdesired rect to layout
Optional targetsILayoutable[] | Iterator<ILayoutable>array of nodes or iterator of nodes supposed to layout

Returns

TableLayout

this

Overrides

Layout.layout


notify

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

Notify listeners

Type parameters

NameType
Eextends string

Parameters

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

Returns

TableLayout

this

Inherited from

Layout.notify


off

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

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: TableLayout, args: EventMap[E]) => voidfunction to be called

Returns

TableLayout

this

Inherited from

Layout.off


on

on<E>(type, callback): TableLayout

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: TableLayout, args: EventMap[E]) => voidto be called

Returns

TableLayout

this

Inherited from

Layout.on


setColumnCount

setColumnCount(colCount): TableLayout

Sets the number of columns

Parameters

Name Type Description
colCountnumberthe number of columns for the layout

Returns

TableLayout

this


setDirection

setDirection(value): TableLayout

set direction for Table layout

Parameters

Name Type Description
valueDirectiona new direction

Returns

TableLayout

this


setHorizontalDistance

setHorizontalDistance(distance): TableLayout

Sets Distance between two columns.

Parameters

Name Type Description
distancenumbera horizontal distance

Returns

TableLayout


setProperties

setProperties(properties?): TableLayout

Sets all the properties pertaining to this object

Parameters

Name Type Description
Optional propertiesOptionsAn object containing the properties to set

Returns

TableLayout

this

Overrides

Layout.setProperties


setRowCount

setRowCount(rowCount): TableLayout

Sets the number of rows

Parameters

Name Type Description
rowCountnumberthe number of rows for the layout

Returns

TableLayout

this


setSilent

setSilent(bool): TableLayout

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

TableLayout

this

Inherited from

Layout.setSilent


setVerticalDistance

setVerticalDistance(distance): TableLayout

Sets Distance between two rows.

Parameters

Name Type Description
distancenumbera vertical distance

Returns

TableLayout


getClassName

Static getClassName(): string

Returns

string

Inherited from

Layout.getClassName