Skip to main content
Version: 0.9.0-beta.2

Interface: IStatusBarService

molecule.IStatusBarService

Hierarchy

Implemented by

Properties

state

Protected Abstract state: IStatusBar

Inherited from

Component.state

Defined in

src/react/component.ts:42

Methods

add

add(item, float): void

Add a new StatusBar item into right or left status

Parameters

NameTypeDescription
itemIStatusBarItem<any>
floatFloatposition the item to left or right

Returns

void

Defined in

src/services/workbench/statusBarService.ts:21


count

count(name): number

Count the service event

Parameters

NameTypeDescription
namestringEvent name

Returns

number

Inherited from

Component.count

Defined in

src/common/event/eventBus.ts:28


emit

emit(name, ...args): void

Emit the service event

Parameters

NameTypeDescription
namestringEvent name
...argsanyArguments

Returns

void

Inherited from

Component.emit

Defined in

src/common/event/eventBus.ts:20


forceUpdate

forceUpdate(): void

Force to update the Component

Returns

void

Inherited from

Component.forceUpdate

Defined in

src/react/component.ts:79


getState

getState(): IStatusBar

Get the Component state

Returns

IStatusBar

Inherited from

Component.getState

Defined in

src/react/component.ts:83


getStatusBarItem

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

Get the specific StatusBar item

Parameters

NameType
idUniqueId
float?Float

Returns

null | IStatusBarItem<any>

Defined in

src/services/workbench/statusBarService.ts:38


onClick

onClick(callback): any

Listen to the StatusBar click event

Parameters

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

Returns

any

Defined in

src/services/workbench/statusBarService.ts:47


onUpdateState

onUpdateState(callback): void

Listen to the Component state update event

Parameters

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

Returns

void

Inherited from

Component.onUpdateState

Defined in

src/react/component.ts:71


remove

remove(id, float?): void

Remove the specific StatusBar item

Parameters

NameTypeDescription
idUniqueId
float?Floatif provided, it'll remove the item in spcific position

Returns

void

Defined in

src/services/workbench/statusBarService.ts:27


removeOnUpdateState

removeOnUpdateState(): void

Remove the Component update event listening

Returns

void

Inherited from

Component.removeOnUpdateState

Defined in

src/react/component.ts:75


render

render(nextState?): void

Initiative notify the component to render the view by the state

Parameters

NameType
nextState?IStatusBar

Returns

void

Inherited from

Component.render

Defined in

src/react/component.ts:67


reset

reset(): void

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

Returns

void

Defined in

src/services/workbench/statusBarService.ts:42


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

Inherited from

Component.setState

Defined in

src/react/component.ts:54


subscribe

subscribe(name, callback): void

Subscribe the service event

Parameters

NameTypeDescription
namestring | string[]Event name
callbackFunctionCallback function

Returns

void

Inherited from

Component.subscribe

Defined in

src/common/event/eventBus.ts:11


unsubscribe

unsubscribe(name): void

Unsubscribe the specific event

Parameters

NameTypeDescription
nameanyThe event name

Returns

void

Inherited from

Component.unsubscribe

Defined in

src/common/event/eventBus.ts:37


update

update(item, float?): void

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

Parameters

NameTypeDescription
itemIStatusBarItem<any>the id field is required
float?Floatif provided, it'll update the item in specific position

Returns

void

Defined in

src/services/workbench/statusBarService.ts:33