Class AvailableExtensionsPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class AvailableExtensionsPanel extends JPanel
This panel queries a remote UpdateSource for a list of compatible extensions with this application, then allows them to be downloaded, installed, or updated.
Since:
swing-extras 2.5
Author:
scorbo2
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • isRestartRequired

      public boolean isRestartRequired()
    • tabActivated

      public void tabActivated()
      Invoked from ExtensionManagerDialog when our tab becomes active - if we have no currently-selected UpdateSource, we'll prompt for one. There is also a manual "refresh" button on this tab, but it may not be immediately intuitive for the user when first visiting this tab to click it, so we can make it happen automatically on first visit.
    • initComponents

      protected void initComponents()
    • listSelectionChanged

      protected void listSelectionChanged()
      When an extension is selected in the left menu, we display its details, and provide controls for installing it (if not already installed), updating it (if already installed but a newer version is available), or uninstalling it (if already installed).
    • refreshList

      protected void refreshList()
    • promptForUpdateSource

      protected void promptForUpdateSource()
      Tries to select an UpdateSource intelligently and display it. If there are no update sources, the view is cleared. If there's only one update source, it is selected automatically. If there are more than one, the user is prompted to pick one. If an update source is chosen as a result of the above, its version manifest and public key are downloaded and set as current.
    • setVersionManifest

      protected void setVersionManifest(VersionManifest manifest)
    • isInstalled

      protected boolean isInstalled(VersionManifest.Extension extension)
    • extensionInstallCallback

      protected boolean extensionInstallCallback(DownloadedExtension downloadedExtension)
      Invoked internally from the install and update actions, after the extension is downloaded, to complete the process and then prompt to restart the application.
    • createScreenshotCacheDirectory

      protected File createScreenshotCacheDirectory()
      Creates a temporary directory for caching screenshot images during this panel's lifetime. Returns null if creation fails.
    • cleanupScreenshotCache

      public void cleanupScreenshotCache()
      Cleans up the temporary screenshot cache directory. We rely on the caller to invoke this, as we don't know when the panel is no longer needed. This is typically invoked from the ExtensionManagerDialog when it is closed.
    • getCacheKeyForUrl

      protected String getCacheKeyForUrl(URL url)
      Generates a cache key from a URL to use as filename.
    • getMessageUtil

      protected MessageUtil getMessageUtil()