Class OpenLocationAction

    • Constructor Detail

      • OpenLocationAction

        public OpenLocationAction()
        Create an open action. The name is "Open a file".
      • OpenLocationAction

        protected OpenLocationAction​(Shortcut shortcut)
        Create an open action. The name is "Open a file".
        Parameters:
        shortcut - action shortcut, can be null for subclasses
    • Method Detail

      • findDownloadTasks

        public Collection<DownloadTaskfindDownloadTasks​(String url,
                                                          boolean isRemotecontrol)
        Replies the list of download tasks accepting the given url.
        Parameters:
        url - The URL to open
        isRemotecontrol - True if download request comes from remotecontrol.
        Returns:
        The list of download tasks accepting the given url.
        Since:
        5691
      • findSummaryDocumentation

        public String findSummaryDocumentation()
        Summarizes acceptable urls for error message purposes.
        Returns:
        The HTML message to be displayed
        Since:
        6031
      • openUrl

        public List<Future<?>> openUrl​(boolean newLayer,
                                       String url)
        Open the given URL.
        Parameters:
        newLayer - true if the URL needs to be opened in a new layer, false otherwise
        url - The URL to open
        Returns:
        the list of tasks that have been started successfully (can be empty).
        Since:
        11986 (return type)
      • openUrl

        public List<Future<?>> openUrl​(DownloadParams settings,
                                       String url)
        Open the given URL.
        Parameters:
        settings - download settings
        url - The URL to open
        Returns:
        the list of tasks that have been started successfully (can be empty).
        Since:
        13927
      • openUrl

        public List<Future<?>> openUrl​(String url)
        Open the given URL. This class checks the USE_NEW_LAYER preference to check if a new layer should be used.
        Parameters:
        url - The URL to open
        Returns:
        the list of tasks that have been started successfully (can be empty).
        Since:
        11986 (return type)
      • openUrl

        public List<Future<?>> openUrl​(boolean newLayer,
                                       boolean zoomToData,
                                       String url)
        Open the given URL.
        Parameters:
        newLayer - true if the URL needs to be opened in a new layer, false otherwise
        zoomToData - true to zoom to entire newly downloaded data, false otherwise
        url - The URL to open
        Returns:
        the list of tasks that have been started successfully (can be empty).
        Since:
        13261
      • openUrl

        public List<Future<?>> openUrl​(DownloadParams settings,
                                       boolean zoomToData,
                                       String url)
        Open the given URL.
        Parameters:
        settings - download settings
        zoomToData - true to zoom to entire newly downloaded data, false otherwise
        url - The URL to open
        Returns:
        the list of tasks that have been started successfully (can be empty).
        Since:
        13927
      • warnNoSuitableTasks

        protected void warnNoSuitableTasks​(String url)
        Displays an error message dialog that no suitable tasks have been found for the given url.
        Parameters:
        url - the given url