List of usage examples for com.intellij.openapi.wm IdeFocusManager getFocusedDescendantFor
@Nullable public abstract Component getFocusedDescendantFor(@NotNull Component comp);
From source file:com.intellij.designer.LightToolWindow.java
License:Apache License
private boolean isActive() { IdeFocusManager fm = IdeFocusManager.getInstance(myProject); Component component = fm.getFocusedDescendantFor(this); if (component != null) { return true; }//from w w w .ja v a 2s . c o m Component owner = fm.getLastFocusedFor(WindowManager.getInstance().getIdeFrame(myProject)); return owner != null && SwingUtilities.isDescendingFrom(owner, this); }