--- /dev/null
+package jalview.io;
+
+import jalview.bin.Cache;
+import jalview.util.MessageManager;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+public class BackupFilesPresetEntry
+{
+
+ public String suffix;
+
+ public static final int DIGITSMIN = 1;
+
+ public static final int DIGITSMAX = 6;
+
+ public int digits;
+
+ public boolean reverse;
+
+ public boolean keepAll;
+
+ public static final int ROLLMAXMIN = 1;
+
+ public static final int ROLLMAXMAX = 999;
+
+ public int rollMax;
+
+ public boolean confirmDelete;
+
+ public static final String SAVEDCONFIG = BackupFiles.NS + "_SAVED";
+
+ public static final String CUSTOMCONFIG = BackupFiles.NS + "_CUSTOM";
+
+ private static final String stringDelim = "\t";
+
+ public static final int BACKUPFILESSCHEMECUSTOM = 0;
+
+ public static final int BACKUPFILESSCHEMEDEFAULT = 1;
+
+ public BackupFilesPresetEntry(String suffix, int digits, boolean reverse,
+ boolean keepAll, int rollMax, boolean confirmDelete)
+ {
+ this.suffix = suffix == null ? "" : suffix;
+ this.digits = digits < DIGITSMIN ? DIGITSMIN
+ : (digits > DIGITSMAX ? DIGITSMAX : digits);
+ this.reverse = reverse;
+ this.keepAll = keepAll;
+ this.rollMax = rollMax < ROLLMAXMIN ? ROLLMAXMIN
+ : (rollMax > ROLLMAXMAX ? ROLLMAXMAX : rollMax);
+ this.confirmDelete = confirmDelete;
+ }
+
+ public boolean equals(BackupFilesPresetEntry compare)
+ {
+ return suffix.equals(compare.suffix) && digits == compare.digits
+ && reverse == compare.reverse && keepAll == compare.keepAll
+ && rollMax == compare.rollMax
+ && confirmDelete == compare.confirmDelete;
+ }
+
+ @Override
+ public String toString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.append(suffix);
+ sb.append(stringDelim);
+ sb.append(digits);
+ sb.append(stringDelim);
+ sb.append(reverse);
+ sb.append(stringDelim);
+ sb.append(keepAll);
+ sb.append(stringDelim);
+ sb.append(rollMax);
+ sb.append(stringDelim);
+ sb.append(confirmDelete);
+ return sb.toString();
+ }
+
+ public static BackupFilesPresetEntry createBackupFilesPresetEntry(
+ String line)
+ {
+ if (line == null)
+ {
+ return null;
+ }
+ StringTokenizer st = new StringTokenizer(line, stringDelim);
+ String suffix = null;
+ int digits = 0;
+ boolean reverse = false;
+ boolean keepAll = false;
+ int rollMax = 0;
+ boolean confirmDelete = false;
+
+ try
+ {
+ suffix = st.nextToken();
+ digits = Integer.valueOf(st.nextToken());
+ reverse = Boolean.valueOf(st.nextToken());
+ keepAll = Boolean.valueOf(st.nextToken());
+ rollMax = Integer.valueOf(st.nextToken());
+ confirmDelete = Boolean.valueOf(st.nextToken());
+ } catch (Exception e)
+ {
+ System.out.println("Error parsing backupfiles scheme '" + line + "'");
+ }
+
+ return new BackupFilesPresetEntry(suffix, digits, reverse, keepAll,
+ rollMax, confirmDelete);
+ }
+
+ public static BackupFilesPresetEntry getSavedBackupEntry()
+ {
+ String savedPresetString = Cache
+ .getDefault(BackupFilesPresetEntry.SAVEDCONFIG, null);
+ BackupFilesPresetEntry savedPreset = BackupFilesPresetEntry
+ .createBackupFilesPresetEntry(savedPresetString);
+ if (savedPreset == null)
+ {
+ savedPreset = backupfilesPresetEntriesValues
+ .get(BACKUPFILESSCHEMEDEFAULT);
+ }
+ return savedPreset;
+ }
+
+ public static final IntKeyStringValueEntry[] backupfilesPresetEntries = {
+ new IntKeyStringValueEntry(BACKUPFILESSCHEMEDEFAULT,
+ MessageManager.getString("label.default")),
+ new IntKeyStringValueEntry(2,
+ MessageManager.getString("label.single_file")),
+ new IntKeyStringValueEntry(3,
+ MessageManager.getString("label.keep_all_versions")),
+ new IntKeyStringValueEntry(4,
+ MessageManager.getString("label.rolled_backups")),
+ // ...
+ // IMPORTANT, keep "Custom" entry with key 0 (even though it appears last)
+ new IntKeyStringValueEntry(BACKUPFILESSCHEMECUSTOM,
+ MessageManager.getString("label.custom")) };
+
+ public static final Map<Integer, BackupFilesPresetEntry> backupfilesPresetEntriesValues = new HashMap<>()
+ {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 125L;
+
+ {
+ put(1, new BackupFilesPresetEntry(
+ ".bak" + BackupFiles.NUM_PLACEHOLDER, 3, false, false, 3,
+ false));
+ put(2, new BackupFilesPresetEntry("~", 1, false, false, 1, false));
+ put(3, new BackupFilesPresetEntry(".v" + BackupFiles.NUM_PLACEHOLDER,
+ 3, false, true, 10, true));
+ put(4, new BackupFilesPresetEntry(
+ "_bak." + BackupFiles.NUM_PLACEHOLDER, 1, true, false, 9,
+ false));
+
+ // This gets replaced by GPreferences
+ put(BACKUPFILESSCHEMECUSTOM,
+ new BackupFilesPresetEntry("", 0, false, false, 0, false));
+ }
+ };
+
+}
import jalview.gui.StructureViewer.ViewerType;
import jalview.io.BackupFilenameParts;
import jalview.io.BackupFiles;
+import jalview.io.BackupFilesPresetEntry;
+import jalview.io.IntKeyStringValueEntry;
import jalview.util.MessageManager;
import java.awt.BorderLayout;
import java.awt.event.KeyListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
-import java.util.HashMap;
-import java.util.Map;
import javax.swing.AbstractCellEditor;
import javax.swing.BorderFactory;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
-import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
protected JLabel presetsComboLabel = new JLabel();
+ protected JCheckBox customiseCheckbox = new JCheckBox();
+
protected JButton revertButton = new JButton();
protected JComboBox<IntKeyStringValueEntry> backupfilesPresetsCombo = new JComboBox<>();
+ private int backupfilesPresetsComboLastSelected = 0;
+
protected JPanel suffixPanel = new JPanel();
protected JPanel keepfilesPanel = new JPanel();
protected void loadLastSavedBackupsOptions()
{
+ BackupFilesPresetEntry savedPreset = BackupFilesPresetEntry
+ .getSavedBackupEntry();
enableBackupFiles
.setSelected(Cache.getDefault(BackupFiles.ENABLED, true));
+
+ BackupFilesPresetEntry backupfilesCustomEntry = BackupFilesPresetEntry
+ .createBackupFilesPresetEntry(Cache
+ .getDefault(BackupFilesPresetEntry.CUSTOMCONFIG, null));
+ if (backupfilesCustomEntry == null)
+ {
+ backupfilesCustomEntry = BackupFilesPresetEntry.backupfilesPresetEntriesValues
+ .get(BackupFilesPresetEntry.BACKUPFILESSCHEMEDEFAULT);
+ }
+ BackupFilesPresetEntry.backupfilesPresetEntriesValues.put(
+ BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM,
+ backupfilesCustomEntry);
+
setComboIntStringKey(backupfilesPresetsCombo,
- Cache.getDefault(BackupFiles.NS + "_PRESET", 1));
- suffixTemplate.setText(Cache.getDefault(BackupFiles.SUFFIX,
- ".bak" + BackupFiles.NUM_PLACEHOLDER));
- suffixDigitsSpinner
- .setValue(Cache.getDefault(BackupFiles.SUFFIX_DIGITS, 3));
- suffixReverse.setSelected(
- Cache.getDefault(BackupFiles.REVERSE_ORDER, false));
- backupfilesKeepAll
- .setSelected(Cache.getDefault(BackupFiles.NO_MAX, false));
- backupfilesRollMaxSpinner
- .setValue(Cache.getDefault(BackupFiles.ROLL_MAX, 3));
- backupfilesConfirmDelete.setSelected(
- Cache.getDefault(BackupFiles.CONFIRM_DELETE_OLD, true));
+ Cache.getDefault(BackupFiles.NS + "_PRESET",
+ BackupFilesPresetEntry.BACKUPFILESSCHEMEDEFAULT));
+ // backupsTabUpdatePresets();
+
+ System.out
+ .println("LOADLASTSAVEDBACKUPSOPTIONS SETTING BACKUPS OPTIONS");
+ backupsSetOptions(savedPreset);
backupsOptionsSetEnabled();
updateBackupFilesExampleLabel();
}
+ private void setBackupfilesCustomPreset()
+ {
+ if (customiseCheckbox.isSelected() && getComboIntStringKey(
+ backupfilesPresetsCombo) == BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM)
+ {
+ BackupFilesPresetEntry.backupfilesPresetEntriesValues
+ .put(BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM,
+ getBackupfilesCurrentEntry());
+ }
+ }
+
private boolean warnAboutSuffixReverseChange()
{
- boolean savedSuffixReverse = Cache.getDefault(BackupFiles.REVERSE_ORDER,
- false);
- int savedSuffixDigits = Cache.getDefault(BackupFiles.SUFFIX_DIGITS, 3);
- String savedSuffixTemplate = Cache.getDefault(BackupFiles.SUFFIX,
- ".bak" + BackupFiles.NUM_PLACEHOLDER);
+ BackupFilesPresetEntry bfpe = BackupFilesPresetEntry
+ .getSavedBackupEntry();
+ boolean savedSuffixReverse = bfpe.reverse;
+ int savedSuffixDigits = bfpe.digits;
+ String savedSuffixTemplate = bfpe.suffix;
boolean nowSuffixReverse = suffixReverse.isSelected();
int nowSuffixDigits = getSpinnerInt(suffixDigitsSpinner, 3);
return backupsTab;
}
- protected static final int BACKUPFILESSCHEMECUSTOMISE = 0;
-
- private static final IntKeyStringValueEntry[] backupfilesPresetEntries = {
- new IntKeyStringValueEntry(1,
- MessageManager.getString("label.default")),
- new IntKeyStringValueEntry(2,
- MessageManager.getString("label.single_file")),
- new IntKeyStringValueEntry(3,
- MessageManager.getString("label.keep_all_versions")),
- new IntKeyStringValueEntry(4,
- MessageManager.getString("label.rolled_backups")),
- // ...
- // IMPORTANT, keep "Custom" entry with key 0 (even though it appears last)
- new IntKeyStringValueEntry(BACKUPFILESSCHEMECUSTOMISE,
- MessageManager.getString("label.customise")) };
-
- private static final Map<Integer, BackupFilesPresetEntry> backupfilesPresetEntriesValues = new HashMap<Integer, BackupFilesPresetEntry>()
- {
- /**
- *
- */
- private static final long serialVersionUID = 125L;
-
- {
- put(1, new BackupFilesPresetEntry(
- ".bak" + BackupFiles.NUM_PLACEHOLDER, 3, false, false, 3,
- false));
- put(2, new BackupFilesPresetEntry("~", 1, false, false, 1, false));
- put(3, new BackupFilesPresetEntry(".v" + BackupFiles.NUM_PLACEHOLDER,
- 3, false, true, 10, true));
- put(4, new BackupFilesPresetEntry(
- "_bak." + BackupFiles.NUM_PLACEHOLDER, 1, true, false, 9,
- false));
- }
- };
-
private JPanel initBackupsTabPresetsPanel()
{
presetsComboLabel = new JLabel(title + ":");
presetsPanel.add(presetsComboLabel, gbc);
- for (int i = 0; i < backupfilesPresetEntries.length; i++)
+ for (int i = 0; i < BackupFilesPresetEntry.backupfilesPresetEntries.length; i++)
{
- backupfilesPresetsCombo.addItem(backupfilesPresetEntries[i]);
+ backupfilesPresetsCombo
+ .addItem(BackupFilesPresetEntry.backupfilesPresetEntries[i]);
}
- // put "Previously saved scheme" item in italics (it's not really
- // selectable, as such -- it deselects itself when selected) and
- // "Customise" in bold
- backupfilesPresetsCombo
- .setRenderer(new BackupFilesPresetsComboBoxRenderer());
backupfilesPresetsCombo.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
- backupsTabUpdatePresets();
+ int key = getComboIntStringKey(backupfilesPresetsCombo);
+ if (!customiseCheckbox.isSelected())
+ {
+ backupfilesPresetsComboLastSelected = key;
+ }
+ if (key == BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM)
+ {
+ if (customiseCheckbox.isSelected())
+ {
+ // got here by clicking on customiseCheckbox so don't change the values
+ backupfilesCustomOptionsSetEnabled();
+ }
+ else
+ {
+ backupsTabUpdatePresets();
+ backupfilesCustomOptionsSetEnabled();
+ }
+ }
+ else
+ {
+ customiseCheckbox.setSelected(false);
+ backupsTabUpdatePresets();
+ backupfilesCustomOptionsSetEnabled();
+ }
}
});
@Override
public void actionPerformed(ActionEvent e)
{
- loadLastSavedBackupsOptions();
+ backupsSetOptions(
+ BackupFilesPresetEntry.backupfilesPresetEntriesValues.get(
+ BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM));
+ backupfilesCustomOptionsSetEnabled();
}
});
revertButton.setFont(LABEL_FONT);
+ customiseCheckbox.setFont(LABEL_FONT);
+ customiseCheckbox.setText(MessageManager.getString("label.customise"));
+ customiseCheckbox.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ int currently = getComboIntStringKey(backupfilesPresetsCombo);
+ if (customiseCheckbox.isSelected())
+ {
+ backupfilesPresetsComboLastSelected = currently;
+ setComboIntStringKey(backupfilesPresetsCombo,
+ BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM);
+ }
+ else
+ {
+ setComboIntStringKey(backupfilesPresetsCombo,
+ backupfilesPresetsComboLastSelected);
+
+ }
+ backupfilesCustomOptionsSetEnabled();
+ }
+ });
+
+ // customise checkbox
+ gbc.gridx = 0;
+ gbc.gridy++;
+ presetsPanel.add(customiseCheckbox, gbc);
+
// "Cancel changes" button (aligned with combo box above)
gbc.gridx = 1;
- gbc.gridy++;
presetsPanel.add(revertButton, gbc);
return presetsPanel;
int key = entry.getKey();
String value = entry.getValue();
- // BACKUPFILESSCHEMECUSTOMISE (==0) reserved for "Custom"
- if (key != BACKUPFILESSCHEMECUSTOMISE)
+ if (BackupFilesPresetEntry.backupfilesPresetEntriesValues
+ .containsKey(key))
{
- if (backupfilesPresetEntriesValues.containsKey(key))
- {
- backupsSetOptions(backupfilesPresetEntriesValues.get(key));
- }
- else
- {
- System.out.println("Preset '" + value + "' not implemented");
- }
+ backupsSetOptions(
+ BackupFilesPresetEntry.backupfilesPresetEntriesValues
+ .get(key));
+ }
+ else
+ {
+ System.out.println(
+ "Preset '" + value + "' [key:" + key + "] not implemented");
}
- backupfilesCustomOptionsSetEnabled();
+ // Custom options will now be enabled when the customiseCheckbox is checked
+ // (performed above)
+ // backupfilesCustomOptionsSetEnabled();
updateBackupFilesExampleLabel();
}
break;
}
}
- backupsTabUpdatePresets();
+ // backupsTabUpdatePresets();
}
private JPanel initBackupsTabSuffixPanel()
{
updateBackupFilesExampleLabel();
backupfilesCustomOptionsSetEnabled();
+ backupfilesRevertButtonSetEnabled(true);
}
});
- KeyListener kl = new KeyListener()
+ suffixTemplate.addKeyListener(new KeyListener()
{
@Override
public void keyReleased(KeyEvent e)
{
updateBackupFilesExampleLabel();
backupfilesCustomOptionsSetEnabled();
+ backupfilesRevertButtonSetEnabled(true);
}
@Override
@Override
public void keyTyped(KeyEvent e)
{
+ int count = 300;
char c = e.getKeyChar();
if (c == ':' || c == '/' || c == '\\')
{
}
}
- };
- suffixTemplate.addKeyListener(kl);
+ });
// digits spinner
suffixDigitsLabel
.setText(MessageManager.getString("label.index_digits"));
suffixDigitsLabel.setHorizontalAlignment(SwingConstants.LEFT);
suffixDigitsLabel.setFont(LABEL_FONT);
- int defaultmin = 1;
- int defaultmax = 6;
ChangeListener c = new ChangeListener()
{
@Override
public void stateChanged(ChangeEvent e)
{
+ backupfilesRevertButtonSetEnabled(true);
updateBackupFilesExampleLabel();
}
};
- setIntegerSpinner(suffixDigitsSpinner, defaultmin, defaultmax, 3, c);
+ setIntegerSpinner(suffixDigitsSpinner, BackupFilesPresetEntry.DIGITSMIN,
+ BackupFilesPresetEntry.DIGITSMAX, 3, c);
suffixReverse.setLabels(MessageManager.getString("label.reverse_roll"),
MessageManager.getString("label.increment_index"));
}
if (okay)
{
+ backupfilesRevertButtonSetEnabled(true);
updateBackupFilesExampleLabel();
}
else
{
- boolean savedSuffixReverse = Cache
- .getDefault(BackupFiles.REVERSE_ORDER, false);
+ boolean savedSuffixReverse = BackupFilesPresetEntry
+ .getSavedBackupEntry().reverse;
suffixReverse.setSelected(savedSuffixReverse);
}
}
@Override
public void actionPerformed(ActionEvent e)
{
+ backupfilesRevertButtonSetEnabled(true);
updateBackupFilesExampleLabel();
}
});
@Override
public void actionPerformed(ActionEvent e)
{
+ backupfilesRevertButtonSetEnabled(true);
keepRollMaxOptionsEnabled();
updateBackupFilesExampleLabel();
}
@Override
public void stateChanged(ChangeEvent e)
{
+ backupfilesRevertButtonSetEnabled(true);
updateBackupFilesExampleLabel();
}
};
- setIntegerSpinner(backupfilesRollMaxSpinner, 1, 999, 4, true, c);
+ setIntegerSpinner(backupfilesRollMaxSpinner,
+ BackupFilesPresetEntry.ROLLMAXMIN,
+ BackupFilesPresetEntry.ROLLMAXMAX, 4, true, c);
backupfilesConfirmDelete.setLabels(
MessageManager.getString("label.always_ask"),
MessageManager.getString("label.auto_delete"));
+ backupfilesConfirmDelete.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ backupfilesRevertButtonSetEnabled(true);
+ }
+ });
// update the enabled section
keepRollMaxOptionsEnabled();
private void backupfilesKeepAllSetEnabled(boolean tryEnabled)
{
boolean enabled = tryEnabled && enableBackupFiles.isSelected()
- && getComboIntStringKey(backupfilesPresetsCombo) == 0
+ && customiseCheckbox.isSelected()
&& suffixTemplate.getText()
.indexOf(BackupFiles.NUM_PLACEHOLDER) > -1;
keepfilesPanel.setEnabled(enabled);
private void backupfilesSuffixTemplateSetEnabled(boolean tryEnabled)
{
boolean enabled = tryEnabled && enableBackupFiles.isSelected()
- && getComboIntStringKey(backupfilesPresetsCombo) == 0;
+ && customiseCheckbox.isSelected();
suffixPanel.setEnabled(enabled);
suffixTemplateLabel.setEnabled(enabled);
suffixTemplate.setEnabled(enabled);
backupfilesSuffixTemplateDigitsSetEnabled();
}
+ private void backupfilesRevertButtonSetEnabled(boolean tryEnabled)
+ {
+ boolean enabled = tryEnabled && enableBackupFiles.isSelected()
+ && customiseCheckbox.isSelected() && backupfilesCustomChanged();
+ revertButton.setEnabled(enabled);
+ }
+
+ private boolean backupfilesCustomChanged()
+ {
+ BackupFilesPresetEntry custom = BackupFilesPresetEntry.backupfilesPresetEntriesValues
+ .get(BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM);
+ BackupFilesPresetEntry current = getBackupfilesCurrentEntry();
+ return !custom.equals(current);
+ }
+
+ protected BackupFilesPresetEntry getBackupfilesCurrentEntry()
+ {
+ String suffix = suffixTemplate.getText();
+ int digits = getSpinnerInt(suffixDigitsSpinner, 3);
+ boolean reverse = suffixReverse.isSelected();
+ boolean keepAll = backupfilesKeepAll.isSelected();
+ int rollMax = getSpinnerInt(backupfilesRollMaxSpinner, 3);
+ boolean confirmDelete = backupfilesConfirmDelete.isSelected();
+
+ BackupFilesPresetEntry bfpe = new BackupFilesPresetEntry(suffix, digits,
+ reverse, keepAll, rollMax, confirmDelete);
+
+ return bfpe;
+ }
+
protected void backupfilesCustomOptionsSetEnabled()
{
- int scheme = getComboIntStringKey(backupfilesPresetsCombo);
- boolean enabled = scheme == 0 && enableBackupFiles.isSelected();
+ // int scheme = getComboIntStringKey(backupfilesPresetsCombo);
+ // boolean enabled = scheme == BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM &&
+ // enableBackupFiles.isSelected();
+ boolean enabled = customiseCheckbox.isSelected();
+ //boolean enabled = customiseCheckbox.isSelected() && enableBackupFiles.isSelected();
+ backupfilesRevertButtonSetEnabled(enabled);
backupfilesSuffixTemplateSetEnabled(enabled);
backupfilesKeepAllSetEnabled(enabled);
}
presetsPanel.setEnabled(enabled);
presetsComboLabel.setEnabled(enabled);
backupfilesPresetsCombo.setEnabled(enabled);
+ customiseCheckbox.setEnabled(enabled);
revertButton.setEnabled(enabled);
}
}
}
-class IntKeyStringValueEntry
-{
- int k;
-
- String v;
-
- public IntKeyStringValueEntry(int k, String v)
- {
- this.k = k;
- this.v = v;
- }
-
- @Override
- public String toString()
- {
- return this.getValue();
- }
-
- public int getKey()
- {
- return k;
- }
-
- public String getValue()
- {
- return v;
- }
-}
-
-class BackupFilesPresetEntry
-{
- String suffix;
-
- int digits;
-
- boolean reverse;
-
- boolean keepAll;
-
- int rollMax;
-
- boolean confirmDelete;
-
- public BackupFilesPresetEntry(String suffix, int digits, boolean reverse,
- boolean keepAll, int rollMax, boolean confirmDelete)
- {
- this.suffix = suffix;
- this.digits = digits;
- this.reverse = reverse;
- this.keepAll = keepAll;
- this.rollMax = rollMax;
- this.confirmDelete = confirmDelete;
- }
-}
-
-class BackupFilesPresetsComboBoxRenderer extends DefaultListCellRenderer
-{
- /**
- *
- */
- private static final long serialVersionUID = 88L;
-
- @Override
- public Component getListCellRendererComponent(JList list, Object value,
- int index, boolean isSelected, boolean cellHasFocus)
- {
- super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
-
- try {
- IntKeyStringValueEntry e = (IntKeyStringValueEntry) value;
- if (e.getKey() == GPreferences.BACKUPFILESSCHEMECUSTOMISE)
- {
- // "Customise" item
- this.setFont(this.getFont().deriveFont(Font.BOLD));
- }
- } catch (Exception e) {
- return this;
- }
-
- return this;
- }
-}