@jupyterlite / @jupyterlite/application / SingleWidgetApp
Class: SingleWidgetApp#
Defined in: packages/application/src/singleWidgetApp.ts:21
App is the main application class. It is instantiated once and shared.
Extends#
JupyterFrontEnd<ISingleWidgetShell>
Constructors#
Constructor#
new SingleWidgetApp(
options):SingleWidgetApp
Defined in: packages/application/src/singleWidgetApp.ts:27
Construct a new SingleWidgetApp object.
Parameters#
options#
IOptions = ...
The instantiation options for an application.
Returns#
SingleWidgetApp
Overrides#
JupyterFrontEnd<ISingleWidgetShell>.constructor
Properties#
commandLinker#
readonlycommandLinker:CommandLinker
Defined in: node_modules/@jupyterlab/application/lib/frontend.d.ts:51
The command linker used by the application.
Inherited from#
JupyterFrontEnd.commandLinker
commands#
readonlycommands:CommandRegistry
Defined in: node_modules/@lumino/application/types/index.d.ts:32
The application command registry.
Inherited from#
JupyterFrontEnd.commands
docRegistry#
readonlydocRegistry:DocumentRegistry
Defined in: node_modules/@jupyterlab/application/lib/frontend.d.ts:59
The document registry instance used by the application.
Inherited from#
JupyterFrontEnd.docRegistry
name#
readonlyname:"Single Widget Application"='Single Widget Application'
Defined in: packages/application/src/singleWidgetApp.ts:42
The name of the application.
Overrides#
JupyterFrontEnd.name
namespace#
readonlynamespace:"Single Widget Application"
Defined in: packages/application/src/singleWidgetApp.ts:47
A namespace/prefix plugins may use to denote their provenance.
Overrides#
JupyterFrontEnd.namespace
pluginRegistry#
protectedpluginRegistry:PluginRegistry
Defined in: node_modules/@lumino/application/types/index.d.ts:283
Application plugin registry.
Inherited from#
JupyterFrontEnd.pluginRegistry
restored#
readonlyrestored:Promise<void>
Defined in: node_modules/@jupyterlab/application/lib/frontend.d.ts:63
Promise that resolves when state is first restored.
Inherited from#
JupyterFrontEnd.restored
serviceManager#
readonlyserviceManager:IManager
Defined in: node_modules/@jupyterlab/application/lib/frontend.d.ts:67
The service manager used by the application.
Inherited from#
JupyterFrontEnd.serviceManager
shell#
readonlyshell:ISingleWidgetShell
Defined in: node_modules/@lumino/application/types/index.d.ts:45
The application shell widget.
Notes#
The shell widget is the root “container” widget for the entire application. It will typically expose an API which allows the application plugins to insert content in a variety of places.
Inherited from#
JupyterFrontEnd.shell
status#
readonlystatus:LabStatus
Defined in: packages/application/src/singleWidgetApp.ts:52
The application busy and dirty status signals and flags.
version#
readonlyversion:string
Defined in: packages/application/src/singleWidgetApp.ts:57
The version of the application.
Overrides#
JupyterFrontEnd.version
Accessors#
deferredPlugins#
Get Signature#
get deferredPlugins():
string[]
Defined in: node_modules/@lumino/application/types/index.d.ts:49
The list of all the deferred plugins.
Returns#
string[]
Inherited from#
JupyterFrontEnd.deferredPlugins
format#
Get Signature#
get format():
U
Defined in: node_modules/@jupyterlab/application/lib/frontend.d.ts:71
The application form factor, e.g., desktop or mobile.
Returns#
U
Set Signature#
set format(
format):void
Defined in: node_modules/@jupyterlab/application/lib/frontend.d.ts:72
Parameters#
format#
U
Returns#
void
Inherited from#
JupyterFrontEnd.format
formatChanged#
Get Signature#
get formatChanged():
ISignal<this,U>
Defined in: node_modules/@jupyterlab/application/lib/frontend.d.ts:76
A signal that emits when the application form factor changes.
Returns#
ISignal<this, U>
Inherited from#
JupyterFrontEnd.formatChanged
paths#
Get Signature#
get paths():
IPaths
Defined in: packages/application/src/singleWidgetApp.ts:62
The JupyterLab application paths dictionary.
Returns#
IPaths
started#
Get Signature#
get started():
Promise<void>
Defined in: node_modules/@lumino/application/types/index.d.ts:57
A promise which resolves after the application has started.
Notes#
This promise will resolve after the start() method is called,
when all the bootstrapping and shell mounting work is complete.
Returns#
Promise<void>
Inherited from#
JupyterFrontEnd.started
Methods#
activateDeferredPlugins()#
activateDeferredPlugins():
Promise<void>
Defined in: node_modules/@lumino/application/types/index.d.ts:64
Activate all the deferred plugins.
Returns#
Promise<void>
A promise which will resolve when each plugin is activated or rejects with an error if one cannot be activated.
Inherited from#
JupyterFrontEnd.activateDeferredPlugins
activatePlugin()#
activatePlugin(
id):Promise<void>
Defined in: node_modules/@lumino/application/types/index.d.ts:73
Activate the plugin with the given ID.
Parameters#
id#
string
The ID of the plugin of interest.
Returns#
Promise<void>
A promise which resolves when the plugin is activated or rejects with an error if it cannot be activated.
Inherited from#
JupyterFrontEnd.activatePlugin
addEventListeners()#
protectedaddEventListeners():void
Defined in: node_modules/@lumino/application/types/index.d.ts:236
Add the application event listeners.
Notes#
The default implementation of this method adds listeners for
'keydown' and 'resize' events.
A subclass may reimplement this method as needed.
Returns#
void
Inherited from#
JupyterFrontEnd.addEventListeners
attachShell()#
protectedattachShell(id):void
Defined in: node_modules/@lumino/application/types/index.d.ts:226
Attach the application shell to the DOM.
Parameters#
id#
string
The ID of the host node for the shell, or ''.
Notes#
If the ID is not provided, the document body will be the host.
A subclass may reimplement this method as needed.
Returns#
void
Inherited from#
JupyterFrontEnd.attachShell
deactivatePlugin()#
deactivatePlugin(
id):Promise<string[]>
Defined in: node_modules/@lumino/application/types/index.d.ts:82
Deactivate the plugin and its downstream dependents if and only if the
plugin and its dependents all support deactivate.
Parameters#
id#
string
The ID of the plugin of interest.
Returns#
Promise<string[]>
A list of IDs of downstream plugins deactivated with this one.
Inherited from#
JupyterFrontEnd.deactivatePlugin
deregisterPlugin()#
deregisterPlugin(
id,force?):void
Defined in: node_modules/@lumino/application/types/index.d.ts:90
Deregister a plugin with the application.
Parameters#
id#
string
The ID of the plugin of interest.
force?#
boolean
Whether to deregister the plugin even if it is active.
Returns#
void
Inherited from#
JupyterFrontEnd.deregisterPlugin
evtKeydown()#
protectedevtKeydown(event):void
Defined in: node_modules/@lumino/application/types/index.d.ts:246
A method invoked on a document 'keydown' event.
Notes#
The default implementation of this method invokes the key down processing method of the application command registry.
A subclass may reimplement this method as needed.
Parameters#
event#
KeyboardEvent
Returns#
void
Inherited from#
JupyterFrontEnd.evtKeydown
evtKeyup()#
protectedevtKeyup(event):void
Defined in: node_modules/@lumino/application/types/index.d.ts:256
A method invoked on a document 'keyup' event.
Notes#
The default implementation of this method invokes the key up processing method of the application command registry.
A subclass may reimplement this method as needed.
Parameters#
event#
KeyboardEvent
Returns#
void
Inherited from#
JupyterFrontEnd.evtKeyup
evtResize()#
protectedevtResize(event):void
Defined in: node_modules/@lumino/application/types/index.d.ts:279
A method invoked on a window 'resize' event.
Notes#
The default implementation of this method updates the shell.
A subclass may reimplement this method as needed.
Parameters#
event#
Event
Returns#
void
Inherited from#
JupyterFrontEnd.evtResize
getPluginDescription()#
getPluginDescription(
id):string
Defined in: node_modules/@lumino/application/types/index.d.ts:98
Get a plugin description.
Parameters#
id#
string
The ID of the plugin of interest.
Returns#
string
The plugin description.
Inherited from#
JupyterFrontEnd.getPluginDescription
handleEvent()#
handleEvent(
event):void
Defined in: node_modules/@lumino/application/types/index.d.ts:215
Handle the DOM events for the application.
Parameters#
event#
Event
The DOM event sent to the application.
Notes#
This method implements the DOM EventListener interface and is
called in response to events registered for the application. It
should not be called directly by user code.
Returns#
void
Inherited from#
JupyterFrontEnd.handleEvent
hasPlugin()#
hasPlugin(
id):boolean
Defined in: node_modules/@lumino/application/types/index.d.ts:106
Test whether a plugin is registered with the application.
Parameters#
id#
string
The ID of the plugin of interest.
Returns#
boolean
true if the plugin is registered, false otherwise.
Inherited from#
JupyterFrontEnd.hasPlugin
isPluginActivated()#
isPluginActivated(
id):boolean
Defined in: node_modules/@lumino/application/types/index.d.ts:114
Test whether a plugin is activated with the application.
Parameters#
id#
string
The ID of the plugin of interest.
Returns#
boolean
true if the plugin is activated, false otherwise.
Inherited from#
JupyterFrontEnd.isPluginActivated
listPlugins()#
listPlugins():
string[]
Defined in: node_modules/@lumino/application/types/index.d.ts:120
List the IDs of the plugins registered with the application.
Returns#
string[]
A new array of the registered plugin IDs.
Inherited from#
JupyterFrontEnd.listPlugins
registerPlugin()#
registerPlugin(
plugin):void
Defined in: node_modules/@lumino/application/types/index.d.ts:133
Register a plugin with the application.
Parameters#
plugin#
IPlugin<SingleWidgetApp, any>
The plugin to register.
Notes#
An error will be thrown if a plugin with the same ID is already registered, or if the plugin has a circular dependency.
If the plugin provides a service which has already been provided by another plugin, the new service will override the old service.
Returns#
void
Inherited from#
JupyterFrontEnd.registerPlugin
registerPlugins()#
registerPlugins(
plugins):void
Defined in: node_modules/@lumino/application/types/index.d.ts:142
Register multiple plugins with the application.
Parameters#
plugins#
IPlugin<SingleWidgetApp, any>[]
The plugins to register.
Notes#
This calls registerPlugin() for each of the given plugins.
Returns#
void
Inherited from#
JupyterFrontEnd.registerPlugins
resolveOptionalService()#
resolveOptionalService<
U>(token):Promise<null|U>
Defined in: node_modules/@lumino/application/types/index.d.ts:162
Resolve an optional service of a given type.
Type Parameters#
U#
U
Parameters#
token#
Token<U>
The token for the service type of interest.
Returns#
Promise<null | U>
A promise which resolves to an instance of the requested
service, or null if it cannot be resolved.
Notes#
Services are singletons. The same instance will be returned each time a given service token is resolved.
If the plugin which provides the service has not been activated, resolving the service will automatically activate the plugin.
User code will not typically call this method directly. Instead, the optional services for the user’s plugins will be resolved automatically when the plugin is activated.
Inherited from#
JupyterFrontEnd.resolveOptionalService
resolveRequiredService()#
resolveRequiredService<
U>(token):Promise<U>
Defined in: node_modules/@lumino/application/types/index.d.ts:182
Resolve a required service of a given type.
Type Parameters#
U#
U
Parameters#
token#
Token<U>
The token for the service type of interest.
Returns#
Promise<U>
A promise which resolves to an instance of the requested service, or rejects with an error if it cannot be resolved.
Notes#
Services are singletons. The same instance will be returned each time a given service token is resolved.
If the plugin which provides the service has not been activated, resolving the service will automatically activate the plugin.
User code will not typically call this method directly. Instead, the required services for the user’s plugins will be resolved automatically when the plugin is activated.
Inherited from#
JupyterFrontEnd.resolveRequiredService
start()#
start(
options?):Promise<void>
Defined in: node_modules/@lumino/application/types/index.d.ts:204
Start the application.
Parameters#
options?#
IStartOptions
The options for starting the application.
Returns#
Promise<void>
A promise which resolves when all bootstrapping work is complete and the shell is mounted to the DOM.
Notes#
This should be called once by the application creator after all initial plugins have been registered.
If a plugin fails to the load, the error will be logged and the other valid plugins will continue to be loaded.
Bootstrapping the application consists of the following steps:
Activate the startup plugins
Wait for those plugins to activate
Attach the shell widget to the DOM
Add the application event listeners
Inherited from#
JupyterFrontEnd.start