X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FPreferences.java;h=4774cace33e143b640d03ef8dbaac82b4235a95f;hb=9d1a374a20f3e2e74b5cec5d12b569121d8adbe5;hp=32aad84a7a2aad655b385849eb38ed3245f1b6b2;hpb=f24dacb1da56fccf05d684e2f4899facec2aecf7;p=jalview.git diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 32aad84..4774cac 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -47,7 +47,7 @@ public class Preferences extends GPreferences static { String string = Cache.getDefault("SEQUENCE_LINKS", - "SRS|http://srs.ebi.ac.uk/srs7bin/cgi-bin/wgetz?-e+[uniprot-all:$SEQUENCE_ID$]+-vn+2"); + "SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry"); sequenceURLLinks = new Vector(); try @@ -67,6 +67,8 @@ public class Preferences extends GPreferences JInternalFrame frame; + DasSourceBrowser dasSource; + /** * Creates a new Preferences object. @@ -76,10 +78,20 @@ 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; + } - fullID.setSelected( Cache.getDefault("SHOW_FULL_ID", true)); + 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)); annotations.setSelected( Cache.getDefault("SHOW_ANNOTATIONS", true)); @@ -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("."); @@ -140,6 +156,19 @@ public class Preferences extends GPreferences epsRendering.addItem("Text"); epsRendering.setSelectedItem( Cache.getDefault("EPS_RENDERING", "Prompt each time")); + blcjv.setSelected( Cache.getDefault("BLC_JVSUFFIX", true) ); + clustaljv.setSelected( Cache.getDefault("CLUSTAL_JVSUFFIX", true) ); + fastajv.setSelected( Cache.getDefault("FASTA_JVSUFFIX", true) ); + msfjv.setSelected( Cache.getDefault("MSF_JVSUFFIX", true) ); + pfamjv.setSelected( Cache.getDefault("PFAM_JVSUFFIX", true) ); + 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 */ @@ -181,7 +210,7 @@ public class Preferences extends GPreferences public void ok_actionPerformed(ActionEvent e) { - Cache.applicationProperties.setProperty("SHOW_FULL_ID", Boolean.toString(fullID.isSelected())); + Cache.applicationProperties.setProperty("SHOW_JVSUFFIX", Boolean.toString(seqLimit.isSelected())); Cache.applicationProperties.setProperty("SHOW_FULLSCREEN", Boolean.toString(fullScreen.isSelected())); Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS", Boolean.toString(annotations.isSelected())); @@ -196,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())); @@ -257,6 +290,22 @@ public class Preferences extends GPreferences } + Cache.applicationProperties.setProperty("BLC_JVSUFFIX", Boolean.toString(blcjv.isSelected()) ); + Cache.applicationProperties.setProperty("CLUSTAL_JVSUFFIX", Boolean.toString(clustaljv.isSelected()) ); + Cache.applicationProperties.setProperty("FASTA_JVSUFFIX", Boolean.toString(fastajv.isSelected()) ); + Cache.applicationProperties.setProperty("MSF_JVSUFFIX", Boolean.toString(msfjv.isSelected()) ); + 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