Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ABCWidgetFactory<T, U>

The default implementation of a widget factory.

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

Properties

Private _canStartKernel

_canStartKernel: any

Private _defaultFor

_defaultFor: any

Private _defaultRendered

_defaultRendered: any

Private _fileTypes

_fileTypes: any

Private _isDisposed

_isDisposed: any

Private _modelName

_modelName: any

Private _name

_name: any

Private _preferKernel

_preferKernel: any

Private _readOnly

_readOnly: any

Private _shutdownOnClose

_shutdownOnClose: any

Private _toolbarFactory

_toolbarFactory: any

Private _translator

_translator: any

Private _widgetCreated

_widgetCreated: any

Accessors

canStartKernel

  • get canStartKernel(): boolean
  • Whether the widgets can start a kernel when opened.

    Returns boolean

defaultFor

  • get defaultFor(): string[]
  • The file types for which the factory should be the default.

    Returns string[]

defaultRendered

  • get defaultRendered(): string[]
  • The file types for which the factory should be the default for rendering a document model, if different from editing.

    Returns string[]

fileTypes

  • get fileTypes(): string[]
  • The file types the widget can view.

    Returns string[]

isDisposed

  • get isDisposed(): boolean
  • Get whether the model factory has been disposed.

    Returns boolean

modelName

  • get modelName(): string
  • The registered name of the model type used to create the widgets.

    Returns string

name

  • get name(): string
  • The name of the widget to display in dialogs.

    Returns string

preferKernel

  • get preferKernel(): boolean
  • Whether the widgets prefer having a kernel started.

    Returns boolean

readOnly

  • get readOnly(): boolean
  • Whether the widget factory is read only.

    Returns boolean

shutdownOnClose

  • get shutdownOnClose(): boolean
  • set shutdownOnClose(value: boolean): void
  • Whether the kernel should be shutdown when the widget is closed.

    Returns boolean

  • Whether the kernel should be shutdown when the widget is closed.

    Parameters

    • value: boolean

    Returns void

translator

widgetCreated

Methods

createNew

  • createNew(context: IContext<U>, source?: T): T
  • Create a new widget given a document model and a context.

    Notes

    It should emit the [widgetCreated] signal with the new widget.

    Parameters

    • context: IContext<U>
    • Optional source: T

    Returns T

Protected Abstract createNewWidget

  • createNewWidget(context: IContext<U>, source?: T): T
  • Create a widget for a context.

    Parameters

    • context: IContext<U>
    • Optional source: T

    Returns T

Protected defaultToolbarFactory

  • Default factory for toolbar items to be added after the widget is created.

    Parameters

    • widget: T

    Returns IToolbarItem[]

dispose

  • dispose(): void
  • Dispose of the resources used by the document manager.

    Returns void

Generated using TypeDoc