|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.wordpress.tipsforjava.swing.TabFocusHandler
public class TabFocusHandler extends Object
Manage the focus when a new tab is selected. You can select a focus policy: a) Reset Focus - focus is reset to the first focusable component on the tab b) Retain Focus - focus returns to the last component with focus on the tab In addition you add tabs that you want to exclude from the focus policy, in which case the other policy will be in effect.
| Field Summary | |
|---|---|
static int |
RESET_FOCUS
|
static int |
RETAIN_FOCUS
|
private HashSet |
exceptions
|
private int |
focusPolicy
|
private HashMap |
tabFocus
|
private JTabbedPane |
tabbedPane
|
| Constructor Summary | |
TabFocusHandler(JTabbedPane tabbedPane)
|
|
TabFocusHandler(JTabbedPane tabbedPane, int focusPolicy)
|
|
| Method Summary | |
|---|---|
void
|
addException(int index)
|
void
|
propertyChange(PropertyChangeEvent e)
|
void
|
stateChanged(ChangeEvent e)
|
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
public static final int RESET_FOCUS
public static final int RETAIN_FOCUS
private HashSet exceptions
private int focusPolicy
private HashMap tabFocus
private JTabbedPane tabbedPane
| Constructor Detail |
|---|
public TabFocusHandler(JTabbedPane tabbedPane)
public TabFocusHandler(JTabbedPane tabbedPane, int focusPolicy)
| Method Detail |
|---|
public void addException(int index)
public void propertyChange(PropertyChangeEvent e)
public void stateChanged(ChangeEvent e)
Groovy Documentation