Interface: IPanelService
services.IPanelService
Hierarchy
Component
\<IPanel
>↳
IPanelService
Table of contents
Properties
Methods
- add
- appendOutput
- cleanOutput
- getOutputValue
- getPanel
- onTabChange
- onTabClose
- onToolbarClick
- open
- remove
- reset
- setActive
- subscribe
- toggleMaximize
- unsubscribe
- update
- updateOutput
Properties
outputEditorInstance
• Readonly
outputEditorInstance: undefined
| IStandaloneCodeEditor
The editorInstance of Output
Defined in
src/services/workbench/panelService.ts:12
state
• Protected
Abstract
state: IPanel
Inherited from
Component.state
Defined in
Methods
add
▸ add(data
): void
Add new Panel items
Parameters
Name | Type |
---|---|
data | IPanelItem \<any > | IPanelItem \<any >[] |
Returns
void
Defined in
src/services/workbench/panelService.ts:35
appendOutput
▸ appendOutput(content
): void
Append the content into Output panel
Parameters
Name | Type |
---|---|
content | string |
Returns
void
Defined in
src/services/workbench/panelService.ts:82
cleanOutput
▸ cleanOutput(): void
Clean the Output content
Returns
void
Defined in
src/services/workbench/panelService.ts:86
getOutputValue
▸ getOutputValue(): string
Get the value of Output Panel
Returns
string
Defined in
src/services/workbench/panelService.ts:77
getPanel
▸ getPanel(id
): undefined
| IPanelItem
\<any
>
Get the specific panel
Parameters
Name | Type |
---|---|
id | UniqueId |
Returns
undefined
| IPanelItem
\<any
>
Defined in
src/services/workbench/panelService.ts:30
onTabChange
▸ onTabChange(callback
): void
Listen to the Panel tabs onChange event
Parameters
Name | Type |
---|---|
callback | (panelId : UniqueId ) => void |
Returns
void
Defined in
src/services/workbench/panelService.ts:61
onTabClose
▸ onTabClose(callback
): void
Listen to the Panel tabs close event
Parameters
Name | Type |
---|---|
callback | (panelId : UniqueId ) => void |
Returns
void
Defined in
src/services/workbench/panelService.ts:73
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
Defined in
src/services/workbench/panelService.ts:66
open
▸ open(panel
): void
Open a new or existing panel item as the active in Panel view
Parameters
Name | Type |
---|---|
panel | IPanelItem \<any > |
Returns
void
Defined in
src/services/workbench/panelService.ts:25
remove
▸ remove(id
): undefined
| IPanelItem
\<any
>
Remove the specific panel
Parameters
Name | Type |
---|---|
id | UniqueId |
Returns
undefined
| IPanelItem
\<any
>
Defined in
src/services/workbench/panelService.ts:52
reset
▸ reset(): void
Reset data in state
Returns
void
Defined in
src/services/workbench/panelService.ts:90
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 | Description |
---|---|---|
id | UniqueId | target panel id |
Returns
void
Defined in
src/services/workbench/panelService.ts:20
subscribe
▸ subscribe(name
, listener
): void
Subscribe the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | string [] | Event name |
listener | Function | Listener function |
Returns
void
Inherited from
Component.subscribe
Defined in
src/common/event/eventBus.ts:11
toggleMaximize
▸ toggleMaximize(): void
Toggle the panel between maximized or normal
Returns
void
Defined in
src/services/workbench/panelService.ts:56
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
Inherited from
Component.unsubscribe
Defined in
src/common/event/eventBus.ts:39
update
▸ update(panel
): undefined
| IPanelItem
\<any
>
Update the specific panel
Parameters
Name | Type | Description |
---|---|---|
panel | IPanelItem \<any > | the id field is required |
Returns
undefined
| IPanelItem
\<any
>
Defined in
src/services/workbench/panelService.ts:40
updateOutput
▸ updateOutput(panel
): undefined
| IPanelItem
\<any
>
Update the Output panel, except the value
If you want to update the value of this panel, please use the appendOutput
method
Parameters
Name | Type |
---|---|
panel | IPanelItem \<any > |
Returns
undefined
| IPanelItem
\<any
>