@jimka/typescript-ui / component/container / WindowHeader
Class: WindowHeader
Defined in: src/typescript/lib/component/container/WindowHeader.ts:38
A window title bar component with an embedded times glyph close button and an optional title icon shown to the west of the title text.
Extends Header by anchoring a close button to the east side and exposing an optional title-icon slot on the west.
Extends
Constructors
new WindowHeader()
new WindowHeader(text: string, options?: WindowHeaderOptions): WindowHeaderDefined in: src/typescript/lib/component/container/WindowHeader.ts:45
Parameters
text
string
options?
Returns
Overrides
Methods
addComponent()
addComponent(component: Component, constraints?: LayoutConstraints): thisDefined in: src/typescript/lib/core/Component.ts:2774
Adds a child component, appends its element, wires preferred-size change propagation, and triggers layout.
Parameters
component
The child component to add.
constraints?
Optional. Layout constraints to pass to the layout manager.
Returns
this
Inherited from
addComponents()
addComponents(...specs: (
| Component<ComponentOptions>
| ConstrainedComponent
| (
| Component<ComponentOptions>
| ConstrainedComponent)[])[]): thisDefined in: src/typescript/lib/core/Component.ts:2752
Adds multiple child components in a single call, with optional per-component layout constraints.
Each argument is either a Component (added with no constraints), a ConstrainedComponent pair (added with the supplied constraints), or an array of either form (each entry is processed in order). All three forms can be freely mixed in the same call.
Parameters
specs
...( | Component<ComponentOptions> | ConstrainedComponent | ( | Component<ComponentOptions> | ConstrainedComponent)[])[]
The components to add. Each entry is a bare Component, a ConstrainedComponent pair, or an array of either.
Returns
this
This component, for method chaining.
Inherited from
addExitButtonListener()
addExitButtonListener(listener: Function): thisDefined in: src/typescript/lib/component/container/WindowHeader.ts:179
Registers a click listener on the window close button.
Parameters
listener
Function
The callback to invoke when the close button is clicked.
Returns
this
applyStyle()
applyStyle(element: HTMLElement): thisDefined in: src/typescript/lib/core/Component.ts:2580
Writes all current style properties to the given element and its associated CSS rule.
Parameters
element
HTMLElement
The HTMLElement to apply styles to.
Returns
this
This component, for method chaining.
Remarks
Clears all existing inline styles on the element before re-applying, ensuring a clean state.
Inherited from
clearAnimation()
clearAnimation(): thisDefined in: src/typescript/lib/core/Component.ts:2268
Removes the CSS animation property from the component's CSS rule.
Returns
this
This component, for method chaining.
Inherited from
clearAppearance()
clearAppearance(): thisDefined in: src/typescript/lib/core/Component.ts:1314
Removes both the -webkit-appearance and appearance CSS properties.
Returns
this
This component, for method chaining.
Inherited from
clearBackgroundColor()
clearBackgroundColor(): thisDefined in: src/typescript/lib/core/Component.ts:950
Removes the background-color CSS property so the element inherits from its parent.
Returns
this
This component, for method chaining.
Inherited from
clearBackgroundImage()
clearBackgroundImage(): thisDefined in: src/typescript/lib/core/Component.ts:989
Removes the background-image CSS property from the component's CSS rule.
Returns
this
This component, for method chaining.
Inherited from
clearBorder()
clearBorder(): thisDefined in: src/typescript/lib/core/Component.ts:1086
Clears the component's border by applying an explicit 0-width, none-style, black-colour border on every side. The longhand writes guarantee the cleared state overrides any inherited or class-level border styling.
Returns
this
This component, for method chaining.
Inherited from
clearBorderImage()
clearBorderImage(): thisDefined in: src/typescript/lib/core/Component.ts:1354
Removes the border-image CSS property from the element.
Returns
this
This component, for method chaining.
Inherited from
clearBorderRadius()
clearBorderRadius(): thisDefined in: src/typescript/lib/core/Component.ts:1198
Removes the border-radius CSS property from the element.
Returns
this
This component, for method chaining.
Inherited from
clearColorScheme()
clearColorScheme(): thisDefined in: src/typescript/lib/core/Component.ts:1059
Removes the color-scheme CSS property from the element.
Returns
this
This component, for method chaining.
Inherited from
clearContain()
clearContain(): thisDefined in: src/typescript/lib/core/Component.ts:2225
Removes the contain CSS property from the component's CSS rule.
Returns
this
This component, for method chaining.
Inherited from
clearCursor()
clearCursor(): thisDefined in: src/typescript/lib/core/Component.ts:1156
Removes the inline cursor style from the element.
Returns
this
This component, for method chaining.
Inherited from
clearForegroundColor()
clearForegroundColor(): thisDefined in: src/typescript/lib/core/Component.ts:1028
Removes the color (foreground) CSS property so the element inherits from its parent.
Returns
this
This component, for method chaining.
Inherited from
clearGlyph()
clearGlyph(): thisDefined in: src/typescript/lib/component/container/WindowHeader.ts:139
Removes the title icon from the header, if one is present.
Returns
this
This component, for method chaining.
clearInsets()
clearInsets(): thisDefined in: src/typescript/lib/core/Component.ts:862
Resets the component's insets to zero on all sides.
Returns
this
This component, for method chaining.
Remarks
Companion to setInsets. Resets to new Insets(0, 0, 0, 0) — semantically a "reset to default" rather than a CSS-level clear.
Inherited from
clearOpacity()
clearOpacity(): thisDefined in: src/typescript/lib/core/Component.ts:2407
Removes the opacity property from the element's inline style, restoring full opacity from the CSS rule or default.
Returns
this
This component, for method chaining.
Inherited from
clearOutline()
clearOutline(): thisDefined in: src/typescript/lib/core/Component.ts:1274
Removes the outline CSS property from the element.
Returns
this
This component, for method chaining.
Inherited from
clearOverflow()
clearOverflow(): thisDefined in: src/typescript/lib/core/Component.ts:2095
Removes the overflow CSS property from the component's CSS rule.
Returns
this
This component, for method chaining.
Inherited from
clearOverflowX()
clearOverflowX(): thisDefined in: src/typescript/lib/core/Component.ts:2138
Removes the overflow-x CSS property from the component's CSS rule.
Returns
this
This component, for method chaining.
Inherited from
clearOverflowY()
clearOverflowY(): thisDefined in: src/typescript/lib/core/Component.ts:2181
Removes the overflow-y CSS property from the component's CSS rule.
Returns
this
This component, for method chaining.
Inherited from
clearPadding()
clearPadding(): thisDefined in: src/typescript/lib/core/Component.ts:911
Resets the CSS padding to zero on all sides.
Returns
this
This component, for method chaining.
Remarks
Companion to setPadding. Writes "0px 0px 0px 0px" rather than removing the property — preserves the legacy setPadding(null) behaviour as a reset, not a CSS-level clear.
Inherited from
clearPointerEvents()
clearPointerEvents(): thisDefined in: src/typescript/lib/core/Component.ts:2365
Removes the inline pointer-events property from the element.
Returns
this
This component, for method chaining.
Inherited from
clearPosition()
clearPosition(): thisDefined in: src/typescript/lib/core/Component.ts:2055
Removes the explicit position override from the component's CSS rule. The framework default (Position.ABSOLUTE) reported by getPosition remains in effect.
Returns
this
This component, for method chaining.
Inherited from
clearShadow()
clearShadow(): thisDefined in: src/typescript/lib/core/Component.ts:1237
Removes the box-shadow by writing "none" (preserving the legacy setShadow(null) semantic — not a removeProperty).
Returns
this
This component, for method chaining.
Inherited from
clearTransform()
clearTransform(): thisDefined in: src/typescript/lib/core/Component.ts:1397
Removes the transform CSS property from the element.
Returns
this
This component, for method chaining.
Inherited from
clearUserSelect()
clearUserSelect(): thisDefined in: src/typescript/lib/core/Component.ts:2526
Removes the user-select CSS property from the component's CSS rule.
Returns
this
This component, for method chaining.
Inherited from
clearVerticalAlign()
clearVerticalAlign(): thisDefined in: src/typescript/lib/core/Component.ts:1738
Removes the vertical-align CSS property from the element.
Returns
this
This component, for method chaining.
Inherited from
clearWhiteSpace()
clearWhiteSpace(): thisDefined in: src/typescript/lib/core/Component.ts:2485
Removes the white-space CSS property from the component's CSS rule.
Returns
this
This component, for method chaining.
Inherited from
delAttribute()
delAttribute(key: string): thisDefined in: src/typescript/lib/core/Component.ts:726
Removes a component-level attribute from both the internal map and the DOM element.
Parameters
key
string
The attribute name to remove.
Returns
this
Inherited from
delLayoutConstraints()
delLayoutConstraints(component: Component):
| undefined
| null
| LayoutConstraintsDefined in: src/typescript/lib/core/Component.ts:2967
Removes and returns the layout constraints for a child component.
Parameters
component
The child component whose constraints to remove.
Returns
| undefined | null | LayoutConstraints
The removed LayoutConstraints, or null if no layout manager is set.
Inherited from
doChildrenComponentLayouts()
doChildrenComponentLayouts(): thisDefined in: src/typescript/lib/core/Component.ts:3042
Calls doLayout on each direct child component.
Returns
this
This component, for method chaining.
Inherited from
Header.doChildrenComponentLayouts
doLayout()
doLayout(): thisDefined in: src/typescript/lib/core/Component.ts:3060
Delegates layout to the layout manager unless layout is currently paused.
Returns
this
This component, for method chaining.
Remarks
Throws an Error if no layout manager has been set.
Inherited from
flushLayout()
flushLayout(): thisDefined in: src/typescript/lib/core/Component.ts:3107
Forces a synchronous layout pass on this component, removing it from the scheduled-layout queue if it was pending. Use when a layout-derived value must be read before the next animation frame.
Returns
this
This component, for method chaining.
Inherited from
focus()
focus(): thisDefined in: src/typescript/lib/core/Component.ts:2542
Moves browser focus to this component's DOM element.
Returns
this
This component, for method chaining.
Inherited from
getAnimation()
getAnimation(): null | stringDefined in: src/typescript/lib/core/Component.ts:2241
Returns the CSS animation shorthand value, or null if not set.
Returns
null | string
The CSS animation string, or null.
Inherited from
getAppearance()
getAppearance(): null | stringDefined in: src/typescript/lib/core/Component.ts:1287
Returns the CSS appearance value last passed to setAppearance, or null if no appearance override is set.
Returns
null | string
The appearance string, or null.
Inherited from
getAria()
getAria(): AriaDefined in: src/typescript/lib/core/Component.ts:797
Returns the Aria helper for this component, creating it lazily on first access.
Returns
The ARIA helper instance.
Inherited from
getAttribute()
getAttribute(key: string): undefined | StringDefined in: src/typescript/lib/core/Component.ts:698
Returns a component-level attribute value from the internal attributes map.
Parameters
key
string
The attribute name.
Returns
undefined | String
The stored attribute value, or undefined if not set.
Inherited from
getAutoCommitStyle()
getAutoCommitStyle(): booleanDefined in: src/typescript/lib/core/Component.ts:579
Returns whether style changes are immediately committed to the DOM.
Returns
boolean
True if auto-commit is enabled, false if changes are batched.
Inherited from
getBackgroundColor()
getBackgroundColor(): null | stringDefined in: src/typescript/lib/core/Component.ts:923
Returns the component's background color, or null if inherited.
Returns
null | string
The CSS color string, or null if none is set.
Inherited from
getBackgroundImage()
getBackgroundImage(): null | stringDefined in: src/typescript/lib/core/Component.ts:966
Returns the background image CSS value, or null if none is set.
Returns
null | string
The CSS background-image string, or null.
Inherited from
getBaseline()
getBaseline(): null | numberDefined in: src/typescript/lib/component/display/Header.ts:194
Returns the offset from the top of the header to the label's text baseline.
Returns
null | number
The baseline offset in pixels, or null when the label has no baseline.
Inherited from
getBorder()
getBorder(): null | BorderDefined in: src/typescript/lib/core/Component.ts:1075
Returns the Border instance, or null if no border is set.
Returns
null | Border
The current Border object, or null.
Inherited from
getBorderImage()
getBorderImage(): null | stringDefined in: src/typescript/lib/core/Component.ts:1330
Returns the CSS border-image value last passed to setBorderImage, or null if no border-image is set.
Returns
null | string
The border-image string, or null.
Inherited from
getBorderRadius()
getBorderRadius(): null | stringDefined in: src/typescript/lib/core/Component.ts:1172
Returns the CSS border-radius value, or null if not set.
Returns
null | string
The CSS border-radius string, or null.
Inherited from
getBorderSize()
getBorderSize(): PerimeterSizeDefined in: src/typescript/lib/core/Component.ts:1621
Returns the per-side pixel widths of the component's border.
Returns
A PerimeterSize with zero values on each side when no border is set.
Inherited from
getClassName()
getClassName(): stringDefined in: src/typescript/lib/core/BaseObject.ts:44
Returns the runtime class name of this object.
Returns
string
The name of the constructor function as a string.
Inherited from
getColorScheme()
getColorScheme(): null | stringDefined in: src/typescript/lib/core/Component.ts:1039
Returns
null | string
Inherited from
getComponents()
getComponents(): Component<ComponentOptions>[]Defined in: src/typescript/lib/core/Component.ts:2923
Returns the array of child components.
Returns
The live array of child Component instances.
Inherited from
getContain()
getContain(): null | stringDefined in: src/typescript/lib/core/Component.ts:2197
Returns the CSS contain value, or null if not set.
Returns
null | string
The CSS contain string, or null.
Inherited from
getCursor()
getCursor(): null | stringDefined in: src/typescript/lib/core/Component.ts:1130
Returns the current CSS cursor value.
Returns
null | string
The CSS cursor string, or null if not set.
Inherited from
getDisabledAttribute()
getDisabledAttribute(): booleanDefined in: src/typescript/lib/core/Component.ts:2284
Returns the cached state of the HTML disabled attribute on the element.
Returns
boolean
True when the disabled attribute is set, false otherwise.
Inherited from
getDisplay()
getDisplay(): stringDefined in: src/typescript/lib/core/Component.ts:2022
Returns the CSS display mode for this component.
Returns
string
The current display value (e.g. "block", "grid", "flex").
Inherited from
getElement()
getElement(createIfMissing: boolean): HTMLElementDefined in: src/typescript/lib/core/Component.ts:433
Returns the DOM element, querying by ID; creates and renders it if createIfMissing is true.
Parameters
createIfMissing
boolean = false
Optional. When true, renders and returns a new element if none exists in the DOM.
Returns
HTMLElement
The component's HTMLElement, or undefined if it does not exist and createIfMissing is false.
Inherited from
getElementAttribute()
getElementAttribute(key: string): undefined | null | stringDefined in: src/typescript/lib/core/Component.ts:484
Returns the value of a DOM element attribute, or undefined if the element is not in the DOM.
Parameters
key
string
The attribute name to retrieve.
Returns
undefined | null | string
The attribute value string, null if the attribute is absent, or undefined if the element is not in the DOM.
Inherited from
getForegroundColor()
getForegroundColor(): null | stringDefined in: src/typescript/lib/core/Component.ts:1001
Returns the foreground (text) color, or null if inherited.
Returns
null | string
The CSS color string, or null if none is set.
Inherited from
getGlyph()
getGlyph(): null | GlyphDefined in: src/typescript/lib/component/container/WindowHeader.ts:153
Returns the current title-glyph component, or null if none is set.
Returns
null | Glyph
The title Glyph, or null.
getHeight()
getHeight(): numberDefined in: src/typescript/lib/core/Component.ts:1844
Returns the component's current height in pixels.
Returns
number
The height in pixels, or 0 if the size is unavailable.
Inherited from
getId()
getId(): stringDefined in: src/typescript/lib/core/BaseObject.ts:24
Returns the unique identifier for this object.
Returns
string
The UUID string assigned at construction time.
Inherited from
getInnerSize()
getInnerSize():
| null
| {
height: number;
width: number;
}Defined in: src/typescript/lib/core/Component.ts:1599
Returns the usable inner size: component size minus insets and border widths.
Returns
| null | { height: number; width: number; }
The inner Size in pixels, or null if the element is not yet in the DOM.
Inherited from
getInsets()
getInsets(): InsetsDefined in: src/typescript/lib/core/Component.ts:835
Returns the component's insets (internal spacing used by layout managers).
Returns
The current Insets instance.
Inherited from
getLayoutConstraints()
getLayoutConstraints(component: Component):
| undefined
| LayoutConstraintsDefined in: src/typescript/lib/core/Component.ts:2934
Returns the layout constraints for a child component from the layout manager.
Parameters
component
The child component whose constraints to retrieve.
Returns
| undefined | LayoutConstraints
The LayoutConstraints for the component, or undefined if none are set.
Inherited from
getLayoutManager()
getLayoutManager(): LayoutManagerDefined in: src/typescript/lib/core/Component.ts:2981
Returns the layout manager currently attached to this component.
Returns
The current LayoutManager instance.
Inherited from
getMaxSize()
getMaxSize(): null | SizeDefined in: src/typescript/lib/core/Component.ts:1530
Returns the effective maximum size: the larger of the component and layout manager maximums.
Returns
null | Size
A Size object whose width and height are the element-wise maximums of the component and layout manager maximums.
Inherited from
getMinSize()
getMinSize(): null | SizeDefined in: src/typescript/lib/core/Component.ts:1463
Returns the effective minimum size: the larger of the component and layout manager minimums.
Returns
null | Size
A Size object whose width and height are the element-wise maximums of the component and layout manager minimums.
Inherited from
getOpacity()
getOpacity(): null | numberDefined in: src/typescript/lib/core/Component.ts:2382
Returns the opacity value last passed to setOpacity, or null if no opacity has been set.
Returns
null | number
The opacity number, or null.
Inherited from
getOutline()
getOutline(): null | stringDefined in: src/typescript/lib/core/Component.ts:1250
Returns the CSS outline value last passed to setOutline, or null if no outline is set.
Returns
null | string
The outline string, or null.
Inherited from
getOverflow()
getOverflow(): null | stringDefined in: src/typescript/lib/core/Component.ts:2071
Returns the CSS overflow value.
Returns
null | string
The CSS overflow string, or null if not set.
Inherited from
getOverflowX()
getOverflowX(): null | stringDefined in: src/typescript/lib/core/Component.ts:2111
Returns the CSS overflow-x value, or null if not set.
Returns
null | string
The CSS overflow-x string, or null.
Inherited from
getOverflowY()
getOverflowY(): null | stringDefined in: src/typescript/lib/core/Component.ts:2154
Returns the CSS overflow-y value, or null if not set.
Returns
null | string
The CSS overflow-y string, or null.
Inherited from
getPadding()
getPadding(): null | InsetsDefined in: src/typescript/lib/core/Component.ts:875
Returns the CSS padding insets for this component.
Returns
null | Insets
The current padding Insets, or null if none are set.
Inherited from
getParentComponent()
getParentComponent():
| null
| Component<ComponentOptions>Defined in: src/typescript/lib/core/Component.ts:2735
Returns the parent component this component was added to, or null if it has no parent.
Returns
| null | Component<ComponentOptions>
The parent Component, or null.
Inherited from
getPerimiterSize()
getPerimiterSize(): PerimeterSizeDefined in: src/typescript/lib/core/Component.ts:1644
Returns the total per-side consumed space: insets plus border widths.
Returns
A PerimeterSize where each side is the sum of the inset and border width for that side.
Inherited from
getPointerEvents()
getPointerEvents(): null | stringDefined in: src/typescript/lib/core/Component.ts:2341
Returns the inline pointer-events value last passed to setPointerEvents, or null if not set.
Returns
null | string
The pointer-events string, or null.
Inherited from
getPosition()
getPosition(): PositionDefined in: src/typescript/lib/core/Component.ts:1993
Returns the CSS position mode for this component.
Returns
The current Position value (e.g. Position.ABSOLUTE).
Inherited from
getPreferredSize()
getPreferredSize(): null | SizeDefined in: src/typescript/lib/core/Component.ts:1421
Returns the preferred size from the explicit override, layout manager, or current size.
Returns
null | Size
The preferred Size, determined in priority order: explicit override, layout manager, then current size.
Inherited from
getShadow()
getShadow(): null | stringDefined in: src/typescript/lib/core/Component.ts:1213
Returns the CSS box-shadow value, or null if not set.
Returns
null | string
The CSS box-shadow string, or null.
Inherited from
getSize()
getSize(): null | SizeDefined in: src/typescript/lib/core/Component.ts:1409
Returns the component's current width and height.
Returns
null | Size
A Size object with the current width and height in pixels.
Inherited from
getTag()
getTag(): stringDefined in: src/typescript/lib/core/Component.ts:359
Returns the HTML tag name used when creating this component's element.
Returns
string
The HTML tag string (e.g. "div", "button").
Inherited from
getText()
getText(): TextDefined in: src/typescript/lib/component/display/Header.ts:185
Returns the Text child used to display the header text.
Returns
The internal Text instance.
Inherited from
getTransform()
getTransform(): null | stringDefined in: src/typescript/lib/core/Component.ts:1373
Returns the CSS transform value last passed to setTransform, or null if no transform is set.
Returns
null | string
The transform string, or null.
Remarks
Reflects the value written to the component's CSS rule by setTransform. setTranslate writes transform as an inline style on a separate surface — its value is not reflected here. The two transform surfaces (rule vs. inline) are independent; the cached value here is the rule-side value only.
Inherited from
getTranslateX()
getTranslateX(): numberDefined in: src/typescript/lib/core/Component.ts:1948
Returns the cached translate-X component of the element's transform (pixels).
Returns
number
The translate-X value last passed to setTranslate, or 0.
Inherited from
getTranslateY()
getTranslateY(): numberDefined in: src/typescript/lib/core/Component.ts:1957
Returns the cached translate-Y component of the element's transform (pixels).
Returns
number
The translate-Y value last passed to setTranslate, or 0.
Inherited from
getUserSelect()
getUserSelect(): null | stringDefined in: src/typescript/lib/core/Component.ts:2502
Returns the user-select value last passed to setUserSelect, or null if no value has been set.
Returns
null | string
The user-select string, or null.
Inherited from
getVerticalAlign()
getVerticalAlign(): null | stringDefined in: src/typescript/lib/core/Component.ts:1718
Returns
null | string
Inherited from
getWhiteSpace()
getWhiteSpace(): null | stringDefined in: src/typescript/lib/core/Component.ts:2455
Returns the CSS white-space value last written by setWhiteSpace, or null if cleared.
Returns
null | string
The white-space string, or null.
Inherited from
getWidth()
getWidth(): numberDefined in: src/typescript/lib/core/Component.ts:1806
Returns the component's current width in pixels.
Returns
number
The width in pixels, or 0 if the size is unavailable.
Inherited from
getWillChange()
getWillChange(): null | stringDefined in: src/typescript/lib/core/Component.ts:2419
Returns the cached will-change value last passed to setWillChange.
Returns
null | string
The active hint string, or null if no hint is set.
Inherited from
getX()
getX(): numberDefined in: src/typescript/lib/core/Component.ts:1882
Returns the component's horizontal position (CSS left) in pixels.
Returns
number
The left offset in pixels.
Inherited from
getY()
getY(): numberDefined in: src/typescript/lib/core/Component.ts:1915
Returns the component's vertical position (CSS top) in pixels.
Returns
number
The top offset in pixels.
Inherited from
hasElementAttribute()
hasElementAttribute(key: string): undefined | booleanDefined in: src/typescript/lib/core/Component.ts:467
Returns whether the DOM element has the given attribute set.
Parameters
key
string
The attribute name to check.
Returns
undefined | boolean
True if the attribute exists, false otherwise, or undefined if the element is not in the DOM.
Inherited from
insertComponent()
insertComponent(
component: Component,
index: number,
constraints?: LayoutConstraints): thisDefined in: src/typescript/lib/core/Component.ts:2819
Inserts a child component at the given index, appends its element at the matching DOM position, wires preferred-size change propagation, and triggers layout.
Parameters
component
The child component to insert.
index
number
Zero-based insertion index. Values outside [0, children.length] are clamped.
constraints?
Optional. Layout constraints to pass to the layout manager.
Returns
this
Remarks
Use this when child order matters — for example, placing a leading glyph before an existing label without removing and re-appending the label. addComponent(c, …) is the append-at-end shortcut for insertComponent(c, children.length, …).
Inherited from
isLayoutPaused()
isLayoutPaused(): booleanDefined in: src/typescript/lib/core/Component.ts:3012
Returns true if layout has been paused for this component.
Returns
boolean
True if layout passes are currently suppressed.
Inherited from
isVisible()
isVisible(): null | BooleanDefined in: src/typescript/lib/core/Component.ts:738
Returns the visibility state, or null if inherited from the parent.
Returns
null | Boolean
True if explicitly visible, false if explicitly hidden, null if inheriting from the parent.
Inherited from
pauseLayout()
pauseLayout(): thisDefined in: src/typescript/lib/core/Component.ts:3019
Suspends automatic layout passes until resumeLayout is called.
Returns
this
Inherited from
removeAllComponents()
removeAllComponents(): thisDefined in: src/typescript/lib/core/Component.ts:2892
Removes all child components and their DOM elements without triggering layout.
Returns
this
This component, for method chaining.
Inherited from
removeComponent()
removeComponent(component:
| Number
| Component<ComponentOptions>):
| undefined
| null
| LayoutConstraintsDefined in: src/typescript/lib/core/Component.ts:2862
Removes a child component by instance or index, detaches its element, and triggers layout.
Parameters
component
The Component instance to remove, or a Number index into the children array.
Number | Component<ComponentOptions>
Returns
| undefined | null | LayoutConstraints
The layout constraints that were registered for the removed component, or undefined.
Inherited from
removeElement()
removeElement(): thisDefined in: src/typescript/lib/core/Component.ts:449
Removes the component's DOM element from the document.
Returns
this
Inherited from
resumeLayout()
resumeLayout(): thisDefined in: src/typescript/lib/core/Component.ts:3030
Resumes layout and immediately triggers a doLayout pass.
Returns
this
This component, for method chaining.
Inherited from
scheduleLayout()
scheduleLayout(): thisDefined in: src/typescript/lib/core/Component.ts:3086
Queues a layout pass to run on the next animation frame. Multiple calls within the same frame coalesce into a single doLayout() call; if an ancestor is also scheduled, the ancestor's recursion subsumes this component and its scheduled pass is skipped.
Returns
this
This component, for method chaining.
Remarks
Honors pauseLayout(). Callers that need a synchronous layout commit (e.g. before reading getInnerSize) should call flushLayout() instead.
Inherited from
setActive()
setActive(active: boolean): thisDefined in: src/typescript/lib/component/container/WindowHeader.ts:162
Toggles the title bar appearance between the focused and unfocused states.
Parameters
active
boolean
True to show the focused (gradient) background; false for the unfocused (flat) background.
Returns
this
setAnimation()
setAnimation(value: string): thisDefined in: src/typescript/lib/core/Component.ts:2252
Sets the CSS animation shorthand on the component's CSS rule.
Parameters
value
string
A CSS animation shorthand (e.g. "ts-ui-spin 0.8s linear infinite").
Returns
this
This component, for method chaining.
Inherited from
setAppearance()
setAppearance(value: string): thisDefined in: src/typescript/lib/core/Component.ts:1298
Sets the CSS appearance on the element. Use clearAppearance to remove.
Parameters
value
string
A CSS appearance value (e.g. "none", "auto").
Returns
this
This component, for method chaining.
Inherited from
setAttribute()
setAttribute(key: string, value: string): thisDefined in: src/typescript/lib/core/Component.ts:708
Stores a component-level attribute and mirrors it onto the DOM element.
Parameters
key
string
The attribute name.
value
string
The attribute value. Passing null delegates to delAttribute.
Returns
this
Inherited from
setAutoCommitStyle()
setAutoCommitStyle(value: boolean): thisDefined in: src/typescript/lib/core/Component.ts:588
Enables or disables auto-commit; flushing all pending style and CSS rule changes when re-enabled.
Parameters
value
boolean
True to enable immediate commits; false to batch changes until manually flushed.
Returns
this
Inherited from
setBackgroundColor()
setBackgroundColor(backgroundColor: string): thisDefined in: src/typescript/lib/core/Component.ts:934
Sets the background color CSS property. Use clearBackgroundColor to inherit.
Parameters
backgroundColor
string
A CSS color string.
Returns
this
This component, for method chaining.
Inherited from
setBackgroundImage()
setBackgroundImage(backgroundImage: string): thisDefined in: src/typescript/lib/core/Component.ts:977
Sets the CSS background-image property. Use clearBackgroundImage to remove.
Parameters
backgroundImage
string
A CSS background-image string.
Returns
this
This component, for method chaining.
Inherited from
setBorder()
setBorder(options:
| string
| BorderOptions): thisDefined in: src/typescript/lib/core/Component.ts:1101
Creates and applies a border from options.
Parameters
options
Border configuration (style, width, color), or a CSS border shorthand string. Use clearBorder to clear the border explicitly.
string | BorderOptions
Returns
this
This component, for method chaining.
Inherited from
setBorderImage()
setBorderImage(value: string): thisDefined in: src/typescript/lib/core/Component.ts:1341
Sets the CSS border-image shorthand on the element. Use clearBorderImage to remove.
Parameters
value
string
A CSS border-image value (e.g. "none").
Returns
this
This component, for method chaining.
Inherited from
setBorderRadius()
setBorderRadius(borderRadius: string): thisDefined in: src/typescript/lib/core/Component.ts:1183
Sets the CSS border-radius on the element. Use clearBorderRadius to remove.
Parameters
borderRadius
string
A CSS border-radius string (e.g. "4px").
Returns
this
This component, for method chaining.
Inherited from
setColorScheme()
setColorScheme(colorScheme: string): thisDefined in: src/typescript/lib/core/Component.ts:1046
Parameters
colorScheme
string
Returns
this
This component, for method chaining.
Inherited from
setContain()
setContain(value: string): thisDefined in: src/typescript/lib/core/Component.ts:2209
Sets the CSS contain property on the component's CSS rule. Hints the rendering engine that descendants are isolated from external layout/paint.
Parameters
value
string
A CSS contain value (e.g. "layout", "strict", "layout paint").
Returns
this
This component, for method chaining.
Inherited from
setCursor()
setCursor(cursor: string): thisDefined in: src/typescript/lib/core/Component.ts:1141
Sets the CSS cursor style on the element.
Parameters
cursor
string
A CSS cursor value (e.g. "pointer", "text", "default").
Returns
this
This component, for method chaining.
Inherited from
setDisabledAttribute()
setDisabledAttribute(value: boolean): thisDefined in: src/typescript/lib/core/Component.ts:2298
Sets the HTML disabled attribute on the underlying element.
Distinct from setEnabled on input subclasses, which carries semantic + ARIA + visual state. This setter only toggles the HTML attribute.
Parameters
value
boolean
True to add disabled, false to remove it.
Returns
this
This component, for method chaining.
Inherited from
setDisplay()
setDisplay(value: string): thisDefined in: src/typescript/lib/core/Component.ts:2037
Sets the CSS display mode (e.g. "grid", "flex", "inline-block").
Updates the cached display so that setDisplayed restores the correct mode when toggling visibility, and writes through to the per-component CSS rule.
Parameters
value
string
A valid CSS display value.
Returns
this
This component, for method chaining.
Inherited from
setDisplayed()
setDisplayed(value: boolean): thisDefined in: src/typescript/lib/core/Component.ts:812
Shows or hides the component using CSS display; hidden components take no space.
Parameters
value
boolean
True to show the component, false to set display to "none".
Returns
this
This component, for method chaining.
Inherited from
setForegroundColor()
setForegroundColor(foregroundColor: string): thisDefined in: src/typescript/lib/core/Component.ts:1012
Sets the CSS color (text color). Use clearForegroundColor to inherit.
Parameters
foregroundColor
string
A CSS color string.
Returns
this
This component, for method chaining.
Inherited from
setGlyph()
setGlyph(name: string): thisDefined in: src/typescript/lib/component/container/WindowHeader.ts:119
Sets or clears the title icon shown to the west of the header text.
Parameters
name
string
Registry glyph name to display, or null to remove the icon.
Returns
this
This component, for method chaining.
Remarks
Swaps the optional leading glyph child of the permanent title row built by the constructor. The inherited title text always lives inside that row, so the two never overlap and Border's WEST slot only ever tracks one component.
setHeight()
setHeight(height: number): thisDefined in: src/typescript/lib/core/Component.ts:1860
Sets the component height and updates the DOM element's inline style.
Parameters
height
number
The new height in pixels.
Returns
this
This component, for method chaining.
Inherited from
setId()
setId(id: string): thisDefined in: src/typescript/lib/core/Component.ts:678
Sets the component ID and updates the DOM element's id attribute if the element exists.
Parameters
id
string
The new unique identifier for this component.
Returns
this
Inherited from
setInsets()
setInsets(insets: Insets): thisDefined in: src/typescript/lib/core/Component.ts:846
Sets the component's insets. Use clearInsets to reset to zero.
Parameters
insets
The new Insets.
Returns
this
This component, for method chaining.
Inherited from
setLayoutConstraints()
setLayoutConstraints(component: Component, constraints?: LayoutConstraints):
| undefined
| LayoutConstraintsDefined in: src/typescript/lib/core/Component.ts:2950
Registers layout constraints for a child component with the layout manager.
Parameters
component
The child component to constrain.
constraints?
Optional. The layout constraints to apply.
Returns
| undefined | LayoutConstraints
Inherited from
setLayoutManager()
setLayoutManager(layoutManager: LayoutManager): thisDefined in: src/typescript/lib/core/Component.ts:2990
Detaches the current layout manager, attaches the new one, and stores the class name as an attribute.
Parameters
layoutManager
The new LayoutManager to use for this component.
Returns
this
Inherited from
setMaxSize()
setMaxSize(width: number, height: number): thisDefined in: src/typescript/lib/core/Component.ts:1575
Sets the maximum size and applies it to the CSS rule.
Parameters
width
number
The maximum width in pixels. Pass Number.MAX_VALUE to remove the constraint.
height
number
The maximum height in pixels. Pass Number.MAX_VALUE to remove the constraint.
Returns
this
This component, for method chaining.
Inherited from
setMinSize()
setMinSize(width: number, height: number): thisDefined in: src/typescript/lib/core/Component.ts:1508
Sets the minimum size and applies it to the CSS rule.
Parameters
width
number
The minimum width in pixels.
height
number
The minimum height in pixels.
Returns
this
This component, for method chaining.
Inherited from
setOpacity()
setOpacity(value: number): thisDefined in: src/typescript/lib/core/Component.ts:2393
Sets the CSS opacity property on the element.
Parameters
value
number
A number between 0 (fully transparent) and 1 (fully opaque). Use clearOpacity to remove the property.
Returns
this
This component, for method chaining.
Inherited from
setOutline()
setOutline(outline: string): thisDefined in: src/typescript/lib/core/Component.ts:1261
Sets the CSS outline on the element. Use clearOutline to remove.
Parameters
outline
string
A CSS outline value (e.g. "none", "2px solid blue").
Returns
this
This component, for method chaining.
Inherited from
setOverflow()
setOverflow(overflow: string): thisDefined in: src/typescript/lib/core/Component.ts:2082
Sets the CSS overflow property on the component's CSS rule.
Parameters
overflow
string
A CSS overflow value (e.g. "hidden", "auto", "visible").
Returns
this
This component, for method chaining.
Inherited from
setOverflowX()
setOverflowX(value: string): thisDefined in: src/typescript/lib/core/Component.ts:2122
Sets the CSS overflow-x property on the component's CSS rule.
Parameters
value
string
A CSS overflow value (e.g. "hidden", "auto", "visible").
Returns
this
This component, for method chaining.
Inherited from
setOverflowY()
setOverflowY(value: string): thisDefined in: src/typescript/lib/core/Component.ts:2165
Sets the CSS overflow-y property on the component's CSS rule.
Parameters
value
string
A CSS overflow value (e.g. "hidden", "auto", "visible").
Returns
this
This component, for method chaining.
Inherited from
setPadding()
setPadding(padding: Insets): thisDefined in: src/typescript/lib/core/Component.ts:886
Sets the CSS padding. Use clearPadding to reset to "0px 0px 0px 0px".
Parameters
padding
The new padding Insets.
Returns
this
This component, for method chaining.
Inherited from
setPointerEvents()
setPointerEvents(value: string): thisDefined in: src/typescript/lib/core/Component.ts:2352
Sets the CSS pointer-events property on the element.
Parameters
value
string
A CSS pointer-events value (e.g. "none", "auto").
Returns
this
This component, for method chaining.
Inherited from
setPosition()
setPosition(position: Position): thisDefined in: src/typescript/lib/core/Component.ts:2004
Sets the CSS position mode and updates the component's CSS rule.
Parameters
position
The CSS position mode to apply (e.g. Position.ABSOLUTE, Position.STATIC).
Returns
this
This component, for method chaining.
Inherited from
setPreferredSize()
setPreferredSize(width: number, height: number): thisDefined in: src/typescript/lib/core/Component.ts:1444
Sets an explicit preferred size; triggers the onPreferredSizeChange callback if changed.
Parameters
width
number
The preferred width in pixels.
height
number
The preferred height in pixels.
Returns
this
This component, for method chaining.
Inherited from
setShadow()
setShadow(shadow: string): thisDefined in: src/typescript/lib/core/Component.ts:1224
Sets the CSS box-shadow. Use clearShadow to set the shadow to "none".
Parameters
shadow
string
A CSS box-shadow string.
Returns
this
This component, for method chaining.
Inherited from
setSize()
setSize(size: Size): thisDefined in: src/typescript/lib/core/Component.ts:1782
Sets width and height, updates the DOM element, and triggers doLayout.
Parameters
size
The new Size with width and height in pixels.
Returns
this
This component, for method chaining.
Inherited from
setTransform()
setTransform(value: string): thisDefined in: src/typescript/lib/core/Component.ts:1384
Sets the CSS transform on the element. Use clearTransform to remove.
Parameters
value
string
A CSS transform value (e.g. "translateY(-1px)").
Returns
this
This component, for method chaining.
Inherited from
setTranslate()
setTranslate(x: number, y: number): thisDefined in: src/typescript/lib/core/Component.ts:1971
Writes the element's transform to translate3d(x, y, 0). This positions on the compositor without triggering layout/paint, complementing setX/setY (left/top). Visual position of the element is left + translateX, top + translateY.
Parameters
x
number
Translate-X in pixels.
y
number
Translate-Y in pixels.
Returns
this
This component, for method chaining.
Inherited from
setUserSelect()
setUserSelect(value: string): thisDefined in: src/typescript/lib/core/Component.ts:2513
Sets the CSS user-select property on the element.
Parameters
value
string
A CSS user-select value (e.g. "none", "auto", "text").
Returns
this
This component, for method chaining.
Inherited from
setVerticalAlign()
setVerticalAlign(align: string): thisDefined in: src/typescript/lib/core/Component.ts:1725
Parameters
align
string
Returns
this
This component, for method chaining.
Inherited from
setVisible()
setVisible(value: Boolean): thisDefined in: src/typescript/lib/core/Component.ts:749
Sets visibility; true = visible, false = hidden, null/falsy = inherit from parent.
Parameters
value
Boolean
True to show the component, false to hide it, or a falsy non-boolean to inherit.
Returns
this
Remarks
Throws an Error if value is a non-boolean truthy value.
Inherited from
setWhiteSpace()
setWhiteSpace(value: string): thisDefined in: src/typescript/lib/core/Component.ts:2472
Sets the CSS white-space property on the component's CSS rule.
Parameters
value
string
A CSS white-space value (e.g. "nowrap", "normal", "pre").
Returns
this
This component, for method chaining.
Remarks
Previously declared on Text; promoted to Component because the property has no Text-specific semantics. The _whiteSpace backing field that applyStyle already consults on re-render lives here, so caching during the setter call keeps the post-render state in lockstep with the cached value.
Inherited from
setWidth()
setWidth(width: number): thisDefined in: src/typescript/lib/core/Component.ts:1822
Sets the component width and updates the DOM element's inline style.
Parameters
width
number
The new width in pixels.
Returns
this
This component, for method chaining.
Inherited from
setWillChange()
setWillChange(value: null | string): thisDefined in: src/typescript/lib/core/Component.ts:2437
Sets the CSS will-change hint on the element, pre-promoting it to its own compositor layer so the first transform/scroll frame doesn't pay a layer-creation cost. Pass null to clear the hint and release the layer.
Parameters
value
A CSS will-change value (e.g. "transform") or null to clear.
null | string
Returns
this
This component, for method chaining.
Remarks
The hint costs GPU memory and is ignored by browsers past a per-page threshold (~50–100 elements). Set it only over the active-motion lifetime (drag, pool membership, scroll-target lifetime) and clear it promptly when motion ends.
Inherited from
setX()
setX(x: number): thisDefined in: src/typescript/lib/core/Component.ts:1893
Sets the CSS left position and updates the DOM element's inline style.
Parameters
x
number
The horizontal offset in pixels.
Returns
this
This component, for method chaining.
Inherited from
setY()
setY(y: number): thisDefined in: src/typescript/lib/core/Component.ts:1926
Sets the CSS top position and updates the DOM element's inline style.
Parameters
y
number
The vertical offset in pixels.
Returns
this
This component, for method chaining.
Inherited from
setZIndex()
setZIndex(value: number): thisDefined in: src/typescript/lib/core/Component.ts:781
Sets the CSS z-index of the component.
Parameters
value
number
The z-index value.
Returns
this
Inherited from
sortComponents()
sortComponents(comparator:
| undefined
| Comparator<Component<ComponentOptions>, Component<ComponentOptions>>): thisDefined in: src/typescript/lib/core/Component.ts:2912
Sorts the children array in place using the given comparator function.
Parameters
comparator
Optional. A comparator function that receives two Components and returns a number.
undefined | Comparator<Component<ComponentOptions>, Component<ComponentOptions>>
Returns
this
This component, for method chaining.
Inherited from
sync()
sync(): voidDefined in: src/typescript/lib/core/Component.ts:2721
Re-applies all styles to the existing DOM element, syncing state after external changes.
Returns
void
Inherited from
unfocus()
unfocus(): thisDefined in: src/typescript/lib/core/Component.ts:2559
Removes browser focus from this component's DOM element.
Returns
this
This component, for method chaining.