Home Manual Reference Source Repository
import {StackItemContainer} from 'ug-layout/stack/StackItemContainer'
public class | source

StackItemContainer

Extends:

Renderable → StackItemContainer

Implements:

A renderable that is a direct child of a stack. Handles a renderable item.

Constructor Summary

Public Constructor
public

constructor(_config: StackItemContainerConfig, _container: Stack)

Creates an instance of StackItemContainer.

Member Summary

Public Members
public get
public get
public get
public get
public get
public get

height: *

public get
public get

offsetX: *

public get

offsetY: *

public get

tab: *

public get

title: *

public get

width: *

Method Summary

Public Methods
public

addControl(control: *, options: {})

public
public
public

handleDrop(item: *, dropArea: *, e: *)

public
public
public

isVisible(): *

public
public
public

render(): *

public

setContainer(container: *)

Inherited Summary

From class Renderable
public get

This renderables container or null if none.

public get
public get

This renderables height in pixels.

public get

The injector used to create this renderable.

public get

Whether this renderable is destroyed.

public get

The amount of content items belonging to this renderable.

public get

This renderables page offset x.

public get

This renderables page offset y.

public get

A unique identifier for this renderable.

public get

This renderables width in pixels.

public
public
public

tags: *

public

addChild(item: Renderable, options: AddChildArgs)

Adds a child item to this renderable.

public

Whether a renderable is a descendant of this renderable.

public

createChild(renderable: RenderableArg<T>, providers: ProviderArg[]): T

Creates a child renderable using this renderable as it's container.

public

destroy(): void

Destroys this renderable and all it's children.

public

emit(event: T)

Emits a BusEvent on this renderable.

public

emitDown(event: T)

Emits a BusEvent down to all descendants recursively.

public

emitUp(event: T)

Emits a BusEvent up to all parents recursively.

public

Gets the renderable area of this renderable.

public

Gets a content renderable at an index.

public

Returns this renderables children renderables.

public

Gets all descendants of this renderable recursively.

public

Gets the index of a content renderable.

public

getParent(Ctor: Type<T>): T | null

Gets this renderables parent or any parent that is an instance of the passed in constructor.

public

getParents(Ctor: Type<T>): T | null

Gets this renderables parents or any parents that are an instance of the passed in constructor.

public

Handles any cleanup from a drop.

public

Invoked when the Injector has been assigned and ready for use.

public

Whether this renderable is a descendant of another renderable.

public

Whether this renderable can be dropped on.

public

Determines whether this renderable is visible.

public

remove()

Removes this item from it's parent. If there is no parent then this renderable will just be destroyed.

public

Removes a content item from this renderable.

public

replaceChild(item: Renderable, withItem: Renderable, options: RemoveChildArgs)

Replaces a content item on this renderable with another content item.

public

resize()

Sets this components size and triggers it's childrens sizing.

public

scope(Event: Type<T>): Observable<T>

Creates an Observable scoped to a specific event type.

public

setContainer(container: Renderable | null)

Sets the container of this renderable.

public

subscribe(Event: Type<T>, observer: PartialObserver<T> | function(event: T)): Subscription

Subscribes to a BusEvent.

Public Constructors

public constructor(_config: StackItemContainerConfig, _container: Stack) source

Creates an instance of StackItemContainer.

Override:

Renderable#constructor

Params:

NameTypeAttributeDescription
_config StackItemContainerConfig
_container Stack

Public Members

public get closeable: * source

public get container: * source

This renderables container or null if none.

Override:

Renderable#container

public get controls: undefined[] source

public get draggable: * source

public get droppable: * source

public get height: * source

This renderables height in pixels.

Override:

Renderable#height

public get isActive: * source

public get offsetX: * source

This renderables page offset x.

Override:

Renderable#offsetX

public get offsetY: * source

This renderables page offset y.

Override:

Renderable#offsetY

public get tab: * source

public get title: * source

public get width: * source

This renderables width in pixels.

Override:

Renderable#width

Public Methods

public addControl(control: *, options: {}) source

Params:

NameTypeAttributeDescription
control *
options {}
  • optional
  • default: {}

public getChildren(): undefined[] source

Returns this renderables children renderables. This differs from content items as children should contain all renderables we want as part of the render cycle.

Override:

Renderable#getChildren

Return:

undefined[]

public getHighlightCoordinates(args: *): * source

Params:

NameTypeAttributeDescription
args *

Return:

*

public handleDrop(item: *, dropArea: *, e: *) source

Params:

NameTypeAttributeDescription
item *
dropArea *
e *

public initialize() source

Invoked when the Injector has been assigned and ready for use.

Override:

Renderable#initialize

public isDroppable(): * source

Whether this renderable can be dropped on.

Override:

Renderable#isDroppable

Return:

*

public isVisible(): * source

Determines whether this renderable is visible.

Override:

Renderable#isVisible

Return:

*

public makeVisible() source

public onDropHighlightExit() source

public render(): * source

Return:

*

public setContainer(container: *) source

Sets the container of this renderable.

Override:

Renderable#setContainer

Params:

NameTypeAttributeDescription
container *