Skip to content

Commit 2e1e05b

Browse files
[DEL] GUI: Fullscreen mode removed
1 parent 92db022 commit 2e1e05b

20 files changed

Lines changed: 3 additions & 100 deletions

basex-core/.settings/dictionary.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ ft
5656
ftcontains
5757
ftdata
5858
ftnot
59-
fullscreen
6059
fulltext
6160
gath
6261
gruen

basex-core/src/main/java/org/basex/core/Text.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,6 @@ public interface Text {
948948
/** Command info. */
949949
String FILTER_SELECTED = lang("filter_selected");
950950
/** Command info. */
951-
String FULLSCREEN = lang("fullscreen");
952-
/** Command info. */
953951
String GO_BACK = lang("go_back");
954952
/** Command info. */
955953
String GO_FORWARD = lang("go_forward");

basex-core/src/main/java/org/basex/gui/GUI.java

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

basex-core/src/main/java/org/basex/gui/GUIConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public final class GUIConstants {
119119
}, {
120120
C_SHOW_EDITOR, C_SHOW_PROJECT, C_FIND_CONTENTS, SEPARATOR,
121121
C_SHOW_RESULT, C_SHOW_INFO, SEPARATOR,
122-
C_SHOW_BUTTONS, C_SHOW_INPUT_BAR, C_SHOW_STATUS_BAR, Prop.MAC ? null : C_FULLSCREEN
122+
C_SHOW_BUTTONS, C_SHOW_INPUT_BAR, C_SHOW_STATUS_BAR
123123
}, {
124124
C_SHOW_MAP, C_SHOW_TREE, C_SHOW_FOLDER, C_SHOW_PLOT, C_SHOW_TABLE, C_SHOW_EXPLORE,
125125
}, {

basex-core/src/main/java/org/basex/gui/GUIMenuCmd.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -745,19 +745,6 @@ public void execute(final GUI gui) {
745745
}
746746
},
747747

748-
/** Fullscreen mode. */
749-
C_FULLSCREEN(FULLSCREEN, Prop.MAC ? "% shift F" : "F11", false, true) {
750-
@Override
751-
public void execute(final GUI gui) {
752-
gui.fullscreen();
753-
}
754-
755-
@Override
756-
public boolean selected(final GUI gui) {
757-
return gui.fullscreen;
758-
}
759-
},
760-
761748
/* OPTION MENU */
762749

763750
/** Real-time execution on/off. */

basex-core/src/main/java/org/basex/gui/view/View.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ public void mousePressed(final MouseEvent e) {
101101

102102
@Override
103103
public void keyPressed(final KeyEvent e) {
104-
if(gui.updating) return;
105-
if(ESCAPE.is(e)) gui.fullscreen(false);
106-
107-
if(gui.context.data() == null) return;
104+
if(gui.updating || gui.context.data() == null) return;
108105
if(SPACE.is(e)) {
109106
gui.notify.mark(sc(e) ? 2 : e.isShiftDown() ? 1 : 0, null);
110107
} else if(ENTER.is(e)) {

basex-core/src/main/resources/lang/Chinese.lang

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ first_line_header = 将第一行作为表头
142142
folder = 文件夹
143143
fonts = 字体
144144
format = 格式
145-
fullscreen = 全屏
146145
fulltext = 全文检索
147146
fulltext_index = 全文索引
148147
general = 常规

basex-core/src/main/resources/lang/Dutch.lang

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ first_line_header = Schakel deze optie in om een header te gebruiken
142142
folder = Directory
143143
fonts = Fonts
144144
format = Formaat
145-
fullscreen = Volledig scherm
146145
fulltext = Full-Text
147146
fulltext_index = Full-Text index
148147
general = Algemeen

basex-core/src/main/resources/lang/English.lang

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ first_line_header = Parse first line as table header
142142
folder = Folder
143143
fonts = Fonts
144144
format = Format
145-
fullscreen = Fullscreen
146145
fulltext = Full-Text
147146
fulltext_index = Full-Text Index
148147
general = General

basex-core/src/main/resources/lang/French.lang

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ first_line_header = Analyser la première ligne comme entête de tableau
142142
folder = Dossier
143143
fonts = Polices
144144
format = Format
145-
fullscreen = Plein écran
146145
fulltext = Plein-texte
147146
fulltext_index = Index plein-texte
148147
general = Général

0 commit comments

Comments
 (0)