Winter Cardinal UI - v0.442.0 / DTreeDataSelectionSingle

Class: DTreeDataSelectionSingle<NODE>

Type parameters

Name Type
NODE extends DTreeNode

Hierarchy

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new DTreeDataSelectionSingle<NODE>(parent, options?): DTreeDataSelectionSingle<NODE>

Type parameters

Name Type
NODE extends DTreeNode

Parameters

Name Type
parent DTreeDataSelectionParent<NODE>
options? DTreeDataSelectionOptions<NODE, any>

Returns

DTreeDataSelectionSingle<NODE>

Overrides

utils.EventEmitter.constructor

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:22

Properties

_node

Protected _node: null | NODE

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:20


_parent

Protected _parent: DTreeDataSelectionParent<NODE>

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:19

Accessors

first

get first(): null | NODE

A first selected node or null.

Returns

null | NODE

Implementation of

DTreeDataSelection.first

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:43


last

get last(): null | NODE

A last selected node or null.

Returns

null | NODE

Implementation of

DTreeDataSelection.last

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:47


type

get type(): DTreeDataSelectionType

A type.

Returns

DTreeDataSelectionType

Implementation of

DTreeDataSelection.type

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:39

Methods

add

add(target): boolean

Adds the given node

Parameters

Name Type Description
target NODE a node

Returns

boolean

true if succeeded.

Implementation of

DTreeDataSelection.add

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:58


addListener

addListener(event, fn, context?): this

Alias method for on

Parameters

Name Type
event string | symbol
fn Function
context? any

Returns

this

Implementation of

DTreeDataSelection.addListener

Inherited from

utils.EventEmitter.addListener

Defined in

node_modules/pixi.js/pixi.js.d.ts:25495


clear

clear(): boolean

Clears all the nodes.

Returns

boolean

Implementation of

DTreeDataSelection.clear

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:86


clearAndAdd

clearAndAdd(target): boolean

Clears all the exisint nodes and adds the given node.

Parameters

Name Type Description
target NODE a node to be added

Returns

boolean

true if the selection is changed

Implementation of

DTreeDataSelection.clearAndAdd

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:95


clearAndAddAll

clearAndAddAll(targets): boolean

Clears the exising nodes and add all the given nodes.

Parameters

Name Type Description
targets NODE[] nodes to be added

Returns

boolean

true if the selection is changed

Implementation of

DTreeDataSelection.clearAndAddAll

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:105


contains

contains(target): boolean

Returns true if the given node is selected.

Parameters

Name Type Description
target NODE a node to be checked

Returns

boolean

true if the given node is selected

Implementation of

DTreeDataSelection.contains

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:114


each

each(iteratee): void

Iterates over selected nodes.

Parameters

Name Type Description
iteratee (node: NODE) => boolean | void an iteratee

Returns

void

Implementation of

DTreeDataSelection.each

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:126


emit

emit(event, ...args): boolean

Calls each of the listeners registered for a given event.

Parameters

Name Type Description
event string | symbol The event name.
...args any[] Arguments that are passed to registered listeners

Returns

boolean

true if the event had listeners, else false.

Implementation of

DTreeDataSelection.emit

Inherited from

utils.EventEmitter.emit

Defined in

node_modules/pixi.js/pixi.js.d.ts:25441


eventNames

eventNames(): (string | symbol)[]

Return an array listing the events for which the emitter has registered listeners.

Returns

(string | symbol)[]

Implementation of

DTreeDataSelection.eventNames

Inherited from

utils.EventEmitter.eventNames

Defined in

node_modules/pixi.js/pixi.js.d.ts:25415


get

get(index): null | NODE

Returns a node at the given index or null.

Parameters

Name Type Description
index number an index

Returns

null | NODE

a node at the given index or null

Implementation of

DTreeDataSelection.get

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:51


isEmpty

isEmpty(): boolean

Returns true if the selection is empty.

Returns

boolean

true if the selection is empty

Implementation of

DTreeDataSelection.isEmpty

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:122


listenerCount

listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type Description
event string | symbol The event name.

Returns

number

Implementation of

DTreeDataSelection.listenerCount

Inherited from

utils.EventEmitter.listenerCount

Defined in

node_modules/pixi.js/pixi.js.d.ts:25432


listeners

listeners(event): Function[]

Return the listeners registered for a given event.

Parameters

Name Type Description
event string | symbol The event name.

Returns

Function[]

Implementation of

DTreeDataSelection.listeners

Inherited from

utils.EventEmitter.listeners

Defined in

node_modules/pixi.js/pixi.js.d.ts:25424


newNode

newNode(items, existing): null | NODE

Parameters

Name Type
items NODE[]
existing null | NODE

Returns

null | NODE

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:157


off

off(event, fn?, context?, once?): this

Alias method for removeListener

Parameters

Name Type
event string | symbol
fn? Function
context? any
once? boolean

Returns

this

Implementation of

DTreeDataSelection.off

Inherited from

utils.EventEmitter.off

Defined in

node_modules/pixi.js/pixi.js.d.ts:25489


on

on(event, fn, context?): this

Add a listener for a given event.

Parameters

Name Type Description
event string | symbol The event name.
fn Function The listener function.
context? any The context to invoke the listener with.

Returns

this

this.

Implementation of

DTreeDataSelection.on

Inherited from

utils.EventEmitter.on

Defined in

node_modules/pixi.js/pixi.js.d.ts:25452


onChange

onChange(): void

Returns

void

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:141


onNodeChange

onNodeChange(nodes): void

Parameters

Name Type
nodes NODE[]

Returns

void

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:146


once

once(event, fn, context?): this

Add a one-time listener for a given event.

Parameters

Name Type Description
event string | symbol The event name.
fn Function The listener function.
context? any The context to invoke the listener with.

Returns

this

this.

Implementation of

DTreeDataSelection.once

Inherited from

utils.EventEmitter.once

Defined in

node_modules/pixi.js/pixi.js.d.ts:25463


remove

remove(target): boolean

Removes the given node.

Parameters

Name Type Description
target NODE a node

Returns

boolean

true if succeeded

Implementation of

DTreeDataSelection.remove

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:67


removeAllListeners

removeAllListeners(event?): this

Remove all listeners, or those of the specified event.

Parameters

Name Type Description
event? string | symbol The event name.

Returns

this

this.

Implementation of

DTreeDataSelection.removeAllListeners

Inherited from

utils.EventEmitter.removeAllListeners

Defined in

node_modules/pixi.js/pixi.js.d.ts:25483


removeListener

removeListener(event, fn?, context?, once?): this

Remove the listeners of a given event.

Parameters

Name Type Description
event string | symbol The event name.
fn? Function Only remove the listeners that match this function.
context? any Only remove the listeners that have this context.
once? boolean Only remove one-time listeners.

Returns

this

this.

Implementation of

DTreeDataSelection.removeListener

Inherited from

utils.EventEmitter.removeListener

Defined in

node_modules/pixi.js/pixi.js.d.ts:25475


size

size(): number

Returns the number of selected nodes.

Returns

number

the number of selected nodes

Implementation of

DTreeDataSelection.size

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:118


toArray

toArray(): NODE[]

Returns an array of selected nodes.

Returns

NODE[]

an array of selected nodes.

Implementation of

DTreeDataSelection.toArray

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:133


toggle

toggle(target): boolean

Toggles the given node.

Parameters

Name Type Description
target NODE a node

Returns

boolean

true if succeeded.

Implementation of

DTreeDataSelection.toggle

Defined in

src/main/typescript/wcardinal/ui/d-tree-data-selection-single.ts:76