Class: StatusBarService
molecule.StatusBarService
Hierarchy
↳
StatusBarService
Implements
Constructors
constructor
• new StatusBarService()
Overrides
Defined in
src/services/workbench/statusBarService.ts:68
Properties
state
• Protected
state: IStatusBar
Implementation of
Overrides
Defined in
src/services/workbench/statusBarService.ts:66
Methods
add
▸ add(item
, float
): void
Add a new StatusBar item into right or left status
Parameters
Name | Type |
---|---|
item | IStatusBarItem <any > |
float | Float |
Returns
void
Implementation of
Defined in
src/services/workbench/statusBarService.ts:120
count
▸ count(name
): number
Count the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | Event name |
Returns
number
Implementation of
Inherited from
Defined in
src/common/event/eventBus.ts:28
emit
▸ emit(name
, ...args
): void
Emit the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | Event name |
...args | any | Arguments |
Returns
void
Implementation of
Inherited from
Defined in
src/common/event/eventBus.ts:20
forceUpdate
▸ forceUpdate(): void
Force to update the Component
Returns
void
Implementation of
Inherited from
Defined in
getItem
▸ Private
getItem(item
, float?
): StatusBarItemInfos
Get the item informations in right position or left position
Parameters
Name | Type |
---|---|
item | IStatusBarItem <any > |
float? | Float |
Returns
StatusBarItemInfos
Defined in
src/services/workbench/statusBarService.ts:78
getState
▸ getState(): IStatusBar
Get the Component state
Returns
Implementation of
Inherited from
Defined in
getStatusBarItem
▸ getStatusBarItem(id
, float?
): null
| IStatusBarItem
<any
>
Get the specific StatusBar item
Parameters
Name | Type |
---|---|
id | UniqueId |
float? | Float |
Returns
null
| IStatusBarItem
<any
>
Implementation of
IStatusBarService.getStatusBarItem
Defined in
src/services/workbench/statusBarService.ts:152
onClick
▸ onClick(callback
): void
Listen to the StatusBar click event
Parameters
Name | Type |
---|---|
callback | (e : MouseEvent , item : IStatusBarItem <any >) => void |
Returns
void
Implementation of
Defined in
src/services/workbench/statusBarService.ts:181
onUpdateState
▸ onUpdateState(callback
): void
Listen to the Component state update event
Parameters
Name | Type |
---|---|
callback | (prevState : IStatusBar , nextState : IStatusBar ) => void |
Returns
void
Implementation of
IStatusBarService.onUpdateState
Inherited from
Defined in
remove
▸ remove(id
, float?
): void
Remove the specific StatusBar item
Parameters
Name | Type |
---|---|
id | UniqueId |
float? | Float |
Returns
void
Implementation of
Defined in
src/services/workbench/statusBarService.ts:157
removeOnUpdateState
▸ removeOnUpdateState(): void
Remove the Component update event listening
Returns
void
Implementation of
IStatusBarService.removeOnUpdateState
Inherited from
Defined in
render
▸ render(nextState?
): void
Initiative notify the component to render the view by the state
Parameters
Name | Type |
---|---|
nextState? | IStatusBar |
Returns
void
Implementation of
Inherited from
Defined in
reset
▸ reset(): void
Reset the contextMenu data and the StatusBar data , including right and left
Returns
void
Implementation of
Defined in
src/services/workbench/statusBarService.ts:173
setState
▸ setState(values
, callback?
): void
Set the state values, and notify the view component to re render
Parameters
Name | Type | Description |
---|---|---|
values | Partial <IStatusBar > | update target state values |
callback? | (prevState : IStatusBar , nextState : IStatusBar ) => void | - |
Returns
void
Implementation of
Inherited from
Defined in
subscribe
▸ subscribe(name
, callback
): void
Subscribe the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | string [] | Event name |
callback | Function | Callback function |
Returns
void
Implementation of
Inherited from
Defined in
src/common/event/eventBus.ts:11
unsubscribe
▸ unsubscribe(name
): void
Unsubscribe the specific event
Parameters
Name | Type | Description |
---|---|---|
name | any | The event name |
Returns
void
Implementation of
Inherited from
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
Name | Type |
---|---|
item | IStatusBarItem <any > |
float? | Float |
Returns
void