Subclass this to create a broker between your data and a [[Table]] to display and manipulate it. The [[Table]] doesn't know how your data is structured and how to handle it, the controller implements the methods needed

Type Parameters

  • T

Hierarchy (view full)

Constructors

Properties

selection: T[] = []

Stores references to selected objects. Override with a reference in outer scope, if selection should also operate outside of table

Methods

  • Refer objects to the clipboard for copy & paste and delete them from this controller

    Parameters

    • _focus: T

      The item that has the focus and that will be cut if the selection is empty, otherwise the whole selection gets referred and deleted

    • _operation: ClipOperation

    Returns Promise<T[]>

  • Remove the objects to be deleted, e.g. the current selection, from the data structure the table refers to and return a list of those objects in order for the according TableItems to be deleted also

    Parameters

    • _expendables: T[]

      The expendable objects

    Returns Promise<T[]>

  • Refer objects to the clipboard for drag & drop

    Parameters

    • _focus: T

      The item that has the focus and that will be dragged if the selection is empty, otherwise the current selection is referred

    Returns void

  • Retrieve objects from the clipboard, process and return them to add to the tree. Standard behaviour: if {@link: dragOver} yields "copy", return an array of clones of the objects in, otherwise the content of the dragDrop-clipboard.

    Parameters

    • _event: DragEvent

    Returns Promise<T[]>

  • Retrieve a string to create a label for the table item representing the object (appears not to be called yet)

    Parameters

    • _object: T

    Returns string

  • Retrieve objects from the clipboard, process and return them to add to the table
    Standard behaviour: if the copyPaste clipboard was filled using copy, return an array of clones, otherwise the content of the clipboard

    Returns Promise<T[]>

  • Return false if renaming of object is not possibile, or true if the object was renamed

    Parameters

    • _object: T
    • _new: string

    Returns Promise<boolean>