A type alias for the layout fit policy.
The fit policy controls the computed size constraints which are applied to the parent widget by the layout.
Some layout implementations may ignore the fit policy.
A type alias for the horizontal alignment of a widget.
A type alias for the vertical alignment of a widget.
Construct a new layout.
The options for initializing the layout.
Get the fit policy for the layout.
The fit policy controls the computed size constraints which are applied to the parent widget by the layout.
Some layout implementations may ignore the fit policy.
Set the fit policy for the layout.
The fit policy controls the computed size constraints which are applied to the parent widget by the layout.
Some layout implementations may ignore the fit policy.
Changing the fit policy will clear the current size constraint for the parent widget and then re-fit the parent.
Test whether the layout is disposed.
Get the parent widget of the layout.
This is set automatically when installing the layout on the parent widget. The parent widget should not be set directly by user code.
Set the parent widget of the layout.
This is set automatically when installing the layout on the parent widget. The parent widget should not be set directly by user code.
Get the child widget for the layout.
Setting the child widget will cause the old child widget to be
automatically disposed. If that is not desired, set the parent
of the old child to null
before assigning a new child.
Set the child widget for the layout.
Setting the child widget will cause the old child widget to be
automatically disposed. If that is not desired, set the parent
of the old child to null
before assigning a new child.
Attach a widget to the parent's DOM node.
The widget to attach to the parent.
This method is called automatically by the single layout at the appropriate time. It should not be called directly by user code.
The default implementation adds the widgets's node to the parent's node at the proper location, and sends the appropriate attach messages to the widget if the parent is attached to the DOM.
Subclasses may reimplement this method to control how the widget's node is added to the parent's node.
Detach a widget from the parent's DOM node.
The widget to detach from the parent.
This method is called automatically by the single layout at the appropriate time. It should not be called directly by user code.
The default implementation removes the widget's node from the parent's node, and sends the appropriate detach messages to the widget if the parent is attached to the DOM.
Subclasses may reimplement this method to control how the widget's node is removed from the parent's node.
Dispose of the resources held by the layout.
Perform layout initialization which requires the parent widget.
Create an iterator over the widgets in the layout.
A new iterator over the widgets in the layout.
A message handler invoked on an 'after-attach'
message.
The default implementation of this method forwards the message to all widgets. It assumes all widget nodes are attached to the parent widget node.
This may be reimplemented by subclasses as needed.
A message handler invoked on an 'after-detach'
message.
The default implementation of this method forwards the message to all widgets. It assumes all widget nodes are attached to the parent widget node.
This may be reimplemented by subclasses as needed.
A message handler invoked on an 'after-hide'
message.
The default implementation of this method forwards the message to all non-hidden widgets. It assumes all widget nodes are attached to the parent widget node.
This may be reimplemented by subclasses as needed.
A message handler invoked on an 'after-show'
message.
The default implementation of this method forwards the message to all non-hidden widgets. It assumes all widget nodes are attached to the parent widget node.
This may be reimplemented by subclasses as needed.
A message handler invoked on a 'before-attach'
message.
The default implementation of this method forwards the message to all widgets. It assumes all widget nodes are attached to the parent widget node.
This may be reimplemented by subclasses as needed.
A message handler invoked on a 'before-detach'
message.
The default implementation of this method forwards the message to all widgets. It assumes all widget nodes are attached to the parent widget node.
This may be reimplemented by subclasses as needed.
A message handler invoked on a 'before-hide'
message.
The default implementation of this method forwards the message to all non-hidden widgets. It assumes all widget nodes are attached to the parent widget node.
This may be reimplemented by subclasses as needed.
A message handler invoked on a 'before-show'
message.
The default implementation of this method forwards the message to all non-hidden widgets. It assumes all widget nodes are attached to the parent widget node.
This may be reimplemented by subclasses as needed.
A message handler invoked on a 'child-hidden'
message.
The default implementation of this handler is a no-op.
A message handler invoked on a 'child-removed'
message.
This will remove the child widget from the layout.
Subclasses should not typically reimplement this method.
A message handler invoked on a 'child-shown'
message.
The default implementation of this handler is a no-op.
A message handler invoked on a 'fit-request'
message.
The default implementation of this handler is a no-op.
A message handler invoked on a 'resize'
message.
The layout should ensure that its widgets are resized according
to the specified layout space, and that they are sent a 'resize'
message if appropriate.
The default implementation of this method sends an UnknownSize
resize message to all widgets.
This may be reimplemented by subclasses as needed.
A message handler invoked on an 'update-request'
message.
The layout should ensure that its widgets are resized according
to the available layout space, and that they are sent a 'resize'
message if appropriate.
The default implementation of this method sends an UnknownSize
resize message to all widgets.
This may be reimplemented by subclasses as needed.
Process a message sent to the parent widget.
The message sent to the parent widget.
This method is called by the parent widget to process a message.
Subclasses may reimplement this method as needed.
Remove a widget from the layout.
The widget to remove from the layout.
A widget is automatically removed from the layout when its parent
is set to null
. This method should only be invoked directly when
removing a widget from a layout which has yet to be installed on a
parent widget.
This method does not modify the widget's parent
.
Get the horizontal alignment for a widget.
The widget of interest.
The horizontal alignment for the widget.
If the layout width allocated to a widget is larger than its max width, the horizontal alignment controls how the widget is placed within the extra horizontal space.
If the allocated width is less than the widget's max width, the horizontal alignment has no effect.
Some layout implementations may ignore horizontal alignment.
Get the vertical alignment for a widget.
The widget of interest.
The vertical alignment for the widget.
If the layout height allocated to a widget is larger than its max height, the vertical alignment controls how the widget is placed within the extra vertical space.
If the allocated height is less than the widget's max height, the vertical alignment has no effect.
Some layout implementations may ignore vertical alignment.
Set the horizontal alignment for a widget.
The widget of interest.
The value for the horizontal alignment.
If the layout width allocated to a widget is larger than its max width, the horizontal alignment controls how the widget is placed within the extra horizontal space.
If the allocated width is less than the widget's max width, the horizontal alignment has no effect.
Some layout implementations may ignore horizontal alignment.
Changing the horizontal alignment will post an update-request
message to widget's parent, provided the parent has a layout
installed.
Set the vertical alignment for a widget.
The widget of interest.
The value for the vertical alignment.
If the layout height allocated to a widget is larger than its max height, the vertical alignment controls how the widget is placed within the extra vertical space.
If the allocated height is less than the widget's max height, the vertical alignment has no effect.
Some layout implementations may ignore vertical alignment.
Changing the horizontal alignment will post an update-request
message to widget's parent, provided the parent has a layout
installed.
Generated using TypeDoc
A concrete layout implementation which holds a single widget.
Notes
This class is useful for creating simple container widgets which hold a single child. The child should be positioned with CSS.