Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OutputAreaModel

The default implementation of the IOutputAreaModel. The namespace for OutputAreaModel class statics.

Hierarchy

  • OutputAreaModel

Implements

Index

Constructors

constructor

Properties

Private _changed

_changed: Signal<this, IChangedArgs<IOutputModel>> = new Signal<this, IOutputAreaModel.ChangedArgs>(this)

Private _isDisposed

_isDisposed: boolean = false

Private _lastName

_lastName: "stdout" | "stderr"

Private _lastStream

_lastStream: string

Private _stateChanged

_stateChanged: Signal<IOutputAreaModel, void> = new Signal<IOutputAreaModel, void>(this)

Private _trusted

_trusted: boolean = false

Protected clearNext

clearNext: boolean = false

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

contentFactory

contentFactory: IContentFactory

The output content factory used by the model.

Protected list

list: IObservableList<IOutputModel> = null

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

Static defaultContentFactory

defaultContentFactory: ContentFactory = new ContentFactory()

The default output model factory.

Accessors

changed

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

trusted

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

    Notes

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

    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 void

Methods

Private _add

  • _add(value: nbformat.IOutput): number
  • Add an item to the list.

    Parameters

    • value: nbformat.IOutput

    Returns number

Private _createItem

  • _createItem(options: IOptions): IOutputModel
  • Create an output item and hook up its signals.

    Parameters

    • options: IOptions

    Returns IOutputModel

Private _onGenericChange

  • _onGenericChange(): void
  • Handle a change to an item.

    Returns void

Private _onListChanged

  • _onListChanged(sender: IObservableList<IOutputModel>, args: IChangedArgs<IOutputModel>): void
  • Handle a change to the list.

    Parameters

    • sender: IObservableList<IOutputModel>
    • args: IChangedArgs<IOutputModel>

    Returns void

add

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

    Notes

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

    Parameters

    • output: nbformat.IOutput

    Returns number

clear

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

    Parameters

    • Default value wait: boolean = false

      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(index: number): IOutputModel
  • 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

toJSON

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

    Returns nbformat.IOutput[]

Generated using TypeDoc