Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ImageViewerFactory<U>

A widget factory for images.

Type parameters

  • U: IModel

Hierarchy

  • ABCWidgetFactory<IDocumentWidget<ImageViewer>>
    • ImageViewerFactory

Implements

Index

Constructors

constructor

  • Construct a new ABCWidgetFactory.

    Parameters

    • options: IWidgetFactoryOptions<IDocumentWidget<ImageViewer>>

    Returns ImageViewerFactory

Properties

canStartKernel

canStartKernel: boolean

Whether the widgets can start a kernel when opened.

defaultFor

defaultFor: string[]

The file types for which the factory should be the default.

defaultRendered

defaultRendered: string[]

The file types for which the factory should be the default for rendering a document model, if different from editing.

fileTypes

fileTypes: string[]

The file types the widget can view.

isDisposed

isDisposed: boolean

Get whether the model factory has been disposed.

modelName

modelName: string

The registered name of the model type used to create the widgets.

name

name: string

The name of the widget to display in dialogs.

preferKernel

preferKernel: boolean

Whether the widgets prefer having a kernel started.

readOnly

readOnly: boolean

Whether the widget factory is read only.

shutdownOnClose

shutdownOnClose: boolean

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

widgetCreated

widgetCreated: ISignal<IWidgetFactory<IDocumentWidget<ImageViewer>, U>, IDocumentWidget<ImageViewer>>

A signal emitted when a widget is created.

Methods

createNew

  • 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: IDocumentWidget<ImageViewer>

    Returns IDocumentWidget<ImageViewer>

Protected createNewWidget

  • createNewWidget(context: IContext<IModel>): IDocumentWidget<ImageViewer>
  • Create a new widget given a context.

    Parameters

    • context: IContext<IModel>

    Returns IDocumentWidget<ImageViewer>

Protected defaultToolbarFactory

  • defaultToolbarFactory(widget: IDocumentWidget<ImageViewer>): IToolbarItem[]
  • Default factory for toolbar items to be added after the widget is created.

    Parameters

    Returns IToolbarItem[]

dispose

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

    Returns void

Generated using TypeDoc