A contract for widgets that want to store and restore their inner state, between sessions.

Hierarchy (view full)

Implements

Constructors

Properties

Methods

addClipboardListener addEventListener addKeyListener addUpdateListener applyFontStyles clearFlag createContainerAttributes createNodeAttributes createNodeClassNames createNodeStyle decorateCaption decorateIcon decorateNodeStyle deflateForStorage disableScrollBarFocus dispose doFocus doHandleExpansionToggleDblClickEvent doRenderNodeRow doToggle doUpdateDecorations doUpdateRows getCaptionAttributes getCaptionChildren getContainerTreeNode getDecorationData getDecorations getDefaultNodeStyle getDepthForNode getDepthPadding getIconClass getNodeToFocus getPaddingLeft getPreviewNode getScrollContainer getScrollToRow handleAuxClickEvent handleClickEvent handleContextMenuEvent handleDblClickEvent handleDown handleEnter handleEscape handleExpansionToggleDblClickEvent handleLeft handleMiddleClickEvent handleRight handleSpace handleUp hasCtrlCmdMask hasShiftMask hasTrailingSuffixes inflateFromStorage init isExpandable needsActiveIndentGuideline needsExpansionTogglePadding onActivateRequest onAfterAttach onAfterDetach onBeforeAttach onBeforeDetach onCloseRequest onResize onUpdateRequest render renderCaption renderCaptionAffixes renderCheckbox renderExpansionToggle renderIcon renderIndent renderNode renderNodeRow renderTailDecorations renderTailDecorationsForNode renderTree restoreState rowIsSelected scrollToSelected setFlag shouldDisplayNode shouldRenderIndent storeState tapNode toContextMenuArgs toNodeDescription toNodeIcon toNodeName toNodeRow toReactNode toggle toggleChecked updateGlobalSelection updateScrollToRow

Constructors

Properties

ScrollingRowRenderer: FC<{
    rows: NodeRow[];
}> = ...

Type declaration

contextMenuRenderer: ContextMenuRenderer
corePreferences: CorePreferences
decorations: Map<string, core.Data[]> = ...
decoratorService: TreeDecoratorService
focusService: TreeFocusService
labelProvider: LabelProvider
lastScrollState: undefined | {
    scrollLeft: number;
    scrollTop: number;
}

Store the last scroll state.

Type declaration

  • scrollLeft: number

    The scroll left value.

  • scrollTop: number

    The scroll top value.

model: TreeModel
nodeRoot: Root
onDidChangeVisibility: Event<boolean> = ...
onDidChangeVisibilityEmitter: Emitter<boolean> = ...
onDidDispose: Event<void> = ...
onDidDisposeEmitter: Emitter<void> = ...
onScrollUp: Event<void> = ...
onScrollUpEmitter: Emitter<void> = ...
onScrollYReachEnd: Event<void> = ...
onScrollYReachEndEmitter: Emitter<void> = ...
preferenceService: PreferenceService
props: TreeProps
rows: Map<string, NodeRow> = ...
scheduleUpdateScrollToRow: any = ...
scrollArea: Element = ...
scrollBar?: PerfectScrollbar
scrollOptions?: Options
scrollToRow: undefined | number

Row index to ensure visibility.

  • Used to forcefully scroll if necessary.
searchBox: SearchBox
searchBoxFactory: SearchBoxFactory
searchHighlights: Map<string, CaptionHighlight>
selectionService: SelectionService
shouldScrollToRow: boolean = true
toDispose: DisposableCollection = ...
toDisposeOnDetach: DisposableCollection = ...
treeIndent: number = 8
treeSearch: TreeSearch
updateDecorations: any = ...

Update tree decorations.

  • Updating decorations are debounced in order to limit the number of expensive updates.
updateRows: any = ...
view: undefined | core.View

Methods

  • Decorate the tree caption.

    Parameters

    • node: TreeNode

      the tree node.

    • attrs: HTMLAttributes<HTMLElement>

      the additional attributes.

    Returns Attributes & HTMLAttributes<HTMLElement>

  • Decorate the node style.

    Parameters

    • node: TreeNode

      the tree node.

    • style: undefined | CSSProperties

      the optional CSS properties.

    Returns undefined | CSSProperties

    the CSS styles if available.

  • Actually handle the double-click mouse event on the expansion toggle.

    Parameters

    • event: MouseEvent<HTMLElement, MouseEvent>

      the double-click mouse event.

    Returns void

  • Determine the classes to use for an icon

    • Assumes a Font Awesome name when passed a single string, otherwise uses the passed string array

    Parameters

    • iconName: string | string[]

      the icon name or list of icon names.

    • additionalClasses: string[] = []

      additional CSS classes.

    Returns string

    the icon class name.

  • Handle the context menu click event.

    • The context menu click event is triggered by the right-click.

    Parameters

    • node: undefined | TreeNode

      the tree node if available.

    • event: MouseEvent<HTMLElement, MouseEvent>

      the right-click mouse event.

    Returns void

  • Handle the space key keyboard event.

    • If the element has a checkbox, it will be toggled.
    • Otherwise, it should be similar to a single-click action.

    Parameters

    • event: KeyboardEvent

      the space key keyboard event.

    Returns void

  • Determines whether an indentation div should be rendered for the specified tree node. If there are multiple tree nodes inside of a single rendered row, this method should only return true for the first node.

    Parameters

    Returns boolean