private static JRootPane getRootPane(Window window) {
   if (window instanceof RootPaneContainer) {
     RootPaneContainer container = (RootPaneContainer) window;
     return container.getRootPane();
   }
   return null;
 }
Пример #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);
    }
  }