Package org.eclipse.ui.forms
Class HyperlinkSettings
java.lang.Object
org.eclipse.ui.forms.HyperlinkSettings
- Direct Known Subclasses:
HyperlinkGroup
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 Summary
Modifier and TypeFieldDescriptionstatic final int
Underline mode to be used when hyperlinks should always be underlined.static final int
Underline mode to be used when hyperlinks should only be underlined on mouse hover.static final int
Underline mode to be used when hyperlinks should not be underlined. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the background to use for the active hyperlink.Returns the foreground to use for the active hyperlink.Returns the background to use for the normal hyperlink.Returns the cursor to use when the hyperlink is active.Returns the foreground to use for the normal hyperlink.Returns the cursor to use when hovering over the hyperlink.int
Returns the underline mode to be used for all the hyperlinks in this group.Returns the cursor to use when over text.void
Initializes the hyperlink cursors from the Forms defaults set for the entire workbench.void
initializeDefaultForegrounds
(Display display) Initializes the hyperlink foregrounds from the JFace defaults set for the entire workbench.void
setActiveBackground
(Color newActiveBackground) Sets the new active hyperlink background for all the links.void
setActiveForeground
(Color newActiveForeground) Sets the new active hyperlink foreground for all the links.void
setBackground
(Color newBackground) Sets the new hyperlink background for all the links.void
setBusyCursor
(Cursor newBusyCursor) Sets the new cursor to use when the hyperlink is active for all the links.void
setForeground
(Color newForeground) Sets the new hyperlink foreground for all the links.void
setHyperlinkCursor
(Cursor newHyperlinkCursor) Sets the new cursor to use when hovering over the hyperlink for all the links.void
setHyperlinkUnderlineMode
(int mode) Sets the new hyperlink underline mode for all the links in this group.void
setTextCursor
(Cursor newTextCursor) Sets the new cursor to use when over text for all the links.
-
Field Details
-
UNDERLINE_NEVER
public static final int UNDERLINE_NEVERUnderline mode to be used when hyperlinks should not be underlined.- See Also:
-
UNDERLINE_HOVER
public static final int UNDERLINE_HOVERUnderline mode to be used when hyperlinks should only be underlined on mouse hover.- See Also:
-
UNDERLINE_ALWAYS
public static final int UNDERLINE_ALWAYSUnderline mode to be used when hyperlinks should always be underlined.- See Also:
-
-
Constructor Details
-
HyperlinkSettings
The constructor.- Parameters:
display
- the display to use when creating colors.
-
-
Method Details
-
initializeDefaultForegrounds
Initializes the hyperlink foregrounds from the JFace defaults set for the entire workbench.- Parameters:
display
- the display to use when creating colors- See Also:
-
initializeDefaultCursors
public void initializeDefaultCursors()Initializes the hyperlink cursors from the Forms defaults set for the entire workbench.- Since:
- 3.7
-
getActiveBackground
Returns the background to use for the active hyperlink.- Returns:
- active hyperlink background
-
getActiveForeground
Returns the foreground to use for the active hyperlink.- Returns:
- active hyperlink foreground
-
getBackground
Returns the background to use for the normal hyperlink.- Returns:
- normal hyperlink background
-
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
Returns the cursor to use when over text.- Returns:
- the text cursor
-
getForeground
Returns the foreground to use for the normal hyperlink.- Returns:
- the normal hyperlink foreground
-
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
Sets the new active hyperlink background for all the links.- Parameters:
newActiveBackground
- the new active background
-
setActiveForeground
Sets the new active hyperlink foreground for all the links.- Parameters:
newActiveForeground
- the new active foreground
-
setBackground
Sets the new hyperlink background for all the links.- Parameters:
newBackground
- the new hyperlink background
-
setForeground
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 ofUNDERLINE_NEVER
,UNDERLINE_HOVER
andUNDERLINE_ALWAYS
.
-
setBusyCursor
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
Sets the new cursor to use when over text for all the links.- Parameters:
newTextCursor
- the new text cursor- Since:
- 3.7
-
setHyperlinkCursor
Sets the new cursor to use when hovering over the hyperlink for all the links.- Parameters:
newHyperlinkCursor
- the new hyperlink cursor- Since:
- 3.7
-