* User configurable options are:
* BACKUPFILES_ENABLED - boolean flag as to whether to use this mechanism or act as before, including overwriting files as saved.
* BACKUPFILES_SUFFIX - a template to insert just before the file extension. Use '%n' to be replaced by a 0-led SUFFIX_DIGITS long integer.
+ * BACKUPFILES_NO_MAX - flag to turn off setting a maximum number of backup files to keep.
* BACKUPFILES_ROLL_MAX - the maximum number of backupfiles to keep for any one alignment or project file.
* BACKUPFILES_SUFFIX_DIGITS - the number of digits to insert replace %n with (e.g. BACKUPFILES_SUFFIX_DIGITS = 3 would make "001", "002", etc)
* BACKUPFILES_REVERSE_ORDER - if true then "logfile" style numbering and file rolling will occur. If false then ever-increasing version numbering will occur, but old files will still be deleted if there are more than ROLL_MAX backup files.
public static String SUFFIX = NS + "_SUFFIX";
+ public static String NO_MAX = NS + "_NO_MAX";
+
public static String ROLL_MAX = NS + "_ROLL_MAX";
public static String SUFFIX_DIGITS = NS + "_SUFFIX_DIGITS";
// defaultSuffix - default template to use to append to basename of file
private String suffix;
+ // noMax - flag to turn off a maximum number of files
+ private boolean noMax;
+
// defaultMax - default max number of backup files
private int max;
this(new File(filename));
}
- // first time defaults for SUFFIX, ROLL_MAX, SUFFIX_DIGITS and REVERSE_ORDER
+ // first time defaults for SUFFIX, NO_MAX, ROLL_MAX, SUFFIX_DIGITS and
+ // REVERSE_ORDER
public BackupFiles(File file)
{
- this(file, "-v" + NUM_PLACEHOLDER, 4, 3, false);
+ this(file, "-v" + NUM_PLACEHOLDER, false, 4, 3, false);
}
public BackupFiles(File file,
- String defaultSuffix, int defaultMax, int defaultDigits,
+ String defaultSuffix, boolean defaultNoMax, int defaultMax,
+ int defaultDigits,
boolean defaultReverseOrder)
{
classInit();
this.file = file;
this.suffix = Cache.getDefault(SUFFIX, defaultSuffix);
+ this.noMax = Cache.getDefault(NO_MAX, defaultNoMax);
this.max = Cache.getDefault(ROLL_MAX, defaultMax);
this.digits = Cache.getDefault(SUFFIX_DIGITS, defaultDigits);
this.reverseOrder = Cache.getDefault(REVERSE_ORDER,
return path;
}
+ public static String getNumPlaceHolder()
+ {
+ return NUM_PLACEHOLDER;
+ }
+
public boolean setWriteSuccess(boolean flag)
{
boolean old = this.tempFileWriteSuccess;
{
// file doesn't yet exist or backups are not enabled
- if ((!file.exists()) || (!enabled) || (max < -1))
+ if ((!file.exists()) || (!enabled) || (max < 0))
{
// nothing to do
return true;
// backup style numbering
File lastfile = null;
- int tempMax = max;
- // max == -1 means no limits
+ int tempMax = noMax ? -1 : max;
+ // noMax == true means no limits
// look for first "gap" in backupFiles
- // if tempMax is -1 at this stage just keep going until there's a gap...
+ // if tempMax is -1 at this stage just keep going until there's a gap,
+ // then hopefully tempMax gets set to the right index (a positive
+ // integer so the loop breaks)...
// why do I feel a little uneasy about this loop?..
- for (int i = 1; tempMax < 0 || (max >= 0 && i <= max); i++)
+ for (int i = 1; tempMax < 0 || i <= max; i++)
{
- if (!bfTreeMap.containsKey(i)) // first non-existent backupfile
+ if (!bfTreeMap.containsKey(i)) // first index without existent
+ // backupfile
{
tempMax = i;
}
}
- for (int m = 0; m < tempMax; m++)
+ // for (int m = 0; m < tempMax; m++)
+ for (int n = tempMax; n > 0; n--)
{
- int n = tempMax - m;
+ // int n = tempMax - m;
String backupfilename = dir + File.separatorChar
- + BackupFilenameParts.getBackupFilename(n, basename,
+ + BackupFilenameFilter.getBackupFilename(n, basename,
suffix, digits, extension);
File backupfile_n = new File(backupfilename);
continue;
}
- if (m == 0 && backupfile_n.exists())
+ // if (m == 0 && backupfile_n.exists())
+ if ((!noMax) && n == tempMax && backupfile_n.exists())
{
// move the largest (max) rolled file to a temp file and add to the delete list
try
bfTreeMap.values().toArray(backupFiles);
- // max value of -1 means keep all backup files
- if (bfTreeMap.size() >= max && max != -1)
+ // noMax == true means keep all backup files
+ if ((!noMax) && bfTreeMap.size() >= max)
{
// need to delete some files to keep number of backups to designated
// max
// Let's make the new backup file!! yay, got there at last!
String latestBackupFilename = dir + File.separatorChar
- + BackupFilenameParts.getBackupFilename(nextIndexNum, basename,
+ + BackupFilenameFilter.getBackupFilename(nextIndexNum, basename,
suffix, digits, extension);
File latestBackupFile = new File(latestBackupFilename);
ret = ret && file.renameTo(latestBackupFile);
*/
package jalview.jbgui;
+import jalview.bin.Cache;
import jalview.fts.core.FTSDataColumnPreferences;
import jalview.fts.core.FTSDataColumnPreferences.PreferenceSource;
import jalview.fts.service.pdb.PDBFTSRestClient;
+import jalview.gui.JalviewBooleanRadioButtons;
import jalview.gui.JvSwingUtils;
import jalview.gui.StructureViewer.ViewerType;
+import jalview.io.BackupFilenameFilter;
+import jalview.io.BackupFiles;
import jalview.util.MessageManager;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
+import javax.swing.JSpinner;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
+import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.ListSelectionModel;
+import javax.swing.SpinnerModel;
+import javax.swing.SpinnerNumberModel;
import javax.swing.SwingConstants;
import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
*/
protected JPanel wsTab = new JPanel();
+ /*
+ * Backups tab components
+ * a lot of these are member variables instead of local variables only so that they
+ * can be enabled/disabled easily
+ */
+
+ protected JCheckBox enableBackupFiles = new JCheckBox();
+
+ protected JPanel suffixPanel = new JPanel();
+
+ protected JPanel keepfilesPanel = new JPanel();
+
+ protected JPanel exampleFilesPanel = new JPanel();
+
+ protected JTextField suffixTemplate = new JTextField(null, 8);
+
+ protected JLabel suffixTemplateLabel = new JLabel();
+
+ protected JLabel suffixDigitsLabel = new JLabel();
+
+ protected JSpinner suffixDigitsSpinner = new JSpinner();
+
+ protected JalviewBooleanRadioButtons suffixReverse = new JalviewBooleanRadioButtons();
+
+ protected JalviewBooleanRadioButtons backupfilesKeepAll = new JalviewBooleanRadioButtons();
+
+ protected JSpinner backupfilesRollMaxSpinner = new JSpinner();
+
+ protected JalviewBooleanRadioButtons backupfilesConfirmDelete = new JalviewBooleanRadioButtons();
+
+ protected JLabel exampleLabel = new JLabel();
+
+ protected JScrollPane exampleScrollPane = new JScrollPane();
+
+ protected JTextArea backupfilesExampleLabel = new JTextArea();
+
/**
* Creates a new GPreferences object.
*/
tabbedPane.add(initConnectionsTab(),
MessageManager.getString("label.connections"));
+ tabbedPane.add(initBackupsTab(),
+ MessageManager.getString("label.backups"));
+
tabbedPane.add(initLinksTab(),
MessageManager.getString("label.urllinks"));
embbedBioJSON.setText(MessageManager.getString("label.embbed_biojson"));
embbedBioJSON.setBounds(new Rectangle(228, 200, 250, 23));
+
+ TitledBorder backupFilesBorder = new TitledBorder(
+ MessageManager
+ .getString("label.backup_files"));
+
+
jPanel11.add(jLabel1);
jPanel11.add(blcjv);
jPanel11.add(clustaljv);
return visualTab;
}
+ /**
+ * Initialises the Backups tabbed panel.
+ *
+ * @return
+ */
+ private JPanel initBackupsTab()
+ {
+ JPanel backupsTab = new JPanel();
+ backupsTab.setBorder(new TitledBorder(MessageManager
+ .getString("label.backup_files")));
+ backupsTab.setLayout(new GridBagLayout());
+
+ enableBackupFiles.setFont(LABEL_FONT);
+ enableBackupFiles.setText(
+ MessageManager.getString("label.enable_backupfiles"));
+ enableBackupFiles
+ .setSelected(Cache.getDefault(BackupFiles.ENABLED, true));
+ enableBackupFiles.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ boolean selected = enableBackupFiles.isSelected();
+ // enable other options only when the first is checked
+ backupsOptionsSetEnabled(selected);
+ }
+ });
+
+ GridBagConstraints gbc = new GridBagConstraints();
+ gbc.weightx = 1.0;
+ gbc.weighty = 0.0;
+ gbc.anchor = GridBagConstraints.NORTHWEST;
+
+ // enable checkbox 1 row
+ gbc.gridwidth = 1;
+ gbc.gridy = 0;
+ backupsTab.add(enableBackupFiles, gbc);
+
+ // whole suffix panel next row
+ initBackupsTabSuffixPanel();
+ gbc.gridy = 1;
+ backupsTab.add(suffixPanel, gbc);
+
+ // keep files panel
+ initBackupsTabKeepFilesPanel();
+ gbc.gridy = 2;
+ backupsTab.add(keepfilesPanel, gbc);
+
+ // whole examples panel next row
+ initBackupsTabFilenameExamplesPanel();
+ gbc.gridy = 3;
+ backupsTab.add(exampleFilesPanel, gbc);
+
+ return backupsTab;
+ }
+
+
+ public JPanel initBackupsTabSuffixPanel()
+ {
+ suffixPanel.setBorder(new TitledBorder(
+ MessageManager.getString("label.suffix_format")));
+ suffixPanel.setLayout(new GridBagLayout());
+
+ suffixTemplateLabel
+ .setText(MessageManager.getString("label.suffix_template"));
+ suffixTemplateLabel.setHorizontalAlignment(SwingConstants.LEFT);
+ suffixTemplateLabel.setFont(LABEL_FONT);
+
+ String suffix = Cache.getDefault(BackupFiles.SUFFIX, BackupFiles.getNumPlaceHolder());
+ suffixTemplate.setText(suffix);
+ final String tooltip = JvSwingUtils.wrapTooltip(true, MessageManager
+ .getString("label.suffix_template_tooltip"));
+ suffixTemplate.setToolTipText(tooltip);
+ suffixTemplate.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ updateBackupFilesExampleLabel();
+ }
+
+ });
+ KeyListener kl = new KeyListener()
+ {
+ @Override
+ public void keyReleased(KeyEvent e)
+ {
+ updateBackupFilesExampleLabel();
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e)
+ {
+ }
+
+ // disable use of ':'
+ @Override
+ public void keyTyped(KeyEvent e)
+ {
+ char c = e.getKeyChar();
+ if (c == ':')
+ {
+ // don't process ':'
+ e.consume();
+ }
+ }
+
+ };
+ suffixTemplate.addKeyListener(kl);
+
+ // digits spinner
+ suffixDigitsLabel
+ .setText(MessageManager.getString("label.index_digits"));
+ suffixDigitsLabel.setHorizontalAlignment(SwingConstants.LEFT);
+ suffixDigitsLabel.setFont(LABEL_FONT);
+ int defaultmin = 1;
+ try
+ {
+ defaultmin = Integer.parseInt(
+ MessageManager.getString("default.suffix_index_digits_min"));
+ } catch (Exception e)
+ {
+ defaultmin = 1;
+ System.out.println(
+ "Exception setting suffix digits min from default.suffix_index_digits_min label, setting to "
+ + defaultmin);
+ }
+ int defaultmax = 6;
+ try {
+ defaultmax = Integer.parseInt(
+ MessageManager.getString("default.suffix_index_digits_max"));
+ } catch (Exception e) {
+ defaultmax = 6;
+ System.out.println(
+ "Exception setting suffix digits max from default.suffix_index_digits_max label, setting to "
+ + defaultmax);
+ }
+ setIntegerSpinner(suffixDigitsSpinner, defaultmin, defaultmax,
+ Cache.getDefault(BackupFiles.SUFFIX_DIGITS, 3));
+
+ suffixReverse.setSelected(
+ Cache.getDefault(BackupFiles.REVERSE_ORDER, false));
+ suffixReverse.setLabels(
+ MessageManager.getString("label.reverse_roll"),
+ MessageManager.getString("label.increment_index"));
+ suffixReverse.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ updateBackupFilesExampleLabel();
+ }
+ });
+
+ GridBagConstraints sgbc = new GridBagConstraints();
+
+ // first row (template text box)
+ sgbc.anchor = GridBagConstraints.WEST;
+ sgbc.gridx = 0;
+ sgbc.gridy = 0;
+ sgbc.gridwidth = 1;
+ sgbc.gridheight = 1;
+ sgbc.weightx = 1.0;
+ sgbc.weighty = 0.0;
+ sgbc.fill = GridBagConstraints.NONE;
+ suffixPanel.add(suffixTemplateLabel,sgbc);
+
+ sgbc.gridx = 1;
+ sgbc.fill = GridBagConstraints.HORIZONTAL;
+ suffixPanel.add(suffixTemplate, sgbc);
+
+ // second row (number of digits spinner)
+ sgbc.gridy = 1;
+
+ sgbc.gridx = 0;
+ sgbc.fill = GridBagConstraints.NONE;
+ suffixPanel.add(suffixDigitsLabel, sgbc);
+
+ sgbc.gridx = 1;
+ sgbc.fill = GridBagConstraints.HORIZONTAL;
+ suffixPanel.add(suffixDigitsSpinner, sgbc);
+
+ // third row (forward order radio selection)
+ sgbc.gridx = 0;
+ sgbc.gridy = 2;
+ sgbc.gridwidth = GridBagConstraints.REMAINDER;
+ sgbc.fill = GridBagConstraints.HORIZONTAL;
+ suffixPanel.add(suffixReverse.getFalseButton(), sgbc);
+
+ // fourth row (reverse order radio selection)
+ sgbc.gridy = 3;
+ suffixPanel.add(suffixReverse.getTrueButton(), sgbc);
+ return suffixPanel;
+ }
+
+ private JPanel initBackupsTabKeepFilesPanel()
+ {
+ keepfilesPanel.setBorder(
+ new TitledBorder(MessageManager.getString("label.keep_files")));
+ keepfilesPanel.setLayout(new GridBagLayout());
+
+ backupfilesKeepAll
+ .setSelected(Cache.getDefault(BackupFiles.NO_MAX, true));
+ backupfilesKeepAll.setLabels(
+ MessageManager.getString("label.keep_all_backup_files"),
+ MessageManager.getString(
+ "label.keep_only_this_number_of_backup_files"));
+ backupfilesKeepAll.addTrueActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ updateBackupFilesExampleLabel();
+ }
+ });
+ backupfilesKeepAll.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ boolean selected = backupfilesKeepAll.isSelected();
+ keepRollMaxOptionsEnabled(!selected);
+ updateBackupFilesExampleLabel();
+ }
+ });
+
+ setIntegerSpinner(backupfilesRollMaxSpinner, 1, 999,
+ Cache.getDefault(BackupFiles.ROLL_MAX, 3));
+
+ backupfilesConfirmDelete.setSelected(
+ Cache.getDefault(BackupFiles.CONFIRM_DELETE_OLD, true));
+ backupfilesConfirmDelete.setLabels(
+ MessageManager.getString("label.confirm_delete"),
+ MessageManager.getString("label.auto_delete"));
+ // update the enabled section
+ keepRollMaxOptionsEnabled(!backupfilesKeepAll.isSelected());
+
+ GridBagConstraints kgbc = new GridBagConstraints();
+
+ // first row (template text box)
+ kgbc.anchor = GridBagConstraints.WEST;
+ kgbc.gridx = 0;
+ kgbc.gridy = 0;
+ kgbc.gridwidth = GridBagConstraints.REMAINDER;
+ kgbc.gridheight = 1;
+ kgbc.weightx = 1.0;
+ kgbc.weighty = 0.0;
+ kgbc.fill = GridBagConstraints.HORIZONTAL;
+ keepfilesPanel.add(backupfilesKeepAll.getTrueButton(), kgbc);
+
+ // second row
+ kgbc.gridy = 1;
+
+ kgbc.gridx = 0;
+ kgbc.gridwidth = GridBagConstraints.RELATIVE;
+ keepfilesPanel.add(backupfilesKeepAll.getFalseButton(), kgbc);
+
+ kgbc.gridx = 1;
+ // kgbc.fill = GridBagConstraints.HORIZONTAL;
+ keepfilesPanel.add(backupfilesRollMaxSpinner, kgbc);
+
+ // third row (indented)
+ kgbc.gridy = 2;
+ kgbc.insets = new Insets(0, 20, 0, 0);
+
+ kgbc.gridx = 0;
+ kgbc.gridwidth = GridBagConstraints.REMAINDER;
+ kgbc.fill = GridBagConstraints.HORIZONTAL;
+ kgbc.weightx = 1.0;
+ keepfilesPanel.add(backupfilesConfirmDelete.getTrueButton(), kgbc);
+
+ // fourth row (indented)
+ kgbc.gridy = 3;
+ keepfilesPanel.add(backupfilesConfirmDelete.getFalseButton(), kgbc);
+ return keepfilesPanel;
+ }
+
+ private JPanel initBackupsTabFilenameExamplesPanel()
+ {
+ exampleFilesPanel.setBorder(new TitledBorder(
+ MessageManager.getString("label.examples")));
+ exampleFilesPanel.setLayout(new GridBagLayout());
+
+ exampleLabel.setText(
+ MessageManager.getString("label.suffix_example_filenames"));
+ exampleLabel.setFont(LABEL_FONT);
+ exampleLabel.setHorizontalAlignment(SwingConstants.LEFT);
+
+ backupfilesExampleLabel.setEditable(false);
+ backupfilesExampleLabel.setPreferredSize(new Dimension(300, 100));
+ backupfilesExampleLabel.setAlignmentX(LEFT_ALIGNMENT);
+ backupfilesExampleLabel.setAlignmentY(TOP_ALIGNMENT);
+
+ backupfilesExampleLabel.setFont(LABEL_FONT_ITALIC);
+ backupfilesExampleLabel.setBackground(exampleLabel.getBackground());
+
+ /*
+ exampleScrollPane.setBounds(0, 0, 200, 100);
+ exampleScrollPane.setPreferredSize(new Dimension(800, 800));
+ exampleScrollPane.add(backupfilesExampleLabel);
+ */
+ updateBackupFilesExampleLabel();
+
+ GridBagConstraints gbc = new GridBagConstraints();
+ gbc.anchor = GridBagConstraints.WEST;
+
+ gbc.gridy = 0;
+ exampleFilesPanel.add(exampleLabel, gbc);
+ gbc.gridy = 1;
+ exampleFilesPanel.add(backupfilesExampleLabel, gbc);
+ // exampleFilesPanel.add(exampleScrollPane, gbc);
+ return exampleFilesPanel;
+ }
+
+ private void updateBackupFilesExampleLabel()
+ {
+ int exampleindex = 12;
+ String base = "filename";
+ String extension = ".fa";
+
+ String suffix = suffixTemplate.getText();
+ int digits = 3;
+ try {
+ suffixDigitsSpinner.commitEdit();
+ digits = (Integer) suffixDigitsSpinner.getValue();
+ digits = digits < 1 ? 1 : digits;
+ } catch (Exception e)
+ {
+ System.out.println("Failed casting (Integer) suffixTemplateSpinner.getValue()");
+ }
+ boolean reverse = suffixReverse.isSelected();
+ boolean keepAll = backupfilesKeepAll.isSelected();
+ int rollMax = 4;
+ try
+ {
+ backupfilesRollMaxSpinner.commitEdit();
+ rollMax = (Integer) backupfilesRollMaxSpinner.getValue();
+ rollMax = rollMax < 1 ? 1 : rollMax;
+ } catch (Exception e)
+ {
+ System.out.println(
+ "Failed casting (Integer) backupfilesRollMaxSpinner.getValue()");
+ }
+
+ int surround = 3;
+ StringBuilder exampleSB = new StringBuilder();
+ boolean firstLine = true;
+ if (reverse)
+ {
+
+ int min = 1;
+ int max = keepAll ? exampleindex : rollMax;
+ for (int index = min; index <= max; index++)
+ {
+ if (index == min + surround && index <= max - surround)
+ {
+ exampleSB.append("\n...");
+ }
+ else if (index > min + surround && index <= max - surround)
+ {
+ // nothing
+ }
+ else
+ {
+ if (firstLine)
+ {
+ firstLine = false;
+ }
+ else
+ {
+ exampleSB.append("\n");
+ }
+ exampleSB.append(BackupFilenameFilter.getBackupFilename(index,
+ base, suffix, digits, extension));
+ if (min == max)
+ {
+ // no extra text needed
+ }
+ else if (index == min)
+ {
+ exampleSB.append(" (most recent)");
+ }
+ else if (index == max)
+ {
+ exampleSB.append(" (oldest)");
+ }
+ }
+ }
+ }
+ else
+ {
+
+ int min = (keepAll || exampleindex - rollMax < 0) ? 1
+ : exampleindex - rollMax + 1;
+ int max = exampleindex;
+
+ for (int index = min; index <= max; index++)
+ {
+
+ if (index == min + surround && index <= max - surround)
+ {
+ exampleSB.append("\n...");
+ }
+ else if (index > min + surround && index <= max - surround)
+ {
+ // nothing
+ }
+ else
+ {
+ if (firstLine)
+ {
+ firstLine = false;
+ }
+ else
+ {
+ exampleSB.append("\n");
+ }
+ exampleSB.append(BackupFilenameFilter.getBackupFilename(index,
+ base, suffix, digits, extension));
+ if (min == max)
+ {
+ // no extra text needed
+ }
+ else if (index == min)
+ {
+ exampleSB.append(" (oldest)");
+ }
+ else if (index == max)
+ {
+ exampleSB.append(" (most recent)");
+ }
+ }
+ }
+
+ }
+
+ backupfilesExampleLabel.setText(exampleSB.toString());
+ }
+
+ protected void setIntegerSpinner(JSpinner s, int min,
+ int max, int def)
+ {
+ // integer spinner for number of digits
+ if (def > max)
+ {
+ max = def;
+ }
+ SpinnerModel sModel = new SpinnerNumberModel(def, min, max, 1);
+ s.setModel(sModel);
+
+ s.addChangeListener(new ChangeListener()
+ {
+ @Override
+ public void stateChanged(ChangeEvent e)
+ {
+ updateBackupFilesExampleLabel();
+ }
+
+ });
+
+ }
+
+ public static int getSpinnerInt(JSpinner s, int def)
+ {
+ int i = def;
+ try
+ {
+ s.commitEdit();
+ i = (Integer) s.getValue();
+ } catch (Exception e)
+ {
+ System.out.println("Failed casting (Integer) JSpinner s.getValue()");
+ }
+ return i;
+ }
+
+ private void keepRollMaxOptionsEnabled(boolean enabled)
+ {
+ backupfilesRollMaxSpinner.setEnabled(enabled);
+ backupfilesConfirmDelete.setEnabled(enabled);
+
+ }
+ private void backupsOptionsSetEnabled(boolean enabled)
+ {
+ suffixPanel.setEnabled(enabled);
+ keepfilesPanel.setEnabled(enabled);
+ exampleFilesPanel.setEnabled(enabled);
+
+ suffixTemplate.setEnabled(enabled);
+ suffixTemplateLabel.setEnabled(enabled);
+ suffixDigitsLabel.setEnabled(enabled);
+ suffixDigitsSpinner.setEnabled(enabled);
+ suffixReverse.setEnabled(enabled);
+ backupfilesKeepAll.setEnabled(enabled);
+ backupfilesRollMaxSpinner.setEnabled(enabled);
+ backupfilesConfirmDelete.setEnabled(enabled);
+ exampleLabel.setEnabled(enabled);
+ exampleScrollPane.setEnabled(enabled);
+ backupfilesExampleLabel.setEnabled(enabled);
+
+ keepRollMaxOptionsEnabled(enabled && !backupfilesKeepAll.isSelected());
+ }
+
protected void autoIdWidth_actionPerformed()
{
// TODO Auto-generated method stub