interface-generics {iSEE}R Documentation

Generics for the panel interface

Description

An overview of the generics for defining the user interface (UI) for each panel as well as some recommendations on their implementation.

Defining the parameter interface

In .defineInterface(x, se, select_info), the required arguments are:

Methods for this generic are expected to return a list of collapseBox elements. Each parameter box can contain arbitrary numbers of additional UI elements, each of which is expected to modify one slot of x upon user interaction.

The ID of each interface element should follow the form of PANEL_SLOT where PANEL is the panel name (from .getEncodedName(x)) and SLOT is the name of the slot modified by the interface element, e.g., "ReducedDimensionPlot1_Type". Each interface element should have an equivalent observer in .createObservers unless they are hidden by .hideInterface (see below).

It is the developer's responsibility to call callNextMethod to obtain interface elements for parent classes. Refer to the contract for each Panel class to determine what is already provided by each parent.

Defining the data parameter interface

In .defineDataInterface(x, se, select_info), the required arguments are the same as those for .defineInterface. Methods for this generic are expected to return a list of UI elements for altering data-related parameters, which are automatically placed inside the “Data parameters” collapsible box. Each element's ID should still follow the PANEL_SLOT pattern described above.

This method aims to provide a simpler alternative to specializing .defineInterface for the most common use case, where new panels wish to add their own interface elements for altering the contents of the panel. In fact, .defineInterface,Panel-method will simply call .defineDataInterface to populate the data parameter box.

It is the developer's responsibility to call callNextMethod to obtain interface elements for parent classes. Refer to the contract for each Panel class to determine what is already provided by each parent.

Hiding interface elements

In .hideInterface(x, field), the required arguments are:

Methods for this generic are expected to return a logical scalar indicating whether the interface element corresponding to field should be hidden from the user. This is useful for hiding UI elements that cannot be changed or have no effect.

It is the developer's responsibility to call callNextMethod to hide the same interface elements as parent classes. This is not strictly required if one wishes to expose previously hidden elements. Refer to the contract for each Panel class to determine what is already provided by each parent.

Author(s)

Aaron Lun


[Package iSEE version 2.0.0 Index]