An object implementing the
PanelBuilder interface builds views for
std:ui:panel standard templates, and renders them.
PanelBuilder adds the following features over constructing view yourself.
- It’s designed for passing to multiple co-operating plugins to build a combined user interface. The
std_action_panelplugin uses it to render Elements containing panel elements from multiple plugins.
- Each panel element has a priority, and elements are sorted according to their priority before rendering.
PanelBuildersupports multiple panels, treated as a single element, so user interface can be logically grouped.
All builder functions return the
PanelBuilder object itself for easy chaining.
O.ui.panel() with your required options.
Interface (panel elements)
These builder functions add panel elements.
function element(priority, element)
Add a generic panel element to this panel, with the given
element is the view for this element, described in panel element views.
function link(priority, href, label, indicator)
Add a simple link to the panel with the given
indicator is optional.
function status(priority, text)
Add a panel element displaying the status of a process.
function relatedInfo(priority, href, label, heading)
Add a panel element as a link to related information which isn’t an integral part of the current process.
These builder functions create and configure the individual panels.
PanelBuilder for the given priority.
PanelBuilder will be returned for each
priority value. All returned
PanelBuilders are related, and calling
panel() on any of them will return the same object. The
PanelBuilder returned by
O.ui.panel() has a priority of
title of this panel.
highlight value for this panel. The default highlight value is set by the
highlight for the supported values.
Add additional space above this panel.
Prevent this panel from being rendered. It’s intended to allow customisations to remove user interface from other plugins which isn’t required for a particular application.
Prevents any panel on this
PanelBuilder from being rendered. It’s intended to allow customisations to remove user interface from other plugins which isn’t required for a particular application.
These rendering functions should only be called on the root
PanelBuilder returned by
Render the panel, returning HTML.
Deferred render of the panel, returning a object which can be used with the render() template function.
At least one of the builders returns
true if this individual panel should be rendered. It must have some elements and
hidePanel() must not have been called.