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

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
      • findDownloadTasks

        public java.util.Collection<DownloadTaskfindDownloadTasks​(java.lang.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 java.lang.String findSummaryDocumentation()
        Summarizes acceptable urls for error message purposes.
        Returns:
        The HTML message to be displayed
        Since:
        6031
      • openUrl

        public java.util.List<java.util.concurrent.Future<?>> openUrl​(boolean newLayer,
                                                                      java.lang.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 java.util.List<java.util.concurrent.Future<?>> openUrl​(DownloadParams settings,
                                                                      java.lang.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 java.util.List<java.util.concurrent.Future<?>> openUrl​(java.lang.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 java.util.List<java.util.concurrent.Future<?>> openUrl​(boolean newLayer,
                                                                      boolean zoomToData,
                                                                      java.lang.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 java.util.List<java.util.concurrent.Future<?>> openUrl​(DownloadParams settings,
                                                                      boolean zoomToData,
                                                                      java.lang.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
      • askWhichTasksToLoad

        java.util.Collection<DownloadTaskaskWhichTasksToLoad​(java.util.Collection<DownloadTask> tasks)
        Asks the user which of the possible tasks to perform.
        Parameters:
        tasks - a list of possible tasks
        Returns:
        the selected tasks from the user or an empty list if the dialog has been canceled
      • warnNoSuitableTasks

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

        public final boolean addDownloadTaskClass​(java.lang.Class<? extends DownloadTask> taskClass)
        Adds a new download task to the supported ones.
        Parameters:
        taskClass - The new download task to add
        Returns:
        true (as specified by Collection.add(E))