java.lang.Object
java.awt.KeyboardFocusManager
java.awt.DefaultKeyboardFocusManager
javax.swing.FocusManager
javax.swing.DefaultFocusManager
- 所有已实现的接口:
-
KeyEventDispatcher
,KeyEventPostProcessor
该类已被1.4焦点API所淘汰。虽然客户端代码仍然可以使用这个类,但强烈建议开发人员改用
java.awt.KeyboardFocusManager
和java.awt.DefaultKeyboardFocusManager
。
- 自版本:
- 1.2
-
Field Summary
Fields declared in class javax.swing.FocusManager
FOCUS_MANAGER_CLASS_PROPERTY
Fields declared in class java.awt.KeyboardFocusManager
BACKWARD_TRAVERSAL_KEYS, DOWN_CYCLE_TRAVERSAL_KEYS, FORWARD_TRAVERSAL_KEYS, UP_CYCLE_TRAVERSAL_KEYS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
按照它们的焦点遍历顺序比较组件。getComponentAfter
(Container aContainer, Component aComponent) 返回后面的组件。getComponentBefore
(Container aContainer, Component aComponent) 返回前面的组件。getFirstComponent
(Container aContainer) 返回第一个组件。getLastComponent
(Container aContainer) 返回最后一个组件。Methods declared in class javax.swing.FocusManager
disableSwingFocusManager, getCurrentManager, isFocusManagerEnabled, setCurrentManager
Methods declared in class java.awt.DefaultKeyboardFocusManager
dequeueKeyEvents, discardKeyEvents, dispatchEvent, dispatchKeyEvent, downFocusCycle, enqueueKeyEvents, focusNextComponent, focusPreviousComponent, postProcessKeyEvent, processKeyEvent, upFocusCycle
Methods declared in class java.awt.KeyboardFocusManager
addKeyEventDispatcher, addKeyEventPostProcessor, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clearFocusOwner, clearGlobalFocusOwner, downFocusCycle, firePropertyChange, fireVetoableChange, focusNextComponent, focusPreviousComponent, getActiveWindow, getCurrentFocusCycleRoot, getCurrentKeyboardFocusManager, getDefaultFocusTraversalKeys, getDefaultFocusTraversalPolicy, getFocusedWindow, getFocusOwner, getGlobalActiveWindow, getGlobalCurrentFocusCycleRoot, getGlobalFocusedWindow, getGlobalFocusOwner, getGlobalPermanentFocusOwner, getKeyEventDispatchers, getKeyEventPostProcessors, getPermanentFocusOwner, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, redispatchEvent, removeKeyEventDispatcher, removeKeyEventPostProcessor, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener, setCurrentKeyboardFocusManager, setDefaultFocusTraversalKeys, setDefaultFocusTraversalPolicy, setGlobalActiveWindow, setGlobalCurrentFocusCycleRoot, setGlobalFocusedWindow, setGlobalFocusOwner, setGlobalPermanentFocusOwner, upFocusCycle
-
Constructor Details
-
DefaultFocusManager
public DefaultFocusManager()构造一个DefaultFocusManager
。
-
-
Method Details
-
getComponentAfter
返回后面的组件。- 参数:
-
aContainer
- 一个容器 -
aComponent
- 一个组件 - 返回:
- 后面的组件
-
getComponentBefore
返回前面的组件。- 参数:
-
aContainer
- 一个容器 -
aComponent
- 一个组件 - 返回:
- 前面的组件
-
getFirstComponent
返回第一个组件。- 参数:
-
aContainer
- 一个容器 - 返回:
- 第一个组件
-
getLastComponent
返回最后一个组件。- 参数:
-
aContainer
- 一个容器 - 返回:
- 最后一个组件
-
compareTabOrder
按照它们的焦点遍历顺序比较组件。- 参数:
-
a
- 第一个组件 -
b
- 第二个组件 - 返回:
- 按照它们的焦点遍历顺序比较的组件比较结果
-