Class: StatusBarService
molecule.StatusBarService
Hierarchy
↳
StatusBarService
Implements
Constructors
constructor
• new StatusBarService()
Overrides
Defined in
services/workbench/statusBarService.ts:69
Properties
state
• Protected
state: IStatusBar
Implementation of
Overrides
Defined in
services/workbench/statusBarService.ts:67
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
services/workbench/statusBarService.ts:121
count
▸ count(name
): number
Count the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | Event name |
Returns
number
Implementation of
Inherited from
Defined in
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
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
services/workbench/statusBarService.ts:79
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
services/workbench/statusBarService.ts:153
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
services/workbench/statusBarService.ts:182
onUpdateState
▸ onUpdateState(listener
): void
Listen to the Component state update event
Parameters
Name | Type |
---|---|
listener | (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
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
Name | Type |
---|---|
listener? | Function |
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
services/workbench/statusBarService.ts:174
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
, listener
): void
Subscribe the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | string [] | Event name |
listener | Function | Listener function |
Returns
void
Implementation of
Inherited from
Defined in
unsubscribe
▸ unsubscribe(name
, listener?
): void
Unsubscribe the specific event and the listener function
Parameters
Name | Type | Description |
---|---|---|
name | any | The event name |
listener? | Function | optional, it unsubscribes events via name if not pass the listener function |
Returns
void
Implementation of
Inherited from
Defined in
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