Winter Cardinal UI - v0.457.0 / DListDataSelectionSingle
| Name |
|---|
ITEM |
EventEmitter
↳ DListDataSelectionSingle
DListDataSelection<ITEM>• new DListDataSelectionSingle<ITEM>(parent, accessor, options?): DListDataSelectionSingle<ITEM>
| Name |
|---|
ITEM |
| Name | Type |
|---|---|
parent |
DListDataSelectionParent<ITEM> |
accessor |
DListItemAccessor<ITEM> |
options? |
DListDataSelectionOptions<ITEM, any> |
DListDataSelectionSingle<ITEM>
utils.EventEmitter.constructor
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:23
• Protected _accessor: DListItemAccessor<ITEM>
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:20
• Protected _item: null | ITEM
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:21
• Protected _parent: DListDataSelectionParent<ITEM>
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:19
• get first(): null | ITEM
null | ITEM
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:50
• get last(): null | ITEM
null | ITEM
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:54
• get type(): DListDataSelectionType
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:46
▸ add(target): boolean
Adds the given item
| Name | Type | Description |
|---|---|---|
target |
ITEM |
an item |
boolean
true if succeeded.
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:65
▸ addListener(event, fn, context?): this
Alias method for on
| Name | Type |
|---|---|
event |
string | symbol |
fn |
Function |
context? |
any |
this
DListDataSelection.addListener
utils.EventEmitter.addListener
node_modules/pixi.js/pixi.js.d.ts:25495
▸ clear(): void
Clears all the items.
void
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:93
▸ clearAndAdd(target): boolean
Clears all the existing items and adds the given item.
| Name | Type | Description |
|---|---|---|
target |
ITEM |
an item to be added |
boolean
true if the selection is changed
DListDataSelection.clearAndAdd
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:100
▸ clearAndAddAll(targets): boolean
Clears the existing items and add all the given items.
| Name | Type | Description |
|---|---|---|
targets |
ITEM[] |
items to be added |
boolean
true if the selection is changed
DListDataSelection.clearAndAddAll
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:109
▸ contains(target): boolean
Returns true if the given item is selected.
| Name | Type | Description |
|---|---|---|
target |
ITEM |
an item to be checked |
boolean
true if the given item is selected
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:128
▸ each(iteratee): void
Iterates over selected items.
| Name | Type | Description |
|---|---|---|
iteratee |
(item: ITEM) => boolean | void |
an iteratee |
void
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:140
▸ emit(event, ...args): boolean
Calls each of the listeners registered for a given event.
| Name | Type | Description |
|---|---|---|
event |
string | symbol |
The event name. |
...args |
any[] |
Arguments that are passed to registered listeners |
boolean
true if the event had listeners, else false.
utils.EventEmitter.emit
node_modules/pixi.js/pixi.js.d.ts:25441
▸ eventNames(): (string | symbol)[]
Return an array listing the events for which the emitter has registered listeners.
(string | symbol)[]
utils.EventEmitter.eventNames
node_modules/pixi.js/pixi.js.d.ts:25415
▸ find(target, items): null | ITEM
| Name | Type |
|---|---|
target |
ITEM |
items |
ITEM[] |
null | ITEM
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:171
▸ findById(id, toId, items): null | ITEM
| Name | Type |
|---|---|
id |
unknown |
toId |
DListItemToId<ITEM> |
items |
ITEM[] |
null | ITEM
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:160
▸ get(index): null | ITEM
Returns an item at the given index or null.
| Name | Type | Description |
|---|---|---|
index |
number |
an index |
null | ITEM
an item at the given index or null
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:58
▸ isEmpty(): boolean
Returns true if the selection is empty.
boolean
true if the selection is empty
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:136
▸ listenerCount(event): number
Return the number of listeners listening to a given event.
| Name | Type | Description |
|---|---|---|
event |
string | symbol |
The event name. |
number
DListDataSelection.listenerCount
utils.EventEmitter.listenerCount
node_modules/pixi.js/pixi.js.d.ts:25432
▸ listeners(event): Function[]
Return the listeners registered for a given event.
| Name | Type | Description |
|---|---|---|
event |
string | symbol |
The event name. |
Function[]
utils.EventEmitter.listeners
node_modules/pixi.js/pixi.js.d.ts:25424
▸ off(event, fn?, context?, once?): this
Alias method for removeListener
| Name | Type |
|---|---|
event |
string | symbol |
fn? |
Function |
context? |
any |
once? |
boolean |
this
utils.EventEmitter.off
node_modules/pixi.js/pixi.js.d.ts:25489
▸ on(event, fn, context?): this
Add a listener for a given event.
| Name | Type | Description |
|---|---|---|
event |
string | symbol |
The event name. |
fn |
Function |
The listener function. |
context? |
any |
The context to invoke the listener with. |
this
this.
utils.EventEmitter.on
node_modules/pixi.js/pixi.js.d.ts:25452
▸ onChange(): void
void
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:155
▸ onItemChange(before, items, after): void
| Name | Type |
|---|---|
before |
ITEM[] |
items |
ITEM[] |
after |
ITEM[] |
void
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:181
▸ once(event, fn, context?): this
Add a one-time listener for a given event.
| Name | Type | Description |
|---|---|---|
event |
string | symbol |
The event name. |
fn |
Function |
The listener function. |
context? |
any |
The context to invoke the listener with. |
this
this.
utils.EventEmitter.once
node_modules/pixi.js/pixi.js.d.ts:25463
▸ remove(target): boolean
Removes the given item.
| Name | Type | Description |
|---|---|---|
target |
ITEM |
an item |
boolean
true if succeeded
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:74
▸ removeAllListeners(event?): this
Remove all listeners, or those of the specified event.
| Name | Type | Description |
|---|---|---|
event? |
string | symbol |
The event name. |
this
this.
DListDataSelection.removeAllListeners
utils.EventEmitter.removeAllListeners
node_modules/pixi.js/pixi.js.d.ts:25483
▸ removeListener(event, fn?, context?, once?): this
Remove the listeners of a given event.
| 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. |
this
this.
DListDataSelection.removeListener
utils.EventEmitter.removeListener
node_modules/pixi.js/pixi.js.d.ts:25475
▸ size(): number
Returns the number of selected items.
number
the number of selected items
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:132
▸ toArray(): ITEM[]
Returns an array of selected items.
ITEM[]
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:147
▸ toggle(target): boolean
Toggles the given item.
| Name | Type | Description |
|---|---|---|
target |
ITEM |
an item |
boolean
true if succeeded.
src/main/typescript/wcardinal/ui/d-list-data-selection-single.ts:83