private static JRootPane getRootPane(Window window) {
   if (window instanceof RootPaneContainer) {
     RootPaneContainer container = (RootPaneContainer) window;
     return container.getRootPane();
   }
   return null;
 }
Beispiel #2
0
  private void setCanFullscreen(final boolean canFullScreen) {
    if (target instanceof RootPaneContainer && getPeer().getPeerType() == PeerType.FRAME) {

      if (isInFullScreen && !canFullScreen) {
        toggleFullScreen();
      }

      final RootPaneContainer rpc = (RootPaneContainer) target;
      rpc.getRootPane().putClientProperty(CPlatformWindow.WINDOW_FULLSCREENABLE, canFullScreen);
    }
  }
Beispiel #3
0
  public static void main(String[] args) {
    Frame f = new JFrame("YAY it Works");
    f.addWindowListener(
        new WindowAdapter() {
          public void windowClosing(WindowEvent we) {
            System.exit(0);
          }
        });
    JApplet applet = new midapp();
    ((RootPaneContainer) f).getContentPane().add("Center", applet);
    f.add(p2, BorderLayout.EAST);

    applet.init();
    f.pack();
    f.setSize(new Dimension(653, 437));
    f.setVisible(true);
  }
  public GlassPanePageDialog(Window parent, AbstractWizardPage page) {
    super(parent);
    setShield(1f);

    if (parent instanceof RootPaneContainer) {
      ((RootPaneContainer) parent).setGlassPane(this);
    }

    createComponents(page);

    page.addPageUpdateListener(
        new IWizardPageUpdateListener() {
          @Override
          public void pageUpdated(IWizardPage page) {
            updateState();
          }
        });

    this.page = page;
  }