Skip to main content

Class: DisplayPaneViewFactory

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneViewFactory.ts:8

Creates display pane views.

Constructors

Constructor

new DisplayPaneViewFactory(): DisplayPaneViewFactory

Returns

DisplayPaneViewFactory

Methods

createViewNode()

createViewNode(key, index): VNode

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneViewFactory.ts:29

Creates a new display pane view instance as a VNode.

Parameters

ParameterTypeDescription
keystringThe key of the display pane view to create.
indexDisplayPaneIndexThe index of the view's parent pane.

Returns

VNode

A new display pane view instance as a VNode.

Throws

Error if no view is registered under the given key.


registerView()

registerView(key, vnodeFn): void

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Components/DisplayPanes/DisplayPaneViewFactory.ts:18

Registers a display pane view under a specific key. Once a view is registered, new instances can be created using the key under which it was registered via the createViewNode() method. Registering a view under an existing key will replace the old view registered under that key.

Parameters

ParameterTypeDescription
keystringThe key of the display pane view to register.
vnodeFn(index) => VNodeA function which creates new instances of the display pane view to register as VNodes.

Returns

void