Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LayoutItem

An object which assists in the absolute layout of widgets.

Notes

This class is useful when implementing a layout which arranges its widgets using absolute positioning.

This class is used by nearly all of the built-in lumino layouts.

Hierarchy

  • LayoutItem

Implements

  • IDisposable

Index

Constructors

constructor

  • Construct a new layout item.

    Parameters

    • widget: Widget

      The widget to be managed by the item.

      Notes

      The widget will be set to absolute positioning.

    Returns LayoutItem

Properties

Private _disposed

_disposed: boolean = false

Private _height

_height: number = NaN

Private _left

_left: number = NaN

Private _maxHeight

_maxHeight: number = Infinity

Private _maxWidth

_maxWidth: number = Infinity

Private _minHeight

_minHeight: number = 0

Private _minWidth

_minWidth: number = 0

Private _top

_top: number = NaN

Private _width

_width: number = NaN

widget

widget: Widget

The widget managed by the layout item.

Accessors

isAttached

  • get isAttached(): boolean
  • Whether the managed widget is attached.

    Returns boolean

isDisposed

  • get isDisposed(): boolean
  • Whether the layout item is disposed.

    Returns boolean

isHidden

  • get isHidden(): boolean
  • Whether the managed widget is hidden.

    Returns boolean

isVisible

  • get isVisible(): boolean
  • Whether the managed widget is visible.

    Returns boolean

maxHeight

  • get maxHeight(): number
  • The computed maximum height of the widget.

    Notes

    This value can be updated by calling the fit method.

    Returns number

maxWidth

  • get maxWidth(): number
  • The computed maximum width of the widget.

    Notes

    This value can be updated by calling the fit method.

    Returns number

minHeight

  • get minHeight(): number
  • The computed minimum height of the widget.

    Notes

    This value can be updated by calling the fit method.

    Returns number

minWidth

  • get minWidth(): number
  • The computed minimum width of the widget.

    Notes

    This value can be updated by calling the fit method.

    Returns number

Methods

dispose

  • dispose(): void
  • Dispose of the the layout item.

    Notes

    This will reset the positioning of the widget.

    Returns void

fit

  • fit(): void
  • Update the computed size limits of the managed widget.

    Returns void

update

  • update(left: number, top: number, width: number, height: number): void
  • Update the position and size of the managed widget.

    Parameters

    • left: number

      The left edge position of the layout box.

    • top: number

      The top edge position of the layout box.

    • width: number

      The width of the layout box.

    • height: number

      The height of the layout box.

    Returns void

Generated using TypeDoc