use of com.haulmont.cuba.desktop.TopLevelFrame in project cuba by cuba-platform.
the class DesktopComponentsHelper method canRequestFocus.
public static boolean canRequestFocus(java.awt.Component impl) {
boolean canRequestFocus = true;
java.awt.Component root = SwingUtilities.getRoot(impl);
if (root instanceof TopLevelFrame) {
TopLevelFrame topLevelFrame = (TopLevelFrame) root;
canRequestFocus = !topLevelFrame.getGlassPane().isVisible();
} else if (root instanceof DialogWindow) {
DialogWindow dialogWindow = (DialogWindow) root;
canRequestFocus = !dialogWindow.getGlassPane().isVisible();
}
return canRequestFocus;
}
Aggregations