public interface FocusAwareComponent
Component implementing this interface tells the framework that
it is aware of the existence of the MouseFocusObserver and that this
Component prefers to request its focus independently. The framework
will call maybeRequestFocus() instead of Component.requestFocusInWindow()
when it encounters this interface.| Modifier and Type | Method and Description |
|---|---|
void |
invokeOnFocusRequest(Runnable run)
Informs this
FocusAwareComponent that is should run run after
it has requested the focus. |
void |
maybeRequestFocus()
Called by the
MouseFocusObserver instead of
Component.requestFocusInWindow(). |
void maybeRequestFocus()
MouseFocusObserver instead of
Component.requestFocusInWindow().void invokeOnFocusRequest(Runnable run)
FocusAwareComponent that is should run run after
it has requested the focus. run must only be executed once. It does not
contain references to objects that need to be cleaned by the garbage collector, so this
FocusAwareComponent can keep a reference of run for a long time.Copyright © 2017 Docking Frames. All rights reserved.