public abstract class FocusManager extends DefaultKeyboardFocusManager
java.awt.KeyboardFocusManager和
java.awt.DefaultKeyboardFocusManager相反。
请看 How to Use the Focus Subsystem,java教程中的一部分,和更多的信息Focus Specification。
| Modifier and Type | Field and Description |
|---|---|
static String |
FOCUS_MANAGER_CLASS_PROPERTY
这个字段是过时的,它的使用是气馁,因为它的规范是不兼容的1.4个焦点的。
|
BACKWARD_TRAVERSAL_KEYS, DOWN_CYCLE_TRAVERSAL_KEYS, FORWARD_TRAVERSAL_KEYS, UP_CYCLE_TRAVERSAL_KEYS| Constructor and Description |
|---|
FocusManager() |
| Modifier and Type | Method and Description |
|---|---|
static void |
disableSwingFocusManager()
过时的。
截至1.4日,由
KeyboardFocusManager.setDefaultFocusTraversalPolicy(FocusTraversalPolicy)
|
static FocusManager |
getCurrentManager()
返回调用线程的上下文的当前
KeyboardFocusManager实例。
|
static boolean |
isFocusManagerEnabled()
过时的。
截至1.4日,由
KeyboardFocusManager.getDefaultFocusTraversalPolicy()
|
static void |
setCurrentManager(FocusManager aFocusManager)
设置为调用线程的上下文的当前
KeyboardFocusManager实例。
|
dequeueKeyEvents, discardKeyEvents, dispatchEvent, dispatchKeyEvent, downFocusCycle, enqueueKeyEvents, focusNextComponent, focusPreviousComponent, postProcessKeyEvent, processKeyEvent, upFocusCycleaddKeyEventDispatcher, 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, upFocusCyclepublic static final String FOCUS_MANAGER_CLASS_PROPERTY
KeyboardFocusManager.getCurrentKeyboardFocusManager()查询当前focusmanager。看到集中规范的更多信息。
public static FocusManager getCurrentManager()
KeyboardFocusManager实例。
KeyboardFocusManager
setCurrentManager(javax.swing.FocusManager)
public static void setCurrentManager(FocusManager aFocusManager) throws SecurityException
KeyboardFocusManager实例。如果
null指定,则当前
KeyboardFocusManager与
DefaultKeyboardFocusManager新实例替换。
如果安装了SecurityManager,调用线程必须被授予AWTPermission”replacekeyboardfocusmanager”以取代目前的KeyboardFocusManager。如果没有得到许可,该方法将抛出一个SecurityException,和目前的KeyboardFocusManager将保持不变。
aFocusManager -新的
KeyboardFocusManager这个线程的上下文
SecurityException如果调用线程不允许替换当前的
KeyboardFocusManager
getCurrentManager(),
DefaultKeyboardFocusManager
@Deprecated public static void disableSwingFocusManager()
KeyboardFocusManager.setDefaultFocusTraversalPolicy(FocusTraversalPolicy)
KeyboardFocusManager的默认
FocusTraversalPolicy到
DefaultFocusTraversalPolicy。
@Deprecated public static boolean isFocusManagerEnabled()
KeyboardFocusManager.getDefaultFocusTraversalPolicy()
disableSwingFocusManager()。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.