Class HyperlinkHelper

java.lang.Object
velox.api.layer1.utils.HyperlinkHelper

public class HyperlinkHelper extends Object
  • Constructor Details

    • HyperlinkHelper

      public HyperlinkHelper()
  • Method Details

    • openInBrowser

      public static void openInBrowser(String url)
      Opens the provided link in the browser and sends event statistics that this link was opened. Where possible, prioritize the use of the openInBrowser(String url, JComponent source) method to provide better context
      Parameters:
      url - to be open
    • openInBrowser

      public static void openInBrowser(String url, JComponent component)
      Parameters:
      component - the interaction with which triggered the opening of the link
    • addHyperlinkListener

      public static void addHyperlinkListener(JEditorPane editorPane)
      Adds HyperlinkListener that opens links in the browser when clicking on them. Make sure that you use links with protocol, otherwise an exception will be thrown when trying to follow the link.
      Parameters:
      editorPane - to which the listener will be added
    • removeHyperlinkListener

      public static void removeHyperlinkListener(JEditorPane editorPane)
      Removes the hyperlink listener if you added it before using addHyperlinkListener(JEditorPane editorPane)
      Parameters:
      editorPane - from which the listener will be removed