Interface AlertState
- All Known Implementing Classes:
AlertState.Alert,AlertState.Loading,AlertState.Nothing
Represents the display state of an
AlertOption.
There are three mutually exclusive states:
AlertState.Nothing– the alert panel is hidden. Use theNOTHINGconstant.AlertState.Loading– the alert panel shows a loading spinner. Use theLOADINGconstant. Generally used while waiting for an operation/status.AlertState.Alert– the alert panel shows a message with an optional expandable details section and a severity level. Create with one of theof(java.lang.String)factory methods.
A common flow is to show AlertState.Nothing until a button is clicked, then to show AlertState.Loading while waiting for the status/operation to update,
and then finally to show AlertState.Alert for any errors/warnings/info.
An AlertOption can be added to an Options panel using
Options.addAlertOption(String, AlertState).
- Since:
- API 4.202700 (Geneious 2027.0.0)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA state that shows an alert message with an optional expandable details section and severity level.static final recordA state that shows a loading spinner inside the alert panel.static final recordA state that hides the alert panel entirely. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AlertStateA state that shows a loading spinner inside the alert panel.static final AlertStateA state that hides the alert panel entirely. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic AlertStateCreates an INFO-level alert with a summary message and no extra details.static AlertStateCreates an INFO-level alert with a summary message and an expandable details section.static AlertStateof(String message, String extraDetails, AlertPanel.AlertLevel level) Creates an alert with a summary message, an optional expandable details section, and a severity level.
-
Field Details
-
LOADING
A state that shows a loading spinner inside the alert panel. -
NOTHING
A state that hides the alert panel entirely. Note: this hides the message but retains the space occupied by the AlertPanel
-
-
Method Details
-
of
Creates an INFO-level alert with a summary message and no extra details.- Parameters:
message- the short summary shown directly in the panel- Returns:
- an INFO-level
AlertState.Alertwith the given message
-
of
Creates an INFO-level alert with a summary message and an expandable details section.- Parameters:
message- the short summary shown directly in the panelextraDetails- longer text shown in a separate dialog when the user clicks "More details", ornullif no details button should be shown- Returns:
- an INFO-level
AlertState.Alertwith the given message and details
-
of
Creates an alert with a summary message, an optional expandable details section, and a severity level.- Parameters:
message- the short summary shown directly in the panelextraDetails- longer text shown in a separate dialog when the user clicks "More details", ornullif no details button should be shownlevel- the severity level that controls the icon and color of the alert- Returns:
- an
AlertState.Alertwith the given message, details, and level
-