use of com.haulmont.cuba.desktop.sys.DisabledGlassPane in project cuba by cuba-platform.
the class DetachedFrame method initUI.
private void initUI() {
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
glassPane = new DisabledGlassPane();
JRootPane rootPane = SwingUtilities.getRootPane(this);
rootPane.setGlassPane(glassPane);
final java.awt.Component topLevelGlassPane = DesktopComponentsHelper.getTopLevelFrame(parentContainer).getGlassPane();
topLevelGlassPane.addHierarchyListener(new HierarchyListener() {
@Override
public void hierarchyChanged(HierarchyEvent e) {
if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) == HierarchyEvent.SHOWING_CHANGED) {
if (topLevelGlassPane.isVisible()) {
glassPane.activate(null);
} else {
glassPane.deactivate();
}
}
}
});
}
use of com.haulmont.cuba.desktop.sys.DisabledGlassPane in project cuba by cuba-platform.
the class TopLevelFrame method initUI.
protected void initUI() {
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
glassPane = new DisabledGlassPane();
JRootPane rootPane = SwingUtilities.getRootPane(this);
rootPane.setGlassPane(glassPane);
Configuration configuration = AppBeans.get(Configuration.NAME);
DesktopConfig config = configuration.getConfig(DesktopConfig.class);
DesktopResources resources = App.getInstance().getResources();
if (StringUtils.isNotEmpty(config.getWindowIcon())) {
setIconImage(resources.getImage(config.getWindowIcon()));
}
}
Aggregations