Class HyperlinkSettings

  • Direct Known Subclasses:
    HyperlinkGroup

    public class HyperlinkSettings
    extends Object
    Manages color and underline mode settings for a group of hyperlinks. The class is extended by HyperlinkGroup but is otherwise not intended to be subclassed.
    Since:
    3.0
    Restriction:
    This class is not intended to be subclassed by clients.
    • Field Detail

      • UNDERLINE_NEVER

        public static final int UNDERLINE_NEVER
        Underline mode to be used when hyperlinks should not be underlined.
        See Also:
        Constant Field Values
      • UNDERLINE_HOVER

        public static final int UNDERLINE_HOVER
        Underline mode to be used when hyperlinks should only be underlined on mouse hover.
        See Also:
        Constant Field Values
      • UNDERLINE_ALWAYS

        public static final int UNDERLINE_ALWAYS
        Underline mode to be used when hyperlinks should always be underlined.
        See Also:
        Constant Field Values
    • Constructor Detail

      • HyperlinkSettings

        public HyperlinkSettings​(Display display)
        The constructor.
        Parameters:
        display - the display to use when creating colors.
    • Method Detail

      • initializeDefaultForegrounds

        public void initializeDefaultForegrounds​(Display display)
        Initializes the hyperlink foregrounds from the JFace defaults set for the entire workbench.
        Parameters:
        display - the display to use when creating colors
        See Also:
        JFaceColors
      • initializeDefaultCursors

        public void initializeDefaultCursors()
        Initializes the hyperlink cursors from the Forms defaults set for the entire workbench.
        Since:
        3.7
      • getActiveBackground

        public Color getActiveBackground()
        Returns the background to use for the active hyperlink.
        Returns:
        active hyperlink background
      • getActiveForeground

        public Color getActiveForeground()
        Returns the foreground to use for the active hyperlink.
        Returns:
        active hyperlink foreground
      • getBackground

        public Color getBackground()
        Returns the background to use for the normal hyperlink.
        Returns:
        normal hyperlink background
      • getBusyCursor

        public Cursor getBusyCursor()
        Returns the cursor to use when the hyperlink is active. This cursor will be shown before hyperlink listeners have been notified of hyperlink activation and hidden when the notification method returns.
        Returns:
        the busy cursor
      • getTextCursor

        public Cursor getTextCursor()
        Returns the cursor to use when over text.
        Returns:
        the text cursor
      • getForeground

        public Color getForeground()
        Returns the foreground to use for the normal hyperlink.
        Returns:
        the normal hyperlink foreground
      • getHyperlinkCursor

        public Cursor getHyperlinkCursor()
        Returns the cursor to use when hovering over the hyperlink.
        Returns:
        the hyperlink cursor
      • getHyperlinkUnderlineMode

        public int getHyperlinkUnderlineMode()
        Returns the underline mode to be used for all the hyperlinks in this group.
        Returns:
        one of UNDERLINE_NEVER, UNDERLINE_ALWAYS, UNDERLINE_HOVER
      • setActiveBackground

        public void setActiveBackground​(Color newActiveBackground)
        Sets the new active hyperlink background for all the links.
        Parameters:
        newActiveBackground - the new active background
      • setActiveForeground

        public void setActiveForeground​(Color newActiveForeground)
        Sets the new active hyperlink foreground for all the links.
        Parameters:
        newActiveForeground - the new active foreground
      • setBackground

        public void setBackground​(Color newBackground)
        Sets the new hyperlink background for all the links.
        Parameters:
        newBackground - the new hyperlink background
      • setForeground

        public void setForeground​(Color newForeground)
        Sets the new hyperlink foreground for all the links.
        Parameters:
        newForeground - the new hyperlink foreground
      • setHyperlinkUnderlineMode

        public void setHyperlinkUnderlineMode​(int mode)
        Sets the new hyperlink underline mode for all the links in this group.
        Parameters:
        mode - one of UNDERLINE_NEVER, UNDERLINE_HOVER and UNDERLINE_ALWAYS .
      • setBusyCursor

        public void setBusyCursor​(Cursor newBusyCursor)
        Sets the new cursor to use when the hyperlink is active for all the links.
        Parameters:
        newBusyCursor - the new busy cursor
        Since:
        3.7
      • setTextCursor

        public void setTextCursor​(Cursor newTextCursor)
        Sets the new cursor to use when over text for all the links.
        Parameters:
        newTextCursor - the new text cursor
        Since:
        3.7
      • setHyperlinkCursor

        public void setHyperlinkCursor​(Cursor newHyperlinkCursor)
        Sets the new cursor to use when hovering over the hyperlink for all the links.
        Parameters:
        newHyperlinkCursor - the new hyperlink cursor
        Since:
        3.7