X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fgui%2FPreferences.java;h=ec9ea342e4745436c4de25a1643ea944a7a32ace;hb=621a628afc1f6ee7a2778b9d0ae2729b88fe5bfd;hp=2243a3d10738674be7d8b1c0b1741080cba3d6f2;hpb=9c5d69ef1e102b1eac18ec13c362522f40c9000d;p=jalview.git diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 2243a3d..ec9ea34 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -67,6 +67,8 @@ public class Preferences extends GPreferences JInternalFrame frame; + DasSourceBrowser dasSource; + /** * Creates a new Preferences object. @@ -76,8 +78,18 @@ public class Preferences extends GPreferences frame = new JInternalFrame(); frame.setContentPane(this); - Desktop.addInternalFrame(frame, "Preferences", 480, 390); - frame.setMinimumSize(new Dimension(480,390)); + dasSource = new DasSourceBrowser(); + dasPanel.add(dasSource, BorderLayout.CENTER); + + int width = 500, height = 420; + if(System.getProperty("os.name").startsWith("Mac")) + { + width = 570; + height = 460; + } + + Desktop.addInternalFrame(frame, "Preferences", width, height); + frame.setMinimumSize(new Dimension(width, height)); seqLimit.setSelected( Cache.getDefault("SHOW_JVSUFFIX", true)); fullScreen.setSelected( Cache.getDefault("SHOW_FULLSCREEN", false)); @@ -121,6 +133,10 @@ public class Preferences extends GPreferences fontSizeCB.setSelectedItem(Cache.getDefault("FONT_SIZE", "10")); fontStyleCB.setSelectedItem(Cache.getDefault("FONT_STYLE", Font.PLAIN + "") ); + smoothFont.setSelected(Cache.getDefault("ANTI_ALIAS", false)); + + wrap.setSelected(Cache.getDefault("WRAP_ALIGNMENT", false)); + gapSymbolCB.addItem("-"); gapSymbolCB.addItem("."); @@ -148,6 +164,11 @@ public class Preferences extends GPreferences pileupjv.setSelected( Cache.getDefault("PILEUP_JVSUFFIX", true) ); pirjv.setSelected( Cache.getDefault("PIR_JVSUFFIX", true) ); + modellerOutput.setSelected( Cache.getDefault("PIR_MODELLER", false)); + + autoCalculateConsCheck.setSelected( Cache.getDefault("AUTO_CALC_CONSENSUS", true)); + padGaps.setSelected( Cache.getDefault("PAD_GAPS", false)); + /**************************************************** * Set up Connections */ @@ -204,6 +225,10 @@ public class Preferences extends GPreferences Cache.applicationProperties.setProperty("FONT_STYLE", fontStyleCB.getSelectedItem().toString()); Cache.applicationProperties.setProperty("FONT_SIZE", fontSizeCB.getSelectedItem().toString()); + Cache.applicationProperties.setProperty("ANTI_ALIAS", Boolean.toString(smoothFont.isSelected())); + + Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", Boolean.toString(wrap.isSelected())); + Cache.applicationProperties.setProperty("STARTUP_FILE", startupFileTextfield.getText()); Cache.applicationProperties.setProperty("SHOW_STARTUP_FILE", Boolean.toString(startupCheckbox.isSelected())); @@ -272,7 +297,15 @@ public class Preferences extends GPreferences Cache.applicationProperties.setProperty("PFAM_JVSUFFIX", Boolean.toString(pfamjv.isSelected()) ); Cache.applicationProperties.setProperty("PILEUP_JVSUFFIX", Boolean.toString(pileupjv.isSelected()) ); Cache.applicationProperties.setProperty("PIR_JVSUFFIX", Boolean.toString(pirjv.isSelected()) ); + Cache.applicationProperties.setProperty("PIR_MODELLER", Boolean.toString(modellerOutput.isSelected()) ); + jalview.io.PIRFile.useModellerOutput = modellerOutput.isSelected(); + + Cache.applicationProperties.setProperty("AUTO_CALC_CONSENSUS", + Boolean.toString(autoCalculateConsCheck.isSelected())); + Cache.applicationProperties.setProperty("PAD_GAPS", + Boolean.toString(padGaps.isSelected())); + dasSource.saveProperties(Cache.applicationProperties); Cache.saveProperties(); try