public final class PassThroughIdeFocusManager extends IdeFocusManager
Disposable.Parent
Constructor and Description |
---|
PassThroughIdeFocusManager() |
Modifier and Type | Method and Description |
---|---|
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 component)
Finds focused component among descendants of the given component.
|
java.awt.Component |
getFocusOwner()
Computes effective focus owner.
|
javax.swing.JComponent |
getFocusTargetFor(javax.swing.JComponent component)
Finds most suitable component to request focus to.
|
static PassThroughIdeFocusManager |
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() |
boolean |
isFocusTransferEnabled()
Reports of focus transfer is enabled right now.
|
ActionCallback |
requestFocus(java.awt.Component c,
boolean forced)
Requests focus on a component
|
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 |
setTypeaheadEnabled(boolean enabled)
Enables or disables typeahead.
|
void |
toFront(javax.swing.JComponent c)
Put the container window to front.
|
dispose, findInstance, findInstanceByComponent, findInstanceByContext, getFurtherRequestor, getGlobalInstance, getInstance, requestDefaultFocus, requestFocusInProject, typeAheadUntil, typeAheadUntil
public static PassThroughIdeFocusManager getInstance()
public ActionCallback requestFocus(java.awt.Component c, boolean forced)
FocusRequestor
c
- - component to request focus toforced
- - if true - focus request is explicit, must be fulfilled, if false - can be droppedpublic javax.swing.JComponent getFocusTargetFor(javax.swing.JComponent component)
IdeFocusManager
getFocusTargetFor
in class IdeFocusManager
public void doWhenFocusSettlesDown(java.lang.Runnable runnable)
IdeFocusManager
doWhenFocusSettlesDown
in class IdeFocusManager
public void doWhenFocusSettlesDown(java.lang.Runnable runnable, ModalityState modality)
IdeFocusManager
doWhenFocusSettlesDown
in class IdeFocusManager
public void doWhenFocusSettlesDown(ExpirableRunnable runnable)
IdeFocusManager
doWhenFocusSettlesDown
in class IdeFocusManager
public java.awt.Component getFocusedDescendantFor(java.awt.Component component)
IdeFocusManager
getFocusedDescendantFor
in class IdeFocusManager
public boolean isFocusTransferEnabled()
IdeFocusManager
FocusCommand
can be executed on an inactive app.isFocusTransferEnabled
in class IdeFocusManager
public void setTypeaheadEnabled(boolean enabled)
IdeFocusManager
setTypeaheadEnabled
in class IdeFocusManager
IdeFocusManager.typeAheadUntil(ActionCallback)
public java.awt.Component getFocusOwner()
IdeFocusManager
getFocusOwner
in class IdeFocusManager
public void runOnOwnContext(DataContext context, java.lang.Runnable runnable)
IdeFocusManager
DataContext
will not be computed from the current focus owner,
but using given one.runOnOwnContext
in class IdeFocusManager
public java.awt.Component getLastFocusedFor(java.awt.Window frame)
IdeFocusManager
Window
.
Only IDE window (that's implementing IdeFrame
).getLastFocusedFor
in class IdeFocusManager
public IdeFrame getLastFocusedFrame()
IdeFocusManager
IdeFrame
.getLastFocusedFrame
in class IdeFocusManager
public java.awt.Window getLastFocusedIdeWindow()
getLastFocusedIdeWindow
in class IdeFocusManager
public void toFront(javax.swing.JComponent c)
IdeFocusManager
window.toFront()
.toFront
in class IdeFocusManager