Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OutputAreaModel

The default implementation of the IOutputAreaModel.

Hierarchy

Implements

Index

Constructors

constructor

  • Construct a new observable outputs instance.

    Parameters

    Returns OutputAreaModel

Properties

Private _add

_add: any

Add a copy of the item to the list.

Private _changed

_changed: any

Private _createItem

_createItem: any

Create an output item and hook up its signals.

Private _isDisposed

_isDisposed: any

Private _lastName

_lastName: any

Private _lastStream

_lastStream: any

Private _onGenericChange

_onGenericChange: any

Handle a change to an item.

Private _onListChanged

_onListChanged: any

Handle a change to the list.

Private _stateChanged

_stateChanged: any

Private _trusted

_trusted: any

Protected clearNext

clearNext: boolean

A flag that is set when we want to clear the output area after the next addition to it.

Readonly contentFactory

contentFactory: IContentFactory

The output content factory used by the model.

Protected list

An observable list containing the output models for this output area.

Accessors

changed

  • A signal emitted when the model changes.

    Returns ISignal<this, ChangedArgs>

isDisposed

  • get isDisposed(): boolean
  • Test whether the model is disposed.

    Returns boolean

length

  • get length(): number
  • Get the length of the items in the model.

    Returns number

stateChanged

  • A signal emitted when the model state changes.

    Returns ISignal<IOutputAreaModel, void>

trusted

  • get trusted(): boolean
  • set trusted(value: boolean): any
  • Get whether the model is trusted.

    Returns boolean

  • Set whether the model is trusted.

    Notes

    Changing the value will cause all of the models to re-set.

    Parameters

    • value: boolean

    Returns any

Methods

add

  • add(output: nbformat.IOutput): number
  • Add an output, which may be combined with previous output.

    Parameters

    • output: nbformat.IOutput

    Returns number

    The total number of outputs.

    Notes

    The output bundle is copied. Contiguous stream outputs of the same name are combined.

clear

  • clear(wait?: boolean): void
  • Clear all of the output.

    Parameters

    • Optional wait: boolean

      Delay clearing the output until the next message is added.

    Returns void

dispose

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

    Returns void

fromJSON

  • fromJSON(values: nbformat.IOutput[]): void
  • Deserialize the model from JSON.

    Notes

    This will clear any existing data.

    Parameters

    • values: nbformat.IOutput[]

    Returns void

get

  • Get an item at the specified index.

    Parameters

    • index: number

    Returns IOutputModel

set

  • set(index: number, value: nbformat.IOutput): void
  • Set the value at the specified index.

    Parameters

    • index: number
    • value: nbformat.IOutput

    Returns void

Protected shouldCombine

  • shouldCombine(options: { lastModel: IOutputModel; value: nbformat.IOutput }): boolean
  • Whether a new value should be consolidated with the previous output.

    This will only be called if the minimal criteria of both being stream messages of the same type.

    Parameters

    Returns boolean

toJSON

  • toJSON(): nbformat.IOutput[]
  • Serialize the model to JSON.

    Returns nbformat.IOutput[]

Generated using TypeDoc