# Class HyperlinkHandler

java.lang.Object
org.eclipse.help.ui.internal.HyperlinkHandler

All Implemented Interfaces:
  `EventListener, MouseListener, MouseTrackListener, PaintListener, Listener`

public class HyperlinkHandler extends Object implements MouseListener, MouseTrackListener, PaintListener, Listener

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`UNDERLINE_ALWAYS`
`static final int`
`UNDERLINE_NEVER`
`static final int`
`UNDERLINE_ROLLOVER`

## Constructor Summary

Constructors
Constructor
Description
`HyperlinkHandler()`
HyperlinkHandler constructor comment.

## Method Summary

Modifier and Type
Method
Description
`Color`
`getActiveBackground()`
`Color`
`getActiveForeground()`
`Color`
`getBackground()`
`Color`
`getForeground()`
`int`
`getHyperlinkUnderlineMode()`
`Control`
`getLastLink()`
`IHyperlinkListener`
`getLinkListener(Control c)`
`void`
`handleEvent(Event event)`
Sent when an event that the receiver has registered for occurs.
`boolean`
`isHyperlinkCursorUsed()`
`void`
`mouseDoubleClick(MouseEvent e)`
Sent when a mouse button is pressed twice within the (operating system specified) double click period.
`void`
`mouseDown(MouseEvent e)`
Sent when a mouse button is pressed.
`void`
`mouseEnter(MouseEvent e)`
Sent when the mouse pointer passes into the area of the screen covered by a control.
`void`
`mouseExit(MouseEvent e)`
Sent when the mouse pointer passes out of the area of the screen covered by a control.
`void`
`mouseHover(MouseEvent e)`
Sent when the mouse pointer hovers (that is, stops moving for an (operating system specified) period of time) over a control.
`void`
`mouseUp(MouseEvent e)`
Sent when a mouse button is released.
`void`
`paintControl(PaintEvent e)`
Sent when a paint event occurs for the control.
`void`
`registerHyperlink(Control control, IHyperlinkListener listener)`
`void`
`reset()`
`void`
`setActiveBackground(Color newActiveBackground)`
`void`
`setActiveForeground(Color newActiveForeground)`
`void`
`setBackground(Color newBackground)`
`void`
`setForeground(Color newForeground)`
`void`
`setHyperlinkCursorUsed(boolean newHyperlinkCursorUsed)`
`void`
`setHyperlinkUnderlineMode(int newHyperlinkUnderlineMode)`
`static void`
`underline(Control control, boolean inside)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### UNDERLINE_NEVER

public static final int UNDERLINE_NEVER

See Also:
  - Constant Field Values

### UNDERLINE_ROLLOVER

public static final int UNDERLINE_ROLLOVER

See Also:
  - Constant Field Values

### UNDERLINE_ALWAYS

public static final int UNDERLINE_ALWAYS

See Also:
  - Constant Field Values

## Constructor Details

### HyperlinkHandler

public HyperlinkHandler()
HyperlinkHandler constructor comment.

## Method Details

### getActiveBackground

public Color getActiveBackground()

Returns:
  org.eclipse.swt.graphics.Color

### getActiveForeground

public Color getActiveForeground()

Returns:
  org.eclipse.swt.graphics.Color

### getBackground

public Color getBackground()

Returns:
  org.eclipse.swt.graphics.Color

### getForeground

public Color getForeground()

Returns:
  org.eclipse.swt.graphics.Color

### getHyperlinkUnderlineMode

public int getHyperlinkUnderlineMode()

Returns:
  int

### getLastLink

public Control getLastLink()

Returns:
  org.eclipse.swt.widgets.Control

### isHyperlinkCursorUsed

public boolean isHyperlinkCursorUsed()

Returns:
  boolean

### mouseDoubleClick

public void mouseDoubleClick(MouseEvent e)
Description copied from interface: `MouseListener`
Sent when a mouse button is pressed twice within the (operating system specified) double click period.

Specified by:
  `mouseDoubleClick` in interface `MouseListener`
Parameters:
  `e` - an event containing information about the mouse double click
See Also:
  - `Display.getDoubleClickTime()`

### mouseDown

public void mouseDown(MouseEvent e)
Description copied from interface: `MouseListener`
Sent when a mouse button is pressed.

Specified by:
  `mouseDown` in interface `MouseListener`
Parameters:
  `e` - an event containing information about the mouse button press

### mouseEnter

public void mouseEnter(MouseEvent e)
Description copied from interface: `MouseTrackListener`
Sent when the mouse pointer passes into the area of the screen covered by a control.

Specified by:
  `mouseEnter` in interface `MouseTrackListener`
Parameters:
  `e` - an event containing information about the mouse enter

### mouseExit

public void mouseExit(MouseEvent e)
Description copied from interface: `MouseTrackListener`
Sent when the mouse pointer passes out of the area of the screen covered by a control.

Specified by:
  `mouseExit` in interface `MouseTrackListener`
Parameters:
  `e` - an event containing information about the mouse exit

### mouseHover

public void mouseHover(MouseEvent e)
Description copied from interface: `MouseTrackListener`
Sent when the mouse pointer hovers (that is, stops moving for an (operating system specified) period of time) over a control.

Specified by:
  `mouseHover` in interface `MouseTrackListener`
Parameters:
  `e` - an event containing information about the hover

### mouseUp

public void mouseUp(MouseEvent e)
Description copied from interface: `MouseListener`
Sent when a mouse button is released.

Specified by:
  `mouseUp` in interface `MouseListener`
Parameters:
  `e` - an event containing information about the mouse button release

### paintControl

public void paintControl(PaintEvent e)
Description copied from interface: `PaintListener`
Sent when a paint event occurs for the control.

Specified by:
  `paintControl` in interface `PaintListener`
Parameters:
  `e` - an event containing information about the paint

### registerHyperlink

public void registerHyperlink(Control control, IHyperlinkListener listener)

Parameters:
  `control` - org.eclipse.swt.widgets.Control
  `listener` - org.eclipse.help.ui.internal.IHyperlinkListener

### getLinkListener

public IHyperlinkListener getLinkListener(Control c)

### reset

public void reset()

### setActiveBackground

public void setActiveBackground(Color newActiveBackground)

Parameters:
  `newActiveBackground` - org.eclipse.swt.graphics.Color

### setActiveForeground

public void setActiveForeground(Color newActiveForeground)

Parameters:
  `newActiveForeground` - org.eclipse.swt.graphics.Color

### setBackground

public void setBackground(Color newBackground)

Parameters:
  `newBackground` - org.eclipse.swt.graphics.Color

### setForeground

public void setForeground(Color newForeground)

Parameters:
  `newForeground` - org.eclipse.swt.graphics.Color

### setHyperlinkCursorUsed

public void setHyperlinkCursorUsed(boolean newHyperlinkCursorUsed)

Parameters:
  `newHyperlinkCursorUsed` - boolean

### setHyperlinkUnderlineMode

public void setHyperlinkUnderlineMode(int newHyperlinkUnderlineMode)

Parameters:
  `newHyperlinkUnderlineMode` - int

### underline

public static void underline(Control control, boolean inside)

Parameters:
  `control` - org.eclipse.swt.widgets.Control
  `inside` - boolean

### handleEvent

public void handleEvent(Event event)
Sent when an event that the receiver has registered for occurs.

Specified by:
  `handleEvent` in interface `Listener`
Parameters:
  `event` - the event which occurred