X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FPreferences.java;h=5cb6512739993215b3d1b7ee8eed5e3d9d6ff085;hb=b61d853baef9db35859efb45d331becfdd11e61d;hp=eadf6adbbdc0b14d386f995c3b8c1e036af08481;hpb=5ca65ade39936144faec660f002727cfcf8ce53b;p=jalview.git diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index eadf6ad..5cb6512 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -263,8 +263,7 @@ public class Preferences extends GPreferences sortAutocalc.addItem("Autocalculated first"); sortAutocalc.addItem("Autocalculated last"); - final boolean showAbove = Cache.getDefault(SHOW_AUTOCALC_ABOVE, - true); + final boolean showAbove = Cache.getDefault(SHOW_AUTOCALC_ABOVE, true); sortAutocalc.setSelectedItem(showAbove ? sortAutocalc.getItemAt(0) : sortAutocalc.getItemAt(1)); startupCheckbox @@ -298,8 +297,7 @@ public class Preferences extends GPreferences structFromPdb.setSelected(structSelected); useRnaView.setSelected(Cache.getDefault(USE_RNAVIEW, false)); useRnaView.setEnabled(structSelected); - addSecondaryStructure - .setSelected(Cache.getDefault(ADD_SS_ANN, false)); + addSecondaryStructure.setSelected(Cache.getDefault(ADD_SS_ANN, false)); addSecondaryStructure.setEnabled(structSelected); addTempFactor.setSelected(Cache.getDefault(ADD_TEMPFACT_ANN, false)); addTempFactor.setEnabled(structSelected); @@ -354,7 +352,7 @@ public class Preferences extends GPreferences "Prompt each time")); autoIdWidth.setSelected(Cache.getDefault("FIGURE_AUTOIDWIDTH", false)); userIdWidth.setEnabled(!autoIdWidth.isSelected()); - userIdWidthlabel.setEnabled(autoIdWidth.isSelected()); + userIdWidthlabel.setEnabled(!autoIdWidth.isSelected()); Integer wi = Cache.getIntegerProperty("FIGURE_USERIDWIDTH"); userIdWidth.setText(wi == null ? "" : wi.toString()); blcjv.setSelected(Cache.getDefault("BLC_JVSUFFIX", true)); @@ -465,8 +463,8 @@ public class Preferences extends GPreferences } final boolean showAutocalcFirst = sortAutocalc.getSelectedIndex() == 0; - Cache.applicationProperties.setProperty(SHOW_AUTOCALC_ABOVE, - Boolean.valueOf(showAutocalcFirst).toString()); + Cache.applicationProperties.setProperty(SHOW_AUTOCALC_ABOVE, Boolean + .valueOf(showAutocalcFirst).toString()); /* * Save Colours settings @@ -645,20 +643,21 @@ public class Preferences extends GPreferences return validateChimeraPath(); } + /** * DOCUMENT ME! */ public void startupFileTextfield_mouseClicked() { JalviewFileChooser chooser = new JalviewFileChooser( - jalview.bin.Cache.getProperty("LAST_DIRECTORY"), - new String[] - { "fa, fasta, fastq", "aln", "pfam", "msf", "pir", "blc", "jar" }, - new String[] - { "Fasta", "Clustal", "PFAM", "MSF", "PIR", "BLC", "Jalview" }, + jalview.bin.Cache.getProperty("LAST_DIRECTORY"), new String[] { + "fa, fasta, fastq", "aln", "pfam", "msf", "pir", "blc", + "jar" }, new String[] { "Fasta", "Clustal", "PFAM", "MSF", + "PIR", "BLC", "Jalview" }, jalview.bin.Cache.getProperty("DEFAULT_FILE_FORMAT")); chooser.setFileView(new JalviewFileView()); - chooser.setDialogTitle(MessageManager.getString("label.select_startup_file")); + chooser.setDialogTitle(MessageManager + .getString("label.select_startup_file")); int value = chooser.showOpenDialog(this); @@ -800,7 +799,8 @@ public class Preferences extends GPreferences public void defaultBrowser_mouseClicked(MouseEvent e) { JFileChooser chooser = new JFileChooser("."); - chooser.setDialogTitle(MessageManager.getString("label.select_default_browser")); + chooser.setDialogTitle(MessageManager + .getString("label.select_default_browser")); int value = chooser.showOpenDialog(this); @@ -833,7 +833,8 @@ public class Preferences extends GPreferences public void minColour_actionPerformed(JPanel panel) { Color col = JColorChooser.showDialog(this, - MessageManager.getString("label.select_colour_minimum_value"), minColour.getBackground()); + MessageManager.getString("label.select_colour_minimum_value"), + minColour.getBackground()); if (col != null) { panel.setBackground(col); @@ -845,7 +846,8 @@ public class Preferences extends GPreferences public void maxColour_actionPerformed(JPanel panel) { Color col = JColorChooser.showDialog(this, - MessageManager.getString("label.select_colour_maximum_value"), maxColour.getBackground()); + MessageManager.getString("label.select_colour_maximum_value"), + maxColour.getBackground()); if (col != null) { panel.setBackground(col); @@ -870,12 +872,10 @@ public class Preferences extends GPreferences } } catch (NumberFormatException x) { - JOptionPane - .showInternalMessageDialog( - Desktop.desktop, - MessageManager.getString("warn.user_defined_width_requirements"), - MessageManager.getString("label.invalid_id_column_width"), - JOptionPane.WARNING_MESSAGE); + JOptionPane.showInternalMessageDialog(Desktop.desktop, MessageManager + .getString("warn.user_defined_width_requirements"), + MessageManager.getString("label.invalid_id_column_width"), + JOptionPane.WARNING_MESSAGE); userIdWidth.setText(""); } } @@ -936,14 +936,13 @@ public class Preferences extends GPreferences } if (!found) { - String[] options = - { "OK", "Help" }; + String[] options = { "OK", "Help" }; int showHelp = JOptionPane.showInternalOptionDialog( Desktop.desktop, JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.chimera_missing")), - "", JOptionPane.YES_NO_OPTION, - JOptionPane.WARNING_MESSAGE, null, options, options[0]); + "", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, + null, options, options[0]); if (showHelp == JOptionPane.NO_OPTION) { try