Class UrlPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class UrlPanel extends JPanel
Displays a URL and options for invoking it.
Since:
6 Feb 2018
Author:
Mark Taylor
See Also:
  • Constructor Details

    • UrlPanel

      public UrlPanel(UrlOptions urlopts, boolean hasAutoInvoke)
      Constructor. An auto-invoke button may optionally be added; note however that this component will not auto-invoke the actions, that is the responsibility of calling code based on the result of calling the instance's isAutoInvoke() method.
      Parameters:
      urlopts - options and defaults for URL invocation
      hasAutoInvoke - true iff an auto-invoke toggle button should be displayed
  • Method Details

    • configureResource

      public void configureResource(ResourceInfo resourceInfo)
      Configures this panel for use with a given resource.
      Parameters:
      resourceInfo - resource info, may be null
    • getUrl

      public URL getUrl()
      Returns the currently displayed URL.
      Returns:
      URL
    • getResourceType

      public ResourceType getResourceType()
      Returns the currently selected resource type.
      Returns:
      resource type
    • getUrlInvoker

      public UrlInvoker getUrlInvoker()
      Returns the currently selected URL invocation mode.
      Returns:
      invoker
    • invokeUrl

      public Outcome invokeUrl()
      Performs a URL invocation based on the current state of this panel. The currently-selected URL is invoked using the currently-selected invoker, assuming both are non-null.
      Returns:
      outcome
    • isAutoInvoke

      public boolean isAutoInvoke()
      Indicates whether this panel is currently set up for auto-invoke.
      Returns:
      whether the auto-invoke toggle button is checked