|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
Currently, the sun.awt.CausedFocusEvent class is used internally as a runtime value of a focus event. The class adds a "cause" field to java.awt.FocusEvent which describes an action caused the event. The set of the "cause" values is defined as below which is pretty mnemonic:
UNKNOWN,
MOUSE_EVENT,
TRAVERSAL,
TRAVERSAL_UP,
TRAVERSAL_DOWN,
TRAVERSAL_FORWARD,
TRAVERSAL_BACKWARD,
MANUAL_REQUEST,
AUTOMATIC_TRAVERSE,
ROLLBACK,
NATIVE_SYSTEM,
ACTIVATION,
CLEAR_GLOBAL_FOCUS_OWNER,
RETARGETED
This information may give a client an ability to make its response to a focus event more specific.
Also, in conjunction with it, we should consider adding appropriate focus request methods to a component:
public boolean requestFocus(CausedFocusEvent.Cause)
public boolean requestFocusInWindow(CausedFocusEvent.Cause)
|