3131class AppearancePrefsTab extends JPanel implements PrefsTab {
3232
3333 JabRefPreferences _prefs ;
34- private JCheckBox colorCodes , overrideFonts ;//, useCustomIconTheme;
34+ private JCheckBox colorCodes , overrideFonts , showGrid ;//, useCustomIconTheme;
3535 private ColorSetupPanel colorPanel = new ColorSetupPanel ();
3636 private Font font = GUIGlobals .CURRENTFONT ;
3737 private int oldMenuFontSize ;
@@ -59,6 +59,8 @@ public AppearancePrefsTab(JabRefPreferences prefs) {
5959 ("Use antialiasing font"));*/
6060 overrideFonts = new JCheckBox (Globals .lang ("Override default font settings" ));
6161
62+ showGrid = new JCheckBox (Globals .lang ("Show gridlines" ));
63+
6264 //useCustomIconTheme = new JCheckBox(Globals.lang("Use custom icon theme"));
6365 //customIconThemeFile = new JTextField();
6466 FormLayout layout = new FormLayout
@@ -86,6 +88,8 @@ public AppearancePrefsTab(JabRefPreferences prefs) {
8688 builder .nextLine ();
8789 builder .append (colorCodes );
8890 builder .nextLine ();
91+ builder .append (showGrid );
92+ builder .nextLine ();
8993 JButton fontButton = new JButton (Globals .lang ("Set table font" ));
9094 builder .append (fontButton );
9195 builder .nextLine ();
@@ -157,6 +161,7 @@ public void setValues() {
157161 fontSize .setEnabled (overrideFonts .isSelected ());
158162 //useCustomIconTheme.setSelected(_prefs.getBoolean("useCustomIconTheme"));
159163 //customIconThemeFile.setText(_prefs.get("customIconThemeFile"));
164+ showGrid .setSelected (_prefs .getBoolean ("tableShowGrid" ));
160165 colorPanel .setValues ();
161166 }
162167
@@ -175,6 +180,7 @@ public void storeSettings() {
175180 _prefs .putBoolean ("overrideDefaultFonts" , overrideFonts .isSelected ());
176181 GUIGlobals .CURRENTFONT = font ;
177182 colorPanel .storeSettings ();
183+ _prefs .putBoolean ("tableShowGrid" , showGrid .isSelected ());
178184 try {
179185 int size = Integer .parseInt (fontSize .getText ());
180186 if ((overrideFonts .isSelected () != oldOverrideFontSize ) ||
@@ -187,7 +193,6 @@ public void storeSettings() {
187193 Globals .lang ("Changed font settings" ),
188194 JOptionPane .WARNING_MESSAGE );
189195 }
190-
191196 } catch (NumberFormatException ex ) {
192197 ex .printStackTrace ();
193198 }
0 commit comments