A container component that can contain a collection of child components.
Components can be added at construction time through the ContainerConfig#components setting, or later
through the Container#addComponent method. The UIManager automatically takes care of all components, i.e. it
initializes and configures them automatically.
In the DOM, the container consists of an outer
(that can be configured by the config) and an inner wrapper
that contains the components. This double-
-structure is often required to achieve many advanced effects
in CSS and/or JS, e.g. animations and certain formatting with absolute positioning.
Configures the component for the supplied Player and UIInstanceManager. This is the place where all the magic
happens, where components typically subscribe and react to events (on their DOM element, the Player, or the
UIInstanceManager), and basically everything that makes them interactive.
This method is called only once, when the UIManager initializes the UI.
Subclasses usually overwrite this method to add their own functionality.
Disables the component.
This method basically transfers the component into the disabled state. Actual disabling is done via CSS or child
components. (e.g. Button needs to unsubscribe click listeners)
Returns void
enable
enable(): void
Enables the component.
This method basically transfers the component into the enabled state. Actual enabling is done via CSS or child
components. (e.g. Button needs to subscribe click listeners)
Returns the DOM element of this component. Creates the DOM element if it does not yet exist.
Should not be overwritten by subclasses.
Returns DOM
hasDomElement
hasDomElement(): boolean
Checks if this component has a DOM element.
Returns boolean
hide
hide(): void
Hides the component if shown.
This method basically transfers the component into the hidden state. Actual hiding is done via CSS.
Returns void
initialize
initialize(): void
Initializes the component, e.g. by applying config settings.
This method must not be called from outside the UI framework.
This method is automatically called by the UIInstanceManager. If the component is an inner component of
some component, and thus encapsulated abd managed internally and never directly exposed to the UIManager,
this method must be called from the managing component's #initialize method.
Returns void
isDisabled
isDisabled(): boolean
Determines if the component is disabled.
Returns boolean
true if the component is disabled, else false
isEnabled
isEnabled(): boolean
Determines if the component is enabled.
Returns boolean
true if the component is enabled, else false
isHidden
isHidden(): boolean
Determines if the component is hidden.
Returns boolean
true if the component is hidden, else false
isHovered
isHovered(): boolean
Determines if the component is currently hovered.
Returns boolean
true if the component is hovered, else false
isShown
isShown(): boolean
Determines if the component is shown.
Returns boolean
true if the component is visible, else false
release
release(): void
Releases all resources and dependencies that the component holds. Player, DOM, and UIManager events are
automatically removed during release and do not explicitly need to be removed here.
This method is called by the UIManager when it releases the UI.
Subclasses that need to release resources should override this method and call super.release().
A container component that can contain a collection of child components. Components can be added at construction time through the ContainerConfig#components setting, or later through the Container#addComponent method. The UIManager automatically takes care of all components, i.e. it initializes and configures them automatically.
In the DOM, the container consists of an outer
DOM example:
... child components ...
Type Parameters
Hierarchy (view full)
Index
Constructors
Accessors
Methods
Constructors
constructor
Type Parameters
Parameters
Returns Container<Config>
Accessors
on Disabled
Gets the event that is fired when the component is disabling. See the detailed explanation on event architecture on the #componentEvents events list.
Returns Event<Component<Config>, NoArgs>
on Enabled
Gets the event that is fired when the component is enabling. See the detailed explanation on event architecture on the #componentEvents events list.
Returns Event<Component<Config>, NoArgs>
on Hide
Gets the event that is fired when the component is hiding. See the detailed explanation on event architecture on the #componentEvents events list.
Returns Event<Component<Config>, NoArgs>
on Hover Changed
Gets the event that is fired when the component's hover-state is changing.
Returns Event<Component<Config>, ComponentHoverChangedEventArgs>
on Show
Gets the event that is fired when the component is showing. See the detailed explanation on event architecture on the #componentEvents events list.
Returns Event<Component<Config>, NoArgs>
on View Mode Changed
Gets the event that is fired when the
ViewMode
of this component has changed.Returns Event<Component<Config>, ViewModeChangedEventArgs>
Methods
add Component
Adds a child component to the container.
Parameters
the component to add
Returns void
configure
Configures the component for the supplied Player and UIInstanceManager. This is the place where all the magic happens, where components typically subscribe and react to events (on their DOM element, the Player, or the UIInstanceManager), and basically everything that makes them interactive. This method is called only once, when the UIManager initializes the UI.
Subclasses usually overwrite this method to add their own functionality.
Parameters
the player which this component controls
the UIInstanceManager that manages this component
Returns void
disable
Disables the component. This method basically transfers the component into the disabled state. Actual disabling is done via CSS or child components. (e.g. Button needs to unsubscribe click listeners)
Returns void
enable
Enables the component. This method basically transfers the component into the enabled state. Actual enabling is done via CSS or child components. (e.g. Button needs to subscribe click listeners)
Returns void
get Components
Gets an array of all child components in this container.
Returns Component<ComponentConfig>[]
get Config
Returns the configuration object of the component.
Returns Config
get Dom Element
Returns the DOM element of this component. Creates the DOM element if it does not yet exist.
Should not be overwritten by subclasses.
Returns DOM
has Dom Element
Checks if this component has a DOM element.
Returns boolean
hide
Hides the component if shown. This method basically transfers the component into the hidden state. Actual hiding is done via CSS.
Returns void
initialize
Initializes the component, e.g. by applying config settings. This method must not be called from outside the UI framework.
This method is automatically called by the UIInstanceManager. If the component is an inner component of some component, and thus encapsulated abd managed internally and never directly exposed to the UIManager, this method must be called from the managing component's #initialize method.
Returns void
is Disabled
Determines if the component is disabled.
Returns boolean
true if the component is disabled, else false
is Enabled
Determines if the component is enabled.
Returns boolean
true if the component is enabled, else false
is Hidden
Determines if the component is hidden.
Returns boolean
true if the component is hidden, else false
is Hovered
Determines if the component is currently hovered.
Returns boolean
true if the component is hovered, else false
is Shown
Determines if the component is shown.
Returns boolean
true if the component is visible, else false
release
Releases all resources and dependencies that the component holds. Player, DOM, and UIManager events are automatically removed during release and do not explicitly need to be removed here. This method is called by the UIManager when it releases the UI.
Subclasses that need to release resources should override this method and call super.release().
Returns void
remove Component
Removes a child component from the container.
Parameters
the component to remove
Returns boolean
true if the component has been removed, false if it is not contained in this container
remove Components
Removes all child components from the container.
Returns void
set Aria Attr
Parameters
Returns void
set Aria Label
Parameters
Returns void
show
Shows the component if hidden.
Returns void
toggle Hidden
Toggles the hidden state by hiding the component if it is shown, or showing it if hidden.
Returns void
Settings
On This Page
Constructors
Accessors
Methods