Example usage for javax.swing JFrame isAlwaysOnTopSupported

List of usage examples for javax.swing JFrame isAlwaysOnTopSupported

Introduction

In this page you can find the example usage for javax.swing JFrame isAlwaysOnTopSupported.

Prototype

public boolean isAlwaysOnTopSupported() 

Source Link

Document

Returns whether the always-on-top mode is supported for this window.

Usage

From source file:at.gv.egiz.bku.local.stal.LocalIdentityLinkSTALFactory.java

@Override
public STAL createSTAL() {
    final LocalBKUWorker stal;
    //http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html
    // use undecorated JFrame instead of JWindow,
    // which creates an invisible owning frame and therefore cannot getFocusInWindow()
    JFrame dialog = new JFrame("Brgerkarte");
    log.debug("AlwaysOnTop supported: {}.", dialog.isAlwaysOnTopSupported());
    // [#439] make mocca dialog alwaysOnTop
    dialog.setAlwaysOnTop(true);/*from   ww  w  .  j av  a2 s . c  o  m*/
    dialog.setIconImages(BKUIcons.icons);
    //       dialog.setUndecorated(true);
    //       dialog.getRootPane().setWindowDecorationStyle(JRootPane.NONE);

    if (locale != null) {
        dialog.setLocale(locale);
    }
    LocalHelpListener helpListener = null;
    if (helpURL != null) {
        helpListener = new LocalHelpListener(helpURL, locale);
    } else {
        log.warn("No HELP URL configured, help system disabled.");
    }
    IdentityLinkGUIFacade gui = new IdentityLinkGUI(dialog.getContentPane(), dialog.getLocale(), null,
            new ResourceFontLoader(), helpListener);
    BKUGUIFacade proxy = (BKUGUIFacade) GUIProxy.newInstance(gui, dialog,
            new Class[] { IdentityLinkGUIFacade.class });
    stal = new LocalBKUWorker(proxy, dialog);
    dialog.setPreferredSize(PREFERRED_SIZE);
    dialog.pack();
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = dialog.getSize();
    if (frameSize.height > screenSize.height) {
        frameSize.height = screenSize.height;
    }
    if (frameSize.width > screenSize.width) {
        frameSize.width = screenSize.width;
    }
    dialog.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
    return stal;
}

From source file:at.gv.egiz.bku.local.stal.LocalGetCertificateSTALFactory.java

@Override
public STAL createSTAL() {
    final LocalBKUWorker stal;
    //http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html
    // use undecorated JFrame instead of JWindow,
    // which creates an invisible owning frame and therefore cannot getFocusInWindow()
    JFrame dialog = new JFrame("Brgerkarte");
    log.debug("AlwaysOnTop supported: {}.", dialog.isAlwaysOnTopSupported());
    // [#439] make mocca dialog alwaysOnTop
    dialog.setAlwaysOnTop(true);//from   w w  w. j a va2  s  .c  om
    dialog.setIconImages(BKUIcons.icons);
    //       dialog.setUndecorated(true);
    //       dialog.getRootPane().setWindowDecorationStyle(JRootPane.NONE);

    if (locale != null) {
        dialog.setLocale(locale);
    }
    LocalHelpListener helpListener = null;
    if (helpURL != null) {
        helpListener = new LocalHelpListener(helpURL, locale);
    } else {
        log.warn("No HELP URL configured, help system disabled.");
    }
    GetCertificateGUIFacade gui = new GetCertificateGUI(dialog.getContentPane(), dialog.getLocale(), null,
            new ResourceFontLoader(), helpListener);
    BKUGUIFacade proxy = (BKUGUIFacade) GUIProxy.newInstance(gui, dialog,
            new Class[] { GetCertificateGUIFacade.class, });
    stal = new LocalBKUWorker(proxy, dialog);
    dialog.setPreferredSize(PREFERRED_SIZE);
    dialog.pack();
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = dialog.getSize();
    if (frameSize.height > screenSize.height) {
        frameSize.height = screenSize.height;
    }
    if (frameSize.width > screenSize.width) {
        frameSize.width = screenSize.width;
    }
    dialog.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);

    return stal;
}

From source file:at.gv.egiz.bku.local.stal.LocalGetHardwareInfoSTALFactory.java

@Override
public STAL createSTAL() {
    final LocalBKUWorker stal;
    //http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html
    // use undecorated JFrame instead of JWindow,
    // which creates an invisible owning frame and therefore cannot getFocusInWindow()
    JFrame dialog = new JFrame("Brgerkarte");
    log.debug("AlwaysOnTop supported: {}.", dialog.isAlwaysOnTopSupported());
    // [#439] make mocca dialog alwaysOnTop
    dialog.setAlwaysOnTop(true);/*  w w w  . ja  v  a 2s . c  o  m*/
    dialog.setIconImages(BKUIcons.icons);
    //       dialog.setUndecorated(true);
    //       dialog.getRootPane().setWindowDecorationStyle(JRootPane.NONE);

    if (locale != null) {
        dialog.setLocale(locale);
    }
    LocalHelpListener helpListener = null;
    if (helpURL != null) {
        helpListener = new LocalHelpListener(helpURL, locale);
    } else {
        log.warn("No HELP URL configured, help system disabled.");
    }
    GetHardwareInfoGUIFacade gui = new GetHardwareInfoGUI(dialog.getContentPane(), dialog.getLocale(), null,
            new ResourceFontLoader(), helpListener);
    BKUGUIFacade proxy = (BKUGUIFacade) GUIProxy.newInstance(gui, dialog,
            new Class[] { GetHardwareInfoGUIFacade.class, });
    stal = new LocalBKUWorker(proxy, dialog);
    dialog.setPreferredSize(PREFERRED_SIZE);
    dialog.pack();
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = dialog.getSize();
    if (frameSize.height > screenSize.height) {
        frameSize.height = screenSize.height;
    }
    if (frameSize.width > screenSize.width) {
        frameSize.width = screenSize.width;
    }
    dialog.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);

    return stal;
}

From source file:at.gv.egiz.bku.local.stal.LocalSTALFactory.java

@Override
public STAL createSTAL() {

    final LocalBKUWorker stal;
    //http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html
    // use undecorated JFrame instead of JWindow,
    // which creates an invisible owning frame and therefore cannot getFocusInWindow()
    JFrame dialog = new JFrame("Brgerkarte");
    log.debug("AlwaysOnTop supported: {}.", dialog.isAlwaysOnTopSupported());
    // [#439] make mocca dialog alwaysOnTop
    dialog.setAlwaysOnTop(true);// ww  w.j a  v a 2  s  .  co m
    dialog.setIconImages(BKUIcons.icons);
    //    dialog.setUndecorated(true);
    //    dialog.getRootPane().setWindowDecorationStyle(JRootPane.NONE);

    if (locale != null) {
        dialog.setLocale(locale);
    }
    LocalHelpListener helpListener = null;
    if (helpURL != null) {
        helpListener = new LocalHelpListener(helpURL, locale);
    } else {
        log.warn("No HELP URL configured, help system disabled.");
    }
    PINManagementGUIFacade gui = new PINManagementGUI(dialog.getContentPane(), dialog.getLocale(), null,
            new ResourceFontLoader(), helpListener);
    BKUGUIFacade proxy = (BKUGUIFacade) GUIProxy.newInstance(gui, dialog,
            new Class[] { PINManagementGUIFacade.class });
    SMCCHelper.setUseSWCard(configurationFacade.getUseSWCard());
    stal = new LocalBKUWorker(proxy, dialog);
    dialog.setPreferredSize(PREFERRED_SIZE);
    dialog.pack();
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = dialog.getSize();
    if (frameSize.height > screenSize.height) {
        frameSize.height = screenSize.height;
    }
    if (frameSize.width > screenSize.width) {
        frameSize.width = screenSize.width;
    }
    dialog.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
    return stal;
}