JAL-3253-applet JAL-3439 Preferences issues 1/2
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Tue, 24 Sep 2019 14:23:58 +0000 (10:23 -0400)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Tue, 24 Sep 2019 14:23:58 +0000 (10:23 -0400)
minor tab ui changes in SwingJS
JScrollPane peer issue update in SwingJS

still an issue with Preferences Link tab table row height being set to 6
instead of 16 (suspect font size coming in as 0 for some reason -- will
investigate)

SUGGESTED sizing, positioning changes for Visual tab and overall size.
Issues involve Visual tab checkbox overflow, panel overflow, and Link
"double-click" header overflow
at least in Windows Java and JavaScript.

src/jalview/gui/Preferences.java
src/jalview/jbgui/GPreferences.java
swingjs/SwingJS-site.zip
swingjs/timestamp
swingjs/ver/3.2.4/SwingJS-site.zip
swingjs/ver/3.2.4/timestamp

index b1206a2..777ab48 100755 (executable)
@@ -306,7 +306,10 @@ public class Preferences extends GPreferences
       wsPrefs = new WsPreferences();
       wsTab.add(wsPrefs, BorderLayout.CENTER);
     }
-    int width = 500, height = 510; // BH 2019.07.12 added 60 to height
+    int width = 700, height = 510; // BH 2019.07.12 added 60 to height and 40 to
+                                   // width (for Visual check boxes and Links
+                                   // "Double Click" header)
+    // BH 2019.09.24 added 20 to width
     // (structure panel was too small anyway, and I added a default dimension
     // for Jmol
     if (Platform.isAMacAndNotJS())
@@ -659,7 +662,11 @@ public class Preferences extends GPreferences
     /*
      * Set Backups tab defaults
      */
-    loadLastSavedBackupsOptions();
+    if (!Platform.isJS())
+    {
+      loadLastSavedBackupsOptions();
+    }
+
   }
 
   /**
@@ -765,8 +772,7 @@ public class Preferences extends GPreferences
     Cache.setPropertyNoSave(WRAP_ALIGNMENT,
             Boolean.toString(wrap.isSelected()));
 
-    Cache.setPropertyNoSave("STARTUP_FILE",
-            startupFileTextfield.getText());
+    Cache.setPropertyNoSave("STARTUP_FILE", startupFileTextfield.getText());
     Cache.setPropertyNoSave("SHOW_STARTUP_FILE",
             Boolean.toString(startupCheckbox.isSelected()));
 
@@ -778,8 +784,7 @@ public class Preferences extends GPreferences
             .forDescription(sortAnnBy.getSelectedItem().toString());
     if (annSortOrder != null)
     {
-      Cache.setPropertyNoSave(SORT_ANNOTATIONS,
-              annSortOrder.name());
+      Cache.setPropertyNoSave(SORT_ANNOTATIONS, annSortOrder.name());
     }
 
     final boolean showAutocalcFirst = sortAutocalc.getSelectedIndex() == 0;
@@ -857,8 +862,7 @@ public class Preferences extends GPreferences
     }
     else
     {
-      Cache.setPropertyNoSave("SEQUENCE_LINKS",
-              menuLinks.toString());
+      Cache.setPropertyNoSave("SEQUENCE_LINKS", menuLinks.toString());
     }
 
     String nonMenuLinks = sequenceUrlLinks.writeUrlsAsString(false);
@@ -868,8 +872,7 @@ public class Preferences extends GPreferences
     }
     else
     {
-      Cache.setPropertyNoSave("STORED_LINKS",
-              nonMenuLinks.toString());
+      Cache.setPropertyNoSave("STORED_LINKS", nonMenuLinks.toString());
     }
 
     Cache.setPropertyNoSave("DEFAULT_URL",
@@ -935,8 +938,7 @@ public class Preferences extends GPreferences
     Cache.setPropertyNoSave(FIGURE_AUTOIDWIDTH,
             Boolean.toString(autoIdWidth.isSelected()));
     userIdWidth_actionPerformed();
-    Cache.setPropertyNoSave("FIGURE_FIXEDIDWIDTH",
-            userIdWidth.getText());
+    Cache.setPropertyNoSave("FIGURE_FIXEDIDWIDTH", userIdWidth.getText());
 
     /*
      * Save Editing settings
@@ -951,27 +953,26 @@ public class Preferences extends GPreferences
     if (!Platform.isJS())
     {
       wsPrefs.updateAndRefreshWsMenuConfig(false);
-    }
+      /*
+       * Save Backups settings
+       */
+      Cache.setPropertyNoSave(BackupFiles.CONFIRM_DELETE_OLD,
+              Boolean.toString(backupfilesConfirmDelete.isSelected()));
+      Cache.setPropertyNoSave(BackupFiles.ENABLED,
+              Boolean.toString(enableBackupFiles.isSelected()));
+      Cache.setPropertyNoSave(BackupFiles.NO_MAX,
+              Boolean.toString(backupfilesKeepAll.isSelected()));
+      Cache.setPropertyNoSave(BackupFiles.REVERSE_ORDER,
+              Boolean.toString(suffixReverse.isSelected()));
+      Cache.setPropertyNoSave(BackupFiles.SUFFIX, suffixTemplate.getText());
+      Cache.setPropertyNoSave(BackupFiles.ROLL_MAX, Integer
+              .toString(getSpinnerInt(backupfilesRollMaxSpinner, 4)));
+      Cache.setPropertyNoSave(BackupFiles.SUFFIX_DIGITS,
+              Integer.toString(getSpinnerInt(suffixDigitsSpinner, 3)));
+      Cache.setPropertyNoSave(BackupFiles.NS + "_PRESET", Integer
+              .toString(getComboIntStringKey(backupfilesPresetsCombo)));
 
-    /*
-     * Save Backups settings
-     */
-    Cache.setPropertyNoSave(BackupFiles.CONFIRM_DELETE_OLD,
-            Boolean.toString(backupfilesConfirmDelete.isSelected()));
-    Cache.setPropertyNoSave(BackupFiles.ENABLED,
-            Boolean.toString(enableBackupFiles.isSelected()));
-    Cache.setPropertyNoSave(BackupFiles.NO_MAX,
-            Boolean.toString(backupfilesKeepAll.isSelected()));
-    Cache.setPropertyNoSave(BackupFiles.REVERSE_ORDER,
-            Boolean.toString(suffixReverse.isSelected()));
-    Cache.setPropertyNoSave(BackupFiles.SUFFIX,
-            suffixTemplate.getText());
-    Cache.setPropertyNoSave(BackupFiles.ROLL_MAX,
-            Integer.toString(getSpinnerInt(backupfilesRollMaxSpinner, 4)));
-    Cache.setPropertyNoSave(BackupFiles.SUFFIX_DIGITS,
-            Integer.toString(getSpinnerInt(suffixDigitsSpinner, 3)));
-    Cache.setPropertyNoSave(BackupFiles.NS + "_PRESET",
-            Integer.toString(getComboIntStringKey(backupfilesPresetsCombo)));
+    }
 
     Cache.saveProperties();
     Desktop.getInstance().doConfigureStructurePrefs();
index 7784cf4..d9a6cea 100755 (executable)
@@ -1612,11 +1612,17 @@ public class GPreferences extends JPanel
     fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
     fontLabel.setText(MessageManager.getString("label.font"));
     fontSizeCB.setFont(LABEL_FONT);
-    fontSizeCB.setBounds(new Rectangle(320, 112, 65, 23));
+    fontSizeCB.setBounds(new Rectangle(320, 115, 65, 23)); // BH 2019.09.24 y
+                                                           // added 3 pixels for
+                                                           // Java/Windows
     fontStyleCB.setFont(LABEL_FONT);
-    fontStyleCB.setBounds(new Rectangle(382, 112, 80, 23));
+    fontStyleCB.setBounds(new Rectangle(382, 115, 80, 23)); // BH 2019.09.24 y
+                                                            // added 3 pixels
+                                                            // for Java/Windows
     fontNameCB.setFont(LABEL_FONT);
-    fontNameCB.setBounds(new Rectangle(172, 112, 147, 23));
+    fontNameCB.setBounds(new Rectangle(172, 115, 147, 23)); // BH 2019.09.24 y
+                                                            // added 3 pixels
+                                                            // for Java/Windows
     gapSymbolCB.setFont(LABEL_FONT);
     gapSymbolCB.setBounds(new Rectangle(172, 215, 69, 23));
     DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
@@ -1661,7 +1667,18 @@ public class GPreferences extends JPanel
     sortAutocalc.setBounds(new Rectangle(290, 285, 165, 21));
 
     JPanel annsettingsPanel = new JPanel();
-    annsettingsPanel.setBounds(new Rectangle(173, 13, 320, 96));
+    annsettingsPanel.setBounds(new Rectangle(173, 13, 330, 100)); // BH
+                                                                 // 2019.09.24
+                                                                 // SwingJS
+                                                                 // needs a few
+                                                                  // more
+                                                                  // pixels.
+                                                                  // Java needs
+                                                                  // a bit more
+                                                                  // in height
+                                                                  // on Windows
+                                                                  // OS
+                                                                 // Was 320
     annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
     annsettingsPanel.setBorder(new EtchedBorder());
     visualTab.add(annsettingsPanel);
index 4b99fc9..e1edf02 100644 (file)
Binary files a/swingjs/SwingJS-site.zip and b/swingjs/SwingJS-site.zip differ
index 0967866..b9f7173 100644 (file)
@@ -1 +1 @@
-20190924060911 
+20190924101854 
index 4b99fc9..e1edf02 100644 (file)
Binary files a/swingjs/ver/3.2.4/SwingJS-site.zip and b/swingjs/ver/3.2.4/SwingJS-site.zip differ
index 0967866..b9f7173 100644 (file)
@@ -1 +1 @@
-20190924060911 
+20190924101854