Interface UserInterface

    • Method Detail

      • show

        void show()
        Shows the UI.

        Note that the actual UI components are created lazily when this method is called, rather then upon the UI's initial construction.

      • isVisible

        boolean isVisible()
        Whether this UI is visible onscreen.
      • show

        default void show​(Object o)
        Shows the object onscreen using an appropriate UI widget.
      • show

        void show​(String name,
                  Object o)
        Shows the object onscreen using an appropriate UI widget.
        Parameters:
        name - The name to use when displaying the object.
        o - The object to be displayed.
      • show

        void show​(Display<?> display)
        Shows the display onscreen using an appropriate UI widget.
      • getDesktop

        default Desktop getDesktop()
        Gets the desktop, for use with multi-document interfaces (MDI), or null if not applicable.
      • getApplicationFrame

        default ApplicationFrame getApplicationFrame()
        Gets the main SciJava application frame, or null if not applicable.
      • getToolBar

        default ToolBar getToolBar()
        Gets the main SciJava toolbar, or null if not applicable.
      • getStatusBar

        default StatusBar getStatusBar()
        Gets the main SciJava status bar, or null if not applicable.
      • getConsolePane

        default ConsolePane<?> getConsolePane()
        Gets the main SciJava console pane, or null if not applicable.
      • getSystemClipboard

        default SystemClipboard getSystemClipboard()
        Gets the system clipboard associated with this UI, or null if not applicable.
      • createDisplayWindow

        DisplayWindow createDisplayWindow​(Display<?> display)
        Creates a new display window housing the given display, or null if not applicable.
      • dialogPrompt

        DialogPrompt dialogPrompt​(String message,
                                  String title,
                                  DialogPrompt.MessageType messageType,
                                  DialogPrompt.OptionType optionType)
        Creates a dialog prompter.
        Parameters:
        message - The message in the dialog itself.
        title - The title of the dialog.
        messageType - The type of message. This typically is rendered as an icon next to the message. For example, DialogPrompt.MessageType.WARNING_MESSAGE typically appears as an exclamation point.
        optionType - The choices available when dismissing the dialog. These choices are typically rendered as buttons for the user to click.
        Returns:
        The newly created DialogPrompt object, or null if not applicable.
      • chooseFiles

        default File[] chooseFiles​(File parent,
                                   File[] files,
                                   FileFilter filter,
                                   String style)
        Prompts the user to choose a list of files.
        Parameters:
        parent - Parent folder for file selection
        files - The initial value displayed in the file chooser prompt.
        filter - A filter allowing to restrict file choice.
        style - File selection style (files, directories, or both) and optional filters
        Returns:
        The selected Files chosen by the user, or null if the user cancels the prompt.
      • chooseFiles

        default List<File> chooseFiles​(File parent,
                                       List<File> fileList,
                                       FileFilter filter,
                                       String style)
        Prompts the user to choose a list of files.
        Parameters:
        parent - Parent folder for file selection
        fileList - The initial value displayed in the file chooser prompt.
        filter - A filter allowing to restrict file choice.
        style - File selection style (files, directories, or both) and optional filters
        Returns:
        The selected Files chosen by the user, or null if the user cancels the prompt.
      • showContextMenu

        void showContextMenu​(String menuRoot,
                             Display<?> display,
                             int x,
                             int y)
        Displays a popup context menu for the given display at the specified position.
      • saveLocation

        void saveLocation()
        Persists the application frame's current location.
      • restoreLocation

        void restoreLocation()
        Restores the application frame's current location.
      • requiresEDT

        boolean requiresEDT()
        Returns true if this UI requires the EDT.