public final class FocusManagerImpl extends IdeFocusManager implements Disposable
Disposable.Parent| Constructor and Description |
|---|
FocusManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Usually not invoked directly, see class javadoc.
|
void |
doWhenFocusSettlesDown(ExpirableRunnable runnable)
Executes given runnable after all focus activities are finished.
|
void |
doWhenFocusSettlesDown(java.lang.Runnable runnable)
Executes given runnable after all focus activities are finished.
|
void |
doWhenFocusSettlesDown(java.lang.Runnable runnable,
ModalityState modality)
Executes given runnable after all focus activities are finished, immediately or later with the given modality state.
|
java.awt.Component |
getFocusedDescendantFor(java.awt.Component comp)
Finds focused component among descendants of the given component.
|
java.awt.Component |
getFocusOwner()
Computes effective focus owner.
|
javax.swing.JComponent |
getFocusTargetFor(javax.swing.JComponent comp)
Finds most suitable component to request focus to.
|
static IdeFocusManager |
getInstance() |
java.awt.Component |
getLastFocusedFor(java.awt.Window frame)
Returns last focused component for the given IDE
Window. |
IdeFrame |
getLastFocusedFrame()
Returns last focused
IdeFrame. |
java.awt.Window |
getLastFocusedIdeWindow() |
java.util.List<FocusRequestInfo> |
getRequests() |
boolean |
isFocusTransferEnabled()
Reports of focus transfer is enabled right now.
|
void |
recordFocusRequest(java.awt.Component c,
boolean forced) |
ActionCallback |
requestDefaultFocus(boolean forced)
Requests default focus.
|
ActionCallback |
requestFocus(java.awt.Component c,
boolean forced)
Requests focus on a component
|
ActionCallback |
requestFocusInProject(java.awt.Component c,
Project project) |
void |
runOnOwnContext(DataContext context,
java.lang.Runnable runnable)
Runs runnable for which
DataContext will not be computed from the current focus owner,
but using given one. |
void |
setLastFocusedAtDeactivation(java.awt.Window frame,
java.awt.Component c) |
void |
setTypeaheadEnabled(boolean enabled)
Enables or disables typeahead.
|
void |
toFront(javax.swing.JComponent c)
Put the container window to front.
|
void |
typeAheadUntil(ActionCallback callback,
java.lang.String cause)
Aggregates all key events until given callback object is processed.
|
findInstance, findInstanceByComponent, findInstanceByContext, getFurtherRequestor, getGlobalInstance, getInstance, typeAheadUntilpublic IdeFrame getLastFocusedFrame()
IdeFocusManagerIdeFrame.getLastFocusedFrame in class IdeFocusManagerpublic java.awt.Window getLastFocusedIdeWindow()
getLastFocusedIdeWindow in class IdeFocusManager@DirtyUI public ActionCallback requestFocusInProject(java.awt.Component c, Project project)
requestFocusInProject in class IdeFocusManagerpublic ActionCallback requestFocus(java.awt.Component c, boolean forced)
FocusRequestorrequestFocus in interface FocusRequestorc - - component to request focus toforced - - if true - focus request is explicit, must be fulfilled, if false - can be droppedpublic java.util.List<FocusRequestInfo> getRequests()
public void recordFocusRequest(java.awt.Component c,
boolean forced)
public static IdeFocusManager getInstance()
@DirtyUI public void dispose()
Disposabledispose in interface Disposabledispose in class IdeFocusManagerpublic void doWhenFocusSettlesDown(ExpirableRunnable runnable)
IdeFocusManagerdoWhenFocusSettlesDown in class IdeFocusManagerpublic void doWhenFocusSettlesDown(java.lang.Runnable runnable)
IdeFocusManagerdoWhenFocusSettlesDown in class IdeFocusManagerpublic void doWhenFocusSettlesDown(java.lang.Runnable runnable,
ModalityState modality)
IdeFocusManagerdoWhenFocusSettlesDown in class IdeFocusManagerpublic void setTypeaheadEnabled(boolean enabled)
IdeFocusManagersetTypeaheadEnabled in class IdeFocusManagerIdeFocusManager.typeAheadUntil(ActionCallback)public void typeAheadUntil(ActionCallback callback, java.lang.String cause)
IdeFocusManagertypeAheadUntil in class IdeFocusManagercallback - action callback@DirtyUI public java.awt.Component getFocusOwner()
IdeFocusManagergetFocusOwner in class IdeFocusManager@DirtyUI public void runOnOwnContext(DataContext context, java.lang.Runnable runnable)
IdeFocusManagerDataContext will not be computed from the current focus owner,
but using given one.runOnOwnContext in class IdeFocusManagerpublic java.awt.Component getLastFocusedFor(java.awt.Window frame)
IdeFocusManagerWindow.
Only IDE window (that's implementing IdeFrame).getLastFocusedFor in class IdeFocusManagerpublic void setLastFocusedAtDeactivation(java.awt.Window frame,
java.awt.Component c)
public void toFront(javax.swing.JComponent c)
IdeFocusManagerwindow.toFront().toFront in class IdeFocusManagerpublic javax.swing.JComponent getFocusTargetFor(javax.swing.JComponent comp)
IdeFocusManagergetFocusTargetFor in class IdeFocusManagerpublic java.awt.Component getFocusedDescendantFor(java.awt.Component comp)
IdeFocusManagergetFocusedDescendantFor in class IdeFocusManagerpublic ActionCallback requestDefaultFocus(boolean forced)
IdeFocusManagerrequestDefaultFocus in class IdeFocusManagerpublic boolean isFocusTransferEnabled()
IdeFocusManagerFocusCommand can be executed on an inactive app.isFocusTransferEnabled in class IdeFocusManager