Class ServerSelector

java.lang.Object
qupath.lib.gui.panes.ServerSelector

public class ServerSelector extends Object
Helper class for selecting one image server out of a collection.
  • Method Details

    • createFromBuilders

      public static ServerSelector createFromBuilders(Collection<? extends ImageServerBuilder.ServerBuilder<BufferedImage>> builders)
    • create

      public static ServerSelector create(Collection<? extends ImageServer<BufferedImage>> servers)
    • promptToSelectImage

      public ImageServer<BufferedImage> promptToSelectImage(String prompt, boolean alwaysShow)
      Prompt to select a single ImageServer.
      Parameters:
      prompt - a one-word prompt to use in the title or button; typically "Open", "Import" or "Select"
      alwaysShow - if true, always show the prompt; if false, it won't be shown if it isn't necessary (i.e. there are 0 or 1 servers).
      Returns:
      the selected server, or null if no server was selected
    • promptToSelectImages

      public List<ImageServer<BufferedImage>> promptToSelectImages(String prompt)
      Prompt to select multiple ImageServers.
      Parameters:
      prompt - a one-word prompt to use in the title or button; typically "Open", "Import" or "Select"
      Returns:
      the selected servers, or empty list if no servers were selected