Private flag that is set to true after an update-request.
This is used by the layout algorithm to ensure that all subtrees updated properly, since some Phosphor containers will skip updating in certain cases.
The absolute size of this region. May be pre-defined, or calculated. May
be undefined until the first call to
DashboardLayoutRegion#sizeContentToFit()
The dataset for the widget's DOM node.
A signal emitted when the widget is disposed.
An immutable ID assigned to this layout region that is unique within it's dashboard
Test whether the widget's node is attached to the DOM.
Test whether the widget has been disposed.
Test whether the widget is explicitly hidden.
Test whether the widget is visible.
A widget is visible when it is attached to the DOM, is not explicitly hidden, and has no explicitly hidden ancestors.
Get the DOM node owned by the widget.
Set the parent of the widget.
Children are typically added to a widget by using a layout, which means user code will not normally set the parent widget directly.
The widget will be automatically removed from its old parent.
This is a no-op if there is no effective parent change.
The title object for the widget.
The title object is used by some container widgets when displaying the widget alongside some title, such as a tab panel or side bar.
Since not all widgets will use the title, it is created on demand.
The owner
property of the title is set to this widget.
The titlebar for this region.
An Observable that emits whenever this region becomes stale
The content of this layout region. The content is where children and content should go, as this will be given the "main area" of the region. The titlebar will, if shown, take up the top 1em of the region.
The content of this layout region. The content is where children and content should go, as this will be given the "main area" of the region. The titlebar will, if shown, take up the top 1em of the region.
Whether this region is currently focused by the MavenWorks framework
Whether this region has changes that it's parent hasn't acknowledged
This is used by the framework to track dirtiness and update reactively.
The Layout Manager that owns this region
A layout region that controls this region. For root regions and regions that are not attached, this returns null.
A layout region that controls this region. For root regions and regions that are not attached, this returns null.
A key-value dictionary of metadata that defines how this layout region should display itself
A key-value dictionary of metadata that defines how this layout region should display itself
An immutable ID assigned to this layout region that is unique within it's dashboard
Post an 'activate-request'
message to the widget.
This is a simple convenience method for posting the message.
Add a class name to the widget's DOM node.
The class name to add to the node.
If the class name is already added to the node, this is a no-op.
The class name must not contain whitespace.
Attach a new element to this region's chrome.
Region chroming is a way of attaching transient or parent-specific elements to the DOM, without interfering with the base class or the implementation of the region children.
To remove the chrome, simply #dispose()
it.
Region chroming is automatically cleared whenever the parentRegion changes.
Create an iterator over the widget's children.
A new iterator over the children of the widget.
The widget must have a populated layout in order to have children.
If a layout is not installed, the returned iterator will be empty.
Send a 'close-request'
message to the widget.
This is a simple convenience method for sending the message.
Test whether a widget is a descendant of this widget.
The descendant widget of interest.
true
if the widget is a descendant, false
otherwise.
Post a 'fit-request'
message to the widget.
This is a simple convenience method for posting the message.
Focus this region.
Get the default value for a layout property.
Return the value of a layout region property.
This should fall back to default values if the property is undefined, and respect per-property logic (such as flexSize/fixedSize precedence)
The name of the layout property to retrieve
Test whether the widget's DOM node has the given class name.
The class name of interest.
true
if the node has the class, false
otherwise.
Invoke the message processing routine of the widget's layout.
The message to dispatch to the layout.
This is a no-op if the widget does not have a layout.
This will not typically be called directly by user code.
A handler that is called after this region has lost focus.
The default implementation is a no-op.
A message handler invoked on an 'after-detach'
message.
The default implementation of this handler is a no-op.
A handler that is called after this region has recieved focus.
The default implementation is a no-op.
A message handler invoked on an 'after-hide'
message.
The default implementation of this handler is a no-op.
A message handler invoked on an 'after-show'
message.
The default implementation of this handler is a no-op.
A message handler invoked on a 'before-attach'
message.
The default implementation of this handler is a no-op.
A handler that is called before this region is about to lose focus.
The default implementation is a no-op.
A handler that is called before this region is about to recieve focus.
The default implementation is a no-op.
A message handler invoked on a 'before-hide'
message.
The default implementation of this handler is a no-op.
A message handler invoked on a 'before-show'
message.
The default implementation of this handler is a no-op.
A message handler invoked on a 'child-added'
message.
The default implementation of this handler is a no-op.
A message handler invoked on a 'child-removed'
message.
The default implementation of this handler is a no-op.
Close this layout region and dispose of it.
Phosphor defaults to merely unparenting a region when it's closed- Dashboard layouts don't really need this.
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 default implementation of this handler is a no-op.
A message handler invoked on an 'update-request'
message.
The default implementation of this handler is a no-op.
Remove a class name from the widget's DOM node.
The class name to remove from the node.
If the class name is not yet added to the node, this is a no-op.
The class name must not contain whitespace.
Acknowledge changes in this part
This function is called by the framework, and should not be called by user code.
Show or hide the widget according to a boolean value.
true
to hide the widget, or false
to show it.
This is a convenience method for hide()
and show()
.
Set a layout property and update this region as appropriate.
Mark this region as having changes that need to be synced with something
Examples of this include layout properties, which need to be saved to a model, and added/removed children, which need the dashboard to issue update requests.
Size the content of the layout region to fit within the given bounds
This is normally called by the dashboarding framework, or by layout regions with children after they have fit themselves.
Subclassers may implement additional logic that is relevant to how they should be displayed, such as background color.
The width and height that the layout region should fit into.
Test whether the given widget flag is set.
This will not typically be called directly by user code.
Toggle a class name on the widget's DOM node.
The class name to toggle on the node.
Whether to force add the class (true
) or force
remove the class (false
). If not provided, the presence of
the class will be toggled from its current state.
true
if the class is now present, false
otherwise.
The class name must not contain whitespace.
Post an 'update-request'
message to the widget.
This is a simple convenience method for posting the message.
Update the region's actual size in the DOM.
This is called whenever the region recieves an update-request
Get metadata about this layout region, for display in UI editors.
Attach a widget to a host DOM node.
The widget of interest.
The DOM node to use as the widget's host.
The child of host
to use as the reference element.
If this is provided, the widget will be inserted before this
node in the host. The default is null
, which will cause the
widget to be added as the last child of the host.
This will throw an error if the widget is not a root widget, if the widget is already attached, or if the host is not attached to the DOM.
Detach the widget from its host DOM node.
The widget of interest.
This will throw an error if the widget is not a root widget, or if the widget is not attached to the DOM.
Generated using TypeDoc
An abstract representation of a DashboardLayoutRegion. All things that might appear in a Dashboard layout should subclass this.
Defines some layout framework classes for the handling of layout in Phosphor.