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);
linkTab.setLayout(new GridBagLayout());
// Set up table for Url links
+ linkUrlTable.getTableHeader().setReorderingAllowed(false);
linkUrlTable.setFillsViewportHeight(true);
linkUrlTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
linkUrlTable.setAutoCreateRowSorter(true);
@Override
public void actionPerformed(ActionEvent e)
{
- boolean selected = enableBackupFiles.isSelected();
// enable other options only when the first is checked
backupsOptionsSetEnabled();
}
return backupsTab;
}
- private final int BACKUPFILESSCHEMECUSTOMISE = 0;
- private final IntKeyStringValueEntry[] backupfilesPresetEntries = {
+ protected static final int BACKUPFILESSCHEMECUSTOMISE = 0;
+
+ private static final IntKeyStringValueEntry[] backupfilesPresetEntries = {
new IntKeyStringValueEntry(1,
MessageManager.getString("label.default")),
new IntKeyStringValueEntry(2,
new IntKeyStringValueEntry(4,
MessageManager.getString("label.rolled_backups")),
// ...
- // new IntKeyStringValueEntry(255,
- // MessageManager.getString("label.previously_saved_scheme")),
// IMPORTANT, keep "Custom" entry with key 0 (even though it appears last)
new IntKeyStringValueEntry(BACKUPFILESSCHEMECUSTOMISE,
MessageManager.getString("label.customise")) };
- private final Map<Integer, BackupFilesPresetEntry> backupfilesPresetEntriesValues = new HashMap<Integer, BackupFilesPresetEntry>()
+ 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,
updateBackupFilesExampleLabel();
}
- protected int getComboIntStringKey(JComboBox c)
+ protected int getComboIntStringKey(JComboBox<IntKeyStringValueEntry> c)
{
IntKeyStringValueEntry e = (IntKeyStringValueEntry) c.getSelectedItem();
return e != null ? e.getKey() : 0;
for (int i = 0; i < c.getItemCount(); i++)
{
IntKeyStringValueEntry e = c.getItemAt(i);
- int k = e.getKey();
- String v = e.getValue();
if (e.getKey() == key)
{
c.setSelectedIndex(i);
@Override
public void actionPerformed(ActionEvent e)
{
- boolean selected = backupfilesKeepAll.isSelected();
keepRollMaxOptionsEnabled();
updateBackupFilesExampleLabel();
}
class BackupFilesPresetsComboBoxRenderer extends DefaultListCellRenderer
{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 88L;
+
@Override
- public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+ 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() == 255)
- {
- // "Previously saved scheme" item
- this.setFont(this.getFont().deriveFont(Font.ITALIC));
- }
- else if (e.getKey() == 0)
+ if (e.getKey() == GPreferences.BACKUPFILESSCHEMECUSTOMISE)
{
// "Customise" item
this.setFont(this.getFont().deriveFont(Font.BOLD));