跳到主要内容
版本:Next

Class: StatusBarService

molecule.StatusBarService

Hierarchy

Implements

Constructors

constructor

new StatusBarService()

Overrides

Component.constructor

Defined in

services/workbench/statusBarService.ts:69

Properties

state

Protected state: IStatusBar

Implementation of

IStatusBarService.state

Overrides

Component.state

Defined in

services/workbench/statusBarService.ts:67

Methods

add

add(item, float): void

Add a new StatusBar item into right or left status

Parameters

NameType
itemIStatusBarItem<any>
floatFloat

Returns

void

Implementation of

IStatusBarService.add

Defined in

services/workbench/statusBarService.ts:121


count

count(name): number

Count the service event

Parameters

NameTypeDescription
namestringEvent name

Returns

number

Implementation of

IStatusBarService.count

Inherited from

Component.count

Defined in

common/event/eventBus.ts:28


emit

emit(name, ...args): void

Emit the service event

Parameters

NameTypeDescription
namestringEvent name
...argsanyArguments

Returns

void

Implementation of

IStatusBarService.emit

Inherited from

Component.emit

Defined in

common/event/eventBus.ts:20


forceUpdate

forceUpdate(): void

Force to update the Component

Returns

void

Implementation of

IStatusBarService.forceUpdate

Inherited from

Component.forceUpdate

Defined in

react/component.ts:81


getItem

Private getItem(item, float?): StatusBarItemInfos

Get the item informations in right position or left position

Parameters

NameType
itemIStatusBarItem<any>
float?Float

Returns

StatusBarItemInfos

Defined in

services/workbench/statusBarService.ts:79


getState

getState(): IStatusBar

Get the Component state

Returns

IStatusBar

Implementation of

IStatusBarService.getState

Inherited from

Component.getState

Defined in

react/component.ts:85


getStatusBarItem

getStatusBarItem(id, float?): null | IStatusBarItem<any>

Get the specific StatusBar item

Parameters

NameType
idUniqueId
float?Float

Returns

null | IStatusBarItem<any>

Implementation of

IStatusBarService.getStatusBarItem

Defined in

services/workbench/statusBarService.ts:153


onClick

onClick(callback): void

Listen to the StatusBar click event

Parameters

NameType
callback(e: MouseEvent, item: IStatusBarItem<any>) => void

Returns

void

Implementation of

IStatusBarService.onClick

Defined in

services/workbench/statusBarService.ts:182


onUpdateState

onUpdateState(listener): void

Listen to the Component state update event

Parameters

NameType
listener(prevState: IStatusBar, nextState: IStatusBar) => void

Returns

void

Implementation of

IStatusBarService.onUpdateState

Inherited from

Component.onUpdateState

Defined in

react/component.ts:73


remove

remove(id, float?): void

Remove the specific StatusBar item

Parameters

NameType
idUniqueId
float?Float

Returns

void

Implementation of

IStatusBarService.remove

Defined in

services/workbench/statusBarService.ts:158


removeOnUpdateState

removeOnUpdateState(listener?): void

Remove the Component update event listening, default is remove all, also you can remove one by pass the listener

Parameters

NameType
listener?Function

Returns

void

Implementation of

IStatusBarService.removeOnUpdateState

Inherited from

Component.removeOnUpdateState

Defined in

react/component.ts:77


render

render(nextState?): void

Initiative notify the component to render the view by the state

Parameters

NameType
nextState?IStatusBar

Returns

void

Implementation of

IStatusBarService.render

Inherited from

Component.render

Defined in

react/component.ts:69


reset

reset(): void

Reset the contextMenu data and the StatusBar data , including right and left

Returns

void

Implementation of

IStatusBarService.reset

Defined in

services/workbench/statusBarService.ts:174


setState

setState(values, callback?): void

Set the state values, and notify the view component to re render

Parameters

NameTypeDescription
valuesPartial<IStatusBar>update target state values
callback?(prevState: IStatusBar, nextState: IStatusBar) => void-

Returns

void

Implementation of

IStatusBarService.setState

Inherited from

Component.setState

Defined in

react/component.ts:56


subscribe

subscribe(name, listener): void

Subscribe the service event

Parameters

NameTypeDescription
namestring | string[]Event name
listenerFunctionListener function

Returns

void

Implementation of

IStatusBarService.subscribe

Inherited from

Component.subscribe

Defined in

common/event/eventBus.ts:11


unsubscribe

unsubscribe(name, listener?): void

Unsubscribe the specific event and the listener function

Parameters

NameTypeDescription
nameanyThe event name
listener?Functionoptional, it unsubscribes events via name if not pass the listener function

Returns

void

Implementation of

IStatusBarService.unsubscribe

Inherited from

Component.unsubscribe

Defined in

common/event/eventBus.ts:37


update

update(item, float?): void

Update the specific StatusBar item, it'll update the item found in left

Parameters

NameType
itemIStatusBarItem<any>
float?Float

Returns

void

Implementation of

IStatusBarService.update

Defined in

services/workbench/statusBarService.ts:137