Winter Cardinal UI - v0.442.0 / DTreeDataSelection

Interface: DTreeDataSelection<NODE>

Type parameters

Name Type
NODE extends DTreeNode

Hierarchy

Implemented by

Table of contents

Properties

Methods

Properties

first

Readonly first: null | NODE

A first selected node or null.

Defined in

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


last

Readonly last: null | NODE

A last selected node or null.

Defined in

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


type

Readonly type: DTreeDataSelectionType

A type.

Defined in

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

Methods

add

add(target): boolean

Adds the given node

Parameters

Name Type Description
target NODE a node

Returns

boolean

true if succeeded.

Defined in

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


addListener

addListener(event, fn, context?): this

Alias method for on

Parameters

Name Type
event string | symbol
fn Function
context? any

Returns

this

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

Defined in

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


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

Defined in

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


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

Defined in

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


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

Defined in

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


each

each(iteratee): void

Iterates over selected nodes.

Parameters

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

Returns

void

Defined in

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


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.

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)[]

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

Defined in

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


isEmpty

isEmpty(): boolean

Returns true if the selection is empty.

Returns

boolean

true if the selection is empty

Defined in

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


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

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[]

Inherited from

utils.EventEmitter.listeners

Defined in

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


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

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.

Inherited from

utils.EventEmitter.on

Defined in

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


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.

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

Defined in

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


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.

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.

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

Defined in

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


toArray

toArray(): NODE[]

Returns an array of selected nodes.

Returns

NODE[]

an array of selected nodes.

Defined in

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


toggle

toggle(target): boolean

Toggles the given node.

Parameters

Name Type Description
target NODE a node

Returns

boolean

true if succeeded.

Defined in

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