Interface AlertState

All Known Implementing Classes:
AlertState.Alert, AlertState.Loading, AlertState.Nothing

public sealed interface AlertState permits AlertState.Loading, AlertState.Nothing, AlertState.Alert
Represents the display state of an AlertOption.

There are three mutually exclusive states:

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 Classes
    Modifier and Type
    Interface
    Description
    static final record 
    A state that shows an alert message with an optional expandable details section and severity level.
    static final record 
    A state that shows a loading spinner inside the alert panel.
    static final record 
    A state that hides the alert panel entirely.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final AlertState
    A state that shows a loading spinner inside the alert panel.
    static final AlertState
    A state that hides the alert panel entirely.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static AlertState
    of(String message)
    Creates an INFO-level alert with a summary message and no extra details.
    static AlertState
    of(String message, String extraDetails)
    Creates an INFO-level alert with a summary message and an expandable details section.
    static AlertState
    of(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

      static final AlertState LOADING
      A state that shows a loading spinner inside the alert panel.
    • NOTHING

      static final AlertState 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

      static AlertState of(String message)
      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.Alert with the given message
    • of

      static AlertState of(String message, String extraDetails)
      Creates an INFO-level alert with a summary message and an expandable details section.
      Parameters:
      message - the short summary shown directly in the panel
      extraDetails - longer text shown in a separate dialog when the user clicks "More details", or null if no details button should be shown
      Returns:
      an INFO-level AlertState.Alert with the given message and details
    • of

      static AlertState of(String message, String extraDetails, AlertPanel.AlertLevel level)
      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 panel
      extraDetails - longer text shown in a separate dialog when the user clicks "More details", or null if no details button should be shown
      level - the severity level that controls the icon and color of the alert
      Returns:
      an AlertState.Alert with the given message, details, and level