interface-generics {iSEE} | R Documentation |
An overview of the generics for defining the user interface (UI) for each panel as well as some recommendations on their implementation.
In .defineInterface(x, se, select_info)
, the required arguments are:
x
, an instance of a Panel class.
se
, a SummarizedExperiment object containing the current dataset.
This can be assumed to have been produced by running .refineParameters(x, se)
.
select_info
, a list of two lists, single
and multiple
,
each of which contains the character vectors row
and column
.
This specifies the panels available for transmitting single/multiple selections on the rows/columns,
see ?.multiSelectionDimension
and ?.singleSelectionDimension
for more details.
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.
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.
In .hideInterface(x, field)
, the required arguments are:
x
, an instance of a Panel class.
field
, string containing the name of a slot of x
.
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.
Aaron Lun