Package javax.help.plaf.basic

# Class BasicContentViewerUI

java.lang.Object
javax.swing.plaf.ComponentUI
javax.help.plaf.HelpContentViewerUI
javax.help.plaf.basic.BasicContentViewerUI

All Implemented Interfaces:
  `PropertyChangeListener`, `Serializable`, `EventListener`, `HelpModelListener`, `TextHelpModelListener`, `HyperlinkListener`

public class BasicContentViewerUI extends HelpContentViewerUI implements HelpModelListener, TextHelpModelListener, HyperlinkListener, PropertyChangeListener, Serializable
The default UI for JHelpContentViewer.

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`protected JHelpContentViewer`
`theViewer`

## Constructor Summary

Constructors
Constructor
Description
`BasicContentViewerUI(JHelpContentViewer b)`

## Method Summary

Modifier and Type
Method
Description
`static ComponentUI`
`createUI(JComponent x)`
`Dimension`
`getMaximumSize(JComponent c)`
`Dimension`
`getMinimumSize(JComponent c)`
`Dimension`
`getPreferredSize(JComponent c)`
`void`
`highlightsChanged(TextHelpModelEvent e)`
Determines if highlights have changed.
`void`
`hyperlinkUpdate(HyperlinkEvent e)`
Notification of a change relative to a hyperlink.
`void`
`idChanged(HelpModelEvent e)`
Tells the listener that the current ID in the HelpModel has changed.
`void`
`installUI(JComponent c)`
`protected void`
`linkActivated(URL u)`
Follows the reference in an link.
`void`
`propertyChange(PropertyChangeEvent event)`
`void`
`setEditorKit(String type, EditorKit kit)`
`void`
`uninstallUI(JComponent c)`

### Methods inherited from class javax.swing.plaf.ComponentUI

`contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, paint, update`

### Methods inherited from class java.lang.Object

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

## Field Details

### theViewer

protected JHelpContentViewer theViewer

## Constructor Details

### BasicContentViewerUI

public BasicContentViewerUI(JHelpContentViewer b)

## Method Details

### createUI

public static ComponentUI createUI(JComponent x)

### setEditorKit

public void setEditorKit(String type, EditorKit kit)

### installUI

public void installUI(JComponent c)

Overrides:
  `installUI` in class `ComponentUI`

### uninstallUI

public void uninstallUI(JComponent c)

Overrides:
  `uninstallUI` in class `ComponentUI`

### getPreferredSize

public Dimension getPreferredSize(JComponent c)

Overrides:
  `getPreferredSize` in class `ComponentUI`

### getMinimumSize

public Dimension getMinimumSize(JComponent c)

Overrides:
  `getMinimumSize` in class `ComponentUI`

### getMaximumSize

public Dimension getMaximumSize(JComponent c)

Overrides:
  `getMaximumSize` in class `ComponentUI`

### idChanged

public void idChanged(HelpModelEvent e)
Description copied from interface: `HelpModelListener`
Tells the listener that the current ID in the HelpModel has changed. All highlights from the previous location change at this point.

Specified by:
  `idChanged` in interface `HelpModelListener`
Parameters:
  `e` - The event

### propertyChange

public void propertyChange(PropertyChangeEvent event)

Specified by:
  `propertyChange` in interface `PropertyChangeListener`

### hyperlinkUpdate

public void hyperlinkUpdate(HyperlinkEvent e)
Notification of a change relative to a hyperlink.

Specified by:
  `hyperlinkUpdate` in interface `HyperlinkListener`

### linkActivated

protected void linkActivated(URL u)
Follows the reference in an link. The given url is the requested reference. By default this calls setPage, and if an exception is thrown the original previous document is restored and a beep sounded. If an attempt was made to follow a link, but it represented a malformed url, this method will be called with a null argument.

Parameters:
  `u` - the URL to follow

### highlightsChanged

public void highlightsChanged(TextHelpModelEvent e)
Determines if highlights have changed. Collects all the highlights and marks the presentation.

Specified by:
  `highlightsChanged` in interface `TextHelpModelListener`
Parameters:
  `e` - The TextHelpModelEvent.