javax.swing.plaf.basic

Class BasicTabbedPaneUI.FocusHandler

public class BasicTabbedPaneUI.FocusHandler extends FocusAdapter

A helper class that handles focus.

The purpose of this class is to implement a more flexible focus handling for the tabbed pane, which is used to determine whether the focus indicator should be painted or not. When in scrolling layout mode the area containing the tabs is a scrollpane, so simply testing whether the tabbed pane has the focus does not work.

The FocusHandler is installed on the scrollpane and the tabbed pane and sets the variable hasFocus to false only when both components do not hold the focus.

UNKNOWN: Apparently this class was intended to be protected, but was made public by a compiler bug and is now public for compatibility.

Method Summary
voidfocusGained(FocusEvent e)
This method is called when the component gains focus.
voidfocusLost(FocusEvent e)
This method is called when the component loses focus.

Method Detail

focusGained

public void focusGained(FocusEvent e)
This method is called when the component gains focus.

Parameters: e The FocusEvent.

focusLost

public void focusLost(FocusEvent e)
This method is called when the component loses focus.

Parameters: e The FocusEvent.