@@ -69,8 +69,6 @@ public final class GUI extends JFrame implements BaseXWindow {
6969 /** Indicates if a running command or operation is updating. */
7070 public boolean updating ;
7171
72- /** Fullscreen flag. */
73- boolean fullscreen ;
7472 /** Button panel. */
7573 final BaseXBack buttons ;
7674 /** Navigation/input panel. */
@@ -101,11 +99,6 @@ public final class GUI extends JFrame implements BaseXWindow {
10199 /** Indicates if a command is running. */
102100 private boolean running ;
103101
104- /** Menu panel height. */
105- private int menuHeight ;
106- /** Fullscreen Window. */
107- private JFrame fullscr ;
108-
109102 /** Password reader. */
110103 private static volatile PasswordReader pwReader ;
111104
@@ -581,19 +574,13 @@ void updateControl(final JComponent comp, final boolean show, final String layou
581574 if (comp == status ) {
582575 if (show ) top .add (comp , layout );
583576 else top .remove (comp );
584- } else if (comp == menu ) {
585- if (!show ) menuHeight = menu .getHeight ();
586- final int s = show ? menuHeight : 0 ;
587- comp .setPreferredSize (new Dimension (comp .getPreferredSize ().width , s ));
588- menu .setSize (menu .getWidth (), s );
589577 } else if (show ) {
590578 control .add (comp , layout );
591579 } else {
592580 control .remove (comp );
593581 }
594582 setContentBorder ();
595- final Component frame = fullscr == null ? getRootPane () : fullscr ;
596- frame .validate ();
583+ getRootPane ().validate ();
597584 refreshControls (false );
598585 }
599586
@@ -631,57 +618,6 @@ public void refreshControls(final boolean result) {
631618 menu .refresh ();
632619 }
633620
634- /**
635- * Toggles fullscreen mode.
636- */
637- void fullscreen () {
638- fullscreen ^= true ;
639- fullscreen (fullscreen );
640- }
641-
642- /**
643- * Turns fullscreen mode on/off.
644- * @param full fullscreen flag
645- */
646- public void fullscreen (final boolean full ) {
647- if (full ^ fullscr == null ) return ;
648-
649- if (full ) {
650- control .remove (buttons );
651- control .remove (nav );
652- getRootPane ().remove (menu );
653- top .remove (status );
654- remove (top );
655- fullscr = new JFrame ();
656- fullscr .setIconImage (getIconImage ());
657- fullscr .setTitle (getTitle ());
658- fullscr .setUndecorated (true );
659- fullscr .setJMenuBar (menu );
660- fullscr .add (top );
661- fullscr .setDefaultCloseOperation (WindowConstants .DISPOSE_ON_CLOSE );
662- } else {
663- fullscr .removeAll ();
664- fullscr .dispose ();
665- fullscr = null ;
666- if (!gopts .get (GUIOptions .SHOWBUTTONS )) control .add (buttons , BorderLayout .CENTER );
667- if (!gopts .get (GUIOptions .SHOWINPUT )) control .add (nav , BorderLayout .SOUTH );
668- if (!gopts .get (GUIOptions .SHOWSTATUS )) top .add (status , BorderLayout .SOUTH );
669- setJMenuBar (menu );
670- add (top );
671- }
672-
673- gopts .set (GUIOptions .SHOWBUTTONS , !full );
674- gopts .set (GUIOptions .SHOWINPUT , !full );
675- gopts .set (GUIOptions .SHOWSTATUS , !full );
676- fullscreen = full ;
677-
678- GraphicsEnvironment .getLocalGraphicsEnvironment ().getDefaultScreenDevice ().setFullScreenWindow (
679- fullscr );
680- setContentBorder ();
681- updateControl (menu , !full , BorderLayout .NORTH );
682- setVisible (!full );
683- }
684-
685621 @ Override
686622 public GUI gui () {
687623 return this ;
0 commit comments