- java.lang.Object
-
- java.awt.KeyboardFocusManager
-
- java.awt.DefaultKeyboardFocusManager
-
- javax.swing.FocusManager
-
- javax.swing.DefaultFocusManager
-
- All Implemented Interfaces:
-
KeyEventDispatcher
,KeyEventPostProcessor
public class DefaultFocusManager extends FocusManager
这个类已被1.4焦点API过时了。 虽然客户端代码仍然可以使用此类,但是强烈建议开发人员使用java.awt.KeyboardFocusManager
和java.awt.DefaultKeyboardFocusManager
。请参阅How to Use the Focus Subsystem , Java教程中的一节,以及有关更多信息的Focus Specification 。
- 从以下版本开始:
- 1.2
-
-
Field Summary
-
Fields inherited from class javax.swing.FocusManager
FOCUS_MANAGER_CLASS_PROPERTY
-
Fields inherited from class java.awt.KeyboardFocusManager
BACKWARD_TRAVERSAL_KEYS, DOWN_CYCLE_TRAVERSAL_KEYS, FORWARD_TRAVERSAL_KEYS, UP_CYCLE_TRAVERSAL_KEYS
-
-
构造方法摘要
构造方法 Constructor 描述 DefaultFocusManager()
构造一个DefaultFocusManager
。
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 boolean
compareTabOrder(Component a, Component b)
通过焦点遍历循环顺序对组件进行比较。Component
getComponentAfter(Container aContainer, Component aComponent)
返回之后的组件。Component
getComponentBefore(Container aContainer, Component aComponent)
返回之前的组件。Component
getFirstComponent(Container aContainer)
返回第一个组件。Component
getLastComponent(Container aContainer)
返回最后一个组件。-
Methods inherited from class java.awt.DefaultKeyboardFocusManager
dequeueKeyEvents, discardKeyEvents, dispatchEvent, dispatchKeyEvent, downFocusCycle, enqueueKeyEvents, focusNextComponent, focusPreviousComponent, postProcessKeyEvent, processKeyEvent, upFocusCycle
-
Methods inherited from class javax.swing.FocusManager
disableSwingFocusManager, getCurrentManager, isFocusManagerEnabled, setCurrentManager
-
Methods inherited from 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
-
-
-
-
方法详细信息
-
getComponentAfter
public Component getComponentAfter(Container aContainer, Component aComponent)
返回之后的组件。- 参数
-
aContainer
- 一个容器 -
aComponent
- 一个组件 - 结果
- 组件之后
-
getComponentBefore
public Component getComponentBefore(Container aContainer, Component aComponent)
返回之前的组件。- 参数
-
aContainer
- 一个容器 -
aComponent
- 一个组件 - 结果
- 组件之前
-
getFirstComponent
public Component getFirstComponent(Container aContainer)
返回第一个组件。- 参数
-
aContainer
- 一个容器 - 结果
- 第一个组件
-
getLastComponent
public Component getLastComponent(Container aContainer)
返回最后一个组件。- 参数
-
aContainer
- 一个容器 - 结果
- 最后一个组件
-
-