Class: PanelService
molecule.PanelService
Hierarchy
Implements
Constructors
constructor
• new PanelService()
Overrides
Defined in
services/workbench/panelService.ts:115
Properties
builtinService
• Private
Readonly
builtinService: IBuiltinService
Defined in
services/workbench/panelService.ts:113
layoutService
• Private
Readonly
layoutService: LayoutService
Defined in
services/workbench/panelService.ts:112
state
• Protected
state: IPanel
Implementation of
Overrides
Defined in
services/workbench/panelService.ts:111
Accessors
outputEditorInstance
• get
outputEditorInstance(): undefined
| IStandaloneCodeEditor
The editorInstance of Output
Returns
undefined
| IStandaloneCodeEditor
Implementation of
IPanelService.outputEditorInstance
Defined in
services/workbench/panelService.ts:132
Methods
add
▸ add(data
): void
Add new Panel items
Parameters
Name | Type |
---|---|
data | IPanelItem <any > | IPanelItem <any >[] |
Returns
void
Implementation of
Defined in
services/workbench/panelService.ts:238
appendOutput
▸ appendOutput(content
): void
Append the content into Output panel
Parameters
Name | Type |
---|---|
content | string |
Returns
void
Implementation of
Defined in
services/workbench/panelService.ts:226
cleanOutput
▸ cleanOutput(): void
Clean the Output content
Returns
void
Implementation of
Defined in
services/workbench/panelService.ts:234
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
getOutputValue
▸ getOutputValue(): any
Get the value of Output Panel
Returns
any
Implementation of
Defined in
services/workbench/panelService.ts:205
getPanel
▸ getPanel(id
): undefined
| IPanelItem
<any
>
Get the specific panel
Parameters
Name | Type |
---|---|
id | UniqueId |
Returns
undefined
| IPanelItem
<any
>
Implementation of
Defined in
services/workbench/panelService.ts:188
getState
▸ getState(): IPanel
Get the Component state
Returns
Implementation of
Inherited from
Defined in
onTabChange
▸ onTabChange(callback
): void
Listen to the Panel tabs onChange event
Parameters
Name | Type |
---|---|
callback | (key : UniqueId ) => void |
Returns
void
Implementation of
Defined in
services/workbench/panelService.ts:291
onTabClose
▸ onTabClose(callback
): void
Listen to the Panel tabs close event
Parameters
Name | Type |
---|---|
callback | (key : UniqueId ) => void |
Returns
void
Implementation of
Defined in
services/workbench/panelService.ts:301
onToolbarClick
▸ onToolbarClick(callback
): void
Listen to the Panel toolbar click event
Parameters
Name | Type |
---|---|
callback | (e : MouseEvent <Element , MouseEvent >, item : IActionBarItemProps <any >) => void |
Returns
void
Implementation of
Defined in
services/workbench/panelService.ts:295
onUpdateState
▸ onUpdateState(listener
): void
Listen to the Component state update event
Parameters
Name | Type |
---|---|
listener | (prevState : IPanel , nextState : IPanel ) => void |
Returns
void
Implementation of
Inherited from
Defined in
open
▸ open(data
): void
Open a new or existing panel item as the active in Panel view
Parameters
Name | Type |
---|---|
data | IPanelItem <any > |
Returns
void
Implementation of
Defined in
services/workbench/panelService.ts:172
remove
▸ remove(id
): undefined
| IPanelItem
<any
>
Remove the specific panel
Parameters
Name | Type |
---|---|
id | UniqueId |
Returns
undefined
| IPanelItem
<any
>
Implementation of
Defined in
services/workbench/panelService.ts:266
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
IPanelService.removeOnUpdateState
Inherited from
Defined in
render
▸ render(nextState?
): void
Initiative notify the component to render the view by the state
Parameters
Name | Type |
---|---|
nextState? | IPanel |
Returns
void
Implementation of
Inherited from
Defined in
reset
▸ reset(): void
Reset data in state
Returns
void
Implementation of
Defined in
services/workbench/panelService.ts:282
setActive
▸ setActive(id
): void
Set the current active panel
This method will log error when couldn't find target panel in state data.
So if you want to add a panel and meanwhile active it, please use the open
method
Parameters
Name | Type |
---|---|
id | UniqueId |
Returns
void
Implementation of
Defined in
services/workbench/panelService.ts:140
setState
▸ setState(values
, callback?
): void
Set the state values, and notify the view component to re render
Parameters
Name | Type | Description |
---|---|---|
values | Partial <IPanel > | update target state values |
callback? | (prevState : IPanel , nextState : IPanel ) => 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
toggleMaximize
▸ toggleMaximize(): void
Toggle the panel between maximized or normal
Returns
void
Implementation of
Defined in
services/workbench/panelService.ts:151
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(data
): undefined
| IPanelItem
<any
>
Update the specific panel
Parameters
Name | Type |
---|---|
data | IPanelItem <any > |
Returns
undefined
| IPanelItem
<any
>
Implementation of
Defined in
services/workbench/panelService.ts:251
updateOutput
▸ updateOutput(data
): undefined
| IPanelItem
<any
>
Onyl support to update several properties
Parameters
Name | Type |
---|---|
data | Partial <IPanelItem <any >> |
Returns
undefined
| IPanelItem
<any
>
Implementation of
Defined in
services/workbench/panelService.ts:214
updateOutputProperty
▸ Private
updateOutputProperty(data
): undefined
| IPanelItem
<any
>
Parameters
Name | Type |
---|---|
data | Partial <IPanelItem <string >> |
Returns
undefined
| IPanelItem
<any
>