public class BasicTabbedPaneUI.FocusHandler extends FocusAdapter
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.
Constructor and Description |
---|
BasicTabbedPaneUI.FocusHandler() |
Modifier and Type | Method and Description |
---|---|
void |
focusGained(FocusEvent e)
This method is called when the component gains focus.
|
void |
focusLost(FocusEvent e)
This method is called when the component loses focus.
|
public BasicTabbedPaneUI.FocusHandler()
public void focusGained(FocusEvent e)
focusGained
in interface FocusListener
focusGained
in class FocusAdapter
e
- The FocusEvent.public void focusLost(FocusEvent e)
focusLost
in interface FocusListener
focusLost
in class FocusAdapter
e
- The FocusEvent.