Class HelpLink

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
HelpExternalLink

public class HelpLink extends JComponent implements Accessible
A lightweight component that will activate online help, suitable for use in More Info help panes. To use this component in More Info, use the following:
    <object classid="java:com.sun.javatest.tool.HelpLink">
    <param  name=... value=...>
    ...
    </object>
 
The following parameters are recognized:
target
the help ID that will be displayed when the link is activated
text
the text string that will be displayed as the body of the link
textFont
the font used to display the link
textColor
the color used to display the link
See Also:
  • Field Details

  • Constructor Details

    • HelpLink

      public HelpLink()
      Create a HelpLink object.
    • HelpLink

      protected HelpLink(Object o)
      A constructor used to specify another MouseListener by subclasses
      Parameters:
      o - fake param - not used
  • Method Details

    • getAccessibleContext

      public AccessibleContext getAccessibleContext()
      Get the accessible context for this pane.
      Specified by:
      getAccessibleContext in interface Accessible
      Overrides:
      getAccessibleContext in class Component
      Returns:
      the accessible context for this pane
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class JComponent
    • paintComponent

      public void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • getTarget

      public String getTarget()
      Get the help ID that will be displayed when the link is activated.
      Returns:
      the help ID that will be displayed when the link is activated
      See Also:
    • setTarget

      public void setTarget(String target)
      Set the help ID that will be displayed when the link is activated. The ID must be set before the link is displayed.
      Parameters:
      target - the help ID that will be displayed when the link is activated
      See Also:
    • getText

      public String getText()
      Get the text string that will be displayed as the body of the link.
      Returns:
      the text string that will be displayed as the body of the link
      See Also:
    • setText

      public void setText(String text)
      Set the text string that will be displayed as the body of the link. The text must be set before the link is displayed.
      Parameters:
      text - the text string that will be displayed as the body of the link
      See Also:
    • getTextFont

      public String getTextFont()
      Get the font that will be used to display the link. The default font is inherited from the context in which the link appears.
      Returns:
      the name of the font that will be used to display the link
      See Also:
    • setTextFont

      public void setTextFont(String font)
      Set the font that will be used to display the link.
      Parameters:
      font - the name of font that will be used to display the link
      See Also:
    • getTextColor

      public String getTextColor()
      Get the color that will be used to display the link. The default color is blue.
      Returns:
      a string giving the color that will be used to display the link
      See Also:
    • setTextColor

      public void setTextColor(String color)
      Set the color that will be used to display the link.
      Parameters:
      color - the name of color that will be used to display the link
      See Also: