The application shell for JupyterLab.

Hierarchy

Implements

Constructors

Properties

Accessors

Methods

Constructors

  • Construct a new application shell.

    Parameters

    Returns LabShell

Properties

_activeChanged: any
_addToBottomArea: any

Add a widget to the bottom content area.

Notes

Widgets must have a unique id property, which will be used as the DOM id.

_addToDownArea: any
_addToHeaderArea: any

Add a widget to the header content area.

Notes

Widgets must have a unique id property, which will be used as the DOM id.

_addToLeftArea: any

Add a widget to the left content area.

Notes

Widgets must have a unique id property, which will be used as the DOM id.

_addToMainArea: any

Add a widget to the main content area.

Notes

Widgets must have a unique id property, which will be used as the DOM id. All widgets added to the main area should be disposed after removal (disposal before removal will remove the widget automatically).

In the options, ref defaults to null, mode defaults to 'tab-after', and activate defaults to true.

_addToMenuArea: any

Add a widget to the title content area.

Notes

Widgets must have a unique id property, which will be used as the DOM id.

_addToRightArea: any

Add a widget to the right content area.

Notes

Widgets must have a unique id property, which will be used as the DOM id.

_addToTopArea: any

Add a widget to the top content area.

Notes

Widgets must have a unique id property, which will be used as the DOM id.

_adjacentBar: any
_bottomPanel: any
_cachedLayout: any
_currentChanged: any
_currentPath: any
_currentPathChanged: any
_currentTabBar: any
_delayedWidget: any
_dockChildHook: any

A message hook for child add/remove messages on the main area dock panel.

_dockPanel: any
_downPanel: any
_headerPanel: any
_hsplitPanel: any
_idTypeMap: any
_isRestored: any
_layoutDebouncer: any
_layoutModified: any
_layoutRestorer: any
_leftHandler: any
_mainOptionsCache: any
_menuHandler: any
_modeChanged: any
_onActiveChanged: any

Handle a change to the dock area active widget.

_onCurrentChanged: any

Handle a change to the dock area current widget.

_onLayoutModified: any

Handle a change to the layout.

_onTabPanelChanged: any

Handle a change on the down panel widgets

_restored: any
_rightHandler: any
_sideOptionsCache: any
_skipLinkWidget: any
_titleHandler: any
_topHandler: any
_topHandlerHiddenByUser: any
_tracker: any
_translator: any
_updateCurrentPath: any

The path of the current widget changed, fire the _currentPathChanged signal.

_updateTitlePanelTitle: any

Update the title panel title based on the title of the current widget.

_userLayout: any
_vsplitPanel: any

Get the DOM node owned by the widget.

Accessors

  • get activeWidget(): Widget
  • The active widget in the shell's main area.

    Returns Widget

  • get addButtonEnabled(): boolean
  • Whether the add buttons for each main area tab bar are enabled.

    Returns boolean

  • set addButtonEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get currentPath(): string
  • Current document path.

    Returns string

  • get currentWidget(): Widget
  • The current widget in the shell's main area.

    Returns Widget

  • get dataset(): DOMStringMap
  • The dataset for the widget's DOM node.

    Returns DOMStringMap

  • get disposed(): ISignal<this, void>
  • A signal emitted when the widget is disposed.

    Returns ISignal<this, void>

  • get hiddenMode(): HiddenMode
  • Get the method for hiding the widget.

    Returns HiddenMode

  • set hiddenMode(value): void
  • Set the method for hiding the widget.

    Parameters

    • value: HiddenMode

    Returns void

  • get id(): string
  • Get the id of the widget's DOM node.

    Returns string

  • set id(value): void
  • Set the id of the widget's DOM node.

    Parameters

    • value: string

    Returns void

  • get isAttached(): boolean
  • Test whether the widget's node is attached to the DOM.

    Returns boolean

  • get isDisposed(): boolean
  • Test whether the widget has been disposed.

    Returns boolean

  • get isHidden(): boolean
  • Test whether the widget is explicitly hidden.

    Returns boolean

  • get isVisible(): boolean
  • Test whether the widget is visible.

    Notes

    A widget is visible when it is attached to the DOM, is not explicitly hidden, and has no explicitly hidden ancestors.

    Returns boolean

  • get layout(): Layout
  • Get the layout for the widget.

    Returns Layout

  • set layout(value): void
  • Set the layout for the widget.

    Notes

    The layout is single-use only. It cannot be changed after the first assignment.

    The layout is disposed automatically when the widget is disposed.

    Parameters

    • value: Layout

    Returns void

  • get layoutModified(): ISignal<this, void>
  • A signal emitted when the main area's layout is modified.

    Returns ISignal<this, void>

  • get leftCollapsed(): boolean
  • Whether the left area is collapsed.

    Returns boolean

  • get mode(): Mode
  • The main dock area's user interface mode.

    Returns Mode

  • set mode(mode): void
  • Parameters

    • mode: Mode

    Returns void

  • get modeChanged(): ISignal<this, Mode>
  • A signal emitted when the shell/dock panel change modes (single/multiple document).

    Returns ISignal<this, Mode>

  • get parent(): Widget
  • Get the parent of the widget.

    Returns Widget

  • set parent(value): void
  • Set the parent of the widget.

    Notes

    Children are typically added to a widget by using a layout, which means user code will not normally set the parent widget directly.

    The widget will be automatically removed from its old parent.

    This is a no-op if there is no effective parent change.

    Parameters

    Returns void

  • get presentationMode(): boolean
  • Whether JupyterLab is in presentation mode with the jp-mod-presentationMode CSS class.

    Returns boolean

  • set presentationMode(value): void
  • Parameters

    • value: boolean

    Returns void

  • get restored(): Promise<ILayout>
  • Promise that resolves when state is first restored, returning layout description.

    Returns Promise<ILayout>

  • get rightCollapsed(): boolean
  • Whether the left area is collapsed.

    Returns boolean

  • get title(): Title<Widget>
  • The title object for the widget.

    Notes

    The title object is used by some container widgets when displaying the widget alongside some title, such as a tab panel or side bar.

    Since not all widgets will use the title, it is created on demand.

    The owner property of the title is set to this widget.

    Returns Title<Widget>

  • get translator(): ITranslator
  • Returns ITranslator

  • set translator(value): void
  • Parameters

    Returns void

  • get userLayout(): {
        multiple-document: IUserLayout;
        single-document: IUserLayout;
    }
  • User customized shell layout.

    Returns {
        multiple-document: IUserLayout;
        single-document: IUserLayout;
    }

Methods

  • Post an 'activate-request' message to the widget.

    Notes

    This is a simple convenience method for posting the message.

    Returns void

  • Alpha

    Activate widget in specified area.

    Notes

    The alpha version of this method only supports activating the "main" area.

    Parameters

    • Optional area: Area

      Name of area to activate

    Returns void

  • Activate a widget in its area.

    Parameters

    • id: string

    Returns void

  • Activate the next Tab in the active TabBar.

    Returns void

  • Activate the next TabBar.

    Returns void

  • Activate the previous Tab in the active TabBar.

    Returns void

  • Activate the next TabBar.

    Returns void

  • Add a widget to the JupyterLab shell

    Parameters

    Returns void

  • Add a class name to the widget's DOM node.

    Parameters

    • name: string

      The class name to add to the node.

      Notes

      If the class name is already added to the node, this is a no-op.

      The class name must not contain whitespace.

    Returns void

  • Create an iterator over the widget's children.

    Returns IterableIterator<Widget>

    A new iterator over the children of the widget.

    Notes

    The widget must have a populated layout in order to have children.

    If a layout is not installed, the returned iterator will be empty.

  • Clear the given widget flag.

    Notes

    This will not typically be called directly by user code.

    Parameters

    • flag: Flag

    Returns void

  • Send a 'close-request' message to the widget.

    Notes

    This is a simple convenience method for sending the message.

    Returns void

  • Close all widgets in the main and down area.

    Returns void

  • Collapse the left area.

    Returns void

  • Collapse the right area.

    Returns void

  • Test whether a widget is a descendant of this widget.

    Parameters

    • widget: Widget

      The descendant widget of interest.

    Returns boolean

    true if the widget is a descendant, false otherwise.

  • Dispose the shell.

    Returns void

  • Expand the left area.

    Notes

    This will open the most recently used tab, or the first tab if there is no most recently used.

    Returns void

  • Expand the right area.

    Notes

    This will open the most recently used tab, or the first tab if there is no most recently used.

    Returns void

  • Post a 'fit-request' message to the widget.

    Notes

    This is a simple convenience method for posting the message.

    Returns void

  • Test whether the widget's DOM node has the given class name.

    Parameters

    • name: string

      The class name of interest.

    Returns boolean

    true if the node has the class, false otherwise.

  • Hide the widget and make it hidden to its parent widget.

    Notes

    This causes the isHidden property to be true.

    If the widget is explicitly hidden, this is a no-op.

    Returns void

  • True if the given area is empty.

    Parameters

    Returns boolean

  • Whether an side tab bar is visible or not.

    Parameters

    • side: "left" | "right"

      Sidebar of interest

    Returns boolean

    Side tab bar visibility

  • Whether the top bar in simple mode is visible or not.

    Returns boolean

    Top bar visibility

  • Move a widget type to a new area.

    The type is determined from the widget.id and fallback to widget.id.

    Notes

    If mode is undefined, both mode are updated. The new layout is now persisted.

    Parameters

    • widget: Widget

      Widget to move

    • area: Area

      New area

    • Optional mode: Mode

      Mode to change

    Returns {
        multiple-document: IUserLayout;
        single-document: IUserLayout;
    }

    The new user layout

  • Invoke the message processing routine of the widget's layout.

    Parameters

    • msg: Message

      The message to dispatch to the layout.

      Notes

      This is a no-op if the widget does not have a layout.

      This will not typically be called directly by user code.

    Returns void

  • A message handler invoked on an 'activate-request' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: Message

    Returns void

  • Handle after-attach messages for the application shell.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on an 'after-detach' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on an 'after-hide' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on an 'after-show' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'before-attach' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'before-detach' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'before-hide' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'before-show' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'child-added' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: ChildMessage

    Returns void

  • A message handler invoked on a 'child-removed' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: ChildMessage

    Returns void

  • A message handler invoked on a 'close-request' message.

    Notes

    The default implementation unparents or detaches the widget.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'fit-request' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'resize' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: ResizeMessage

    Returns void

  • A message handler invoked on an 'update-request' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: Message

    Returns void

  • Process a message sent to the widget.

    Parameters

    • msg: Message

      The message sent to the widget.

      Notes

      Subclasses may reimplement this method as needed.

    Returns void

  • Remove a class name from the widget's DOM node.

    Parameters

    • name: string

      The class name to remove from the node.

      Notes

      If the class name is not yet added to the node, this is a no-op.

      The class name must not contain whitespace.

    Returns void

  • Restore the layout state and configuration for the application shell.

    Notes

    This should only be called once.

    Parameters

    Returns Promise<void>

  • Save the dehydrated state of the application shell.

    Returns ILayout

  • Set the given widget flag.

    Notes

    This will not typically be called directly by user code.

    Parameters

    • flag: Flag

    Returns void

  • Show or hide the widget according to a boolean value.

    Parameters

    • hidden: boolean

      true to hide the widget, or false to show it.

      Notes

      This is a convenience method for hide() and show().

    Returns void

  • Show the widget and make it visible to its parent widget.

    Notes

    This causes the isHidden property to be false.

    If the widget is not explicitly hidden, this is a no-op.

    Returns void

  • Test whether the given widget flag is set.

    Notes

    This will not typically be called directly by user code.

    Parameters

    • flag: Flag

    Returns boolean

  • Toggle a class name on the widget's DOM node.

    Parameters

    • name: string

      The class name to toggle on the node.

    • Optional force: boolean

      Whether to force add the class (true) or force remove the class (false). If not provided, the presence of the class will be toggled from its current state.

    Returns boolean

    true if the class is now present, false otherwise.

    Notes

    The class name must not contain whitespace.

  • Toggle side tab bar visibility

    Parameters

    • side: "left" | "right"

      Sidebar of interest

    Returns void

  • Toggle top header visibility in simple mode

    Note: Does nothing in multi-document mode

    Returns void

  • Post an 'update-request' message to the widget.

    Notes

    This is a simple convenience method for posting the message.

    Returns void

  • Update the shell configuration.

    Parameters

    Returns void

  • Returns the widgets for an application area.

    Parameters

    • Optional area: Area

    Returns IterableIterator<Widget>

Generated using TypeDoc