/*
- * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
- * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
+ * Copyright (C) 2010 J Procter, AM Waterhouse, 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
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This file is part of Jalview.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
*/
package jalview.gui;
import jalview.io.*;
import jalview.jbgui.*;
import jalview.schemes.*;
+import jalview.ws.EnfinEnvision2OneWay;
/**
* DOCUMENT ME!
* $SEQUENCE_ID$ or $SEQUENCE_ID=/.possible | chars ./=$
*/
public static Vector sequenceURLLinks;
+
/**
- * Holds name and link separated with | character. Sequence IDS and Sequences must be
- * $SEQUENCEIDS$ or $SEQUENCEIDS=/.possible | chars ./=$ and $SEQUENCES$ or $SEQUENCES=/.possible | chars ./=$
- * and separation character for first and second token specified after a pipe character at end |,|.
+ * Holds name and link separated with | character. Sequence IDS and Sequences
+ * must be $SEQUENCEIDS$ or $SEQUENCEIDS=/.possible | chars ./=$ and
+ * $SEQUENCES$ or $SEQUENCES=/.possible | chars ./=$ and separation character
+ * for first and second token specified after a pipe character at end |,|.
* (TODO: proper escape for using | to separate ids or sequences
*/
"SEQUENCE_LINKS",
"SRS|http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+(([uniprot-all:$SEQUENCE_ID$]))+-view+SwissEntry");
sequenceURLLinks = new Vector();
-
+
try
{
StringTokenizer st = new StringTokenizer(string, "|");
System.out.println(ex + "\nError parsing sequence links");
}
/**
- * TODO: reformulate groupURL encoding so two or more can be stored in the .properties file as '|' separated strings
+ * TODO: reformulate groupURL encoding so two or more can be stored in the
+ * .properties file as '|' separated strings
*/
-
+
groupURLLinks = new Vector();
- groupURLLinks.addElement("UNIPROT|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?workflow=Default&datasetName=JalviewIDs$DATASETID$&input=$SEQUENCEIDS$&inputType=0|,");
- groupURLLinks.addElement("Seqs|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?workflow=Default&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCES=/([A-Za-z]+)+/=$&inputType=1|,");
-
+ // groupURLLinks.addElement("UNIPROT|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=Default&datasetName=JalviewIDs$DATASETID$&input=$SEQUENCEIDS$&inputType=0|,");
+ // groupURLLinks.addElement("Seqs|EnVision2|http://www.ebi.ac.uk/enfin-srv/envision2/pages/linkin.jsf?tool=Jalview&workflow=Default&datasetName=JalviewSeqs$DATASETID$&input=$SEQUENCES=/([A-Za-z]+)+/=$&inputType=1|,");
+
}
Vector nameLinks, urlLinks;
DasSourceBrowser dasSource;
+ private WsPreferences wsPrefs;
+
/**
* Creates a new Preferences object.
*/
frame.setContentPane(this);
dasSource = new DasSourceBrowser();
dasPanel.add(dasSource, BorderLayout.CENTER);
-
+ wsPrefs = new WsPreferences();
+ wsPanel.add(wsPrefs, BorderLayout.CENTER);
int width = 500, height = 420;
if (new jalview.util.Platform().isAMac())
{
fullScreen.setSelected(Cache.getDefault("SHOW_FULLSCREEN", false));
annotations.setSelected(Cache.getDefault("SHOW_ANNOTATIONS", true));
- conservation.setEnabled(Cache.getDefault("SHOW_ANNOTATIONS", true));
- quality.setEnabled(Cache.getDefault("SHOW_ANNOTATIONS", true));
- identity.setEnabled(Cache.getDefault("SHOW_ANNOTATIONS", true));
-
conservation.setSelected(Cache.getDefault("SHOW_CONSERVATION", true));
quality.setSelected(Cache.getDefault("SHOW_QUALITY", true));
identity.setSelected(Cache.getDefault("SHOW_IDENTITY", true));
openoverv.setSelected(Cache.getDefault("SHOW_OVERVIEW", false));
- showUnconserved.setSelected(Cache.getDefault("SHOW_UNCONSERVED", false));
+ showUnconserved
+ .setSelected(Cache.getDefault("SHOW_UNCONSERVED", false));
+ showNpTooltip.setSelected(Cache
+ .getDefault("SHOW_NPFEATS_TOOLTIP", true));
+ showDbRefTooltip.setSelected(Cache.getDefault("SHOW_DBREFS_TOOLTIP",
+ true));
- for (int i = 0; i < 13; i++)
+ for (int i = ColourSchemeProperty.FIRST_COLOUR; i <= ColourSchemeProperty.LAST_COLOUR; i++)
{
colour.addItem(ColourSchemeProperty.getColourName(i));
}
autoCalculateConsCheck.setSelected(Cache.getDefault(
"AUTO_CALC_CONSENSUS", true));
+ showGroupConsensus.setSelected(Cache.getDefault("SHOW_GROUP_CONSENSUS",
+ false));
+ showGroupConservation.setSelected(Cache.getDefault(
+ "SHOW_GROUP_CONSERVATION", false));
+ showConsensHistogram.setSelected(Cache.getDefault(
+ "SHOW_CONSENSUS_HISTOGRAM", true));
+ showConsensLogo.setSelected(Cache.getDefault("SHOW_CONSENSUS_LOGO",
+ false));
+
padGaps.setSelected(Cache.getDefault("PAD_GAPS", false));
/***************************************************************************
proxyPortTB.setText(Cache.getDefault("PROXY_PORT", ""));
defaultBrowser.setText(Cache.getDefault("DEFAULT_BROWSER", ""));
-
- usagestats.setSelected(Cache.getDefault("USAGESTATS", false));
- questionnaire.setSelected(Cache.getProperty("NOQUESTIONNAIRES")==null); // note antisense here
- versioncheck.setSelected(Cache.getDefault("VERSION_CHECK", true)); // default is true
+ usagestats.setSelected(Cache.getDefault("USAGESTATS", false));
+ questionnaire
+ .setSelected(Cache.getProperty("NOQUESTIONNAIRES") == null); // note
+ // antisense
+ // here
+ versioncheck.setSelected(Cache.getDefault("VERSION_CHECK", true)); // default
+ // is
+ // true
+ annotations_actionPerformed(null); // update the display of the annotation
+ // settings
try
{
jbInit();
* DOCUMENT ME!
*
* @param e
- * DOCUMENT ME!
+ * DOCUMENT ME!
*/
public void ok_actionPerformed(ActionEvent e)
{
Cache.applicationProperties.setProperty("ID_ITALICS", Boolean
.toString(idItalics.isSelected()));
- Cache.applicationProperties.setProperty("SHOW_UNCONSERVED",Boolean.toString(showUnconserved.isSelected()));
+ Cache.applicationProperties.setProperty("SHOW_UNCONSERVED", Boolean
+ .toString(showUnconserved.isSelected()));
+ Cache.applicationProperties.setProperty("SHOW_GROUP_CONSENSUS", Boolean
+ .toString(showGroupConsensus.isSelected()));
+ Cache.applicationProperties.setProperty("SHOW_GROUP_CONSERVATION",
+ Boolean.toString(showGroupConservation.isSelected()));
+ Cache.applicationProperties.setProperty("SHOW_CONSENSUS_HISTOGRAM",
+ Boolean.toString(showConsensHistogram.isSelected()));
+ Cache.applicationProperties.setProperty("SHOW_CONSENSUS_LOGO", Boolean
+ .toString(showConsensLogo.isSelected()));
Cache.applicationProperties.setProperty("ANTI_ALIAS", Boolean
.toString(smoothFont.isSelected()));
+ Cache.applicationProperties.setProperty("SHOW_NPFEATS_TOOLTIP", Boolean
+ .toString(showNpTooltip.isSelected()));
+ Cache.applicationProperties.setProperty("SHOW_DBREFS_TOOLTIP", Boolean
+ .toString(showDbRefTooltip.isSelected()));
Cache.applicationProperties.setProperty("WRAP_ALIGNMENT", Boolean
.toString(wrap.isSelected()));
System.setProperty("http.proxyHost", "");
System.setProperty("http.proxyPort", "");
}
- Cache.setProperty("VERSION_CHECK", Boolean
- .toString(versioncheck.isSelected()));
- if (Cache.getProperty("USAGESTATS")!=null || usagestats.isSelected()) {
+ Cache.setProperty("VERSION_CHECK", Boolean.toString(versioncheck
+ .isSelected()));
+ if (Cache.getProperty("USAGESTATS") != null || usagestats.isSelected())
+ {
// default is false - we only set this if the user has actively agreed
- Cache.setProperty("USAGESTATS",Boolean
- .toString(usagestats.isSelected()));
+ Cache.setProperty("USAGESTATS", Boolean.toString(usagestats
+ .isSelected()));
}
if (!questionnaire.isSelected())
{
Cache.setProperty("NOQUESTIONNAIRES", "true");
- } else {
- // special - made easy to edit a property file to disable questionnaires by just adding the given line
+ }
+ else
+ {
+ // special - made easy to edit a property file to disable questionnaires
+ // by just adding the given line
Cache.removeProperty("NOQUESTIONNAIRES");
}
Cache.applicationProperties.setProperty("BLC_JVSUFFIX", Boolean
.toString(padGaps.isSelected()));
dasSource.saveProperties(Cache.applicationProperties);
-
+ wsPrefs.updateWsMenuConfig(false);
Cache.saveProperties();
try
{
* DOCUMENT ME!
*
* @param e
- * DOCUMENT ME!
+ * DOCUMENT ME!
*/
public void cancel_actionPerformed(ActionEvent e)
{
try
{
+ wsPrefs.updateWsMenuConfig(true);
frame.setClosed(true);
} catch (Exception ex)
{
* DOCUMENT ME!
*
* @param e
- * DOCUMENT ME!
+ * DOCUMENT ME!
*/
public void annotations_actionPerformed(ActionEvent e)
{
conservation.setEnabled(annotations.isSelected());
quality.setEnabled(annotations.isSelected());
identity.setEnabled(annotations.isSelected());
+ showGroupConsensus.setEnabled(annotations.isSelected());
+ showGroupConservation.setEnabled(annotations.isSelected());
+ showConsensHistogram.setEnabled(annotations.isSelected()
+ && (identity.isSelected() || showGroupConsensus.isSelected()));
+ showConsensLogo.setEnabled(annotations.isSelected()
+ && (identity.isSelected() || showGroupConsensus.isSelected()));
}
public void newLink_actionPerformed(ActionEvent e)
}
}
- /* (non-Javadoc)
- * @see jalview.jbgui.GPreferences#showunconserved_actionPerformed(java.awt.event.ActionEvent)
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * jalview.jbgui.GPreferences#showunconserved_actionPerformed(java.awt.event
+ * .ActionEvent)
*/
protected void showunconserved_actionPerformed(ActionEvent e)
{
private void jbInit() throws Exception
{
}
+
+ public static Collection getGroupURLLinks()
+ {
+ return groupURLLinks;
+ }
}