<classpathentry kind="lib" path="lib/castor-1.1-cycle-xml.jar" sourcepath="C:/Documents and Settings/JimP/workspace-3.3/castor/src/main/java"/>
<classpathentry kind="lib" path="lib/JGoogleAnalytics_0.3.jar" sourcepath="/JGoogleAnalytics/src/main/java"/>
<classpathentry kind="lib" path="lib/vamsas-client.jar"/>
- <classpathentry kind="lib" path="lib/min-jaba-client.jar" sourcepath="/clustengine"/>
<classpathentry kind="lib" path="lib/Jmol-12.1.13.jar" sourcepath="/Jmol"/>
<classpathentry kind="lib" path="appletlib/JmolApplet-12.1.13.jar"/>
<classpathentry kind="lib" path="lib/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="lib/apache-mime4j-0.6.jar" sourcepath="G:/InstallsDir/Sources for Development/apache-mime4j-0.6-src.zip"/>
- <classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/>
<classpathentry kind="lib" path="lib/httpclient-4.0.3.jar">
<attributes>
<attribute name="javadoc_location" value="file:/D:/InstallsDir/Sources for Development/httpconnect/httpcomponents-client-4.0.3/javadoc/"/>
<attribute name="javadoc_location" value="file:/D:/InstallsDir/Sources for Development/httpconnect/httpcomponents-client-4.0.3/javadoc/"/>
</attributes>
</classpathentry>
+ <classpathentry kind="lib" path="lib/miglayout-4.0-swing.jar"/>
+ <classpathentry kind="lib" path="lib/jswingreader-0.3.jar" sourcepath="/jswingreader"/>
+ <classpathentry kind="lib" path="lib/min-jaba-client.jar"/>
+ <classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.jar"/>
+<!-- <classpathentry exported="true" kind="var" path="GROOVY_ECLIPSE_HOME/groovy-all-1.0.jar"/> -->
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.java"/>
<classpathentry kind="lib" path="lib/VARNAv3-9.jar"/>
<classpathentry kind="output" path="classes"/>
--- /dev/null
+/dist
+/classes
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>Jalview Release</name>
+ <name>Jalview Release 2.7</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value><project>/.externalToolBuilders/Jalview build.xml [Builder] (1).launch</value>
- </dictionary>
</arguments>
</buildCommand>
<buildCommand>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
- <value><project>/.externalToolBuilders/Jalview build.xml [Builder] (1).launch</value>
+ <value><project>/.externalToolBuilders/Jalview Release indices [Builder].launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
- <value><project>/.externalToolBuilders/Jalview Release indices [Builder].launch</value>
+ <value><project>/.externalToolBuilders/buildapplet [Builder].launch</value>
</dictionary>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.codehaus.groovy.eclipse.groovyBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>de.tud.st.ispace.builder.ISpaceNature</nature>
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
+ <nature>org.codehaus.groovy.eclipse.groovyNature</nature>
</natures>
</projectDescription>
The source is available as a tar file and comes complete with the GNU General Public License.
-To build the application you will need a J2SDK 1.5+.
+To build the application you will need a J2SDK 1.6+.
An Ant build file (build.xml) is provided, you will need to install Apache Ant first.
Run ant to view usage which will display a list of useful build targets.
+Jalview is primarily developed with eclipse, and a .project file is provided to simplify importing the source into your own eclipse workspace. A NetBeans nbbuild.xml file is also provided for developing Jalview with NetBeans - but this is not officially supported.
+
You may also be able to use Borland JBuilder to build Jalview. A JBuilder project file
(JalviewX.jpx, JalviewApplet.jpx) for both application and applet is provided,
but the library dependencies are almost certainly out of date. See the build.xml
-jalview.release=-r Release_2_6_Branch\r
-jalview.version=2.6.1\r
-\r
+jalview.release=Release_2_7_Branch\r
+jalview.version=2.7\r
--- /dev/null
+The Jalview Desktop relies on a number of third-party libraries.
+These can be found in the lib directory, with additional compile
+time dependencies in the utils directory.
+
+Licencing information for each library is given below:
+
+JGoogleAnalytics_0.3.jar APL 2.0 License - http://code.google.com/p/jgoogleanalytics/
+Jmol-12.1.13.jar GPL/LGPLv2 http://sourceforge.net/projects/jmol/files/
+activation.jar
+apache-mime4j-0.6.jar
+axis.jar
+castor-1.1-cycle-xml.jar
+commons-codec-1.3.jar
+commons-discovery.jar
+commons-logging-1.1.1.jar
+commons-logging.jar
+httpclient-4.0.3.jar
+httpcore-4.0.1.jar
+httpmime-4.0.3.jar
+jaxrpc.jar
+jhall.jar
+jswingreader-0.3.jar : Apache license - built from http://jswingreader.sourceforge.net/ svn/trunk v12
+log4j-1.2.8.jar
+mail.jar
+miglayout-4.0-swing.jar BSD http://www.migcalendar.com/miglayout/versions/4.0/license.txt
+min-jaba-client.jar
+regex.jar
+saaj.jar
+vamsas-client.jar
+wsdl4j.jar
+xercesImpl.jar
+xml-apis.jar
+
+Additional dependencies
+
+examples/javascript/deployJava.js : http://java.com/js/deployJava.js
+examples/javascript/jquery*.js : BSD license
+examples/javascript/jshashtable-2.1.js : Apache License
<?xml version="1.0"?>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!-- Don't change anything below here unless you know what you are doing! -->
<!-- Url path for WebStart in JNLP file -->
<property name="WebStartLocation" value="http://www.jalview.org/webstart" />
+ <!-- J2SE version needed for webstart launch -->
+ <property name="j2sev" value="1.6+"/>
<!-- build directory configuration -->
<property name="libDir" value="lib" />
<property name="resourceDir" value="resources" />
<description kind="short">Jalview</description>
<icon href="logo_big.gif" />
<offline_allowed />
- <!--
- <association mime-type="application-x/ext-file" extensions="fa"/>
- <association mime-type="application-x/ext-file" extensions="fasta"/>
- <association mime-type="application-x/ext-file" extensions="fastq"/>
- <association mime-type="application-x/ext-file" extensions="blc"/>
- <association mime-type="application-x/ext-file" extensions="msf"/>
- <association mime-type="application-x/ext-file" extensions="pfam"/>
- <association mime-type="application-x/ext-file" extensions="aln"/>
- <association mime-type="application-x/ext-file" extensions="pir"/>
- <association mime-type="application-x/ext-file" extensions="amsa"/>
- -->
</information>
<resources>
- <j2se version="1.5+" initial_heap_size="10M" />
+ <j2se version="${j2sev}" initial_heap_size="10M" />
<fileset dir="${packageDir}">
<include name="jalview.jar" />
</fileset>
<security>
<all_permissions />
</security>
- </jnlp>
- <!-- the rest of these jnlp tasks are copy and pastes of the above but with different Vm args -->
+ </jnlp>
<jnlp toFile="${packageDir}/jalview_1G.jnlp" codebase="${WebStartLocation}">
<information>
<title>Jalview</title>
<description kind="short">Jalview</description>
<icon href="logo_big.gif" />
<offline_allowed />
- <!--
- <association mime-type="application-x/ext-file" extensions="fa"/>
- <association mime-type="application-x/ext-file" extensions="fasta"/>
- <association mime-type="application-x/ext-file" extensions="fastq"/>
- <association mime-type="application-x/ext-file" extensions="blc"/>
- <association mime-type="application-x/ext-file" extensions="msf"/>
- <association mime-type="application-x/ext-file" extensions="pfam"/>
- <association mime-type="application-x/ext-file" extensions="aln"/>
- <association mime-type="application-x/ext-file" extensions="pir"/>
- <association mime-type="application-x/ext-file" extensions="amsa"/>
- -->
</information>
<resources>
- <j2se version="1.5+" initial_heap_size="64M" max_heap_size="512M" />
+ <j2se version="${j2sev}" initial_heap_size="128M" max_heap_size="512M" />
<fileset dir="${packageDir}">
<include name="jalview.jar" />
</fileset>
<description kind="short">Jalview</description>
<icon href="logo_big.gif" />
<offline_allowed />
- <!--
- <association mime-type="application-x/ext-file" extensions="fa"/>
- <association mime-type="application-x/ext-file" extensions="fasta"/>
- <association mime-type="application-x/ext-file" extensions="fastq"/>
- <association mime-type="application-x/ext-file" extensions="blc"/>
- <association mime-type="application-x/ext-file" extensions="msf"/>
- <association mime-type="application-x/ext-file" extensions="pfam"/>
- <association mime-type="application-x/ext-file" extensions="aln"/>
- <association mime-type="application-x/ext-file" extensions="pir"/>
- <association mime-type="application-x/ext-file" extensions="amsa"/>
- -->
</information>
<resources>
- <j2se version="1.5+" initial_heap_size="256M" max_heap_size="1024M" />
+ <j2se version="${j2sev}" initial_heap_size="256M" max_heap_size="1024M" />
<fileset dir="${packageDir}">
<include name="jalview.jar" />
</fileset>
<all_permissions />
</security>
</jnlp>
-
+ <!-- finally, need to postprocess to add in associations at end of 'information' element
+
+ <xslt in="${packageDir}/jalview_noa_1G.jnlp" out="${packageDir}/jalview_1G.jnlp">
+
+ </xslt>
+
+
+ -->
+ <!--
+ <association mime-type="application-x/ext-file" extensions="fa"/>
+ <association mime-type="application-x/ext-file" extensions="fasta"/>
+ <association mime-type="application-x/ext-file" extensions="fastq"/>
+ <association mime-type="application-x/ext-file" extensions="blc"/>
+ <association mime-type="application-x/ext-file" extensions="msf"/>
+ <association mime-type="application-x/ext-file" extensions="pfam"/>
+ <association mime-type="application-x/ext-file" extensions="aln"/>
+ <association mime-type="application-x/ext-file" extensions="pir"/>
+ <association mime-type="application-x/ext-file" extensions="amsa"/>
+ <association mime-type="application-x/ext-file" extensions="stk"/>-->
+
</target>
<target name="runenv" depends="init">
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
<html>\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r<html><!-- InstanceBegin template="/Templates/jtemplate.dwt" codeOutsideHTMLIsLocked="false" -->\r<head>\r<!-- InstanceBeginEditable name="doctitle" -->
<TITLE>Applet Parameters</TITLE>
<!-- InstanceEndEditable --> \r<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="keywords" content="jalview,multiple,sequence,alignment,editor,viewer,java,download,barton group,protein,dna,das,distributed annotation system">\r<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> \r<style type="text/css">\r<!--\rtd {\r font-family: Geneva, Arial, Helvetica, sans-serif;\r font-size: 12px;\r}\r.plain {\r font-family: Verdana, Arial, Helvetica, sans-serif;\r font-size: 14px;\r text-decoration: none;\r}\r.plain:hover{\r background-color:#000000; color: #F2F2FF;\r}\r \r-->\r</style>\r\r<script language="JavaScript">\rfunction genHref()\r{\rvar s1 = "ml:ljvwr", s2 = "athpai.g", s3 = "ioe@leo ", href="";\rfor(i=0; i<8; i++)\r{href = href + s1.charAt(i) + s2.charAt(i) + s3.charAt(i); }\rwindow.location=href;\r}\rfunction getEventTarget(e)\r{\rif(!e)\re = window.event;\rif(e.target)\rreturn e.target;\rreturn e.srcElement;\r}\r\r</script>\r</head>\r\r<body alink="#000000" vlink="#000000" link="#000000">\r<script type="text/javascript">\rvar gaJsHost = (("https:" == document.location.protocol) ? \r"https://ssl." : "http://www.");\rdocument.write(unescape("%3Cscript src='" + gaJsHost + \r"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));\r</script>\r<script type="text/javascript">\rtry{\rvar pageTracker = _gat._getTracker("UA-9060947-1");\rpageTracker._trackPageview();\r} catch(err) {}\r</script>\r<div align="left"> \r <table width="805" height="100" cellpadding="5">\r <tr>\r <td background="../jalview.gif"> <a href="http://www.compbio.dundee.ac.uk" target="NEW"><img src="../uodc_r1_c1.gif" width="143" height="101" border="1"></a></td>\r </tr>\r </table>\r <table width="805" border="0" cellpadding="5" cellspacing="5">\r <tr> \r <td width="183" valign="top" bgcolor="#F2F2FF" border="5"> \r \r <div align="center">\r <table width="182" height="386" border="0" cellpadding="0" cellspacing="0">\r <tr> \r <td align="left" valign="middle"><a href="../index.html" class="plain">Home</a></td>\r </tr>\r <tr> \r <td align="left" valign="middle"><a href="../overview.html" class="plain">Overview</a></td>\r </tr>\r <tr> \r <td align="left" valign="middle"><a href="../download.html" class="plain">Download</a></td>\r </tr>\r <tr> \r <td align="left" valign="middle"><a href="applets.html" class="plain">Applet \r Version</a></td>\r </tr>\r <tr> \r <td align="left" valign="middle"><a href="examples.html" class="plain">Screenshots</a></td>\r </tr>\r <tr> \r <td align="left" valign="middle"><a href="../faq.html" class="plain">FAQ</a></td>\r </tr>\r <tr> \r <td align="left" valign="middle"><a href="../documentList.html" class="plain">Documentation</a></td>\r </tr>\r <tr>\r <td align="left" valign="middle" ><a href="../releaseHistory.html" class="plain">Release \r history</a></td>\r </tr>\r <tr> \r <td align="left" valign="middle"><a href="../source/source.html" class="plain">Source \r Code</a></td>\r </tr>\r <tr> \r <td align="left" valign="middle"><a href="../versions.html" class="plain">Development Version</a></td>\r </tr>\r <tr> \r <td align="left" valign="middle"><a href="../links.html" class="plain">Links</a></td>\r </tr>\r <tr> \r <td align="left" valign="middle"><a href="http://www.jalview.org/mailman/listinfo/jalview-announce" class="plain" target="NEW">News \r Mailing List</a></td>\r </tr>\r <tr>\r <td align="left" valign="middle"><a\r href="http://www.jalview.org/mailman/listinfo/jalview-discuss"\r class="plain" target="NEW">Discussion Mailing List</a><br><br><em>Please send problems<br>and\r bug reports to the discussion list.</em></td>\r </tr>\r <tr></tr>\r <tr>\r <!--<td align="left" valign="middle"><br>\r Please send problems<br>and\r bug reports to:<br><a href="#" onClick="javascript:genHref();"><img src="../help.gif" width="123" height="19" border="0"></a></td>-->\r </tr>\r </table>\r\r </div>\r\r <div align="center"> <a href="http://www.bbsrc.ac.uk/" target="NEW"><br>\r <img src="../bbsrc-new.gif" width="179" height="64" border="1"></a> \r </div>\r </td>\r <td valign="top" width="587" bgcolor="#F2F2FF"><!-- InstanceBeginEditable name="Contents" -->
- <p><strong>Download the applet jar file from <a
- href="jalviewApplet.jar">here</a>. Parameters are described
- <a href="#parameters">below</a>, and the javascript API is described <a href="jalviewLiteJs.html">here</a></strong>.
- </p>
+ <p>\r <strong>Quick Links:<ul><li>Download the applet jar file from <a\r href="jalviewApplet.jar">here</a>\r </li>\r <li>Parameters are described <a href="#parameters">below</a></li>\r <li>The javascript API is described <a\r href="jalviewLiteJs.html">here</a></li>\r </ul></strong>\r </p>\r
<h3 align="left">Useful to know!!</h3>
<ul>
<li>Package all your data files into a single (or multiple) zip / jar
button by setting the embed parameter to true;<br>
<param name="embedded"
value="true"> </li>
- </ul>\r <p><strong><font size="2">**NEW FEATURES** in Jalview 2.7</font></strong></p>\r <ul>\r <li><font size="2">Javascript callbacks capabilities<ul><li>oninit parameter and methods for registering javascript handlers for selections, mouseovers and linking to Jmol applets on the page.</li>\r <li>To use javascript callbacks, ensure the applet tag includes the '<a href="http://download.oracle.com/javase/6/docs/technotes/guides/plugin/developer_guide/java_js.html">mayscript</a>' attribute - either as a parameter (<param name="mayscript" value="true"/;gt;) or as a bare attribute in the applet html tag).</li></ul></font>\r </li>\r <li><font size="2">New <a href="jalviewLiteJsApi.html">jalviewLite java api</a> methods for selecting, highlighting, scrolling and reordering sequences in an alignment view.\r </font></li></ul>\r <p><strong><font size="2">**NEW FEATURES** in Jalview 2.6</font></strong></p>\r <ul>\r <li><font size="2">Jmol compatibility updated to Jmol 12.1.x series - <a href="JmolApplet-12.1.13.jar">download the JmolApplet here</a></font></li>\r<li>To use Jmol as the structure viewer for Jalview, you must include \r the jar file in the applet archive argument thus:<br>\r <pre><font size="2">archive="jalviewApplet.jar,Jmol-12.1.13.jar"</font></pre>\r </li>\r <li>Jmol 12.x requires at least Java 1.5 to run in the clients web browser. If the client does not have \r Java 1.5, or if the Jmol-12.1.13.jar is not added to the archive, the \r original Jalview structure viewer will still be available. <br>\r </li>\r <li>Jalview 2.6 works only with Jmol version 12.1.13 or later. You can use the JmolApplet.jar from \r the Jmol binary distribution available at the Jmol Sourceforge site, \r or <a href="JmolApplet-12.1.13.jar">download the Jmol applet from here</a></li>\r <li><font size="2">Minimum recommended version of Java runtime for the applet is now 1.5 (JalviewLite v2.6 without the Jmol viewer may work ok on earlier Java environments but compatibility can no-longer be guaranteed).</font></li>\r </ul>
+ </ul>\r <p><strong><font size="2">**NEW FEATURES** in Jalview 2.7</font></strong></p>\r <ul>\r <li><font size="2">Javascript callbacks capabilities<ul><li>oninit parameter and methods for registering javascript handlers for selections, mouseovers and linking to Jmol applets on the page.</li>\r <li>To use javascript callbacks, ensure the applet tag includes the '<a href="http://download.oracle.com/javase/6/docs/technotes/guides/plugin/developer_guide/java_js.html">mayscript</a>' attribute - either as a parameter (<param name="mayscript" value="true"/;gt;) or as a bare attribute in the applet html tag).</li></ul></font>\r </li>\r <li><font size="2">New <a href="jalviewLiteJs.html">jalviewLite java api</a> methods for selecting, highlighting, scrolling and reordering sequences in an alignment view.\r </font></li></ul>\r <p><strong><font size="2">**NEW FEATURES** in Jalview 2.6</font></strong></p>\r <ul>\r <li><font size="2">Jmol compatibility updated to Jmol 12.1.x series - <a href="JmolApplet-12.1.13.jar">download the JmolApplet here</a></font></li>\r<li>To use Jmol as the structure viewer for Jalview, you must include \r the jar file in the applet archive argument thus:<br>\r <pre><font size="2">archive="jalviewApplet.jar,Jmol-12.1.13.jar"</font></pre>\r </li>\r <li>Jmol 12.x requires at least Java 1.5 to run in the clients web browser. If the client does not have \r Java 1.5, or if the Jmol-12.1.13.jar is not added to the archive, the \r original Jalview structure viewer will still be available. <br>\r </li>\r <li>Jalview 2.6 works only with Jmol version 12.1.13 or later. You can use the JmolApplet.jar from \r the Jmol binary distribution available at the Jmol Sourceforge site, \r or <a href="JmolApplet-12.1.13.jar">download the Jmol applet from here</a></li>\r <li><font size="2">Minimum recommended version of Java runtime for the applet is now 1.5 (JalviewLite v2.6 without the Jmol viewer may work ok on earlier Java environments but compatibility can no-longer be guaranteed).</font></li>\r </ul>
<br><strong><font size="2">**NEW FEATURES** in Jalview 2.5</font></strong></p>\r <ul>\r <li><font size="2">New parameters to control display of tree annotation, width of alignment columns, and to disable the jalview button and check for Jmol on startup.</font></li>\r </ul> \r <br><strong><font size="2">**NEW FEATURES** in Jalview 2.4</font></strong></p>
<ul>
<li><font size="2">New applet API methods for feature display control, views, and obtaining current selection via javascript.</font></li>
<tr><td>showbutton</td>
<td>true</td>
<td>Show the jalview button on the page. When false, JalviewLite will open immediately.</td>
- </tr>\r </tr>\r <tr><td>sortByTree</td>\r <td>true or false (default is false)</td>\r <td>automatically sort the associated alignment view by the tree when a new tree is opened.</td>\r </tr>\r <tr>\r <td>showTreeBootstraps</td><td>true or false (default is true)</td><td>show or hide branch bootstraps</td>\r </tr>\r <tr><td>showTreeDistances</td><td>true or false (default is true)</td><td>show or hide branch lengths</td></tr>\r <tr><td>showUnlinkedTreeNodes</td><td>true or false (default is false)</td><td>indicate if unassociated nodes should be highlighted in the tree view</td>\r </tr>\r <tr><td>heightScale</td>\r <td>1.0 or greater</td>\r <td>Adjust the height of each cell in the alignment grid relative to the height of a character in the alignment font.</td>\r </tr>
- <tr><td>widthScale</td>\r <td>1.0 or greater</td>\r <td>Adjust the width of each cell in the alignment grid relative to the width of a character in the alignment font.</td>\r </tr>\r <tr><td>centrecolumnlabels</td>\r <td>true of false (default is false)</td>\r <td>When true, text labels associated with a column in the alignment will be shown centered with respect to the column.</td>\r <tr><td>showUnconserved</td>\r <td>true of false (default is false)</td>\r <td>When true, only gaps and symbols different to the consensus sequence for a column will be shown. Useful for visualizing alignments exhibiting low sequence variation, where it is important to highlight mutations.</td>\r </tr>\r <tr><td>upperCase</td>\r <td><em>bold</em> or other value</td>\r <td>Indicate a text style to apply to uppercase sequence symbols. Currently, only <strong>bold</strong> is supported.</td>\r </tr>\r <tr><td>showUnconserved</td>\r <td>true of false (default is false)</td>\r <td>When true, only gaps and symbols different to the consensus sequence for a column will be shown. Useful for visualizing alignments exhibiting low sequence variation, where it is important to highlight mutations.</td>\r </tr>\r \r <tr><td>automaticScrolling</td>\r <td>true of false (default is false)</td>\r <td>When true, alignment panels will automatically scroll to show any regions of the alignment highlighted due to javascript events or when mousing over a position in an associated structure.</td>\r </tr>\r \r <tr><td>showGroupConsensus</td>\r <td>true of false (default is false)</td>\r <td>When true, shows consensus annotation row for any groups on the alignment.</td>\r </tr>\r \r <tr><td>showGroupConservation</td>\r <td>true of false (default is false)</td>\r <td>When true, shows amino-acid property conservation annotation row for any groups on the alignment.</td>\r </tr>\r <tr><td>showConsensusHistogram</td>\r <td>true of false (default is true)</td>\r <td>When true, shows the percentage occurence of the consensus symbol for each column as a histogram above the consensus sequence row.</td>\r </tr>\r <tr><td>showSequenceLogo</td>\r <td>true of false (default is false)</td>\r <td>When true, shows a sequence logo above the consensus sequence (overlaid above the Consensus Histogram, if visible, with symbols coloured using the alignment's default colourscheme).</td>\r </tr>\r <tr><td>oninit</td>\r <td><em>after_init()</em></td>\r <td>name of javascript function that will be called after the jalviewLite instance has completed its initialisation.</em></td>\r </tr>\r <tr><td>relaxedidmatch</td>\r <td><em>true or false (default is false)</em></td>\r <td>When true, use stem based matching to identify sequences that match features imported from a GFF or Jalview sequence features file, and for associating PDB data (passed on PDBfile parguments) with sequences (based on a given destination sequence ID).</td>\r </tr>\r <tr><td>alignpdbfiles</td>\r <td><em>true or false (default is false)</em></td>\r <td>When true, and jalviewLite is able to use jmol as a structure viewer, attempt to show a superposition of all structures loaded onto the alignment, superimposed using the aligned regions of corresponding sequences. [experimental]</td>\r </tr>\r <tr><td>externalstructureviewer</td>\r <td><em>true or false (default is false)</em></td>\r <td>re-route jmol colouring commands, selection and mouseover events to an external viewer using javascript callbacks. [experimental]</td>\r </tr>\r <tr><td>externalstructureviewer</td>\r <td><em>true or false (default is false)</em></td>\r <td>re-route jmol colouring commands, selection and mouseover events to an external viewer using javascript callbacks. [experimental]</td>\r \r </tr>\r <tr><td>annotationcolour_max</td>\r <td>colour name or RGB hex triplet (default is red)</td>\r <td>Default colour used for maximum value when shading by annotation.</td>\r </tr>\r <tr><td>annotationcolour_min</td>\r <td>colour name or RGB hex triplet (default is orange)</td>\r <td>Default colour used for minimum value when shading by annotation.</td>\r </tr>\r\r </table>
+ </tr>\r </tr>\r <tr><td>sortByTree</td>\r <td>true or false (default is false)</td>\r <td>automatically sort the associated alignment view by the tree when a new tree is opened.</td>\r </tr>\r <tr>\r <td>showTreeBootstraps</td><td>true or false (default is true)</td><td>show or hide branch bootstraps</td>\r </tr>\r <tr><td>showTreeDistances</td><td>true or false (default is true)</td><td>show or hide branch lengths</td></tr>\r <tr><td>showUnlinkedTreeNodes</td><td>true or false (default is false)</td><td>indicate if unassociated nodes should be highlighted in the tree view</td>\r </tr>\r <tr><td>heightScale</td>\r <td>1.0 or greater</td>\r <td>Adjust the height of each cell in the alignment grid relative to the height of a character in the alignment font. (<em>since 2.5.1</em>)</td>\r </tr>
+ <tr><td>widthScale</td>\r <td>1.0 or greater</td>\r <td>Adjust the width of each cell in the alignment grid relative to the width of a character in the alignment font. (<em>since 2.5.1</em>)</td>\r </tr>\r <tr><td>centrecolumnlabels</td>\r <td>true of false (default is false)</td>\r <td>When true, text labels associated with a column in the alignment will be shown centered with respect to the column. (<em>since 2.4</em>)</td>\r <tr><td>showUnconserved</td>\r <td>true of false (default is false)</td>\r <td>When true, only gaps and symbols different to the consensus sequence for a column will be shown. Useful for visualizing alignments exhibiting low sequence variation, where it is important to highlight mutations. (<em>since 2.5</em>)</td>\r </tr>\r <tr><td>upperCase</td>\r <td><em>bold</em> or other value</td>\r <td>Indicate a text style to apply to uppercase sequence symbols. Currently, only <strong>bold</strong> is supported.</td>\r </tr>\r <tr><td>automaticScrolling</td>\r <td>true of false (default is true)</td>\r <td>When true, alignment panels will automatically scroll to show any regions of the alignment highlighted due to javascript events or when mousing over a position in an associated structure. (<em>since 2.6</em>)</td>\r </tr>\r \r <tr><td>showGroupConsensus</td>\r <td>true of false (default is false)</td>\r <td>When true, shows consensus annotation row for any groups on the alignment. (<em>since 2.7</em>)</td>\r </tr>\r \r <tr><td>showGroupConservation</td>\r <td>true of false (default is false)</td>\r <td>When true, shows amino-acid property conservation annotation row for any groups on the alignment. (<em>since 2.7</em>)</td>\r </tr>\r <tr><td>showConsensusHistogram</td>\r <td>true of false (default is true)</td>\r <td>When true, shows the percentage occurence of the consensus symbol for each column as a histogram above the consensus sequence row. (<em>since 2.7</em>)</td>\r </tr>\r <tr><td>showSequenceLogo</td>\r <td>true of false (default is false)</td>\r <td>When true, shows a sequence logo above the consensus sequence (overlaid above the Consensus Histogram, if visible, with symbols coloured using the alignment's default colourscheme). (<em>since 2.7</em>)</td>\r </tr>\r <tr><td>oninit</td>\r <td><em>after_init()</em></td>\r <td>name of javascript function that will be called after the jalviewLite instance has completed its initialisation. (<em>since 2.7</em>)</td>\r </tr>\r <tr><td>relaxedidmatch</td>\r <td><em>true or false (default is false)</em></td>\r <td>When true, use stem based matching to identify sequences that match features imported from a GFF or Jalview sequence features file, and for associating PDB data (passed on PDBfile parguments) with sequences (based on a given destination sequence ID). (<em>since 2.7</em>)</td>\r </tr>\r <tr><td>alignpdbfiles</td>\r <td><em>true or false (default is false)</em></td>\r <td>When true, and jalviewLite is able to use jmol as a structure viewer, attempt to show a superposition of all structures loaded onto the alignment, superimposed using the aligned regions of corresponding sequences. [experimental] (<em>since 2.7</em>)</td>\r </tr>\r <tr><td>externalstructureviewer</td>\r <td><em>true or false (default is false)</em></td>\r <td>re-route jmol colouring commands, selection and mouseover events to an external viewer using javascript callbacks. [experimental] (<em>since 2.7</em>)</td>\r \r </tr>\r <tr><td>annotationcolour_max</td>\r <td>colour name or RGB hex triplet (default is red)</td>\r <td>Default colour used for maximum value when shading by annotation. (<em>since 2.7</em>)</td>\r </tr>\r <tr><td>annotationcolour_min</td>\r <td>colour name or RGB hex triplet (default is orange)</td>\r <td>Default colour used for minimum value when shading by annotation. (<em>since 2.7</em>)</td>\r </tr>\r <tr><td>jalviewhelpurl</td>\r <td>absolute or relative url or javascript function prefixed by <em>javascript:</em> (default is http://www.jalview.org/help.html)</td>\r <td>Optional parameter allowing modification of the default Jalview Help URL normally opened when JalviewLite's 'Help' menu item is selected. (<em>since 2.7</em>)</td>\r </tr>\r <tr><td>resolvetocodebase</td>\r <td>True or False (False)</td>\r <td>Set to true to re-instate pre-JalviewLite 2.7 behaviour where relative URLs were prepended with the applet 'codebase' rather than the current document base URL before resolution. (<em>since 2.7</em>)</td>\r </tr>\r \r </table>
<p align="center"> </p>
<!-- InstanceEndEditable --></td>\r </tr>\r </table>\r</div>\r</body>\r<!-- InstanceEnd --></html>\r
\ No newline at end of file
Iron-sulfur (2Fe-2S) FER_CAPAA -1 44 44 METAL\r
Iron-sulfur (2Fe-2S) FER_CAPAA -1 47 47 METAL\r
Iron-sulfur (2Fe-2S) FER_CAPAA -1 77 77 METAL\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 8_8</a></html> FER_CAPAA -1 8 83 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 8_8</a></html> FER_CAPAA -1 8 83 Pfam\r
Ferredoxin_fold Status: True Positive FER_CAPAA -1 3 93 Cath\r
Iron-sulfur (2Fe-2S) FER_CAPAN -1 86 86 METAL\r
Iron-sulfur (2Fe-2S) FER_CAPAN -1 91 91 METAL\r
Iron-sulfur (2Fe-2S) FER_CAPAN -1 94 94 METAL\r
Iron-sulfur (2Fe-2S) FER_CAPAN -1 124 124 METAL\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 55_13</a></html> FER_CAPAN -1 55 130 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 55_13</a></html> FER_CAPAN -1 55 130 Pfam\r
Ferredoxin_fold Status: True Positive FER_CAPAN -1 45 140 Cath\r
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 86 86 METAL\r
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 91 91 METAL\r
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 94 94 METAL\r
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 124 124 METAL\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 55_13</a></html> FER1_SOLLC -1 55 130 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 55_13</a></html> FER1_SOLLC -1 55 130 Pfam\r
Ferredoxin_fold Status: True Positive FER1_SOLLC -1 45 140 Cath\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 55_13</a></html> Q93XJ9_SOLTU -1 55 130 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 55_13</a></html> Q93XJ9_SOLTU -1 55 130 Pfam\r
Ferredoxin_fold Status: True Positive Q93XJ9_SOLTU -1 45 140 Cath\r
Iron-sulfur (2Fe-2S) FER1_PEA -1 91 91 METAL\r
Iron-sulfur (2Fe-2S) FER1_PEA -1 96 96 METAL\r
Iron-sulfur (2Fe-2S) FER1_PEA -1 99 99 METAL\r
Iron-sulfur (2Fe-2S) FER1_PEA -1 129 129 METAL\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_13</a></html> FER1_PEA -1 60 135 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_13</a></html> FER1_PEA -1 60 135 Pfam\r
Ferredoxin_fold Status: True Positive FER1_PEA -1 50 145 Cath\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 63_13</a></html> Q7XA98_TRIPR -1 63 138 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 63_13</a></html> Q7XA98_TRIPR -1 63 138 Pfam\r
Ferredoxin_fold Status: True Positive Q7XA98_TRIPR -1 53 148 Cath\r
Iron-sulfur (2Fe-2S) FER1_MESCR -1 90 90 METAL\r
Iron-sulfur (2Fe-2S) FER1_MESCR -1 95 95 METAL\r
Iron-sulfur (2Fe-2S) FER1_MESCR -1 98 98 METAL\r
Iron-sulfur (2Fe-2S) FER1_MESCR -1 128 128 METAL\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 59_13</a></html> FER1_MESCR -1 59 134 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 59_13</a></html> FER1_MESCR -1 59 134 Pfam\r
Ferredoxin_fold Status: True Positive FER1_MESCR -1 49 144 Cath\r
Iron-sulfur (2Fe-2S) FER1_SPIOL -1 89 89 METAL\r
Iron-sulfur (2Fe-2S) FER1_SPIOL -1 94 94 METAL\r
Iron-sulfur (2Fe-2S) FER1_SPIOL -1 97 97 METAL\r
Iron-sulfur (2Fe-2S) FER1_SPIOL -1 127 127 METAL\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 58_13</a></html> FER1_SPIOL -1 58 133 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 58_13</a></html> FER1_SPIOL -1 58 133 Pfam\r
Ferredoxin_fold Status: True Positive FER1_SPIOL -1 48 143 Cath\r
Iron-sulfur (2Fe-2S) FER3_RAPSA -1 39 39 METAL\r
Iron-sulfur (2Fe-2S) FER3_RAPSA -1 44 44 METAL\r
Iron-sulfur (2Fe-2S) FER3_RAPSA -1 47 47 METAL\r
Iron-sulfur (2Fe-2S) FER3_RAPSA -1 77 77 METAL\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 8_8</a></html> FER3_RAPSA -1 8 83 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 8_8</a></html> FER3_RAPSA -1 8 83 Pfam\r
Ferredoxin_fold Status: True Positive FER3_RAPSA -1 3 93 Cath\r
Iron-sulfur (2Fe-2S) FER_BRANA -1 39 39 METAL\r
Iron-sulfur (2Fe-2S) FER_BRANA -1 44 44 METAL\r
Iron-sulfur (2Fe-2S) FER_BRANA -1 47 47 METAL\r
Iron-sulfur (2Fe-2S) FER_BRANA -1 77 77 METAL\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 8_8</a></html> FER_BRANA -1 8 83 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 8_8</a></html> FER_BRANA -1 8 83 Pfam\r
Ferredoxin_fold Status: True Positive FER_BRANA -1 2 96 Cath\r
Iron-sulfur (2Fe-2S) FER2_ARATH -1 91 91 METAL\r
Iron-sulfur (2Fe-2S) FER2_ARATH -1 96 96 METAL\r
Iron-sulfur (2Fe-2S) FER2_ARATH -1 99 99 METAL\r
Iron-sulfur (2Fe-2S) FER2_ARATH -1 129 129 METAL\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_13</a></html> FER2_ARATH -1 60 135 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_13</a></html> FER2_ARATH -1 60 135 Pfam\r
Ferredoxin_fold Status: True Positive FER2_ARATH -1 50 145 Cath\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_11</a></html> Q93Z60_ARATH -1 60 118 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_11</a></html> Q93Z60_ARATH -1 60 118 Pfam\r
Ferredoxin_fold Status: True Positive Q93Z60_ARATH -1 52 118 Cath\r
Iron-sulfur (2Fe-2S) FER1_MAIZE -1 91 91 METAL\r
Iron-sulfur (2Fe-2S) FER1_MAIZE -1 96 96 METAL\r
Iron-sulfur (2Fe-2S) FER1_MAIZE -1 99 99 METAL\r
Iron-sulfur (2Fe-2S) FER1_MAIZE -1 129 129 METAL\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_13</a></html> FER1_MAIZE -1 60 135 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_13</a></html> FER1_MAIZE -1 60 135 Pfam\r
Ferredoxin_fold Status: True Positive FER1_MAIZE -1 50 145 Cath\r
-<html>Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 52_12</a></html> O80429_MAIZE -1 52 127 Pfam\r
+<html>Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 52_12</a></html> O80429_MAIZE -1 52 127 Pfam\r
Ferredoxin_fold Status: True Positive O80429_MAIZE -1 42 137 Cath\r
ENDGROUP uniprot\r
\r
--- /dev/null
+// You need to add the groovy directory to the class path from the script window\r
+// or add the groovy directory to the java classpath when running Jalview\r
+\r
+jvtst = new JvLoadTester().newJvLoadTest('D:\\fooTest.jar');\r
+try { jvtst.TestForAll('D:\\e6-workspace\\Jalview RNA\\examples\\rna\\rfamSml') } \r
+catch (OutOfMemoryError e) { \r
+// inspect jvtst to find out what file + file index it was on\r
+}\r
+// Terminate Jalview - useful if running from command line\r
+if (Jalview.isInBatchMode()) {\r
+ Jalview.quit() \r
+}
\ No newline at end of file
--- /dev/null
+import jalview.gui.*;\r
+import jalview.io.*;\r
+\r
+def class JvLoadTest {\r
+ FileLoader fl = null;\r
+ def String safename = null;\r
+ JvLoadTest(String sname) { \r
+ if (!new File(sname).exists() || new File(sname).canWrite())\r
+ {\r
+ safename = sname;\r
+ } else {\r
+ System.err.println("Warning : "+sname+" isn't being used to store temporary files.");\r
+ } \r
+ }\r
+ def public boolean doTest (file) {\r
+ fl = new FileLoader(false);\r
+ System.gc();\r
+ AlignFrame af = fl.LoadFileWaitTillLoaded(file\r
+ ,FormatAdapter.FILE);\r
+ return doTest(af);\r
+ }\r
+ def public boolean doSequentialReadTest (file) {\r
+ return doSequentialReadTest(file, 0);\r
+ }\r
+ // Return true if there is more data to read.\r
+ def public boolean peekFp(FileParse fp) {\r
+ try { fp.mark(); } catch (Exception ex) { System.err.println("FAILED mark."+ex); return false; };\r
+ try {\r
+ def String nl;\r
+ for (i in 1..3) { \r
+ nl = fp.nextLine();\r
+ if (nl==null) { return false; }\r
+ System.out.println(nl +"\\n");\r
+ }\r
+ } catch (Exception e) { // end of file.\r
+ return false; };\r
+ try { fp.reset(); } catch (Exception ex) { System.err.println("FAILED rewind."+ex); return false; };\r
+ return true;\r
+ }\r
+ /*\r
+ Halt after loading the mx'th entry in the filestream\r
+ */\r
+ def public boolean doSequentialReadTest (file, int mx) {\r
+ // first properly open the file\r
+ // if (!doTest(file)) { return };\r
+ def FileParse fp = null;\r
+ try {\r
+ fp = new FileParse(file, AppletFormatAdapter.FILE);\r
+ } catch (Exception e) { System.err.println("Couldn't open "+file+"\\n"); e.printStackTrace(); return false;};\r
+ Desktop.instance.closeAll_actionPerformed(null)\r
+ System.gc();\r
+ while (fp!=null && fp.isValid() && (mx==0 || mx!=fp.index)) {\r
+ if (!peekFp(fp)) return false;\r
+ fl = new FileLoader(false);\r
+ AlignFrame af = fl.LoadFileWaitTillLoaded(fp, null);\r
+ System.out.println("FileParse index: "+fp.index); \r
+ if (af!=null && (mx==0 || mx!=fp.index))\r
+ { def boolean res = doTest(af);\r
+ if (!res)\r
+ {\r
+ // return false;\r
+ }\r
+ } else {\r
+ // return false;\r
+ }\r
+ }\r
+ return true;\r
+ }\r
+ def public void waitTillSettled(AlignFrame af)\r
+ {\r
+ if (af==null) { return; }\r
+ Thread.sleep(10);\r
+ while (af.getViewport().updatingConsensus || af.getViewport().updatingConservation) {\r
+ Thread.sleep(150); // wait until things settle down\r
+ }\r
+ }\r
+ def public boolean doTest(AlignFrame af) {\r
+ Object pr = af.getViewport().getAlignment().getProperty("AC");\r
+ if (pr!=null) { System.out.println("Accession = "+(String) pr); }\r
+ af.selectAllSequenceMenuItem_actionPerformed(null)\r
+ def boolean done = false;\r
+ // Just try to save - don\'t mess around with clipboard\r
+ /*while (!done) {\r
+ try {\r
+ af.copy_actionPerformed(null)\r
+ done = true;\r
+ } catch (Exception e) {\r
+ Thread.sleep(100); // wait until clipboard might be available again\r
+ }\r
+ }*/\r
+ if (af==null) { return false; }\r
+ waitTillSettled(af);\r
+ // Try and save as a jalview project and reload\r
+ try {\r
+ // af.saveAlignment(safename, "Jalview")\r
+ new Jalview2XML().SaveState(new java.io.File(safename));\r
+ Thread.sleep(100);\r
+ } catch (Exception ex) { \r
+ System.out.println("Couldn\'t save.");\r
+ ex.printStackTrace(System.err);\r
+ return false;\r
+ }\r
+ waitTillSettled(af);\r
+ try {\r
+ Desktop.instance.closeAll_actionPerformed(null);\r
+ } catch (Exception ex) {}\r
+ System.gc();\r
+ try {\r
+ af = new FileLoader(false).LoadFileWaitTillLoaded(safename, FormatAdapter.FILE); \r
+ } \r
+ catch (Exception ex) {\r
+ System.out.println("Couldn't reload saved file.");\r
+ System.gc();\r
+ return false;\r
+ }\r
+ waitTillSettled(af);\r
+\r
+ Desktop.instance.closeAll_actionPerformed(null);\r
+\r
+ // af.paste(true)\r
+ // af.newView_actionPerformed(null)\r
+ // af.newView_actionPerformed(null)\r
+\r
+ return true;\r
+ }\r
+ def public boolean TestForAll(String dir) {\r
+ println "For directory or file : "+dir;\r
+ File fd = new File(dir);\r
+ if (!fd.isDirectory()) { return doSequentialReadTest(dir); }\r
+ fd.eachFile() { file -> TestForAll(file.getAbsolutePath()) };\r
+ }\r
+}\r
+def JvLoadTest newJvLoadTest(String tempFile) {\r
+ jalview.gui.Desktop.instance.closeAll_actionPerformed(null);\r
+ System.gc();\r
+ jalview.gui.Desktop.instance.desktop.showMemoryUsage(true);\r
+ return new JvLoadTest(tempFile)\r
+}
\ No newline at end of file
--- /dev/null
+// run an alignment on the current alignFrame
+import jalview.ws.jws2.*;
+import jalview.datamodel.*;
+
+// First get the JABA service discoverer and see if there are any services.
+jalview.ws.jws2.Jws2Discoverer disc = jalview.ws.jws2.Jws2Discoverer.getDiscoverer();
+while (disc.isRunning()) {
+Thread.sleep(50);
+}
+if (!disc.isRunning() && !disc.hasServices())
+{
+ // discoverer is not running, and has no services - so run it again.
+ disc.run();
+}
+
+for (jalview.ws.jws2.Jws2Discoverer.Jws2Instance service: disc.getServices()) {
+
+if (service.serviceType.indexOf("uscle")>-1) {
+ // now - go through the services if any, and find a Muscle service
+ def msaf;
+ try {
+ msaf = currentAlFrame;
+ } catch (q) {
+ // currentAlFrame is not defined - so we were run as an interactive script from the Groovy console
+ // in that case, just pick the first alignmentFrame in the stack.
+ msaf = Jalview.getAlignframes()[0]
+ };
+ // Finally start Jalview's JabaWS MSA Client with the alignment from msaf
+ new MsaWSClient(service, msaf.getTitle(), msaf.gatherSequencesForAlignment(), false,
+ true, msaf.getViewport().getAlignment()
+ .getDataset(), msaf);
+ break;
+}
+}
public AlignFrame newViewFrom(AlignFrame alf, String name)
// load a new alignment
+// remember to store the AlignFrame object reference
+// if you want to manipulate the new alignment view.
public AlignFrame loadAlignment(String text, String title)
// the given location the top left hand corner for given current view (v2.7)
public void scrollViewToIn(AlignFrame alf, String topRow, String leftHandColumn)
+// adjust horizontal scroll in alf to the make
+// the given location the left hand corner for given current view (v2.7)
+public void scrollViewToColumnIn(AlignFrame alf, String leftHandColumn)
+
+// adjust horizontal/vertical scroll in alf to the make
+// the given location the top row for given current view (v2.7)
+public void scrollViewToRowIn(AlignFrame alf, String topRow)
+
// return separator separated list of feature groups
// on the current alignment
-\r
+/*********\r
+ * downloaded from http://java.com/js/deployJava.js\r
+ * Probably copyright Oracle nee Sun 2011,2010,2009.\r
+ */\r
var deployJava={debug:null,firefoxJavaVersion:null,myInterval:null,preInstallJREList:null,returnPage:null,brand:null,locale:null,installType:null,EAInstallEnabled:false,EarlyAccessURL:null,getJavaURL:'http://java.sun.com/webapps/getjava/BrowserRedirect?host=java.com',appleRedirectPage:'http://www.apple.com/support/downloads/',oldMimeType:'application/npruntime-scriptable-plugin;DeploymentToolkit',mimeType:'application/java-deployment-toolkit',launchButtonPNG:'http://java.sun.com/products/jfc/tsc/articles/swing2d/webstart.png',browserName:null,browserName2:null,getJREs:function(){var list=new Array();if(deployJava.isPluginInstalled()){var plugin=deployJava.getPlugin();var VMs=plugin.jvms;for(var i=0;i<VMs.getLength();i++){list[i]=VMs.get(i).version;}}else{var browser=deployJava.getBrowser();if(browser=='MSIE'){if(deployJava.testUsingActiveX('1.7.0')){list[0]='1.7.0';}else if(deployJava.testUsingActiveX('1.6.0')){list[0]='1.6.0';}else if(deployJava.testUsingActiveX('1.5.0')){list[0]='1.5.0';}else if(deployJava.testUsingActiveX('1.4.2')){list[0]='1.4.2';}else if(deployJava.testForMSVM()){list[0]='1.1';}}else if(browser=='Netscape Family'){deployJava.getJPIVersionUsingMimeType();if(deployJava.firefoxJavaVersion!=null){list[0]=deployJava.firefoxJavaVersion;}else if(deployJava.testUsingMimeTypes('1.7')){list[0]='1.7.0';}else if(deployJava.testUsingMimeTypes('1.6')){list[0]='1.6.0';}else if(deployJava.testUsingMimeTypes('1.5')){list[0]='1.5.0';}else if(deployJava.testUsingMimeTypes('1.4.2')){list[0]='1.4.2';}else if(deployJava.browserName2=='Safari'){if(deployJava.testUsingPluginsArray('1.7.0')){list[0]='1.7.0';}else if(deployJava.testUsingPluginsArray('1.6')){list[0]='1.6.0';}else if(deployJava.testUsingPluginsArray('1.5')){list[0]='1.5.0';}else if(deployJava.testUsingPluginsArray('1.4.2')){list[0]='1.4.2';}}}}\r
if(deployJava.debug){for(var i=0;i<list.length;++i){alert('We claim to have detected Java SE '+list[i]);}}\r
return list;},installJRE:function(requestVersion){var ret=false;if(deployJava.isPluginInstalled()){if(deployJava.getPlugin().installJRE(requestVersion)){deployJava.refresh();if(deployJava.returnPage!=null){document.location=deployJava.returnPage;}\r
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
// default console to report messages\r
var _console = document.getElementById("stdout");\r
var _jvapps = new Array();\r
var frid = "";\r
for (frm in frames) {\r
try {\r
- frid = (("" + source.getDatasetId()) == ("" + frames[frm]\r
- .getDatasetId()));\r
+ frid = (source!=null) && (("" + source.getSequenceSetId()) == ("" + frames[frm].currentAlignFrame\r
+ .getSequenceSetId()));\r
} catch (q) {\r
- }\r
- ;\r
+ };\r
+ \r
if (!frames[frm].equals(source) && !frid\r
&& !frames[frm].currentAlignFrame.equals(source)) {\r
frms[frms.length] = frames[frm];\r
// try { applet.setViewListener("viewlist"); } catch (err) {};\r
if (jmolView)\r
{\r
+ var sep = applet.getSeparator();\r
var oldjm=jmolView;\r
// recover full id of Jmol applet\r
jmolView=_jmolGetApplet(jmolView).id;\r
mtf="";\r
var dbase = document.baseURI.substring(0,document.baseURI.lastIndexOf("/")+1);\r
for (m in jmbinding._modelstofiles)\r
- { mtf+=jmbinding._modelstofiles[m];\r
+ { if (m>0) { mtf+=sep; }\r
+ mtf+=jmbinding._modelstofiles[m];\r
if (jmbinding._modelstofiles[m].indexOf("//")==-1)\r
- { jmbinding._fullmpath[m] = dbase+jmbinding._modelstofiles[m]; }\r
- jmbinding._filetonum.put(jmbinding._modelstofiles[m], m);\r
- jmbinding._filetonum.put(jmbinding._fullmpath[m], m);\r
+ { jmbinding._fullmpath[m] = dbase+((jmbinding._modelstofiles[m].indexOf("/")==0) ? jmbinding._modelstofiles[m].substring(1) : jmbinding._modelstofiles[m]); }\r
+ jmbinding._filetonum.put(jmbinding._modelstofiles[m], m+1); \r
+ jmbinding._filetonum.put(jmbinding._fullmpath[m], m+1);\r
\r
- if (m>0) { mtf+=sep; }}\r
- jvfollower.setStructureListener("_structure", mtf);\r
+ }\r
+ applet.setStructureListener("_structure", mtf);\r
}\r
}\r
\r
// relaxed third parameter - may be null or a model number for multi model\r
// views\r
atomlabel = ("" + atomlabel)\r
- .match(/\[(.+)\](\d+):(.)\.(\S+)\s*(\/\d+\.|).+/);\r
+ .match(/\[(.+)\](\d+):(.)\.([^\/]+)(\/\d+\.|).+/);\r
atomidx = "" + atomidx;\r
if (atomlabel[5]) {\r
atomlabel[5] = atomlabel[5].match(/\/(.+)\./)[1];\r
+ atomlabel[5] = parseInt(atomlabel[5])-1;\r
} else {\r
// default - first model\r
atomlabel[5] = 0;\r
_jvapps[ap].mouseOverStructure(atomlabel[2], atomlabel[3],\r
document.baseURI\r
.substring(0, document.baseURI.lastIndexOf('/'))\r
- + "/" + modeltofiles[atomlabel[5]]);\r
+ + "/" + \r
+ modeltofiles[atomlabel[5]]);\r
msg = _jmolhovermsg;\r
}\r
}\r
Iron-sulfur (2Fe-2S) FER_CAPAA -1 44 44 METAL
Iron-sulfur (2Fe-2S) FER_CAPAA -1 47 47 METAL
Iron-sulfur (2Fe-2S) FER_CAPAA -1 77 77 METAL
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 8_83</a></html> FER_CAPAA -1 8 83 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 8_83</a></html> FER_CAPAA -1 8 83 Pfam
Chloroplast FER_CAPAN -1 1 47 TRANSIT
Iron-sulfur (2Fe-2S) FER_CAPAN -1 86 86 METAL
Iron-sulfur (2Fe-2S) FER_CAPAN -1 91 91 METAL
Iron-sulfur (2Fe-2S) FER_CAPAN -1 94 94 METAL
Iron-sulfur (2Fe-2S) FER_CAPAN -1 124 124 METAL
Phosphothreonine FER_CAPAN -1 136 136 MOD_RES
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 55_130</a></html> FER_CAPAN -1 55 130 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 55_130</a></html> FER_CAPAN -1 55 130 Pfam
Chloroplast FER1_SOLLC -1 1 47 TRANSIT
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 86 86 METAL
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 91 91 METAL
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 94 94 METAL
Iron-sulfur (2Fe-2S) FER1_SOLLC -1 124 124 METAL
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 55_130</a></html> FER1_SOLLC -1 55 130 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 55_130</a></html> FER1_SOLLC -1 55 130 Pfam
Evidence: EI4 Q93XJ9_SOLTU -1 1 48 SIGNAL
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 55_130</a></html> Q93XJ9_SOLTU -1 55 130 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 55_130</a></html> Q93XJ9_SOLTU -1 55 130 Pfam
Chloroplast FER1_PEA -1 1 52 TRANSIT
L -> I (in strain: cv. Onward) FER1_PEA -1 59 59 VARIANT
I -> L (in strain: cv. Onward) FER1_PEA -1 85 85 VARIANT
Iron-sulfur (2Fe-2S) FER1_PEA -1 99 99 METAL
Iron-sulfur (2Fe-2S) FER1_PEA -1 129 129 METAL
YPTS -> PPPA (in Ref. 2) FER1_PEA -1 132 135 CONFLICT
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_135</a></html> FER1_PEA -1 60 135 Pfam
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 63_138</a></html> Q7XA98_TRIPR -1 63 138 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_135</a></html> FER1_PEA -1 60 135 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 63_138</a></html> Q7XA98_TRIPR -1 63 138 Pfam
Chloroplast FER1_MESCR -1 1 51 TRANSIT
Iron-sulfur (2Fe-2S) FER1_MESCR -1 90 90 METAL
Iron-sulfur (2Fe-2S) FER1_MESCR -1 95 95 METAL
Iron-sulfur (2Fe-2S) FER1_MESCR -1 98 98 METAL
Iron-sulfur (2Fe-2S) FER1_MESCR -1 128 128 METAL
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 59_134</a></html> FER1_MESCR -1 59 134 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 59_134</a></html> FER1_MESCR -1 59 134 Pfam
Chloroplast FER1_SPIOL -1 1 50 TRANSIT
STRAND FER1_SPIOL -1 52 59 STRAND
TURN FER1_SPIOL -1 60 61 TURN
STRAND FER1_SPIOL -1 130 133 STRAND
STRAND FER1_SPIOL -1 135 138 STRAND
HELIX FER1_SPIOL -1 142 144 HELIX
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 58_133</a></html> FER1_SPIOL -1 58 133 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 58_133</a></html> FER1_SPIOL -1 58 133 Pfam
I -> V FER3_RAPSA -1 8 8 VARIANT
Iron-sulfur (2Fe-2S) FER3_RAPSA -1 39 39 METAL
Iron-sulfur (2Fe-2S) FER3_RAPSA -1 44 44 METAL
Iron-sulfur (2Fe-2S) FER3_RAPSA -1 77 77 METAL
R -> K FER3_RAPSA -1 91 91 VARIANT
M -> V FER3_RAPSA -1 95 95 VARIANT
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 8_83</a></html> FER3_RAPSA -1 8 83 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 8_83</a></html> FER3_RAPSA -1 8 83 Pfam
Chloroplast FER1_ARATH -1 1 52 TRANSIT
Iron-sulfur (2Fe-2S) FER1_ARATH -1 91 91 METAL
Iron-sulfur (2Fe-2S) FER1_ARATH -1 96 96 METAL
Iron-sulfur (2Fe-2S) FER1_ARATH -1 99 99 METAL
Iron-sulfur (2Fe-2S) FER1_ARATH -1 129 129 METAL
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_135</a></html> FER1_ARATH -1 60 135 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_135</a></html> FER1_ARATH -1 60 135 Pfam
Iron-sulfur (2Fe-2S) FER_BRANA -1 39 39 METAL
Iron-sulfur (2Fe-2S) FER_BRANA -1 44 44 METAL
Iron-sulfur (2Fe-2S) FER_BRANA -1 47 47 METAL
Iron-sulfur (2Fe-2S) FER_BRANA -1 77 77 METAL
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 8_83</a></html> FER_BRANA -1 8 83 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 8_83</a></html> FER_BRANA -1 8 83 Pfam
Chloroplast FER2_ARATH -1 1 52 TRANSIT
Iron-sulfur (2Fe-2S) FER2_ARATH -1 91 91 METAL
Iron-sulfur (2Fe-2S) FER2_ARATH -1 96 96 METAL
Iron-sulfur (2Fe-2S) FER2_ARATH -1 99 99 METAL
Iron-sulfur (2Fe-2S) FER2_ARATH -1 129 129 METAL
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_135</a></html> FER2_ARATH -1 60 135 Pfam
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_118</a></html> Q93Z60_ARATH -1 60 118 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_135</a></html> FER2_ARATH -1 60 135 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_118</a></html> Q93Z60_ARATH -1 60 118 Pfam
Chloroplast FER1_MAIZE -1 1 52 TRANSIT
STRAND FER1_MAIZE -1 57 59 STRAND
STRAND FER1_MAIZE -1 72 74 STRAND
STRAND FER1_MAIZE -1 132 135 STRAND
STRAND FER1_MAIZE -1 137 141 STRAND
TURN FER1_MAIZE -1 142 142 TURN
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_135</a></html> FER1_MAIZE -1 60 135 Pfam
-<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 52_127</a></html> O80429_MAIZE -1 52 127 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 60_135</a></html> FER1_MAIZE -1 60 135 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://pfam.sanger.ac.uk/family/PF00111">Pfam 52_127</a></html> O80429_MAIZE -1 52 127 Pfam
ENDGROUP uniprot
--- /dev/null
+testdata contains data files that are used for testing particular features of jalview.
+The files in this directory contain nonsense, and shouldn't be used in any of
+the example JalviewLite pages demonstrations!
\ No newline at end of file
--- /dev/null
+JALVIEW_ANNOTATION
+# Created: Thursday 18th August 2011
+# testdata - Mike is fictitious, and any resemblance to persons living or dead is purely coincidental :)
+NO_GRAPH Secondary<Structure This is a long <= mouseover > here ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||1,E|E|E|||||2,E|E|E|E|E|E|E|E|||||3,H|H|H|H|H|||||||||||Fe|||||Fe|||Fe||4,E|E||||||5,E|E|||||||||||6,H|H|H|H||7,E||||Fe|||E|E||||9,E|E|E|E|E||||||||||
+NO_GRAPH Secondary Structure ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||1,E|E|E|||||2,E|E|E|E|E|E|E|E|||||3,H|H|H|H|H|||||||||||Fe|||||Fe|||Fe||4,E|E||||||5,E|E|||||||||||6,H|H|H|H||7,E||||Fe|||E|E||||9,E|E|E|E|E||||||||||
+NO_GRAPH Iron Sulphur Contacts <html>My <bold>Friend Mike</bold> says this is Rubbish!</html> ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||Fe|||||Fe|||Fe||||||||||||||||||||||||||||||Fe||||||||||||||||||||||
+NO_GRAPH Iron Sulphur Contacts <html>My <bold>Friend Mike</bold> says this is unterminated Rubbish!</html> ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||Fe|||||Fe|||Fe||||||||||||||||||||||||||||||Fe||||||||||||||||||||||
+NO_GRAPH Iron Sulphur Contacts <html>My <bold>Friend Mike</bold> <br>says this is valuable Rubbish!</html> ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||Fe|||||Fe|||Fe||||||||||||||||||||||||||||||Fe|||||||||||||||||||||| 67.4
+NO_GRAPH Iron Sulphur Contacts <html>My <bold>Friend Mike</bold> <br>says this is valuable unterminated Rubbish! ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||Fe|||||Fe|||Fe||||||||||||||||||||||||||||||Fe|||||||||||||||||||||| 67.4
+COLOUR Conservation 5d1500
+COLOUR Quality 560c00
--- /dev/null
+HELIX d4d189
+MOD_RES 47e459
+TRANSIT 6f949b
+TURN 1d1e2d
+METAL 70686e
+SIGNAL 92c7dd
+VARIANT 60beac
+Pfam dc206a
+CONFLICT c46c6e
+STRAND 25c54c
+
+STARTGROUP uniprot
+Iron-sulfur (2Fe-2S) < me < them > you FER_CAPAA -1 39 39 METAL
+Iron-sulfur (2Fe-2S) < me < them > you FER_CAPAA -1 44 44 METAL
+Iron-sulfur (2Fe-2S) <>,.?// FER_CAPAA -1 47 47 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAA -1 77 77 METAL
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 8_83</a></html> FER_CAPAA -1 8 83 Pfam
+Chloroplast FER_CAPAN -1 1 47 TRANSIT
+Iron-sulfur (2Fe-2S) FER_CAPAN -1 86 86 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAN -1 91 91 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAN -1 94 94 METAL
+Iron-sulfur (2Fe-2S) FER_CAPAN -1 124 124 METAL
+Phosphothreonine FER_CAPAN -1 136 136 MOD_RES
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 55_130</a></html> FER_CAPAN -1 55 130 Pfam
+Chloroplast FER1_SOLLC -1 1 47 TRANSIT
+Iron-sulfur (2Fe-2S) FER1_SOLLC -1 86 86 METAL
+Iron-sulfur (2Fe-2S) FER1_SOLLC -1 91 91 METAL
+Iron-sulfur (2Fe-2S) FER1_SOLLC -1 94 94 METAL
+Iron-sulfur (2Fe-2S) FER1_SOLLC -1 124 124 METAL
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 55_130</a></html> FER1_SOLLC -1 55 130 Pfam
+Evidence: EI4 Q93XJ9_SOLTU -1 1 48 SIGNAL
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 55_130</a></html> Q93XJ9_SOLTU -1 55 130 Pfam
+Chloroplast FER1_PEA -1 1 52 TRANSIT
+L -> I (in strain: cv. Onward) FER1_PEA -1 59 59 VARIANT
+I -> L (in strain: cv. Onward) FER1_PEA -1 85 85 VARIANT
+Iron-sulfur (2Fe-2S) FER1_PEA -1 91 91 METAL
+Iron-sulfur (2Fe-2S) FER1_PEA -1 96 96 METAL
+Iron-sulfur (2Fe-2S) FER1_PEA -1 99 99 METAL
+Iron-sulfur (2Fe-2S) FER1_PEA -1 129 129 METAL
+YPTS -> PPPA (in Ref. 2) FER1_PEA -1 132 135 CONFLICT
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_135</a></html> FER1_PEA -1 60 135 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 63_138</a></html> Q7XA98_TRIPR -1 63 138 Pfam
+Chloroplast FER1_MESCR -1 1 51 TRANSIT
+Iron-sulfur (2Fe-2S) FER1_MESCR -1 90 90 METAL
+Iron-sulfur (2Fe-2S) FER1_MESCR -1 95 95 METAL
+Iron-sulfur (2Fe-2S) FER1_MESCR -1 98 98 METAL
+Iron-sulfur (2Fe-2S) FER1_MESCR -1 128 128 METAL
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 59_134</a></html> FER1_MESCR -1 59 134 Pfam
+Chloroplast FER1_SPIOL -1 1 50 TRANSIT
+STRAND FER1_SPIOL -1 52 59 STRAND
+TURN FER1_SPIOL -1 60 61 TURN
+STRAND FER1_SPIOL -1 62 69 STRAND
+TURN FER1_SPIOL -1 70 71 TURN
+HELIX FER1_SPIOL -1 74 80 HELIX
+TURN FER1_SPIOL -1 81 82 TURN
+STRAND FER1_SPIOL -1 88 92 STRAND
+Iron-sulfur (2Fe-2S) FER1_SPIOL -1 89 89 METAL
+Iron-sulfur (2Fe-2S) FER1_SPIOL -1 94 94 METAL
+TURN FER1_SPIOL -1 96 97 TURN
+Iron-sulfur (2Fe-2S) FER1_SPIOL -1 97 97 METAL
+STRAND FER1_SPIOL -1 98 104 STRAND
+TURN FER1_SPIOL -1 109 110 TURN
+HELIX FER1_SPIOL -1 116 121 HELIX
+TURN FER1_SPIOL -1 122 122 TURN
+STRAND FER1_SPIOL -1 123 125 STRAND
+HELIX FER1_SPIOL -1 126 128 HELIX
+Iron-sulfur (2Fe-2S) FER1_SPIOL -1 127 127 METAL
+STRAND FER1_SPIOL -1 130 133 STRAND
+STRAND FER1_SPIOL -1 135 138 STRAND
+HELIX FER1_SPIOL -1 142 144 HELIX
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 58_133</a></html> FER1_SPIOL -1 58 133 Pfam
+I -> V FER3_RAPSA -1 8 8 VARIANT
+Iron-sulfur (2Fe-2S) FER3_RAPSA -1 39 39 METAL
+Iron-sulfur (2Fe-2S) FER3_RAPSA -1 44 44 METAL
+Iron-sulfur (2Fe-2S) FER3_RAPSA -1 47 47 METAL
+S -> T FER3_RAPSA -1 55 55 VARIANT
+Iron-sulfur (2Fe-2S) FER3_RAPSA -1 77 77 METAL
+R -> K FER3_RAPSA -1 91 91 VARIANT
+M -> V FER3_RAPSA -1 95 95 VARIANT
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 8_83</a></html> FER3_RAPSA -1 8 83 Pfam
+Chloroplast FER1_ARATH -1 1 52 TRANSIT
+Iron-sulfur (2Fe-2S) FER1_ARATH -1 91 91 METAL
+Iron-sulfur (2Fe-2S) FER1_ARATH -1 96 96 METAL
+Iron-sulfur (2Fe-2S) FER1_ARATH -1 99 99 METAL
+Iron-sulfur (2Fe-2S) FER1_ARATH -1 129 129 METAL
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_135</a></html> FER1_ARATH -1 60 135 Pfam
+Iron-sulfur (2Fe-2S) FER_BRANA -1 39 39 METAL
+Iron-sulfur (2Fe-2S) FER_BRANA -1 44 44 METAL
+Iron-sulfur (2Fe-2S) FER_BRANA -1 47 47 METAL
+Iron-sulfur (2Fe-2S) FER_BRANA -1 77 77 METAL
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 8_83</a></html> FER_BRANA -1 8 83 Pfam
+Chloroplast FER2_ARATH -1 1 52 TRANSIT
+Iron-sulfur (2Fe-2S) FER2_ARATH -1 91 91 METAL
+Iron-sulfur (2Fe-2S) FER2_ARATH -1 96 96 METAL
+Iron-sulfur (2Fe-2S) FER2_ARATH -1 99 99 METAL
+Iron-sulfur (2Fe-2S) FER2_ARATH -1 129 129 METAL
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_135</a></html> FER2_ARATH -1 60 135 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_118</a></html> Q93Z60_ARATH -1 60 118 Pfam
+Chloroplast FER1_MAIZE -1 1 52 TRANSIT
+STRAND FER1_MAIZE -1 57 59 STRAND
+STRAND FER1_MAIZE -1 72 74 STRAND
+HELIX FER1_MAIZE -1 76 80 HELIX
+TURN FER1_MAIZE -1 81 84 TURN
+STRAND FER1_MAIZE -1 90 97 STRAND
+Iron-sulfur (2Fe-2S) FER1_MAIZE -1 91 91 METAL
+Iron-sulfur (2Fe-2S) FER1_MAIZE -1 96 96 METAL
+TURN FER1_MAIZE -1 98 99 TURN
+Iron-sulfur (2Fe-2S) FER1_MAIZE -1 99 99 METAL
+TURN FER1_MAIZE -1 118 119 TURN
+HELIX FER1_MAIZE -1 120 123 HELIX
+TURN FER1_MAIZE -1 128 129 TURN
+Iron-sulfur (2Fe-2S) FER1_MAIZE -1 129 129 METAL
+STRAND FER1_MAIZE -1 132 135 STRAND
+STRAND FER1_MAIZE -1 137 141 STRAND
+TURN FER1_MAIZE -1 142 142 TURN
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 60_135</a></html> FER1_MAIZE -1 60 135 Pfam
+<html>Description: Fer2 Status: True Positive <a href="http://www.sanger.ac.uk/cgi-bin/Pfam/getacc?PF00111">Pfam 52_127</a></html> O80429_MAIZE -1 52 127 Pfam
+ENDGROUP uniprot
--- /dev/null
+>FER1_MAIZE/53-118 Ferredoxin-1, chloroplast precursor
+ATYNVKLITPEGEVELQVPDDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDD
+>FER_CAPAA/1-66 Ferredoxin
+ASYKVKLITPDGPIEFDCPDDVYILDQAEEAGHDLPYSCRAGSCSSCAGKIAGGAVDQTDGNFLDD
+>FER_CAPAN/48-113 Ferredoxin, chloroplast precursor
+ASYKVKLITPDGPIEFDCPDNVYILDQAEEAGHDLPYSCRAGSCSSCAGKIAGGAVDQTDGNFLDD
+>FER1_SOLLC/48-113 Ferredoxin-1, chloroplast precursor
+ASYKVKLITPEGPIEFECPDDVYILDQAEEEGHDLPYSCRAGSCSSCAGKVTAGSVDQSDGNFLDE
+>Q93XJ9_SOLTU/48-113 Ferredoxin I precursor
+ASYKVKLITPDGPIEFECPDDVYILDQAEEEGHDLPYSCRAGSCSSCAGKVTAGTVDQSDGKFLDD
+>FER1_PEA/53-118 Ferredoxin-1, chloroplast precursor
+ASYKVKLVTPDGTQEFECPSDVYILDHAEEVGIDLPYSCRAGSCSSCAGKVVGGEVDQSDGSFLDD
+>Q7XA98_TRIPR/56-121 Ferredoxin I
+ATYKVKLITPEGPQEFDCPDDVYILDHAEEVGIELPYSCRAGSCSSCAGKVVNGNVNQEDGSFLDD
+>FER1_MESCR/52-117 Ferredoxin-1, chloroplast precursor
+AAYKVTLVTPEGKQELECPDDVYILDAAEEAGIDLPYSCRAGSCSSCAGKVTSGSVNQDDGSFLDD
+>FER1_SPIOL/51-116 Ferredoxin-1, chloroplast precursor
+AAYKVTLVTPTGNVEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCAGKLKTGSLNQDDQSFLDD
+>FER3_RAPSA/1-66 Ferredoxin, leaf L-A
+ATYKVKFITPEGEQEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSFLDD
+>FER1_ARATH/53-118 Ferredoxin-1, chloroplast precursor
+ATYKVKFITPEGELEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSFLDD
+>FER_BRANA/1-66 Ferredoxin
+ATYKVKFITPEGEQEVECDDDVYVLDAAEEAGIDLPYSCRAGSCSSCAGKVVSGFVDQSDESFLDD
+>FER2_ARATH/53-118 Ferredoxin-2, chloroplast precursor
+ATYKVKFITPEGEQEVECEEDVYVLDAAEEAGLDLPYSCRAGSCSSCAGKVVSGSIDQSDQSFLDD
+>Q93Z60_ARATH/53-118 At1g10960/T19D16_12
+ATYKVKFITPEGEQEVECEEDVYVLDAAEEAGLDLPYSCRAGSCSSCAGKVVSGSIDQSDQSFLDD
+>O80429_MAIZE/45-110 Ferredoxin
+ATYNVKLITPEGEVELQVPDDVYILDFAEEEGIDLPFSCRAGSCSSCAGKVVSGSVDQSDQSFLND
<mapID target="wsparams" url="html/webServices/webServicesParams.html"/>
<mapID target="wsprefs" url="html/webServices/webServicesPrefs.html"/>
<mapID target="msaservice" url="html/webServices/msaclient.html"/>
- <mapID target="clustal" url="html/webServices/clustalw.html"/>
- <mapID target="muscle" url="html/webServices/muscle.html"/>
- <mapID target="mafft" url="html/webServices/mafft.html"/>
<mapID target="jnet" url="html/webServices/jnet.html"/>
+ <mapID target="shmrws" url="html/webServices/shmr.html"/>
+ <mapID target="newsreader" url="html/webServices/newsreader.html"/>
<mapID target="seqfetch" url="html/features/seqfetch.html"/>
<mapID target="dbreffetcher" url="html/webservices/dbreffetcher.html"/>
<mapID target="seqmappings" url="html/features/seqmappings.html"/>
+++ /dev/null
-<html><head><title>Jalview - Help </title></head>
-<body bgcolor=#F1F1F1>
-<p><center><strong>Contents</strong></center></p>
-
-<br><a href="html/index.html" target=bodyframe>Jalview Documentation</a>
-<br> <a href="html/whatsNew.html" target=bodyframe>What's new</a>
-<br> <a href="html/features/featureschemes.html" target=bodyframe>Graduated Feature Colours</a>
-<br> <a href="html/features/featuresettings.html" target=bodyframe>Sort by Features</a>
-<br> <a href="html/webServices/index.html" target=bodyframe>Envision2 Service</a>
-<br> <a href="html/releases.html" target=bodyframe>Release History</a>
-<br> <a href="html/editing/index.html" target=bodyframe>Editing Alignments</a>
-<br> <a href="html/features/cursorMode.html" target=bodyframe>Cursor Mode</a>
-<br> <a href="html/keys.html" target=bodyframe>Key Strokes</a>
-<br> <a href="html/io/index.html" target=bodyframe>Input / Output</a>
-<br> <a href="html/io/export.html" target=bodyframe>Making Figures</a>
-<br> <a href="html/features/hiddenRegions.html" target=bodyframe>Hidden Regions</a>
-<br> <a href="html/features/multipleViews.html" target=bodyframe>Multiple Views</a>
-<br> <a href="html/calculations/treeviewer.html" target=bodyframe>Viewing Trees</a>
-<br> <a href="html/features/seqfetch.html" target=bodyframe>Fetching Sequences</a>
-<br> <a href="html/features/seqfeatures.html" target=bodyframe>Sequence Features</a>
-<br> <a href="html/features/featuresettings.html" target=bodyframe>Sequence Feature Settings</a>
-<br> <a href="html/features/featuresFormat.html" target=bodyframe>Sequence Features File</a>
-<br> <a href="html/features/featureschemes.html" target=bodyframe>Feature Colourschemes</a>
-<br> <a href="html/features/creatinFeatures.html" target=bodyframe>User Defined Sequence Features</a>
-<br> <a href="html/features/editingFeatures.html" target=bodyframe>Editing Sequence Features</a>
-<br> <a href="html/features/dasfeatures.html" target=bodyframe>DAS Feature Retrieval</a>
-<br> <a href="html/features/dassettings.html" target=bodyframe>DAS Feature Settings</a>
-<br> <a href="html/webServices/index.html" target=bodyframe>Web Services</a>
-<br> <a href="html/webServices/msaclient.html" target=bodyframe>Sequence Alignment</a>
-<br> <a href="html/webServices/clustalw.html" target=bodyframe>Clustal Alignment</a>
-<br> <a href="html/webServices/muscle.html" target=bodyframe>Muscle Alignment</a>
-<br> <a href="html/webServices/mafft.html" target=bodyframe>MAFFT Alignment</a>
-<br> <a href="html/webServices/msaclient.html" target=bodyframe>Multiple Alignment Subjobs</a>
-<br> <a href="html/webServices/jnet.html" target=bodyframe>Secondary Structure Prediction</a>
-<br> <a href="html/features/seqfetch.html" target=bodyframe>Sequence Retrieval</a>
-<br> <a href="html/webservices/dbreffetcher.html" target=bodyframe>Database Reference Retrieval</a>
-<br> <a href="html/features/dasfeatures.html" target=bodyframe>DAS Feature Retrieval</a>
-<br> <a href="html/na/index.html" target=bodyframe>Nucleic Acid Support</a>
-<br> <a href="html/colourSchemes/index.html" target=bodyframe>Colour Schemes</a>
-<br> <a href="html/colourSchemes/textcolour.html" target=bodyframe>Background Dependent Text Colour</a>
-<br> <a href="html/colourSchemes/clustal.html" target=bodyframe>ClustalX</a>
-<br> <a href="html/colourSchemes/zappo.html" target=bodyframe>Zappo</a>
-<br> <a href="html/colourSchemes/taylor.html" target=bodyframe>Taylor</a>
-<br> <a href="html/colourSchemes/hydrophobic.html" target=bodyframe>Hydrophobicity</a>
-<br> <a href="html/colourSchemes/helix.html" target=bodyframe>Helix propensity</a>
-<br> <a href="html/colourSchemes/strand.html" target=bodyframe>Strand propensity</a>
-<br> <a href="html/colourSchemes/turn.html" target=bodyframe>Turn propensity</a>
-<br> <a href="html/colourSchemes/buried.html" target=bodyframe>Buried index</a>
-<br> <a href="html/colourSchemes/nucleotide.html" target=bodyframe>Nucleotide colours</a>
-<br> <a href="html/colourSchemes/purinepyrimidine.html" target=bodyframe>Purine/Pyrimidine colours</a>
-<br> <a href="html/colourSchemes/blosum.html" target=bodyframe>Blosum62</a>
-<br> <a href="html/colourSchemes/pid.html" target=bodyframe>by Percentage Identity</a>
-<br> <a href="html/colourSchemes/user.html" target=bodyframe>User Defined</a>
-<br> <a href="html/colourSchemes/abovePID.html" target=bodyframe>Above Percentage Identity</a>
-<br> <a href="html/colourSchemes/conservation.html" target=bodyframe>By conservation</a>
-<br> <a href="html/colourSchemes/annotationColouring.html" target=bodyframe>By Annotation</a>
-<br> <a href="html/colourSchemes/rnahelicesColouring.html" target=bodyframe>By RNA Helices</a>
-<br> Calculations
-<br> <a href="html/calculations/sorting.html" target=bodyframe>Sorting alignments</a>
-<br> <a href="html/calculations/tree.html" target=bodyframe>Calculating trees</a>
-<br> <a href="html/calculations/pca.html" target=bodyframe>Principal Component Analysis</a>
-<br> <a href="html/calculations/recoverInputdata.html" target=bodyframe>Tree/PCA Input Data</a>
-<br> <a href="html/calculations/pairwise.html" target=bodyframe>Pairwise Alignments</a>
-<br> <a href="html/calculations/redundancy.html" target=bodyframe>Remove Redundancy</a>
-<br> <a href="html/features/annotation.html" target=bodyframe>Alignment Annotations</a>
-<br> <a href="html/calculations/conservation.html" target=bodyframe>Conservation</a>
-<br> <a href="html/calculations/quality.html" target=bodyframe>Quality</a>
-<br> <a href="html/calculations/consensus.html" target=bodyframe>Consensus</a>
-<br> <a href="html/calculations/structureconsensus.html" target=bodyframe>RNA Structure Consensus</a>
-<br> <a href="html/features/annotationsFormat.html" target=bodyframe>Annotations File Format</a>
-<br> <a href="html/features/viewingpdbs.html" target=bodyframe>Viewing PDB Files</a>
-<br> <a href="html/features/jmol.html" target=bodyframe>Jmol Viewer</a>
-<br> <a href="html/features/pdbviewer.html" target=bodyframe>Simple PDB Viewer</a>
-<br> <a href="html/features/varna.html" target=bodyframe>Viewing RNA structures</a>
-<br> <a href="html/vamsas/index.html" target=bodyframe>VAMSAS Data Exchange</a>
-<br> <a href="html/menus/index.html" target=bodyframe>Window Menus</a>
-<br> <a href="html/menus/desktopMenu.html" target=bodyframe>Desktop Window</a>
-<br> <a href="html/menus/alignmentMenu.html" target=bodyframe>Alignment Window</a>
-<br> <a href="html/menus/alwfile.html" target=bodyframe>File Menu</a>
-<br> <a href="html/menus/alwedit.html" target=bodyframe>Edit Menu</a>
-<br> <a href="html/menus/alwselect.html" target=bodyframe>Select Menu</a>
-<br> <a href="html/menus/alwview.html" target=bodyframe>View Menu</a>
-<br> <a href="html/menus/alwformat.html" target=bodyframe>Format Menu</a>
-<br> <a href="html/menus/alwcolour.html" target=bodyframe>Colour Menu</a>
-<br> <a href="html/menus/alwcalculate.html" target=bodyframe>Calculation Menu</a>
-<br> <a href="html/menus/wsmenu.html" target=bodyframe>Web Service Menu</a>
-<br> <a href="html/menus/alwannotations.html" target=bodyframe>Annotation Menus</a>
-<br> <a href="html/menus/popupMenu.html" target=bodyframe>Popup Menu</a>
-<br> <a href="html/features/preferences.html" target=bodyframe>Preferences</a>
-<br> <a href="html/memory.html" target=bodyframe>Memory Settings</a>
-<br> <a href="html/jalviewjnlp.html" target=bodyframe>JNLP with extra memory parameters</a>
-<br> <a href="html/features/commandline.html" target=bodyframe>Command Line</a>
-<br> <a href="html/features/clarguments.html" target=bodyframe>Command Line Arguments</a>
-<br> <a href="html/features/groovy.html" target=bodyframe>Groovy Shell</a>
-<br> <a href="html/privacy.html" target=bodyframe>Privacy</a>
-<br>Useful information
-<br> <a href="html/misc/aminoAcids.html" target=bodyframe>Amino Acid Table</a>
-<br> <a href="html/misc/aaproperties.html" target=bodyframe>Amino Acid Properties</a>
-<br> <a href="html/misc/geneticCode.html" target=bodyframe>The Genetic Code</a>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<toc version="1.0">
<tocitem text="Jalview Documentation" target="home" expand="true" >
<tocitem text="What's new" target="new" expand="true">
- <tocitem text="Jaba Web Services" target="jabaws"/>
- <tocitem text="Superpositions with Jmol 12" target="pdbjmol"/>
- <tocitem text="Web Service Parameters" target="wsparams"/>
- <tocitem text="Web Service Preferences" target="wsprefs"/>
- <tocitem text="Release History" target="release"/>
+ <tocitem text="Viewing RNA structure" target="varna" />
+ <tocitem text="RNA Structure Consensus" target="calcs.alstrconsensus"/>
+ <tocitem text="RNA Helices coloring" target="colours.rnahelices"/>
</tocitem>
<tocitem text="Editing Alignments" target ="edit"/>
<tocitem text="Cursor Mode" target="cursor"/>
<tocitem text="JABAWS" target="jabaws"/>
<tocitem text="Web Service Preferences" target="wsprefs"/>
<tocitem text="Web Service Parameters" target="wsparams"/>
- <tocitem text="Sequence Alignment" target="msaservice" expand="false">
- <tocitem text="Clustal Alignment" target="clustal"/>
- <tocitem text="Muscle Alignment" target="muscle"/>
- <tocitem text="MAFFT Alignment" target="mafft"/>
+ <tocitem text="Sequence Alignment" target="msaservice" expand="false">
<tocitem text="Multiple Alignment Subjobs" target="msaservice"/>
</tocitem>
<tocitem text="Secondary Structure Prediction" target="jnet"/>
+ <tocitem text="Multi-Harmony Alignment Analysis" target="shmrws"/>
<tocitem text="Sequence Retrieval" target="seqfetch"/>
<tocitem text="Database Reference Retrieval" target="dbreffetcher"/>
<tocitem text="DAS Feature Retrieval" target="das.viewing"/>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
and additional leaves from sequences not present in the associated
alignment.
</p>
-<p>The view menu contains options controlling the way a tree is
-rendered and labelled:
+<p>The view menu mostly contains options controlling the way a tree is
+rendered and labeled:
<ul>
<li><strong>Fit to Window</strong><p>
The tree layout will be scaled to fit in the display
indicate that there is no sequence corresponding to that leaf in the
associated alignment.
</p></li>
-<li><strong>Associate Leaves with ...</strong><p>
-Only visible when there are <a href="../features/multipleviews.html">multiple views</a> of the same
-alignment to show and edit which alignment views are associated with
-the leaves of the displayed tree.
-</p>
-</ul>
+ <li><strong>Sort Alignment By Tree</strong>
+ <p>
+ Sorts any associated alignment views using the current tree. (<em>Only
+ available in the Jalview Desktop</em>)
+ </p>
+ </li>
+ <li><strong>Associate Leaves with ...</strong>
+ <p>
+ Only visible when there are <a href="../features/multipleviews.html">multiple
+ views</a> of the same alignment to show and edit which alignment views
+ are associated with the leaves of the displayed tree.
+ </p>
+ </ul>
</p>
</body>
</html>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<body>
<p><strong> Annotation Colouring </strong></p>
-<p>Jalview 2.08 allows an alignment to be coloured on a per-column basis based
- on any numerical annotation added to that alignment. </p>
+<p>Jalview allows the columns of an alignment to be coloured using any
+ numerical annotation rows added to that alignment. </p>
Select "Colour" <strong>→</strong> "..
by Annotation" to bring up the Colour by Annotation settings window. <br>
<br><div align="center">
- <img src="annotationColourSetting.jpg" width="426" height="140"> </div>
+ <img src="annotationColourSetting.jpg" width="507" height="202"> </div>
<ul>
<li>Select which annotation to base the colouring scheme on using the top left
selection box.</li>
<li> If the "Use Original Colours" box is selected, the colouring
scheme will use the colouring scheme present on the alignment before the Annotation
Colour Settings window was displayed. </li>
- <li>The colour scheme can display a colour gradient from a colour representing
- the minimum value in the selected annotation to a colour representing the
- maximum value in the selected annotation. Use the "Min Colour" and
- "Max Colour" to set the colour gradient range.</li>
- <li>Select whether to colour the alignment above or below an adjustable threshold
+ <li>The colour scheme can display a colour gradient from a colour
+ representing the minimum value in the selected annotation to a colour
+ representing the maximum value in the selected annotation. Use the
+ "Min Colour" and "Max Colour" to set the colour
+ gradient range.
+ <ul>
+ <li><em>New in Jalview 2.7</em>: Press the "Defaults"
+ button to reset the minimum and maximum colours to their default
+ settings (these are configured in the applet's parameters or the <a
+ href="../features/preferences.html">application's user
+ preferences</a>.)
+ </ul>
+ </li>
+
+ <li>Select whether to colour the alignment above or below an adjustable threshold
with the selection box center left of the window. </li>
- <li>Change the threshold value with the slider, or enter the exact value in
- the text box. </li>
-</ul>
-<p align="center"><img src="annotationColours.jpg" width="475" height="262"> </p>
+ <li>Change the threshold value with the slider, or enter the
+ exact value in the text box.
+ </li>
+ <li>Select the "Threshold is Min/Max" checkbox to
+ assign colours using the thresholded range's minimum and maximum
+ values, otherwise the scale will be defined by the range of values in
+ the annotation row.</li>
+ </ul>
+<p align="center"><img src="annotationColours.jpg" width="688" height="488"> </p>
</body>
</html>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
menu of an alignment window.</li>
</ul>
</p>
-<p><strong>Annotations File Format</strong></p>
-<p>The File consists of lines containing an instruction followed by
+<p><h3><font face="Arial, Helvetica, sans-serif">Format of an Annotations File</font></h3>
+<p>The file consists of lines containing an instruction followed by
tab delimited fields, and any lines starting with "#" are
ignored. The first non-commented out line of a valid Annotations file
must begin with :<strong><pre>JALVIEW_ANNOTATION</pre></strong></p>
-<p>A row of annotation is added with a line like <strong><pre><em>GRAPH_TYPE</em>	<em>Label</em>	<em>Values</em></pre></strong></p>
-<p>The <em>GRAPH_TYPE</em> field, which appears first, defines the
-appearance of the annotation row when rendered by Jalview. The next field is the row label for the annotation. The final <em>Values</em> field contains a series of "|"
-separated value fields. Each value field is itself a comma separated list of fields of a particular type defined by the annotation row's
-GRAPH_TYPE. The allowed values of GRAPH_TYPE and the format of their respective value fields (with the trailing "<strong>|</strong>" symbol) are shown below:<ul>
- <li>BAR_GRAPH<br>
- Plots a histogram with labels below each bar.<br>
- <em>number</em>,<em>text character</em>,<em>Tooltip text</em></li>
- <li>LINE_GRAPH<br>
- Draws a line between values on the annotation row.<br>
- <em>number</em></li>
- <li>NO_GRAPH<br>
- For a row consisting of text labels and/or secondary structure symbols.<br>
- <em>{Secondary Structure Symbol}</em>,<em>text label</em>,<em>Tooltip text</em><br>
- Currently supported secondary structure structure symbols are <em>H</em> (for helix) and <em>E</em> (for strand)</li>
-</ul>
-Any or all value fields may be left empty, as well as the BAR_GRAPH's
+<p>A row of annotation is added with a line like <strong><pre><em>GRAPH_TYPE</em>	<em>Label</em>	<em>Description</em> (optional)	<em>Values</em></pre></strong></p>
+ <p>
+ The <em>GRAPH_TYPE</em> field, which appears first, defines the
+ appearance of the annotation row when rendered by Jalview. The next
+ field is the row <em>label</em> for the annotation. This may be
+ followed by a <em>description</em> for the row, which is shown in a
+ tooltip when the user mouses over the annotation row's label. Since
+ Jalview 2.7, the description field may also contain html in the same
+ way as a <a href="featuresFile.html">sequence feature's</a> label,
+ providing the html is enclosed in an <html/> tag.
+
+ <ul><em>Please note: URL links embedded in HTML descriptions will
+ be supported in a future release of Jalview</em>
+ </ul>
+ </p>
+ <p>The final <em>Values</em>
+ field contains a series of "|" separated value fields. Each
+ value field is itself a comma separated list of fields of a particular
+ type defined by the annotation row's GRAPH_TYPE. The allowed values of
+ GRAPH_TYPE and the format of their respective value fields (with the
+ trailing "<strong>|</strong>" symbol) are shown below:
+
+ <ul>
+ <li>BAR_GRAPH<br> Plots a histogram with labels below each
+ bar.<br> <em>number</em>,<em>text character</em>,<em>Tooltip
+ text</em>
+ </li>
+ <li>LINE_GRAPH<br> Draws a line between values on the
+ annotation row.<br> <em>number</em>
+ </li>
+ <li>NO_GRAPH<br> For a row consisting of text labels and/or
+ secondary structure symbols.<br> <em>{Secondary Structure
+ Symbol}</em>,<em>text label</em>,<em>Tooltip text</em><br> Currently
+ supported secondary structure structure symbols are <em>H</em> (for
+ helix) and <em>E</em> (for strand)</li>
+ </ul>
+ Any or all value fields may be left empty, as well as the BAR_GRAPH's
text character field, and either or both of the text-label and secondary
structure symbol fields of the NO_GRAPH type annotation rows.</p>
<p>Color strings can be embedded in a value field by enclosing an RGB triplet in square brackets to colour that position in an annotation row.
</p>
-<p>You can associate an annotation with a sequence by preceding its
+<p><h3><font face="Arial, Helvetica, sans-serif">SEQUENCE_REF and GROUP_REF</font></h3>
+ By
+ default, annotation is associated with the alignment as a whole.
+ However, it is also possible to have an annotation row associated with
+ a specific sequence, or a sequence group. Clicking the annotation
+ label for sequence or group associated annotation will highlight the
+ associated rows in the alignment, and double clicking will select
+ those rows, allowing further analysis. While group associated
+ annotation remains associated with a particular alignment, sequence
+ associated annotation can move with a sequence - so copying a sequence
+ to another alignment will also copy its associated annotation.
+ </p>
+ <p>You can associate an annotation with a sequence by preceding its
definition with the line:
<pre>SEQUENCE_REF	<em>seq_name</em>	<em>[startIndex]</em></pre>
All Annotations defined after a SEQUENCE_REF command will then be
associated with that sequence, and the first field in the Value field
list will (optionally) be placed at the <em>startIndex</em>'th column.</p>
-<ul><em>New in Jalview 2.4</em>: the tooltip displayed when the mouse is moved over the row
-label for sequence associated annotation gives the associated
-sequence's name followed by the annotation row's description.<br/>
-<em>New in Jalview 2.5 Desktop</em>: Clicking on a sequence or group associated annotation row's label will highlight the sequence or sequence group in the alignment, and double clicking the annotation row label will select the associated sequence or group.</ul>
+
<p>Sequence associations are turned off for subsequent annotation
definitions by:
<pre>SEQUENCE_REF	ALIGNMENT</pre>
</p>
-<p>Since version 2.5, Jalview allows annotation rows to be associated with a group defined on the alignment, by preceding the annotation row with the line:
+<p>Similarly, since Jalview 2.5, group associated annotation can be defined by preceding the row definitions with the line:
<pre>GROUP_REF	<em>group_name</em></pre>
-Group association is turned off for subsequent annotation rows by
+Group association is turned off for subsequent annotation rows by:
<pre>GROUP_REF	<em>ALIGNMENT</em></pre>
-Annotations may be associated with both a sequence and a group, however - group annotations are still experimental and unexpected behaviour may be observed when editing alignments containing both group and sequence associated annotation rows.</p>
+</p>
+<h3><font face="Arial, Helvetica, sans-serif">LINE_GRAPH Grouping</font></h3>
<p><em>LINE_GRAPH</em> type annotations can be given a colour
(specified as 24 bit RGB triplet in hexadecimal or comma separated
values), combined onto the same vertical axis, and have ordinate lines
COMBINE	<em>graph_1_name</em>	<em>graph_2_name</em>
GRAPHLINE	<em>graph_name</em>	<em>value</em>	<em>label</em>	<em>colour</em><strong><em>
</em></strong></pre>
+</p>
<h3><font face="Arial, Helvetica, sans-serif">(Since Jalview 2.5) ROWPROPERTIES</font></h3>
<p>The visual display properties for a set of annotation rows can be modified using the following tab-delimited line:</p>
<pre>ROWPROPERTIES	<em>Row label</em>	<em>centrelabs=true( or false)</em>	<em>showalllabs=true(default is false)</em>	<em>scaletofit=true (default is false)</em></pre>
<pre>#Comment lines follow the hash symbol
JALVIEW_ANNOTATION
SEQUENCE_REF	FER1_MESCR	5
-BAR_GRAPH	Bar Graph 1	||-100,-|-200,-|-300,-|-400,-|200,+|300,+|150,+
+BAR_GRAPH	Bar Graph 1	<html>an <em>html tooltip</em> for Bar graph 1.</html>	||-100,-|-200,-|-300,-|-400,-|200,+|300,+|150,+
LINE_GRAPH	Green Values	1.1|2.2|1.3|3.4|0.7|1.4|3.3|2.2|2.1|-1.1|3.2
LINE_GRAPH	Red Values	2.1|3.2|1.3|-1.4|5.5|1.4|1.3|4.2|-1.1|1.1|3.2
BAR_GRAPH	Bar Graph	2 1,.|2,*|3,:|4,.|5,*|4,:|3,.|2|1|1|2|3|4|5|4
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
</tr>
<tr>
- <td><div align="center">-props FILE</div></td>
+ <td><div align="center">-props FILE/URL</div></td>
<td><div align="left">Use the given Jalview properties file instead
of users default.</div></td>
</tr>
<tr>
- <td><div align="center">-features FILE</div></td>
+ <td><div align="center">-features FILE/URL</div></td>
<td><div align="left">
<p>Use the given file to add sequence features to an alignment.
See <a href="featuresFormat.html" target="NEW">Features
</tr>
<tr>
<td>
- <div align="center">-annotations FILE</div>
+ <div align="center">-annotations FILE/URL</div>
</td>
<td>Add precalculated annotations to the alignment. See <a
href="annotationsFormat.html" target="NEW">Annotation File</a>
</tr>
<tr>
<td>
- <div align="center">-tree FILE</div>
+ <div align="center">-tree FILE/URL</div>
<td>
<div align="left">Load the given newick format tree file onto
the alignment</div>
</tr>
<tr>
<td>
- <div align="center">-groovy FILE</div>
+ <div align="center">-groovy FILE/URL</div>
<td>
<div align="left">Execute groovy script in FILE (where FILE may be 'STDIN' to read from the standard input) after all other
arguments have been processed</div>
</tr>
<tr>
<td>
- <div align="center">-vdoc VAMSAS DOCUMENT FILE or URL</div>
+ <div align="center">-vdoc VAMSAS DOCUMENT FILE/URL</div>
<td>
<div align="left">Import the given vamsas document into a new session.<br><em>New in 2.5</em></div>
</td>
</tr>
<tr>
<td>
- <div align="center">-groovy FILE</div>
- <td>
- <div align="left">Execute groovy script in FILE (where FILE may be 'STDIN' to read from the standard input) after all other
- arguments have been processed</div>
- </td>
- </tr>
- <tr>
- <td>
<div align="center">-fasta FILE</div>
</td>
<html>\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
* \r
* You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.\r
-->\r
-<head><title>Groovy Shell</title></head>\r
+<head>\r
+<title>Groovy Shell</title>\r
+</head>\r
<body>\r
-<p><strong>The Groovy Shell</strong></p>\r
-<p><a href="http://groovy.codehaus.org/">Groovy</a> is an "<em>agile and dynamic \r
-language for the Java platform</em>". The groovy scripting language makes it \r
-extremely easy to programmatically interact with Java programs, in much the same \r
-way that Javascript is used to generate and interact with applets and other \r
-objects on the page.</p>\r
-<p><strong><em>Getting Groovy...</em></strong><br>\r
-Jalview Groovy support is only possible if the core groovy \r
-jars which include the GroovyShell are present on the CLASSPATH \r
-when Jalview is started.</p><p>The jars are obtained from the \r
-<em>embedded</em> directory within the <a \r
-href="http://dist.codehaus.org/groovy/distributions">groovy \r
-distribution</a>. The easiest way of adding them to the \r
-Jalview classpath is to download and build jalview from \r
-it's source distribution, and then add the groovy-all-*.jar \r
-to the lib directory whose path is given in the java.ext.dirs property.</p>\r
-<p><strong>Opening Jalview's Groovy Console</strong><br>If groovy is available, then the \r
-<strong>Tools→Groovy Console...</strong> menu entry will be available \r
-from the Jalview Desktop's drop-down menu. Selecting this will open the\r
-<a href="http://groovy.codehaus.org/Groovy+Console">Groovy Console</a> which \r
-allows you to interactively execute Groovy scripts within the Jalview run-time environment.</p>\r
-<p><strong>Executing groovy scripts on Jalview startup</strong><br>\r
-The -groovy <script> option on the <a href="commandline.html"/>\r
-Jalview command line</a> will execute the contents of \r
-<script>. <script> may be a file, or alternatively if it is "STDIN" \r
-then the standard input will be used.</p>\r
-<p><strong>Access to Jalview's functions from Groovy Scripts</strong><br>\r
-There is as yet no properly defined scripting interface to Jalview, but all the\r
-public methods of the jalview class hierarchy can be called from Groovy scripts. \r
-The access point for this is the <strong>Jalview</strong> object defined in\r
-the groovy environent which corresponds to the <pre>jalview.gui.Desktop</pre> object which\r
-manages all the Jalview windows.</p> \r
-Here's an example to get you started:<br>\r
-<ul><li>Getting the title, alignment and first sequence from the current alignFrame<br>\r
-<pre>\r
+ <p>\r
+ <strong>The Groovy Shell</strong>\r
+ </p>\r
+ <p>\r
+ <a href="http://groovy.codehaus.org/">Groovy</a> is an "<em>agile\r
+ and dynamic language for the Java platform</em>". The groovy\r
+ scripting language makes it extremely easy to programmatically\r
+ interact with Java programs, in much the same way that Javascript is\r
+ used to generate and interact with applets and other objects on the\r
+ page.\r
+ </p>\r
+ <p>\r
+ <strong><em>Getting Groovy...</em>\r
+ </strong><br> Jalview Groovy support is only possible if the core groovy\r
+ jars which include the GroovyShell are present on the CLASSPATH when\r
+ Jalview is started.\r
+ </p>\r
+ <p>\r
+ The jars are obtained from the <em>embedded</em> directory within the\r
+ <a href="http://dist.codehaus.org/groovy/distributions">groovy\r
+ distribution</a>. The easiest way of adding them to the Jalview classpath\r
+ is to download and build jalview from it's source distribution, and\r
+ then add the groovy-all-*.jar to the lib directory whose path is given\r
+ in the java.ext.dirs property.\r
+ </p>\r
+ <p>\r
+ <strong>Opening Jalview's Groovy Console</strong><br>If groovy is\r
+ available, then the <strong>Tools→Groovy Console...</strong>\r
+ menu entry will be available from the Jalview Desktop's drop-down\r
+ menu. Selecting this will open the <a\r
+ href="http://groovy.codehaus.org/Groovy+Console">Groovy Console</a>\r
+ which allows you to interactively execute Groovy scripts within the\r
+ Jalview run-time environment.\r
+ </p>\r
+ <p>\r
+ <strong>Executing groovy scripts on Jalview startup</strong><br>\r
+ The -groovy <script> option on the <a href="commandline.html" />\r
+ Jalview command line</a> will execute the contents of <script>.\r
+ <script> may be a file, a URL, or alternatively if it is\r
+ "STDIN" then the standard input will be used.<br>\r
+ <em>Note: The groovy script will be executed <strong>after</strong>\r
+ any data is loaded, and <strong>before</strong> images or any output\r
+ files are written. This allows you to perform customised jalview\r
+ analysis workflows with groovy.</em>\r
+ </p>\r
+ <p>\r
+ <strong>Access to Jalview's functions from Groovy Scripts</strong><br>\r
+ There is as yet no properly defined scripting interface to Jalview,\r
+ but all the public methods of the jalview class hierarchy can be\r
+ called from Groovy scripts. The access point for this is the <strong>Jalview</strong>\r
+ object defined in the groovy environent which corresponds to the\r
+ <pre>jalview.gui.Desktop</pre>\r
+ object which manages all the Jalview windows.\r
+ </p>\r
+ Here's an example to get you started:\r
+ <br>\r
+ <ul>\r
+ <li>Getting the title, alignment and first sequence from the\r
+ current alignFrame<br> <pre>\r
def alf = Jalview.getAlignframes();\r
print alf[0].getTitle();\r
def alignment = alf[0].viewport.alignment;\r
def seq = alignment.getSequenceAt(0);\r
-</pre>\r
-</li>\r
-</ul>\r
-</p>\r
+</pre></li>\r
+<li>When running a groovy script from the command line, the alignment that was just loaded can be referred to like so:<br><pre>\r
+print currentAlFrame.getTitle();</pre>\r
+ </ul>\r
+ </p>\r
\r
-<p> </p>\r
+ <p> </p>\r
</body>\r
</html>\r
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<body>
<p><strong>Preferences</strong></p>
-<p>There are four tabs in the Preferences dialog box:
+<p>There are six tabs in the Preferences dialog box:
<ul>
<li>The <a href="#visual"><strong>"Visual"</strong>
Preferences</a> tab allows you to configure the default display for a new
alignment window.</li>
+ <li>The <a href="#colours"><strong>"Colours"</strong>
+ Preferences</a> tab allows you to configure default colourschemes for a new
+ alignment window.</li>
<li>The <a href="#connections"><strong>"Connections"</strong>
Preferences</a> tab allows you to change the links made from Jalview to
your default web browser.</li>
<li>The <a href="dassettings.html"><strong>"DAS
Settings"</strong> Preferences</a> tab allows you to select which DAS sources
to use when fetching DAS Features.</li>
+ <li>The <a href="../webServices/webServicesPrefs.html"><strong>"Web Service"</strong> Preferences</a> tab allows you to configure the <a href="http://www.compbio.dundee.ac.uk/jabaws">JABAWS</a> servers that Jalview uses, and change the layout of the alignment's Web Services menu.</li>
</ul>
</p>
<p><strong><a name="visual">Visual</a> Preferences tab</strong></p>
windows in wrapped mode or not.</p>
<p><em>Gap Symbol</em> - The default gap symbol may be set to either
"-" or "."</p>
-<p><em>Colour</em> - The default colour scheme for a new alignment
-window. If the chosen option is "User Defined" then the last
-User Defined Colour loaded or saved via the User Defined Colours panel
-will be loaded.</p>
<p><em>Sort by</em> - When the alignment is loaded in, it will can
be sorted by Id or pairwise identity.</p>
<p><em>Open file</em> - If this is selected then the default
alignment file will be opened when Jalview is started. You can change
the default file by clicking on file name and either typing in the file
path or selecting it from the file chooser window.</p>
+<p><a name="colours"><strong>"Colours" Preferences tab</strong></p>
+<p><em>Alignment Colour</em> - The default colour scheme for a new alignment
+window. If the chosen option is "User Defined" then the last
+User Defined Colour loaded or saved via the User Defined Colours panel
+will be loaded.</p>
+ <p>
+ <em>Annotation Shading Default</em> - set the default minimum
+ and maximum colours used when <a
+ href="../colourSchemes/annotationColouring.html">Colour by
+ Annotation ..</a> is selected from the alignment window's colours menu.
+ </p>
+ <br>
+ </p>
<p><a name="connections"><strong>"Connections"
Preferences tab</strong></a></p>
<p><em>URL Link From Sequence ID</em><br>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<li>If the structure is already shown, then you will be prompted
to associate the sequence with an existing view of the selected
- structure.</li>
+ structure. This is useful when working with multi-domain or multi-chain PDB files.</li>
<li style="list-style: none">See the <a href="jmol.html">Jmol
PDB viewer</a> help page for more information about the display.</li>
</ul>
-
<p>
- Additionally, if several of the sequences in the currently selected
- region of the alignment have associated structures, then Jalview will
- provide a 'View <em>X</em> structures' entry in the submenu. This
- option will open a new Jmol view containing all the structures
- available for all selected sequences, superimposed using the currently
- selected region of the alignment. (<em>This capability was added
- in Jalview 2.7</em>)
+ <em>Opening structures associated with the current selection</em><br />
+ If one or more of the sequences in the alignment are selected, then
+ the Structure submenu of the <a href="../menus/popupMenu.html">Sequence
+ ID popup menu</a> will contain will include either a 'View all <em>X</em>
+ structures' entry in the submenu or a 'View structure for <em>Sequence</em>'
+ entry. Both these options will open a new Jmol view containing one, or
+ all the structures available for all selected sequences, superimposed
+ using the currently selected region of the alignment. (<em>This
+ capability was added in Jalview 2.7</em>)
</p>
-
+ <p><strong>Associating PDB files with Sequences</strong></p>
<p>To associate PDB files with a sequence, right click on a sequence
ID and select "Structure<strong>→</strong> Associate Structure with
Sequence", and one of the submenus:</p>
EBI, to fetch the PDB file with the entered Id.<br>
</li>
- <li>Discover PDB Ids - Jalview uses WSDBFetch, provided by the
- EBI, to discover PDB ids for all the sequences in the alignment which
- have valid Uniprot names / accession ids.</li>
+ <li>Discover PDB Ids - Jalview uses the sequence's ID to query WSDBFetch, provided by the
+ EBI, and any enabled DAS servers, to discover PDB ids associated with the sequence.</li>
</ul>
<p><strong>Importing PDB Entries or files in PDB format</strong><br>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
</head>
<body>
-<p><strong>Alignment Window Menus</strong></p>
- <li><strong>File</strong>
+ <p>
+ <strong>Alignment Window Menus</strong>
+ </p>
<ul>
- <li><strong>Fetch Sequence</strong><br>
- <em>Shows a dialog window in which you can select known ids from
- Uniprot, EMBL, EMBLCDS, PDB, PFAM, or RFAM databases using Web Services provided by
- the European Bioinformatics Institute. See <a
- href="../features/seqfetch.html">Sequence Fetcher</a></em>.</li>
- <li><strong>Add Sequences</strong><em><br>
- Add sequences to the visible alignment from file, URL, or cut &
- paste window </em></li>
- <li><strong>Reload</strong><em><br>
- Reloads the alignment from the original file, if available.<br>
- <strong>Warning: This will delete any edits, analyses and
- colourings applied since the alignment was last saved, and cannot be
- undone.</strong></em></li>
- <li><strong>Save (Control S)</strong><em><br>
- Saves the alignment to the file it was loaded from (if available), in
- the same format, updating the original in place. </em></li>
- <li><strong>Save As (Control Shift S)<br>
- </strong><em>Save the alignment to local file. A file selection window
- will open, use the "Files of type:" selection box to
- determine which <a href="../io/index.html">alignment format</a> to
- save as.</em></li>
- <li><strong>Output to Textbox<br>
- </strong><em>The alignment will be displayed in plain text in a new
- window, which you can "Copy and Paste" using the pull down
- menu, or your standard operating system copy and paste keys. The
- output window also has a <strong>"New Window"</strong>
- button to import the (possibly edited) text as a new alignment.<br>
- Select the format of the text by selecting one of the following menu
- items.</em>
- <ul>
- <li><strong>FASTA</strong> <em></em></li>
- <li><strong>MSF</strong></li>
- <li><strong>CLUSTAL</strong></li>
- <li><strong>BLC</strong></li>
- <li><strong>PIR</strong></li>
- <li><strong>PFAM</strong></li>
- </ul>
- </li>
- <li><strong>Print (Control P)<br>
- </strong><em>Jalview will print the alignment using the current fonts and
- colours of your alignment. If the alignment has annotations visible,
- these will be printed below the alignment. If the alignment is wrapped
- the number of residues per line of your alignment will depend on the
- paper width or your alignment window width, whichever is the smaller.
- </em></li>
- <li><strong>Export Image</strong> <em><br>
- Creates an alignment graphic with the current view's annotation,
- alignment background colours and group colours. If the alignment is <a
- href="../features/wrap.html">wrapped</a>, the output will also be
- wrapped and will have the same visible residue width as the open
- alignment. </em>
- <ul>
- <li><strong>HTML<br>
- </strong><em>Create a <a href="../io/export.html">web page</a> from your
- alignment.</em></li>
- <li><strong>EPS<br>
- </strong><em>Create an <a href="../io/export.html">Encapsulated
- Postscript</a> file from your alignment.</em></li>
- <li><strong>PNG<br>
- </strong><em>Create a <a href="../io/export.html">Portable Network
- Graphics</a> file from your alignment.</em></li>
- </ul>
- </li>
- <li><strong>Export Features</strong><em><br>
- All features visible on the alignment can be saved to file or
- displayed in a textbox in either Jalview or GFF format</em></li>
- <li><strong>Export Annotations</strong><em><br>
- All annotations visible on the alignment can be saved to file or
- displayed in a textbox in Jalview annotations format. </em></li>
- <li><strong>Load Associated Tree<br>
- </strong><em>Jalview can <a href="../calculations/treeviewer.html">view
- trees</a> stored in the Newick file format, and associate them with the
- alignment. Note: the ids of the tree file and your alignment MUST be
- the same.</em></li>
- <li><strong>Load Features / Annotations<br>
- </strong><em>Load files describing precalculated <a
- href="../features/featuresFormat.html">sequence features</a> or <a
- href="../features/annotationsFormat.html">alignment annotations</a>.</em></li>
- <li><strong>Close (Control W)</strong><br>
- <em>Close the alignment window. Make sure you have saved your
- alignment before you close - either as a Jalview project or by using
- the <strong>Save As</strong> menu.</em></li>
- </ul>
+ <li><strong>File</strong>
+ <ul>
+ <li><strong>Fetch Sequence</strong><br> <em>Shows a
+ dialog window in which you can retrieve known ids from Uniprot,
+ EMBL, EMBLCDS, PFAM, Rfam, or PDB database using Web Services provided by the
+ European Bioinformatics Institute. See <a
+ href="../features/seqfetch.html">Sequence Fetcher</a> </em>.</li>
+ <li><strong>Add Sequences</strong><em><br> Add
+ sequences to the visible alignment from file, URL, or cut &
+ paste window </em>
+ </li>
+ <li><strong>Reload</strong><em><br> Reloads the
+ alignment from the original file, if available.<br> <strong>Warning:
+ This will delete any edits, analyses and colourings applied since
+ the alignment was last saved, and cannot be undone.</strong> </em>
+ </li>
+ <li><strong>Save (Control S)</strong><em><br> Saves
+ the alignment to the file it was loaded from (if available), in
+ the same format, updating the original in place. </em>
+ </li>
+ <li><strong>Save As (Control Shift S)<br> </strong><em>Save
+ the alignment to local file. A file selection window will open,
+ use the "Files of type:" selection box to determine
+ which <a href="../io/index.html">alignment format</a> to save as.</em>
+ </li>
+ <li><strong>Output to Textbox<br> </strong><em>The
+ alignment will be displayed in plain text in a new window, which
+ you can "Copy and Paste" using the pull down menu, or
+ your standard operating system copy and paste keys. The output
+ window also has a <strong>"New Window"</strong> button
+ to import the (possibly edited) text as a new alignment.<br>
+ Select the format of the text by selecting one of the following
+ menu items.</em>
+ <ul>
+ <li><strong>FASTA</strong> <em></em>
+ </li>
+ <li><strong>MSF</strong>
+ </li>
+ <li><strong>CLUSTAL</strong>
+ </li>
+ <li><strong>BLC</strong>
+ </li>
+ <li><strong>PIR</strong>
+ </li>
+ <li><strong>PFAM</strong>
+ </li>
+ </ul></li>
+ <li><strong>Print (Control P)<br> </strong><em>Jalview
+ will print the alignment using the current fonts and colours of
+ your alignment. If the alignment has annotations visible, these
+ will be printed below the alignment. If the alignment is wrapped
+ the number of residues per line of your alignment will depend on
+ the paper width or your alignment window width, whichever is the
+ smaller. </em>
+ </li>
+ <li><strong>Export Image</strong> <em><br> Creates an
+ alignment graphic with the current view's annotation, alignment
+ background colours and group colours. If the alignment is <a
+ href="../features/wrap.html">wrapped</a>, the output will also be
+ wrapped and will have the same visible residue width as the open
+ alignment. </em>
+ <ul>
+ <li><strong>HTML<br> </strong><em>Create a <a
+ href="../io/export.html">web page</a> from your alignment.</em>
+ </li>
+ <li><strong>EPS<br> </strong><em>Create an <a
+ href="../io/export.html">Encapsulated Postscript</a> file from
+ your alignment.</em>
+ </li>
+ <li><strong>PNG<br> </strong><em>Create a <a
+ href="../io/export.html">Portable Network Graphics</a> file from
+ your alignment.</em>
+ </li>
+ </ul></li>
+ <li><strong>Export Features</strong><em><br> All
+ features visible on the alignment can be saved to file or
+ displayed in a textbox in either Jalview or GFF format</em>
+ </li>
+ <li><strong>Export Annotations</strong><em><br> All
+ annotations visible on the alignment can be saved to file or
+ displayed in a textbox in Jalview annotations format. </em>
+ </li>
+ <li><strong>Load Associated Tree<br> </strong><em>Jalview
+ can <a href="../calculations/treeviewer.html">view trees</a>
+ stored in the Newick file format, and associate them with the
+ alignment. Note: the ids of the tree file and your alignment MUST
+ be the same.</em></li>
+ <li><strong>Load Features / Annotations<br> </strong><em>Load
+ files describing precalculated <a
+ href="../features/featuresFormat.html">sequence features</a> or <a
+ href="../features/annotationsFormat.html">alignment
+ annotations</a>.</em></li>
+ <li><strong>Close (Control W)</strong><br> <em>Close
+ the alignment window. Make sure you have saved your alignment
+ before you close - either as a Jalview project or by using the <strong>Save
+ As</strong> menu.</em>
+ </li>
+ </ul></li>
+ <li><strong>Edit</strong>
+ <ul>
+ <li><strong>Undo (Control Z)</strong><em><br> This
+ will undo any edits you make to the alignment. This applies to
+ insertion or deletion of gaps, cutting residues or sequences from
+ the alignment or pasting sequences to the current alignment or
+ sorting the alignment. <strong>NOTE:</strong> It DOES NOT undo
+ colour changes, adjustments to group sizes, or changes to the
+ annotation panel. </em>
+ </li>
+ <li><strong>Redo (Control Y)<br> </strong><em>Any
+ actions which you undo can be redone using redo. </em>
+ </li>
+ <li><strong>Cut (Control X)<br> </strong><em>This
+ will make a copy of the currently selected residues before
+ removing them from your alignment. Click on a sequence name if you
+ wish to select a whole sequence. <br> Use <CTRL> and X
+ (<APPLE> and X on MacOSX) to cut.</em>
+ </li>
+ <li><strong>Copy (Control C)</strong><br> <em>Copies
+ the currently selected residues to the system clipboard - you can
+ also do this by pressing <CTRL> and C (<APPLE> and C
+ on MacOSX). <br> If you try to paste the clipboard contents
+ to a text editor, you will see the format of the copied residues
+ FASTA.</em></li>
+ <li><strong>Paste </strong>
+ <ul>
+ <li><strong>To New Alignment (Control Shift V)<br>
+ </strong><em>A new alignment window will be created from sequences
+ previously copied or cut to the system clipboard. <br> Use
+ <CTRL> and <SHIFT> and V(<APPLE> and
+ <SHIFT;> and and V on MacOSX) to paste.</em>
+ </li>
+ <li><strong>Add To This Alignment (Control V)<br>
+ </strong><em>Copied sequences from another alignment window can be
+ added to the current Jalview alignment. </em>
+ </li>
+ </ul></li>
+ <li><strong>Delete (Backspace)<br> </strong><em>This
+ will delete the currently selected residues without copying them
+ to the clipboard. Like the other edit operations, this can be
+ undone with <strong>Undo</strong>.</em>
+ </li>
+ <li><strong>Remove Left (Control L)<br> </strong><em>If
+ the alignment has marked columns, the alignment will be trimmed to
+ the left of the leftmost marked column. To mark a column, mouse
+ click the scale bar above the alignment. Click again to unmark a
+ column, or select "Deselect All" to deselect all
+ columns.</em></li>
+ <li><strong>Remove Right (Control R)<br> </strong><em>If
+ the alignment has marked columns, the alignment will be trimmed to
+ the left of the leftmost marked column. To mark a column, mouse
+ click the scale bar above the alignment. Click again to unmark a
+ column, or select "Deselect All" to deselect all
+ columns.</em></li>
+ <li><strong>Remove Empty Columns (Control E)<br>
+ </strong><em>All columns which only contain gap characters
+ ("-", ".") will be deleted.<br> You may
+ set the default gap character in <a
+ href="../features/preferences.html">preferences</a>. </em>
+ </li>
+ <li><strong>Remove All Gaps (Control Shift E)</strong><br>
+ <em>Gap characters ("-", ".") will be
+ deleted from the selected area of the alignment. If no selection
+ is made, ALL the gaps in the alignment will be removed.<br>
+ You may set the default gap character in <a
+ href="../features/preferences.html">preferences</a>. </em>
+ </li>
+ <li><strong>Remove Redundancy (Control D)<br> </strong><em>Selecting
+ this option brings up a window asking you to select a threshold.
+ If the percentage identity between any two sequences (under the
+ current alignment) exceeds this value then one of the sequences
+ (the shorter) is discarded. Press the "Apply" button to
+ remove redundant sequences. The "Undo" button will undo
+ the last redundancy deletion.</em>
+ </li>
+ <li><strong>Pad Gaps<br> </strong><em>When selected,
+ the alignment will be kept at minimal width (so there no empty
+ columns before or after the first or last aligned residue) and all
+ sequences will be padded with gap characters to the before and
+ after their terminating residues.<br> This switch is useful
+ when making a tree using unaligned sequences and when working with
+ alignment analysis programs which require 'properly aligned
+ sequences' to be all the same length.<br> You may set the
+ default for <strong>Pad Gaps</strong> in the <a
+ href="../features/preferences.html">preferences</a>. </em>
+ </li>
+ </ul></li>
+ <li><strong>Select</strong>
+ <ul>
+ <li><strong><a href="../features/search.html">Find...
+ (Control F)</a> </strong><em><br> Opens the Find dialog box to
+ search for residues, sequence name or residue position within the
+ alignment and create new sequence features from the queries. </em>
+ </li>
+ <li><strong>Select All (Control A)<br> </strong><em>Selects
+ all the sequences and residues in the alignment. <br> Use
+ <CTRL> and A (<APPLE> and A on a MacOSX) to select
+ all.</em></li>
+ <li><strong>Deselect All (Escape)<br> </strong><em>Removes
+ the current selection box (red dashed box) from the alignment
+ window. All selected sequences, residues and marked columns will
+ be deselected. </em><em> <br> Use <ESCAPE> to deselect
+ all.</em></li>
+ <li><strong>Invert Sequence Selection (Control I)<br>
+ </strong><em>Any sequence ids currently not selected will replace the
+ current selection. </em>
+ </li>
+ <li><strong>Invert Column Selection (Control Alt I)<br>
+ </strong><em>Any columns currently not selected will replace the current
+ column selection. </em>
+ </li>
+ <li><strong>Undefine Groups (Control U)<br> </strong><em>The
+ alignment will be reset with no defined groups.<br> <strong>WARNING</strong>:
+ This cannot be undone.</em>
+ </li>
+ <li><strong>Make Groups<br /> </strong> <em>The currently
+ selected groups of the alignment will be subdivided according to
+ the contents of the currently selected region. <br />Use this to
+ subdivide an alignment based on the different combinations of
+ residues observed at specific positions. (new in jalview 2.5)</em>
+ </li>
+ </ul></li>
+ <li><strong>View</strong>
+ <ul>
+ <li><strong>New View (Control T)</strong><em><br>
+ Creates a new view from the current alignment view. </em>
+ </li>
+ <li><strong>Expand Views (X)</strong><em><br> Display
+ each view associated with the alignment in its own alignment
+ window, allowing several views to be displayed simultaneously. </em>
+ </li>
+ <li><strong>Gather Views (G)</strong><em><br> Each
+ view associated with the alignment will be displayed within its
+ own tab on the current alignment window. </em>
+ </li>
+ <li><strong>Show→(all Columns / Sequences /
+ Sequences and Columns)</strong><em><br> All hidden Columns /
+ Sequences / Sequences and Columns will be revealed. </em>
+ </li>
+ <li><strong>Hide→(all Columns / Sequences /
+ Selected Region / All but Selected Region )</strong><em><br>
+ Hides the all the currently selected Columns / Sequences / Region
+ or everything but the selected Region.</em>
+ </li>
+ <li><strong>Automatic Scrolling<br> </strong><em>When
+ selected, the view will automatically scroll to display the
+ highlighted sequence position corresponding to the position under
+ the mouse pointer in a linked alignment or structure view.</em></li>
+ <li><strong>Show Annotations<br> </strong><em>If this
+ is selected the "Annotation Panel" will be displayed
+ below the alignment. The default setting is to display the
+ conservation calculation, quality calculation and consensus values
+ as bar charts. </em>
+ </li>
+ <li><strong>Autocalculated Annotation<br> </strong><em>Settings
+ for the display of autocalculated annotation.</em>
+ <ul>
+ <li><strong>Apply to all groups<br> </strong><em> When
+ ticked, any modification to the current settings will be applied
+ to all autocalculated annotation.</em></li>
+ <li><strong>Show Consensus Histogram<br> </strong><em>
+ Enable or disable the display of the histogram above the
+ consensus sequence.</em></li>
+ <li><strong>Show Consensus Profile<br> </strong><em> Enable
+ or disable the display of the sequence logo above the consensus
+ sequence.</em></li>
+ <li><strong>Group Conservation<br> </strong><em> When
+ ticked, display a conservation row for all groups (only available
+ for protein alignments).</em></li>
+ <li><strong>Apply to all groups<br> </strong><em> When
+ ticked, display a consensus row for all groups.</em></li>
+ </ul></li>
+ <li><strong>Show Sequence Features</strong><br> <em>Show
+ or hide sequence features on this alignment.</em>
+ </li>
+ <li><strong><a href="../features/featuresettings.html">Seqence
+ Feature Settings...</a> </strong><em><br> <em>Opens the
+ Sequence Feature Settings dialog box to control the colour and
+ display of sequence features on the alignment, and configure and
+ retrieve features from DAS annotation servers.</em>
+ </li>
+ <li><strong>Sequence ID Tooltip</strong><em> (application
+ only) <br>This submenu's options allow the inclusion or
+ exclusion of non-positional sequence features or database cross
+ references from the tooltip shown when the mouse hovers over the
+ sequence ID panel.</em>
+ </li>
+ <li><strong>Alignment Properties...<br /> </strong><em>Displays
+ some simple statistics computed for the current alignment view and
+ any named properties defined on the whole alignment.</em>
+ </li>
+ <li><strong><a href="../features/overview.html">Overview
+ Window</a><br> </strong><em>A scaled version of the alignment will
+ be displayed in a small window. A red box will indicate the
+ currently visible area of the alignment. Move the visible region
+ using the mouse. </em>
+ </li>
+ </ul></li>
+ <li><strong>Alignment Window Format Menu</strong>
+ <ul>
+ <li><strong>Font...<br> </strong><em>Opens the
+ "Choose Font" dialog box, in order to change the font of
+ the display and enable or disable 'smooth fonts' (anti-aliasing)
+ for faster alignment rendering. </em></li>
+ <li><strong>Wrap<br> </strong><em>When ticked, the
+ alignment display is "<a href="../features/wrap.html">wrapped</a>"
+ to the width of the alignment window. This is useful if your
+ alignment has only a few sequences to view its full width at once.</em><br>
+ Additional options for display of sequence numbering and scales are
+ also visible in wrapped layout mode:<br>
+ <ul>
+ <li><strong>Scale Above</strong><br><em> Show the alignment
+ column position scale.</em></li>
+ <li><strong>Scale Left</strong><br><em> Show the sequence
+ position for the first aligned residue in each row in the left
+ column of the alignment.</em></li>
+ <li><strong>Scale Right</strong><br><em> Show the sequence
+ position for the last aligned residue in each row in the
+ right-most column of the alignment.</em></li>
+ <li><strong>Show Sequence Limits<br> </strong><em>If
+ this box is selected the sequence name will have the start and
+ end position of the sequence appended to the name, in the format
+ NAME/START-END</em>
+ </li>
+ <li><strong>Right Align Sequence ID<br> </strong><em>If
+ this box is selected then the sequence names displayed in the
+ sequence label area will be aligned against the left-hand edge
+ of the alignment display, rather than the left-hand edge of the
+ alignment window.
+ </li>
+ <li><strong>Show Hidden Markers<br> </strong><em>When
+ this box is selected, positions in the alignment where rows and
+ columns are hidden will be marked by blue arrows.
+ </li>
+ <li><strong>Boxes</strong><em><br> If this is
+ selected the background of a residue will be coloured using the
+ selected background colour. Useful if used in conjunction with
+ "Colour Text." </em>
+ </li>
+ <li><strong>Text<br> </strong><em>If this is
+ selected the residues will be displayed using the standard 1
+ character amino acid alphabet.</em>
+ </li>
+ <li><strong>Colour Text<br> </strong><em>If this is
+ selected the residues will be coloured according to the
+ background colour associated with that residue. The colour is
+ slightly darker than background so the amino acid symbol remains
+ visible. </em>
+ </li>
+ <li><strong>Show Gaps<br> </strong><em>When this is
+ selected, gap characters will be displayed as "." or
+ "-". If unselected, then gap characters will appear as
+ blank spaces. <br> You may set the default gap character in
+ <a href="../features/preferences.html">preferences</a>.</em>
+ </li>
+ <li><strong>Centre Annotation Labels<br> </strong><em>Select
+ this to center labels along an annotation row relative to their
+ associated column (default is off, i.e. left-justified).</em>
+ </li>
+ <li><strong>Show Unconserved<br> </strong><em>When
+ this is selected, all consensus sequence symbols will be
+ rendered as a '.', highlighting mutations in highly conserved
+ alignments. </em>
+ </li>
+
+ </ul></li>
+ </ul>
</li>
- <li><strong>Edit</strong>
- <ul>
- <li><strong>Undo (Control Z)</strong><em><br>
- This will undo any edits you make to the alignment. This applies to
- insertion or deletion of gaps, cutting residues or sequences from the
- alignment or pasting sequences to the current alignment or sorting the
- alignment. <strong>NOTE:</strong> It DOES NOT undo colour changes,
- adjustments to group sizes, or changes to the annotation panel. </em></li>
- <li><strong>Redo (Control Y)<br>
- </strong><em>Any actions which you undo can be redone using redo. </em></li>
- <li><strong>Cut (Control X)<br>
- </strong><em>This will make a copy of the currently selected residues
- before removing them from your alignment. Click on a sequence name if
- you wish to select a whole sequence. <br>
- Use <CTRL> and X (<APPLE> and X on MacOSX) to cut.</em></li>
- <li><strong>Copy (Control C)</strong><br>
- <em>Copies the currently selected residues to the system
- clipboard - you can also do this by pressing <CTRL> and C
- (<APPLE> and C on MacOSX). <br>
- If you try to paste the clipboard contents to a text editor, you will
- see the format of the copied residues FASTA.</em></li>
- <li><strong>Paste </strong>
- <ul>
- <li><strong>To New Alignment (Control Shift V)<br>
- </strong><em>A new alignment window will be created from sequences
- previously copied or cut to the system clipboard. <br>
- Use <CTRL> and <SHIFT> and V(<APPLE> and
- <SHIFT;> and and V on MacOSX) to paste.</em></li>
- <li><strong>Add To This Alignment (Control V)<br>
- </strong><em>Copied sequences from another alignment window can be added
- to the current Jalview alignment. </em></li>
+
</ul>
</li>
- <li><strong>Delete (Backspace)<br>
- </strong><em>This will delete the currently selected residues without
- copying them to the clipboard. Like the other edit operations, this
- can be undone with <strong>Undo</strong>.</em></li>
- <li><strong>Remove Left (Control L)<br>
- </strong><em>If the alignment has marked columns, the alignment will be
- trimmed to the left of the leftmost marked column. To mark a column,
- mouse click the scale bar above the alignment. Click again to unmark a
- column, or select "Deselect All" to deselect all columns.</em></li>
- <li><strong>Remove Right (Control R)<br>
- </strong><em>If the alignment has marked columns, the alignment will be
- trimmed to the left of the leftmost marked column. To mark a column,
- mouse click the scale bar above the alignment. Click again to unmark a
- column, or select "Deselect All" to deselect all columns.</em></li>
- <li><strong>Remove Empty Columns (Control E)<br>
- </strong><em>All columns which only contain gap characters ("-",
- ".") will be deleted.<br>
- You may set the default gap character in <a
- href="../features/preferences.html">preferences</a>. </em></li>
- <li><strong>Remove All Gaps (Control Shift E)</strong><br>
- <em>Gap characters ("-", ".") will be deleted
- from the selected area of the alignment. If no selection is made, ALL
- the gaps in the alignment will be removed.<br>
- You may set the default gap character in <a
- href="../features/preferences.html">preferences</a>. </em></li>
- <li><strong>Remove Redundancy (Control D)<br>
- </strong><em>Selecting this option brings up a window asking you to select
- a threshold. If the percentage identity between any two sequences
- (under the current alignment) exceeds this value then one of the
- sequences (the shorter) is discarded. Press the "Apply"
- button to remove redundant sequences. The "Undo" button will
- undo the last redundancy deletion.</em></li>
- <li><strong>Pad Gaps<br>
- </strong><em>When selected, the alignment will be kept at minimal width
- (so there no empty columns before or after the first or last aligned
- residue) and all sequences will be padded with gap characters to the
- before and after their terminating residues.<br>
- This switch is useful when making a tree using unaligned sequences and
- when working with alignment analysis programs which require 'properly
- aligned sequences' to be all the same length.<br>
- You may set the default for <strong>Pad Gaps</strong> in the <a
- href="../features/preferences.html">preferences</a>. </em></li>
- </ul>
- </li>
- <li><strong>Select</strong>
- <ul>
- <li><strong><a href="../features/search.html">Find...
- (Control F)</a></strong><em><br>
- Opens the Find dialog box to search for residues, sequence name or
- residue position within the alignment and create new sequence features
- from the queries. </em></li>
- <li><strong>Select All (Control A)<br>
- </strong><em>Selects all the sequences and residues in the alignment. <br>
- Use <CTRL> and A (<APPLE> and A on a MacOSX) to select
- all.</em></li>
- <li><strong>Deselect All (Escape)<br>
- </strong><em>Removes the current selection box (red dashed box) from the
- alignment window. All selected sequences, residues and marked columns
- will be deselected. </em><em> <br>
- Use <ESCAPE> to deselect all.</em></li>
- <li><strong>Invert Sequence Selection (Control I)<br>
- </strong><em>Any sequence ids currently not selected will replace the
- current selection. </em></li>
- <li><strong>Invert Column Selection (Control Alt I)<br>
- </strong><em>Any columns currently not selected will replace the current
- column selection. </em></li>
- <li><strong>Undefine Groups (Control U)<br>
- </strong><em>The alignment will be reset with no defined groups.<br>
- <strong>WARNING</strong>: This cannot be undone.</em></li>
- <li><strong>Make Groups<br/></strong>
- <em>The currently selected groups of the alignment will be
- subdivided according to the contents of the currently selected region.
- <br/>Use this to subdivide an alignment based on the
- different combinations of residues observed at specific
- positions. (new in jalview 2.5)</em></li>
- </ul>
- </li>
- <li><strong>View</strong>
- <ul>
- <li><strong>New View (Control T)</strong><em><br>
- Creates a new view from the current alignment view. </em></li>
- <li><strong>Expand Views (X)</strong><em><br>
- Display each view associated with the alignment in its own alignment
- window, allowing several views to be displayed simultaneously. </em></li>
- <li><strong>Gather Views (G)</strong><em><br>
- Each view associated with the alignment will be displayed within its
- own tab on the current alignment window. </em></li>
- <li><strong>Show→(all Columns / Sequences / Sequences and Columns)</strong><em><br>
- All hidden Columns / Sequences / Sequences and Columns will be revealed. </em></li>
- <li><strong>Hide→(all Columns / Sequences / Selected Region / All but Selected Region )</strong><em><br>
- Hides the all the currently selected Columns / Sequences / Region or everything but the selected Region.</em></li>
- <li><strong>Automatic Scrolling<br>
- </strong><em>When selected, the view will automatically scroll to display the
- highlighted sequence position corresponding to the position under the mouse
- pointer in a linked alignment or structure view.</em>
- </li>
- <li><strong>Show Annotations<br>
- </strong><em>If this is selected the "Annotation Panel" will be
- displayed below the alignment. The default setting is to display the
- conservation calculation, quality calculation and consensus values as
- bar charts. </em></li>
- <li><strong>Autocalculated Annotation<br></strong>Settings for the display of autocalculated annotation.
- <ul><li>
- <strong>Apply to all groups<br></strong>
- When ticked, any modification to the current settings will be applied to all autocalculated annotation.
- </li>
- <li>
- <strong>Show Consensus Histogram<br></strong>
- Enable or disable the display of the histogram above the consensus sequence.
- </li>
- <li>
- <strong>Show Consensus Profile<br></strong>
- Enable or disable the display of the sequence logo above the consensus sequence.
- </li>
- <li>
- <strong>Group Conservation<br></strong>
- When ticked, display a conservation row for all groups (only available for protein alignments).
- </li>
- <li>
- <strong>Apply to all groups<br></strong>
- When ticked, display a consensus row for all groups.
- </li>
- </ul>
- </li>
- <li><strong>Show Sequence Features</strong><br>
- <em>Show or hide sequence features on this alignment.</em></li>
- <li><strong><a href="../features/featuresettings.html">Seqence
- Feature Settings...</a></strong><em><br>
- <em>Opens the Sequence Feature Settings dialog box to control the
- colour and display of sequence features on the alignment, and
- configure and retrieve features from DAS annotation servers.</em></li>
- <li><strong>Sequence ID Tooltip</strong><em> (application only)
- <br>This submenu's options allow the inclusion or exclusion of
- non-positional sequence features or database cross references
- from the tooltip shown when the mouse hovers over the sequence ID panel.</em></li>
- <li><strong>Alignment Properties...<br/>
- </strong><em>Displays some simple statistics computed for the
- current alignment view and any named properties defined on the
- whole alignment.</em></li>
- <li><strong><a href="../features/overview.html">Overview
- Window</a><br>
- </strong><em>A scaled version of the alignment will be displayed in a
- small window. A red box will indicate the currently visible area of
- the alignment. Move the visible region using the mouse. </em></li>
- </ul>
- </li>
- <li><strong>Alignment Window Format Menu</strong>
- <ul>
- <li><strong>Font...<br>
- </strong><em>Opens the "Choose Font" dialog box, in order to
- change the font of the display and enable or disable 'smooth fonts'
- (anti-aliasing) for faster alignment rendering. </em></li>
- <li><strong>Wrap<br>
- </strong><em>When ticked, the alignment display is "<a
- href="../features/wrap.html">wrapped</a>" to the width of the
- alignment window. This is useful if your alignment has only a few
- sequences to view its full width at once.<br>
- Additional options for display of sequence numbering and scales are
- also visible in wrapped layout mode:<br>
- <ul>
- <li><strong>Scale Above</strong><br>
- Show the alignment column position scale.</li>
- <li><strong>Scale Left</strong><br>
- Show the sequence position for the first aligned residue in each row
- in the left column of the alignment.</li>
- <li><strong>Scale Right</strong><br>
- Show the sequence position for the last aligned residue in each row
- in the right-most column of the alignment.</li>
- <li><strong>Show Sequence Limits<br>
- </strong><em>If this box is selected the sequence name will have the start
- and end position of the sequence appended to the name, in the format
- NAME/START-END</em></li>
- <li><strong>Right Align Sequence ID<br>
- </strong><em>If this box is selected then the sequence names displayed in
- the sequence label area will be aligned against the left-hand edge of
- the alignment display, rather than the left-hand edge of the alignment
- window.</li>
- <li><strong>Show Hidden Markers<br>
- </strong><em>When this box is selected, positions in the alignment where
- rows and columns are hidden will be marked by blue arrows.</li>
- <li><strong>Boxes</strong><em><br>
- If this is selected the background of a residue will be coloured using
- the selected background colour. Useful if used in conjunction with
- "Colour Text." </em></li>
- <li><strong>Text<br>
- </strong><em>If this is selected the residues will be displayed using the
- standard 1 character amino acid alphabet.</em></li>
- <li><strong>Colour Text<br>
- </strong><em>If this is selected the residues will be coloured according
- to the background colour associated with that residue. The colour is
- slightly darker than background so the amino acid symbol remains
- visible. </em></li>
- <li><strong>Show Gaps<br>
- </strong><em>When this is selected, gap characters will be displayed as
- "." or "-". If unselected, then gap characters
- will appear as blank spaces. <br>
- You may set the default gap character in <a
- href="../features/preferences.html">preferences</a>.</em></li>
- <li><strong>Centre Annotation Labels<br>
- </strong><em>Select this to center labels along an annotation row
- relative to their associated column (default is off, i.e. left-justified).</em></li>
- <li><strong>Show Unconserved<br>
- </strong><em>When this is selected, all consensus sequence symbols will be rendered as a '.', highlighting mutations in highly conserved alignments.
- </em></li>
-
- </ul>
- <li><strong>Colour</strong>
- <ul>
- <li><strong>Apply Colour To All Groups<br>
- </strong><em>If this is selected, any changes made to the background
- colour will be applied to all currently defined groups.<br>
- </em></li>
- <li><strong><a href="../colourSchemes/textcolour.html">Colour
- Text...</a></strong><em><br>
- Opens the Colour Text dialog box to set a different text colour for
- light and dark background, and the intensity threshold for transition
- between them. </em></li>
- <li>Colour Scheme options: <strong>None, ClustalX,
- Blosum62 Score, Percentage Identity, Zappo, Taylor, Hydrophobicity,
- Helix Propensity, Strand Propensity, Turn Propensity, Buried Index,
- Nucleotide, Purine/Pyrimidine, User Defined<br>
- </strong> <em>See <a href="../colourSchemes/index.html">colours</a> for a
- description of all colour schemes.</em><br>
- </li>
- <li><strong>By Conservation<br>
- </strong><em>See <a href="../colourSchemes/conservation.html">Colouring
- by Conservation</a>.</em><br>
- </li>
- <li><strong>Modify Conservation Threshold<br>
- </strong><em>Use this to display the conservation threshold slider window.
- Useful if the window has been closed, or if the 'by conservation'
- option appears to be doing nothing!</em><br>
- </li>
- <li><strong>Above Identity Threshold<br>
- </strong><em>See <a href="../colourSchemes/abovePID.html">Above
- Percentage Identity</a></em><strong>.<br>
- </strong></li>
- <li><strong>Modify Identity Threshold<br>
- </strong><em>Use this to set the threshold value for colouring above
- Identity. Useful if the window has been closed.<br>
- </em></li>
- <li><strong>By Annotation</strong><br>
- <em>Colours the alignment on a per-column value from a specified
- annotation. See <a href="../colourSchemes/annotationColouring.html">Annotation
- Colouring</a>.</em><br>
- </li>
+
+ <li><strong>Colour</strong>
+ <ul>
+ <li><strong>Apply Colour To All Groups<br> </strong><em>If
+ this is selected, any changes made to the background colour will
+ be applied to all currently defined groups.<br> </em>
+ </li>
+ <li><strong><a href="../colourSchemes/textcolour.html">Colour
+ Text...</a> </strong><em><br> Opens the Colour Text dialog box to
+ set a different text colour for light and dark background, and the
+ intensity threshold for transition between them. </em>
+ </li>
+ <li>Colour Scheme options: <strong>None, ClustalX,
+ Blosum62 Score, Percentage Identity, Zappo, Taylor,
+ Hydrophobicity, Helix Propensity, Strand Propensity, Turn
+ Propensity, Buried Index, Nucleotide, Purine/Pyrimidine, User Defined<br> </strong> <em>See
+ <a href="../colourSchemes/index.html">colours</a> for a
+ description of all colour schemes.</em><br></li>
+ <li><strong>By Conservation<br> </strong><em>See <a
+ href="../colourSchemes/conservation.html">Colouring by
+ Conservation</a>.</em><br></li>
+ <li><strong>Modify Conservation Threshold<br> </strong><em>Use
+ this to display the conservation threshold slider window. Useful
+ if the window has been closed, or if the 'by conservation' option
+ appears to be doing nothing!</em><br></li>
+ <li><strong>Above Identity Threshold<br> </strong><em>See
+ <a href="../colourSchemes/abovePID.html">Above Percentage
+ Identity</a> </em><strong>.<br> </strong>
+ </li>
+ <li><strong>Modify Identity Threshold<br> </strong><em>Use
+ this to set the threshold value for colouring above Identity.
+ Useful if the window has been closed.<br> </em>
+ </li>
+ <li><strong>By Annotation</strong><br> <em>Colours
+ the alignment on a per-column value from a specified annotation.
+ See <a href="../colourSchemes/annotationColouring.html">Annotation
+ Colouring</a>.</em><br></li>
<li><strong>By RNA Helices</strong><br>
<em>Colours the helices of an RNA alignment loaded from a Stockholm file. See
<a href="../colourSchemes/rnahelicesColouring.html">RNA Helices
Colouring</a>.</em><br>
</li>
+ </ul></li>
+ <li><strong>Calculate</strong>
+ <ul>
+ <li><strong>Sort </strong>
+ <ul>
+ <li><strong>by ID</strong><em><br> This will sort
+ the sequences according to sequence name. If the sort is
+ repeated, the order of the sorted sequences will be inverted. </em>
+ </li>
+ <li><strong>by Length</strong><em><br> This will
+ sort the sequences according to their length (excluding gap
+ characters). If the sort is repeated, the order of the sorted
+ sequences will be inverted. </em></li>
+ <li><strong>by Group</strong><strong><br> </strong><em>This
+ will sort the sequences according to sequence name. If the sort
+ is repeated, the order of the sorted sequences will be inverted.
+ </em><strong></strong></li>
+ <li><strong>by Pairwise Identity<br> </strong><em>This
+ will sort the selected sequences by their percentage identity to
+ the consensus sequence. The most similar sequence is put at the
+ top. </em></li>
+ <li><em>The <a href="../calculations/sorting.html">Sort
+ menu</a> will have some additional options if you have just done a
+ multiple alignment calculation, or opened a tree viewer window.</em><br>
+ </li>
+ </ul>
+ </li>
+ <li><strong>Calculate Tree </strong> <br> <em>Functions
+ for calculating trees on the alignment or the currently selected
+ region. See <a href="../calculations/tree.html">calculating
+ trees</a>.</em>
+ <ul>
+ <li><strong>Average Distance Using % Identity</strong></li>
+ <li><strong>Neighbour Joining Using % Identity</strong></li>
+ <li><strong>Average Distance Using Blosum62</strong></li>
+ <li><strong>Neighbour Joining Using Blosum62<br>
+ </strong></li>
+ </ul>
+ </li>
+ <li><strong>Pairwise Alignments</strong><br> <em>Applies
+ Smith and Waterman algorithm to selected sequences. See <a
+ href="../calculations/pairwise.html">pairwise alignments</a>.</em><br>
+ </li>
+ <li><strong>Principal Component Analysis</strong><br> <em>Shows
+ a spatial clustering of the sequences based on the BLOSUM62 scores
+ in the alignment. See <a href="../calculations/pca.html">Principal
+ Component Analysis</a>.</em> <br>
+ </li>
+ <li><strong>Extract Scores ... (optional)</strong><br> <em>This
+ option is only visible if Jalview detects one or more white-space
+ separated values in the description line of the alignment
+ sequences.<br> When selected, these numbers are parsed into
+ sequence associated annotation which can then be used to sort the
+ alignment via the Sort by→Score menu.</em> <br>
+ </li>
+ <li><strong>Autocalculate Consensus</strong><br> <em>For
+ large alignments it can be useful to deselect "Autocalculate
+ Consensus" when editing. This prevents the sometimes lengthy
+ calculations performed after each sequence edit.</em> <br>
+ </li>
+ <li><strong>Sort With New Tree</strong><br> <em>When
+ enabled, Jalview will automatically sort the alignment when a new
+ tree is calculated or loaded onto it.</em> <br></li>
+ </ul></li>
+
+ <li><strong>Web Service Menu</strong><br /> <em>This menu
+ is dynamic, and may contain user-defined web service entries in
+ addition to any of the following ones:</em>
+ <ul>
+ <li><strong>Fetch DB References</strong><br> <em>This
+ will use any of the database services that Jalview is aware of
+ (e.g. DAS sequence servers and the WSDBFetch service provided by
+ the EBI) to verify the sequence and retrieve all database cross
+ references and PDB ids associated with all or just the selected
+ sequences in the alignment. <br />'Standard Databases' will check
+ sequences against the EBI databases plus any active DAS sequence
+ sources, or you can verify against a specific source from one of
+ the sub-menus.</em><br></li>
+ <li><strong>Envision2 Services</strong><br /><em> Submits one or
+ more sequences, sequence IDs or database references to analysis
+ workflows provided by the <a
+ href="http://www.ebi.ac.uk/enfin-srv/envision2">EnVision2 web
+ application</a>. This allows Jalview users to easily access the EnCore
+ network of databases and analysis services developed by members of
+ <a href="http://www.enfin.org">ENFIN</a></em>.</li>
+ </ul>
+ <p>Selecting items from the following submenus will start a
+ remote service on compute facilities at the University of Dundee, or
+ elsewhere. You need a continuous network connection in order to use
+ these services through Jalview.
+ </p>
+ <ul>
+ <li><strong>Alignment</strong><br /><em> Align the currently
+ selected sequences or all sequences in the alignment, or re-align
+ unaligned sequences to the aligned sequences. Entries in this menu
+ provide access to the various alignment programs supported by <a
+ href="../webServices/JABAWS.html">JABAWS</a>. See the <a
+ href="../webServices/msaclient.html">Multiple Sequence
+ Alignment webservice client</a> entry for more information.</em></li>
+ <li><strong>Secondary Structure Prediction</strong>
+ <ul>
+ <li><strong>JPred Secondary Structure Prediction</strong><br>
+ <em>Secondary structure prediction by network consensus. See
+ the <a href="../webServices/jnet.html">Jpred3</a> client entry for
+ more information. The behaviour of this calculation depends on
+ the current selection:
+ <ul>
+ <li>If nothing is selected, and the displayed sequences
+ appear to be aligned, then a JNet prediction will be run for
+ the first sequence in the alignment, using the current
+ alignment. Otherwise the first sequence will be submitted for
+ prediction.</li>
+ <li>If just one sequence (or a region on one sequence) has
+ been selected, it will be submitted to the automatic JNet
+ prediction server for homolog detection and prediction.</li>
+ <li>If a set of sequences are selected, and they appear to
+ be aligned, then the alignment will be used for a Jnet
+ prediction on the <strong>first</strong> sequence in the set
+ (that is, the one that appears first in the alignment window).
+ </li>
+ </ul> </em>
+ </ul></li>
+ <li><strong>Analysis</strong><br />
+ <ul>
+ <li><strong>Multi-Harmony</strong><br> <em>Performs
+ functional residue analysis on a protein family alignment with
+ sub-families defined on it. See the <a
+ href="../webServices/shmr.html">Multi-Harmony service</a> entry for more
+ information.</em>
+ </li>
+ </ul></li>
+ </ul></li>
</ul>
- </li>
- <li><strong>Calculate</strong>
- <ul>
- <li><strong>Sort </strong>
- <ul>
- <li><strong>by ID</strong><em><br>
- This will sort the sequences according to sequence name. If the sort
- is repeated, the order of the sorted sequences will be inverted. </em></li>
- <li><strong>by Length</strong><em><br>
- This will sort the sequences according to their length (excluding gap characters). If the sort is
- repeated, the order of the sorted sequences will be inverted. </em></li>
- <li><strong>by Group</strong><strong><br>
- </strong><em>This will sort the sequences according to sequence name. If
- the sort is repeated, the order of the sorted sequences will be
- inverted. </em><strong></strong></li>
- <li><strong>by Pairwise Identity<br>
- </strong><em>This will sort the selected sequences by their percentage
- identity to the consensus sequence. The most similar sequence is put
- at the top. </em></li>
- <li><em>The <a href="../calculations/sorting.html">Sort
- menu</a> will have some additional options if you have just done a
- multiple alignment calculation, or opened a tree viewer window.</em><br>
- </li>
- </ul>
- </li>
- <li><strong>Calculate Tree </strong> <br>
- <em>Functions for calculating trees on the alignment or the
- currently selected region. See <a href="../calculations/tree.html">calculating
- trees</a>.</em>
- <ul>
- <li><strong>Average Distance Using % Identity</strong></li>
- <li><strong>Neighbour Joining Using % Identity</strong></li>
- <li><strong>Average Distance Using Blosum62</strong></li>
- <li><strong>Neighbour Joining Using Blosum62<br>
- </strong></li>
- </ul>
- </li>
- <li><strong>Pairwise Alignments</strong><br>
- <em>Applies Smith and Waterman algorithm to selected sequences.
- See <a href="../calculations/pairwise.html">pairwise alignments</a>.</em><br>
- </li>
- <li><strong>Principal Component Analysis</strong><br>
- <em>Shows a spatial clustering of the sequences based on the
- BLOSUM62 scores in the alignment. See <a
- href="../calculations/pca.html">Principal Component Analysis</a>.</em> <br>
- </li>
- <li><strong>Extract Scores ... (optional)</strong><br>
- <em>This option is only visible if Jalview detects one or more white-space separated values in the description line of the alignment sequences.<br>
- When selected, these numbers are parsed into sequence associated annotation which can
- then be used to sort the alignment via the Sort by→Score menu.</em> <br>
- </li>
- <li><strong>Autocalculate Consensus</strong><br>
- <em>For large alignments it can be useful to deselect
- "Autocalculate Consensus" when editing. This prevents the
- sometimes lengthy calculations performed after each sequence edit.</em> <br>
- </li>
- </ul>
- </li>
- <li><strong>Web Service<br>
- </strong>
- <ul><li><strong>Fetch DB References</strong><br>
- <em>This will use any of the database services that Jalview is aware
- of (e.g. DAS sequence servers and the WSDBFetch service provided by the EBI)
- to verify the sequence and retrieve all database cross references and PDB ids
- associated with all or just the selected sequences in the alignment.</em><br>
- </li>
- </ul>
- <em>Selecting one of the following menu items starts a remote
- service on compute facilities at the University of Dundee. You need a
- continuous network connection in order to use these services through
- Jalview. </em>
- <ul>
- <li><strong>Alignment</strong>
- <ul>
- <li><strong>ClustalW Multiple Sequence Alignment</strong><br>
- <em> Submits all, or just the currently selected sequences for
- alignment with clustal W.</em></li>
- <li><strong>ClustalW Multiple Sequence Alignment
- Realign</strong><br>
- <em> Submits the alignment or currently selected region for
- re-alignment with clustal W. Use this if you have added some new
- sequences to an existing alignment.</em></li>
- <li><strong>MAFFT Multiple Sequence Alignment</strong><br>
- <em>Submits all, or just the currently selected region for
- alignment with MAFFT. </em></li>
- <li><strong>Muscle Multiple Protein Sequence Alignment</strong><br>
- <em> Submits all, or just the currently selected sequences for
- alignment using Muscle. Do not use this if you are working with
- nucleic acid sequences.</em></li>
- </ul>
- </li>
- <li><strong>Secondary Structure Prediction</strong>
- <ul>
- <li><strong>JPred Secondary Structure Prediction</strong><br>
- <em>Secondary structure prediction by network consensus. The
- behaviour of this calculation depends on the current selection: </em></li>
- <li><em>If nothing is selected, and the displayed sequences
- appear to be aligned, then a JNet prediction will be run for the
- first sequence in the alignment, using the current alignment.
- Otherwise the first sequence will be submitted for prediction. </em></li>
- <li><em>If just one sequence (or a region on one sequence)
- has been selected, it will be submitted to the automatic JNet
- prediction server for homolog detection and prediction. </em></li>
- <li><em>If a set of sequences are selected, and they appear
- to be aligned, then the alignment will be used for a Jnet prediction
- on the <strong>first</strong> sequence in the set (that is, the one
- that appears first in the alignment window). </em></li>
- </ul>
- </li>
- </ul>
- </li>
-</ul>
+
</body>
</html>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*
* You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
-->
-<head><title>Alignment Window Menus</title></head>
+<head>
+<title>Alignment Window Menus</title>
+</head>
<body>
-<p><strong>Alignment Window Calculate Menu</strong></p>
-<ul>
- <li><strong>Sort </strong>
- <ul>
- <li><strong>by ID</strong><em><br>
- This will sort the sequences according to sequence name. If the sort is
- repeated, the order of the sorted sequences will be inverted. </em></li>
- <li><strong>by Length</strong><em><br>
- This will sort the sequences according to their length (excluding gap characters). If the sort is
- repeated, the order of the sorted sequences will be inverted. </em></li>
- <li><strong>by Group</strong><strong><br>
- </strong><em>This will sort the sequences according to sequence name.
- If the sort is repeated, the order of the sorted sequences will be inverted.
- </em><strong></strong></li>
- <li><strong>by Pairwise Identity<br>
- </strong><em>This will sort the selected sequences by their percentage
- identity to the consensus sequence. The most similar sequence is put at
- the top. </em></li>
- <li><em>The <a href="../calculations/sorting.html">Sort menu</a> will have
- some additional options if the alignment has any associated
- score annotation, or you have just done a multiple alignment calculation
- or opened a tree viewer window.</em><br>
- </li>
- </ul>
- </li>
- <li><strong>Calculate Tree </strong> <br>
- <em>Functions for calculating trees on the alignment or the currently selected
- region. See <a
- href="../calculations/tree.html">calculating trees</a>.</em>
- <ul>
- <li><strong>Average Distance Using % Identity</strong></li>
- <li><strong>Neighbour Joining Using % Identity</strong></li>
- <li><strong>Average Distance Using Blosum62</strong></li>
- <li><strong>Neighbour Joining Using Blosum62<br>
- </strong></li>
- </ul>
- </li>
- <li><strong>Pairwise Alignments</strong><br>
- <em>Applies Smith and Waterman algorithm to selected sequences. See <a href="../calculations/pairwise.html">pairwise
- alignments</a>.</em><br>
- </li>
- <li><strong>Principal Component Analysis</strong><br>
- <em>Shows a spatial clustering of the sequences based on the BLOSUM62 scores
- in the alignment. See <a href="../calculations/pca.html">Principal Component
- Analysis</a>.</em> <br>
- </li>
- <li><strong>Extract Scores ... (optional)</strong><br>
- <em>This option is only visible if Jalview detects one or more white-space separated values in the description line of the alignment sequences.<br>
- When selected, these numbers are parsed into sequence associated annotation which can
- then be used to sort the alignment via the Sort by→Score menu.</em> <br>
- </li>
-
- <li><strong>Autocalculate Consensus</strong><br>
- <em>For large alignments it can be useful to deselect "Autocalculate
- Consensus" when editing. This prevents the sometimes lengthy calculations
- performed after each sequence edit.</em> <br>
- </li>
-</ul>
- </body>
+ <p>
+ <strong>Alignment Window Calculate Menu</strong>
+ </p>
+ <ul>
+ <li><strong>Sort </strong>
+ <ul>
+ <li><strong>by ID</strong><em><br> This will sort the
+ sequences according to sequence name. If the sort is repeated, the
+ order of the sorted sequences will be inverted. </em>
+ </li>
+ <li><strong>by Length</strong><em><br> This will sort
+ the sequences according to their length (excluding gap
+ characters). If the sort is repeated, the order of the sorted
+ sequences will be inverted. </em>
+ </li>
+ <li><strong>by Group</strong><strong><br> </strong><em>This
+ will sort the sequences according to sequence name. If the sort is
+ repeated, the order of the sorted sequences will be inverted. </em><strong></strong>
+ </li>
+ <li><strong>by Pairwise Identity<br> </strong><em>This
+ will sort the selected sequences by their percentage identity to
+ the consensus sequence. The most similar sequence is put at the
+ top. </em>
+ </li>
+ <li><em>The <a href="../calculations/sorting.html">Sort
+ menu</a> will have some additional options if the alignment has any
+ associated score annotation, or you have just done a multiple
+ alignment calculation or opened a tree viewer window.</em><br></li>
+ </ul></li>
+ <li><strong>Calculate Tree </strong> <br> <em>Functions
+ for calculating trees on the alignment or the currently selected
+ region. See <a href="../calculations/tree.html">calculating
+ trees</a>.</em>
+ <ul>
+ <li><strong>Average Distance Using % Identity</strong>
+ </li>
+ <li><strong>Neighbour Joining Using % Identity</strong>
+ </li>
+ <li><strong>Average Distance Using Blosum62</strong>
+ </li>
+ <li><strong>Neighbour Joining Using Blosum62<br>
+ </strong>
+ </li>
+ </ul></li>
+ <li><strong>Pairwise Alignments</strong><br> <em>Applies
+ Smith and Waterman algorithm to selected sequences. See <a
+ href="../calculations/pairwise.html">pairwise alignments</a>.</em><br>
+ </li>
+ <li><strong>Principal Component Analysis</strong><br> <em>Shows
+ a spatial clustering of the sequences based on the BLOSUM62 scores
+ in the alignment. See <a href="../calculations/pca.html">Principal
+ Component Analysis</a>.</em> <br></li>
+ <li><strong>Extract Scores ... (optional)</strong><br> <em>This
+ option is only visible if Jalview detects one or more white-space
+ separated values in the description line of the alignment sequences.<br>
+ When selected, these numbers are parsed into sequence associated
+ annotation which can then be used to sort the alignment via the Sort
+ by→Score menu.</em> <br></li>
+
+ <li><strong>Autocalculate Consensus</strong><br> <em>For
+ large alignments it can be useful to deselect "Autocalculate
+ Consensus" when editing. This prevents the sometimes lengthy
+ calculations performed after each sequence edit.</em> <br></li>
+ <li><strong>Sort Alignment With New Tree</strong><br> <em>If
+ this option is selected, the alignment will be automatically sorted
+ whenever a new tree is calculated or loaded.</em> <br>
+ </li>
+ </ul>
+</body>
</html>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
</em></li>
<li><strong>Java Console<br/></strong>
<em>Toggles the display of a the Jalview Java Console window. This setting will be remembered in your user preferences.</em></li>
+ <li><strong>Jalview News<br/></strong>
+ <em>Opens the <a href="../webServices/newsreader.html">Jalview News</a> dialog box. </em></li>
<li><strong>Groovy Console...<em> (only available if groovy is on the classpath)</em><br></strong>
<em>Open's the <a href="../groovy.html">Groovy Console</a> for interactive scripting.</em><strong><br></strong></li>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
</li>
<li><strong>View Structure<br>
</strong><em> If the sequence has an associated PDB file added by one
- of the methods described above, Jalview will display a 3D interactive
- viewer of the file.<br>
+ of the methods described above, Jalview will open a 3D interactive
+ view of the file.<br>
These entries will only be present if the sequence has <a
href="../features/viewingpdbs.html">associated PDB structures</a>.</em><br>
</li>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<head><title>Web Service Menu</title></head>
<body>
-<p><strong>Web Service Menu</strong></p>
-<ul>
- <li><strong>Fetch DB References</strong><br>
- <em>This will use any of the database services that Jalview is aware
- of (e.g. DAS sequence servers and the WSDBFetch service provided by the EBI)
- to verify the sequence and retrieve all database cross references and PDB ids
- associated with all or just the selected sequences in the alignment.
- <br/>'Standard Databases' will check sequences against the EBI databases
- plus any active DAS sequence sources, or you can verify against a specific
- source from one of the sub-menus.</em><br>
- </li>
- <li><strong>Envision2 Services</strong><br/>
- Submits one or more sequences, sequence IDs or database references to analysis workflows provided
-by the <a href="http://www.ebi.ac.uk/enfin-srv/envision2">EnVision2
-web application</a>. This allows Jalview users to easily access the EnCore network of
-databases and analysis services developed by members of <a href="http://www.enfin.org">ENFIN</a>.
- </li>
- </ul>
- </strong> <em>Selecting one of the following menu items starts a remote service
- on compute facilities at the University of Dundee. You need a continuous network
- connection in order to use these services through Jalview. </em> </p>
- <ul>
- <li><strong>Alignment</strong>
- <ul>
- <li><strong>ClustalW Multiple Sequence Alignment</strong><br>
- <em> Submits all, or just the currently selected sequences for alignment
- with clustal W.</em></li>
- <li><strong>ClustalW Multiple Sequence Alignment Realign</strong><br>
- <em> Submits the alignment or currently selected region for re-alignment
- with clustal W. This enables you to align more sequences to an existing alignment.</em></li>
- <li><strong>MAFFT Multiple Sequence Alignment</strong><br>
- <em>Submits all, or just the currently selected region for alignment with
- MAFFT. </em> </li>
- <li><strong>Muscle Multiple Protein Sequence Alignment</strong><br>
- <em> Submits all, or just the currently selected sequences for alignment
- using Muscle. Do not use this if you are working with nucleic acid sequences.</em></li>
- </ul>
- </li>
- <li><strong>Secondary Structure Prediction</strong>
- <ul>
- <li><strong>JPred Secondary Structure Prediction</strong><br>
- <em>Secondary structure prediction by network consensus. The behaviour
- of this calculation depends on the current selection: </em></li>
- <li><em>If nothing is selected, and the displayed sequences appear to be
- aligned, then a JNet prediction will be run for the first sequence in
- the alignment, using the current alignment. Otherwise the first sequence
- will be submitted for prediction. </em></li>
- <li><em>If just one sequence (or a region on one sequence) has been selected,
- it will be submitted to the automatic JNet prediction server for homolog
- detection and prediction. </em></li>
- <li><em>If a set of sequences are selected, and they appear to be aligned,
- then the alignment will be used for a Jnet prediction on the <strong>first</strong>
- sequence in the set (that is, the one that appears first in the alignment
- window). </em> </li>
- </ul>
- </li>
-</ul>
-<p><strong> </strong></p>
+ <p><strong>Web Service Menu</strong><br /> <em>This menu
+ is dynamic, and may contain user-defined web service entries in
+ addition to any of the following ones:</em>
+ <ul>
+ <li><strong>Fetch DB References</strong><br> <em>This
+ will use any of the database services that Jalview is aware of
+ (e.g. DAS sequence servers and the WSDBFetch service provided by
+ the EBI) to verify the sequence and retrieve all database cross
+ references and PDB ids associated with all or just the selected
+ sequences in the alignment. <br />'Standard Databases' will check
+ sequences against the EBI databases plus any active DAS sequence
+ sources, or you can verify against a specific source from one of
+ the sub-menus.</em><br></li>
+ <li><strong>Envision2 Services</strong><br /><em> Submits one or
+ more sequences, sequence IDs or database references to analysis
+ workflows provided by the <a
+ href="http://www.ebi.ac.uk/enfin-srv/envision2">EnVision2 web
+ application</a>. This allows Jalview users to easily access the EnCore
+ network of databases and analysis services developed by members of
+ <a href="http://www.enfin.org">ENFIN</a></em>.</li>
+ </ul>
+ <p>Selecting items from the following submenus will start a
+ remote service on compute facilities at the University of Dundee, or
+ elsewhere. You need a continuous network connection in order to use
+ these services through Jalview.
+ </p>
+ <ul>
+ <li><strong>Alignment</strong><br /><em> Align the currently
+ selected sequences or all sequences in the alignment, or re-align
+ unaligned sequences to the aligned sequences. Entries in this menu
+ provide access to the various alignment programs supported by <a
+ href="../webServices/JABAWS.html">JABAWS</a>. See the <a
+ href="../webServices/msaclient.html">Multiple Sequence
+ Alignment webservice client</a> entry for more information.</em></li>
+ <li><strong>Secondary Structure Prediction</strong>
+ <ul>
+ <li><strong>JPred Secondary Structure Prediction</strong><br>
+ <em>Secondary structure prediction by network consensus. See
+ the <a href="../webServices/jnet.html">Jpred3</a> client entry for
+ more information. The behaviour of this calculation depends on
+ the current selection:
+ <ul>
+ <li>If nothing is selected, and the displayed sequences
+ appear to be aligned, then a JNet prediction will be run for
+ the first sequence in the alignment, using the current
+ alignment. Otherwise the first sequence will be submitted for
+ prediction.</li>
+ <li>If just one sequence (or a region on one sequence) has
+ been selected, it will be submitted to the automatic JNet
+ prediction server for homolog detection and prediction.</li>
+ <li>If a set of sequences are selected, and they appear to
+ be aligned, then the alignment will be used for a Jnet
+ prediction on the <strong>first</strong> sequence in the set
+ (that is, the one that appears first in the alignment window).
+ </li>
+ </ul> </em>
+ </ul></li>
+ <li><strong>Analysis</strong><br />
+ <ul>
+ <li><strong>Multi-Harmony</strong><br> <em>Performs
+ functional residue analysis on a protein family alignment with
+ sub-families defined on it. See the <a
+ href="../webServices/shmr.html">Multi-Harmony service</a> entry for more
+ information.</em>
+ </li>
+ </ul></li>
+ </ul>
</body>
</html>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<div align="center"><em><strong>Issues Resolved</strong></em></div>
</td>
</tr>
- <tr>
- <td>
- <div align="center"><strong><a name="Jalview2.6.1">2.6.1</a></strong><br>
- <em>15/11/2010</em></div>
- </td>
- <td><em>Application</em>
- <ul>
- <li>New warning dialog when the Jalview Desktop cannot contact web services</li>
- <li>JABA service parameters for a preset are shown in service job window</li>
- <li>JABA Service menu entries reworded</li>
-</ul>
- </td>
- <td>
- <ul>
- <li>Modeller PIR IO broken - cannot correctly import a pir file emitted by jalview</li>
-<li>Existing feature settings transferred to new alignment view created from cut'n'paste</li>
-<li>Improved test for mixed amino/nucleotide chains when parsing PDB files</li>
-<li>Consensus and conservation annotation rows occasionally become blank for all new windows</li>
-<li>Exception raised when right clicking above sequences in wrapped view mode</li>
- </ul>
- <em>Application</em>
- <ul>
- <li>multiple multiply aligned structure views cause cpu usage to hit 100% and computer to hang</li>
- <li>Web Service parameter layout breaks for long user parameter names</li>
- <li>Jaba service discovery hangs desktop if Jaba server is down</li>
- </ul>
- </td>
- </tr>
- <tr>
+ <tr>
+ <td>
+ <div align="center">
+ <strong><a name="Jalview2.7">2.7</a>
+ </strong><br> <em>27/09/2011</em>
+ </div></td>
+ <td><em>Application</em>
+ <ul>
+ <li>Jalview Desktop News Reader</li>
+ <li>Tweaked default layout of web services menu</li>
+ <li>View/alignment association menu to enable user to easily
+ specify which alignment a multi-structure view takes its
+ colours/correspondences from</li>
+ <li>Allow properties file location to be specified as URL </li>
+ <li>Extend jalview project to preserve associations between
+ many alignment views and a single Jmol display</li>
+ <li>Store annotation row height in jalview project file</li>
+ <li>Annotation row column label formatting attributes stored
+ in project file</li>
+ <li>Annotation row order for auto-calculated annotation rows
+ preserved in jalview project file</li>
+ <li>Visual progress indication when Jalview state is saved
+ using Desktop window menu</li>
+ <li>Visual indication that command line arguments are still
+ being processed</li>
+ <li>Groovy script execution from URL</li>
+ <li>Colour by annotation default min and max colours in
+ preferences</li>
+ <li>Automatically associate PDB files dragged onto an
+ alignment with sequences that have high similarity and matching
+ IDs</li>
+ <li>Update JGoogleAnalytics to latest release (0.3)</li>
+ <li>'view structures' option to open many structures
+ in same window</li>
+ <li>Sort associated views menu option for tree panel</li>
+ <li>Group all JABA and non-JABA services for a particular
+ analysis function in its own submenu</li>
+ </ul> <em>Applet</em>
+ <ul>
+ <li>Userdefined and autogenerated annotation rows for groups</li>
+ <li>Adjustment of alignment annotation pane height</li>
+ <li>Annotation scrollbar for annotation panel</li>
+ <li>Drag to reorder annotation rows in annotation panel</li>
+ <li>'automaticScrolling' parameter</li>
+ <li>Allow sequences with partial ID string matches to be
+ annotated from GFF/jalview features files</li>
+ <li>Sequence logo annotation row in applet</li>
+ <li>Absolute paths relative to host server in applet
+ parameters are treated as such</li>
+ <li>New in the JalviewLite javascript API:
+ <ul>
+ <li>JalviewLite.js javascript library</li>
+ <li>Javascript callbacks for
+ <ul>
+ <li>Applet initialisation</li>
+ <li>Sequence/alignment mouse-overs and selections</li>
+ </ul>
+ </li>
+ <li>scrollTo row and column alignment scrolling functions</li>
+ <li>Select sequence/alignment regions from javascript</li>
+ <li>javascript structure viewer harness to pass messages
+ between Jmol and Jalview when running as distinct applets</li>
+ <li>sortBy method</li>
+ <li>Set of applet and application examples shipped with
+ documentation</li>
+ <li>New example to demonstrate jalviewLite and Jmol
+ javascript message exchange</li>
+ </ul>
+ </ul> <em>General</em>
+ <ul>
+ <li>Enable Jmol displays to be associated with multiple
+ multiple alignments</li>
+ <li>Option to automatically sort alignment with new tree</li>
+ <li>User configurable link to enable redirects to a
+ www.jalview.org mirror</li>
+ <li>Jmol colours option for Jmol displays</li>
+ <li>Configurable newline string when writing alignment and
+ other flat files</li>
+ <li>Allow alignment annotation description lines to contain
+ html tags</li>
+ </ul> <em>Documentation and Development</em>
+ <ul>
+ <li>Add groovy test harness for bulk load testing to examples
+ </li>
+ <li>Groovy script to load and align a set of sequences using a
+ web service before displaying the result in the Jalview desktop</li>
+ <li>Restructured javascript and applet api documentation</li>
+ <li>Ant target to publish example html files with applet archive</li>
+ <li>Netbeans project for building jalview from source</li>
+ <li>ant task to create online javadoc for jalview source</li>
+ </ul></td>
+ <td><em>Application</em>
+ <ul>
+ <li>User defined colourscheme throws exception when current
+ built in colourscheme is saved as new scheme</li>
+ <li>AlignFrame->Save in application pops up save dialog for
+ valid filename/format</li>
+ <li>Cannot view associated structure for Uniprot sequence</li>
+ <li>PDB file association breaks for Uniprot sequence P37173</li>
+ <li>Associate PDB from file dialog does not tell you which
+ sequence is to be associated with the file</li>
+ <li>Find All raises null pointer exception when query only
+ matches sequence IDs</li>
+ <li>Pre 2.6 Jalview project cannot be loaded into v2.6</li>
+ <li>Jalview project with Jmol views created with Jalview 2.4
+ cannot be loaded</li>
+ <li>Filetype associations not installed for webstart launch</li>
+ <li>Two or more chains in a single PDB file associated with
+ sequences in different alignments do not get coloured by their
+ associated sequence</li>
+ <li>Visibility status of autocalculated annotation row not
+ preserved when project is loaded</li>
+ <li>Annotation row height and visibility attributes not stored
+ in jalview project</li>
+ <li>Tree bootstraps are not preserved when saved as a jalview
+ project</li>
+ <li>Envision2 workflow tooltips are corrupted</li>
+ <li>Enabling show group conservation also enables colour by
+ conservation</li>
+ <li>Duplicate group associated conservation or consensus
+ created on new view</li>
+ <li>Annotation scrollbar not displayed after 'show all
+ hidden annotation rows' option selected</li>
+ <li>Alignment quality not updated after alignment annotation
+ row is hidden then shown</li>
+ <li>Preserve colouring of structures coloured by sequences in pre
+ jalview 2.7 projects</li>
+ <li>Web service job parameter dialog is not laid out properly
+ </li>
+ <li>Web services menu not refreshed after 'reset
+ services' button is pressed in preferences</li>
+ <li>Annotation off by one in jalview v2_3 example project</li>
+ <li>Structures imported from file and saved in project get
+ name like jalview_pdb1234.txt when reloaded</li>
+ <li>Jalview does not always retrieve progress of a JABAWS job
+ execution in full once it is complete</li>
+ </ul> <em>Applet</em>
+ <ul>
+ <li>Alignment height set incorrectly when lots of annotation
+ rows are displayed</li>
+ <li>Relative URLs in feature HTML text not resolved to
+ codebase</li>
+ <li>View follows highlighting does not work for positions in
+ sequences</li>
+ <li><= shown as = in tooltip</li>
+ <li>Export features raises exception when no features exist</li>
+ <li>Separator string used for serialising lists of IDs for
+ javascript api is modified when separator string provided as
+ parameter</li>
+ <li>Null pointer exception when selecting tree leaves for
+ alignment with no existing selection</li>
+ <li>Relative URLs for datasources assumed to be relative to
+ applet's codebase</li>
+ <li>Status bar not updated after finished searching and search
+ wraps around to first result</li>
+ <li>StructureSelectionManager instance shared between several
+ jalview applets causes race conditions and memory leaks</li>
+ <li>Hover tooltip and mouseover of position on structure not
+ sent from Jmol in applet</li>
+ <li>Certain sequences of javascript method calls to applet API
+ fatally hang browser</li>
+ </ul> <em>General</em>
+ <ul>
+ <li>View follows structure mouseover scrolls beyond position
+ with wrapped view and hidden regions</li>
+ <li>Find sequence position moves to wrong residue with/without
+ hidden columns</li>
+ <li>Sequence length given in alignment properties window is
+ off by 1</li>
+ <li>InvalidNumberFormat exceptions thrown when trying to
+ import PDB like structure files</li>
+ <li>Positional search results are only highlighted between
+ user-supplied sequence start/end bounds</li>
+ <li>End attribute of sequence is not validated</li>
+ <li>Find dialog only finds first sequence containing a given
+ sequence position</li>
+ <li>Sequence numbering not preserved in MSF alignment output</li>
+ <li>Jalview PDB file reader does not extract sequence from
+ nucleotide chains correctly</li>
+ <li>Structure colours not updated when tree partition changed
+ in alignment</li>
+ <li>Sequence associated secondary structure not correctly
+ parsed in interleaved stockholm</li>
+ <li>Colour by annotation dialog does not restore current state
+ </li>
+ <li>Hiding (nearly) all sequences doesn't work properly</li>
+ <li>Sequences containing lowercase letters are not properly
+ associated with their pdb files</li>
+ </ul> <em>Documentation and Development</em>
+ <ul>
+ <li>schemas/JalviewWsParamSet.xsd corrupted by ApplyCopyright
+ tool</li>
+ </ul></td>
+ </tr>
+ <tr>
+ <td>
+ <div align="center">
+ <strong><a name="Jalview2.6.1">2.6.1</a>
+ </strong><br> <em>15/11/2010</em>
+ </div></td>
+ <td><em>Application</em>
+ <ul>
+ <li>New warning dialog when the Jalview Desktop cannot contact
+ web services</li>
+ <li>JABA service parameters for a preset are shown in service
+ job window</li>
+ <li>JABA Service menu entries reworded</li>
+ </ul></td>
+ <td>
+ <ul>
+ <li>Modeller PIR IO broken - cannot correctly import a pir
+ file emitted by jalview</li>
+ <li>Existing feature settings transferred to new alignment
+ view created from cut'n'paste</li>
+ <li>Improved test for mixed amino/nucleotide chains when
+ parsing PDB files</li>
+ <li>Consensus and conservation annotation rows occasionally
+ become blank for all new windows</li>
+ <li>Exception raised when right clicking above sequences in
+ wrapped view mode</li>
+ </ul> <em>Application</em>
+ <ul>
+ <li>multiple multiply aligned structure views cause cpu usage
+ to hit 100% and computer to hang</li>
+ <li>Web Service parameter layout breaks for long user
+ parameter names</li>
+ <li>Jaba service discovery hangs desktop if Jaba server is
+ down</li>
+ </ul></td>
+ </tr>
+ <tr>
<td>
<div align="center"><strong><a name="Jalview2.6">2.6</a></strong><br>
<em>26/9/2010</em></div>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+++ /dev/null
-<html>
-<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
- *
- * This file is part of Jalview.
- *
- * 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.
- *
- * 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/>.
--->
-<head><title>ClustalW Alignment</title></head>
-<body>
-<p><strong>ClustalW Alignments</strong></p>
-<p>ClustalW is a program for multiple sequence alignment. It works
-with both DNA and protein sequences, and can also perform profile
-profile alignments to align two or more multiple sequence
-alignments.</p>
-<p>
-Thompson, J.D., Higgins, D.G. and Gibson, T.J. (1994) <br>
-CLUSTAL W: improving the sensitivity of progressive multiple
-sequence alignment through sequence weighting, position specific gap
-penalties and weight matrix choice.<br>
-<em>Nucleic Acids Research</em> <strong>22</strong> 4673-4680
-</p>
-<p>There are two versions of this alignment function, which will operate
-on the selected region, if any, or the whole sequence set:</p>
-<ul>
- <li><strong>Web Service→Alignment→ClustalW Multiple Sequence Alignment</strong><br>
- Aligns using the clustalW program, ignoring any gaps in the submitted sequence
- set. </li>
- <li><strong>Web Service→Alignment→ClustalW Mulitple Sequence Alignment
- Realign </strong><br>
- Submits the sequences with existing gaps to clustalW, which will preserve
- existing gaps and re-align those regions which are not optimal. </li>
-</ul>
-<em>As of Jalview 2.6, alignment services accessed via the 'Alignment' submenu should be considered legacy Jalview SOAP services.</em>
-</body>
-</html>
<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<title>Web Services</title>
</head>
<body>
-<p><strong>Web services</strong></p>
+ <p>
+ <strong>Web services</strong>
+ </p>
-<p>Jalview includes clients for a variety of web services for both
-bioinformatic data retrieval and analysis.
-<ul>
- <li>The <a href="../features/seqfetch.html">Sequence Fetcher</a>
- utilises web services for sequence, alignment and structure retrieval
- provided by the European Bioinformatics Institute (EBI) and Distributed
- Annotation System servers that are capable of serving sequences.</li>
- <li>The <a href="../features/dasfeatures.html">DAS Feature
- Fetcher</a> enables the retrieval and visualization of features from DAS
- annotation sources</li>
- <li>The <a href="dbreffetcher.html">Database Reference Fetcher</a>
- transfers database references from records available from DAS or the
- public sequence databases.</li>
- <li>The <strong>Web Services</strong> menu in each alignment
- window also provides access to the following:
+ <p>Jalview includes clients for a variety of web services for both
+ bioinformatic data retrieval and analysis.
<ul>
- <li>Jalview SOAP Web Services for sequence alignment and
- secondary structure prediction based at the University of Dundee.</li>
- <li>Services for submitting IDs and sequences to external
- bioinformatics services such as <a href="#envision2">Envision2</a>.</li>
- <li>Programs for multiple sequence alignment, made available <em>via</em>
- <a href="JABAWS.html">Java Bioinformatic Analysis Web Service
- (JABAWS)</a> servers.</li>
+ <li>The <a href="../features/seqfetch.html">Sequence Fetcher</a>
+ utilises web services for sequence, alignment and structure retrieval
+ provided by the European Bioinformatics Institute (EBI) and
+ Distributed Annotation System servers that are capable of serving
+ sequences.</li>
+ <li>The <a href="../features/dasfeatures.html">DAS Feature
+ Fetcher</a> enables the retrieval and visualization of features from DAS
+ annotation sources</li>
+ <li>The <a href="dbreffetcher.html">Database Reference
+ Fetcher</a> transfers database references from records available from
+ DAS or the public sequence databases.</li>
+ <li>The <strong>Web Services</strong> menu in each alignment
+ window also provides access to the following:
+ <ul>
+ <li>Programs for <a href="msaclient.html">multiple sequence
+ alignment</a>, made available <em>via</em> <a href="JABAWS.html">Java
+ Bioinformatic Analysis Web Service (JABAWS)</a> servers.</li>
+ <li>Jalview SOAP Web Services for <a href="jnet.html">secondary
+ structure prediction</a> based at the University of Dundee.</li>
+ <li>Services for alignment analysis, such as <a
+ href="shmr.html">Multi-Harmony</a>.
+ <li>Services for submitting IDs and sequences to external
+ bioinformatics services such as Envision2 (see <a href="#envision2">below</a>).</li>
+ </ul>
+ <p>
+ <strong>Web Service Dialog Box</strong>
+ </p> <img src="clwqueued.gif">
+ <p>This dialog box is displayed when a web service job is
+ submitted. It gives the name of the service and any method citation
+ information, and monitors the progress of the calculation. The
+ cancel button will permanently cancel the job, but this is only
+ possible for some services.</p> The <a href="webServicesPrefs.html">Web
+ Services Preference panel</a> controls the display and appearance of the
+ submission and analysis services in the <strong>Web Services</strong>
+ menu.</li>
+ <li>If Jalview encounters problems accessing any services, it may
+ display a <a href="webServicesPrefs.html#wswarnings">warning
+ dialog box</a> (this can be turned off using the web services
+ preferences tab).</li>
</ul>
- The <a href="webServicesPrefs.html">Web Services Preference panel</a>
- controls the display and appearance of the submission and analysis
- services in the <strong>Web Services</strong> menu.</li>
- <li>If Jalview encounters problems accessing any services, it may
- display a <a href="webServicesPrefs.html#wswarnings">warning dialog
- box</a> (this can be turned off using the web services preferences tab).</li>
-</ul>
-</p>
-<p><strong>More about Jalview's Web Services</strong> <br>
-Jalview's distributed computations are SOAP based services exposing
-protein sequence alignment and secondary structure prediction programs.
-These services actually run on the cluster based in the School of Life
-Sciences, University of Dundee, and are maintained by the Barton group.</p>
-<p><strong><a name="envision2">Envision2 Services</a></strong></p>
-<p>Since version 2.5, Jalview has included a client to enable the
-user to submit one or more sequences or sequence IDs to analysis
-workflows provided by the <a
- href="http://www.ebi.ac.uk/enfin-srv/envision2">EnVision2 web
-application</a>. This allows Jalview users to easily access the EnCore
-network of databases and analysis services developed by ENFIN (<a
- href="http://www.enfin.org">www.enfin.org</a>).</p>
-<br />
-<p><strong>Web Service Dialog Box</strong></p>
-<img src="clwqueued.gif">
-<p>This dialog box is displayed when a web service job is submitted.
-It gives the name of the service and any method citation information,
-and monitors the progress of the calculation. The cancel button will
-permanently cancel the job, but this is only possible for some services.
-</p>
-<p>Current services:
-<ul>
- <a href="msaclient.html"><strong>Multiple Sequence
- Alignment Services</strong></a>
- <ul>
- <li><a href="clustalw.html">ClustalW Multiple Alignment and
- re-alignment</a><br>
- The clustal W service remains one of the more popular Jalview
- features.</li>
- <li><a href="muscle.html">Muscle Multiple Alignment</a><br>
- High Quality and High Throughput multiple alignments of proteins. This
- method can sometimes be more accurate than ClustalW when dealing with
- diverse sets of sequences.</li>
- <li><a href="mafft.html">MAFFT</a><br>
- Multiple Alignment with Fast Fourier Transforms - a highly accurate
- and high throughput dna and amino acid alignment method, performing at
- least as well as ClustalW and Muscle.</li>
- <li>Other alignment methods are also available via <a
- href="JABAWS.html">JABAWS</a>. For more information about a
- particular service, see the documentation available via the <a
- href="webServicesParams.html">web services parameter dialog box</a>.</li>
- </ul>
- </li>
- <li><strong>Secondary Structure Prediction</strong>
- <ul>
- <li><a href="jnet.html">JNet</a><br>
- This is a front end to the <a
- href="http://www.compbio.dundee.ac.uk/www-jpred/">JNet www server</a>
- allowing single sequence or profile based prediction.</li>
- </ul>
- </li>
-</ul>
-</p>
-
+ </p>
+ <p>
+ <strong>More about Jalview's Web Services</strong> <br> Jalview's
+ distributed computations utilise <a
+ href="http://en.wikipedia.org/wiki/SOAP">SOAP</a> and <a
+ href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a>
+ web services exposing sequence alignment, analysis, and secondary
+ structure prediction programs. Originally, Jalview 2's services were
+ maintained by the Barton group at the University of Dundee, and ran
+ programs on the Life Sciences High-performace Computing Cluster. With
+ the advent of <a href="http://www.compbio.dundee.ac.uk/JABAWS">JABAWS</a>,
+ however, it is possible for anyone to host Jalview web services.
+ </p>
+ <p>
+ <strong><a name="envision2">Envision2 Services</a>
+ </strong>
+ </p>
+ <p>
+ Since version 2.5, Jalview has included a client to enable the user to
+ submit one or more sequences or sequence IDs to analysis workflows
+ provided by the <a href="http://www.ebi.ac.uk/enfin-srv/envision2">EnVision2
+ web application</a>. This allows Jalview users to easily access the
+ EnCore network of databases and analysis services developed by ENFIN (<a
+ href="http://www.enfin.org">www.enfin.org</a>).
+ </p>
</body>
</html>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+++ /dev/null
-<html>
-<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
- *
- * This file is part of Jalview.
- *
- * 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.
- *
- * 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/>.
--->
-<head><title>MAFFT Multiple Sequence Alignments</title></head>
-<body>
-<p><strong>MAFFT Multiple Sequence Alignments</strong></p>
-<p> Katoh, K., K. Kuma, K., Toh, H., and Miyata, T. (2005) "MAFFT version
- 5: improvement in accuracy of multiple sequence alignment." Nucleic Acids
- Research, 33 511-518</p>
-<p>MAFFT is a program for the multiple alignment of nucleic acid or protein
-sequences, and is available from the <strong>Web
-Service→Alignment→MAFFT Multiple Sequence
-Alignment</strong> entry in the web services menu.</p>
-<p>MAFFT utilizes algorithms for spectral correlation to identify
-homologous regions in a fast-fourier transform representation of each
-sequence. The Jalview web service runs MAFFT using the
-'--auto' option which picks optimal parameters
-for the set of sequences to be aligned.</p>
-<em>As of Jalview 2.6, alignment services accessed via the 'Alignment' submenu should be considered legacy Jalview SOAP services.</em>
-</body>
-</html>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
</head>
<body>
<strong>Multiple Sequence Alignment Web Services</strong>
-<p>Multiple sequence alignment services can be accessed from either
-the <strong>Alignment</strong> or the <strong>JABAWS Alignment</strong>
-submenu of the Alignment Window's <strong>Web Service</strong> menu.
-When an entry from one of these menus is selected, either the currently
-selected residues, or the whole sequence set (if there is no selection
-or only one sequence is selected) will be submitted for multiple
-sequence alignment.</p>
-<p>There are two kinds of multiple sequence alignment operations
+ <p>
+ Multiple sequence alignment services are accessed from the <strong>Alignment</strong>
+ submenu of the Alignment Window's <strong>Web Service</strong> menu.
+ When an entry from one of these menus is selected, either the
+ currently selected residues, or the whole sequence set (if there is no
+ selection or only one sequence is selected) will be submitted for
+ multiple sequence alignment.
+ </p>
+ <p>There are two kinds of multiple sequence alignment operations
available:
<ul>
<li><em>alignment</em> - where a new alignment is constructed from
used by the service to construct a profile based alignment of the
remaining unaligned sequences.</li>
</ul>
-The <a href="JABAWS.html">JABAWS Alignment services</a> also offer a
-range of predefined alignment settings and the opportunity for you to
-define your own set of parameters for running the alingment program.</p>
+ <strong>JABAWS Alignment services</strong><br> Most alignment services are
+ provided by the
+ <a href="JABAWS.html">JABAWS framework</a>, which allows you to
+ customise the precise parameters used when running each alignment
+ prgoram. In addition to the 'Default settings', you may choose from a
+ range of alignment preset settings, or create your own using the
+ <a href="webServicesParams.html">'Edit Settings And Run ..' dialog
+ box</a>.
+ </p>
+ <p><strong>Alignment programs supported by JABAWS</strong><ul>
+ <li><a href="http://www.clustal.org/">ClustalW</a> (version 2.0.12)</li>
+ <li><a href="http://align.bmr.kyushu-u.ac.jp/mafft/software/">Mafft</a> (version 6.713)</li>
+ <li><a href="http://www.drive5.com/muscle">Muscle</a> (version 3.7) </li>
+ <li><a href="http://www.tcoffee.org/Projects_home_page/t_coffee_home_page.html">Tcoffee</a> (version 8.14) </li>
+ <li><a href="http://probcons.stanford.edu/">Probcons</a> (version 1.12)</li>
+ </ul>
+</p>
+
<p><strong>Multiple Alignments of Sequences with hidden
columns</strong><br>
Multiple alignment services are 'column separable' analysis operations.
+++ /dev/null
-<html>
-<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
- *
- * This file is part of Jalview.
- *
- * 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.
- *
- * 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/>.
--->
-<head><title>Muscle Alignment</title></head>
-<body>
-<p><strong>Muscle Alignments</strong></p>
-<p>Muscle is a program for the alignment of many protein sequences.</p>
-<p>
-Edgar, Robert C. (2004), MUSCLE: multiple sequence alignment with high
-accuracy and high throughput<br>
-<em>Nucleic Acids Research</em> <strong>32</strong>(5), 1792-97.</p>
-<p> This alignment method is applied to the selected region, if any, or the whole
- sequence set when the <strong>Web Service→Alignment→Muscle
- Protein Sequence Alignment</strong> menu item is selected. </p>
-<em>As of Jalview 2.6, alignment services accessed via the 'Alignment' submenu should be considered legacy Jalview SOAP services.</em>
-</body>
-</html>
--- /dev/null
+<html>
+<head>Jalview Desktop RSS News Reader
+</head>
+<body>
+ <p>
+ <strong>The Jalview Desktop RSS News Reader</strong><br /> The
+ Jalview Desktop includes a built in news reader for the <a
+ href="http://www.jalview.org/feeds/desktop/rss">Jalview Desktop
+ News Channel</a>.
+ </p>
+
+ <p>We will use the desktop news channel to keep you informed of
+ important updates relevant to users of the Jalview desktop, such as
+ web service outages and user community events.</p>
+ <p>The news reader will be launched automatically when you start
+ the Desktop if new items are available. Should you want to browse
+ older items, however, you can open it manually from the 'Jalview news
+ reader' option in the Desktop's 'Tools' menu.</p>
+ <img src="jalviewrssreader.gif" align="center" width="513" height="337"
+ alt="Snapshot of the Jalview Desktop's RSS reader" />
+ <p>
+ The <em>Jalview news reader</em> was introduced in <a
+ href="http://www.jalview.org/releaseHistory.html#Jalview2.7">Jalview
+ version 2.7</a>. Its implementation is based on <a
+ href="http://jswingreader.sourceforge.net/">JSwingReader</a>.
+ </p>
+</body>
+</html>
--- /dev/null
+<html>
+<!--
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+-->
+<head>
+<title>Multi-Group Sequence Harmony and Multi-Relief</title>
+</head>
+<body>
+ <strong>Functional residue analysis with Sequence Harmony and
+ Multi-Relief</strong>
+ <p>
+ The Multi-Harmony (a.k.a. Sequence Harmony and Multi-Relief, or SHMR) service (<a
+ href="#shmrref">Brandt, Feenstra and Heringa, 2010</a>) available
+ from the <em>Analysis</em> sub-menu of the alignment window's web
+ services menu provides a method for the identification of significant
+ patterns of <em>sub-family variation</em> amongst the columns of an
+ alignment.
+ </p>
+ <p>
+ <strong>Instructions for use</strong><br> The service requires a
+ protein sequence multiple alignment that has been sub-divided into
+ groups containing at least two non-identical protein sequences. An
+ easy way to create groups is to use the built-in <a
+ href="../calculations/tree.html">neighbour-joining or UPGMA tree</a>
+ routines to calculate a tree for the alignment, and then click on the
+ tree to subdivide the alignment.
+ </p>
+ <p>
+ The SHMR service operates on the currently selected visible region(s)
+ of the alignment. Once submitted, a job progress window will display
+ status information about your job, including a URL which allows you to
+ visit the status page on the
+ <a href="http://zeus.few.vu.nl/programs/shmrwww/">IBIVU SHMR server</a>.
+ </p>
+ <p>When the job is complete, Jalview will automatically open a new
+ window containing the alignment and groups that were submitted for
+ analysis, with additional histograms added portraying the SHMR scores
+ for each column of the sub-grouped alignment.</p>
+ <p>
+ If you use this service in your work, please cite :<br /><a name="shmrref"/> Brandt,
+ B.W.*, Feenstra, K.A*. and Heringa, J. (2010) Multi-Harmony: detecting
+ functional specificity from sequence alignment. <a
+ href="http://nar.oxfordjournals.org/cgi/content/abstract/gkq415">Nucleic
+ Acids Res. 38: W35-W40.</a> (<em>* joint first authors</em>)
+ <p>
+ <strong><em>Note:</em></strong> The Multi-Harmony service is implemented with a prototype of Jalview's RESTful
+ web service client introduced in Jalview 2.7. A few bugs remain in this prototype, which we intend to fixed in version 2.7.1.
+ </ul>
+ </p>
+</body>
+</html>
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6.1)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<title>What's new ?</title>
</head>
<body>
-<p><strong>What's new ?</strong></p>
-<p>The Jalview 2.6.1 release fixes a number of minor bugs affecting
-Jalview operation, including issues affecting the import and export of
-PIR files and working with multiple multiple structure superpositions.
-For full details see the <a href="releases.html#Jalview2.6.1">Jalview
-2.6.1 release history</a>.</p>
-<p><strong>Highlights in Jalview Version 2.6</strong></p>
-<ul>
- <li><a href="webServices/JABAWS.html">JABA Web Services</a> for
- multiple alignment using:
+ <p>
+ <strong>What's new ?</strong>
+ </p>
+ <p>
+ The Jalview 2.7.1 release features (tbc)
+ <br /> For full
+ details see the <a href="releases.html#Jalview2.7.1">Jalview 2.7.1
+ release history</a>.
+ </p>
+ <p>
+ <strong>Highlights in Jalview Desktop Version 2.7.1</strong>
+ </p>
<ul>
- <li>ClustalW</li>
- <li>MAFFT</li>
- <li>Muscle</li>
- <li>ProbCons</li>
- <li>T-COFFEE</li>
- </ul>
- </li>
- <li>User modifiable alignment service parameters</li>
- <li>Visualization of superposed structures associated with protein
- or nucleotide sequence alignments.</li>
- <li>Export coordinates and projection as CSV from PCA viewer</li>
+
<li>New Purine/Pyrimidine colour scheme</li>
<li>Colouring of RNA secondary structure by helices. See <a href="na/index.html">Nucleic Acid Support</a></li>
-
-</ul>
-
-<p><strong>Issues Resolved (a select list - see release
-history for details)</strong></p>
-<ul>
+ <li>Embedded <a href="http://www.varna.fr/">VARNA</a> RNA secondary structure viewer.
+ </ul>
-</ul>
-<p>See the <a href="releases.html">Release History</a> page for
-details of all new features and resolved issues.</p>
+ <p>
+ <strong>Issues Resolved (a select list - see the <a
+ href="releases.html#Jalview2.7.1">release history</a> for full details)
+ </strong>
+ </p>
+ <p>
+ <strong>Issues in the Jalview Desktop</strong>
+ <ul>
+ </ul>
+ <strong>Issues specific to the JalviewLite Applet</strong>
+ <ul>
+ </ul>
+ <strong>Issues affecting both applet and application</strong>
+ <ul>
+ </ul>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?><!--
+ Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+
+ This file is part of Jalview.
+
+ 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.
+
+ 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/>.
+ -->
+
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
+###############################################################################
+# Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+# Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+#
+# This file is part of Jalview.
+#
+# 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.
+#
+# 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/>.
+###############################################################################
nbbuild.xml.data.CRC32=f5d3c6c2
nbbuild.xml.script.CRC32=307ee084
nbbuild.xml.stylesheet.CRC32=28e38971@1.43.1.45
+###############################################################################
+# Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+# Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+#
+# This file is part of Jalview.
+#
+# 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.
+#
+# 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/>.
+###############################################################################
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.run.all.processors=true
file.reference.wsdl4j.jar=lib/wsdl4j.jar
file.reference.xercesImpl.jar=lib/xercesImpl.jar
file.reference.xml-apis.jar=lib/xml-apis.jar
+file.reference.miglayout-4.0-swing.jar=lib/miglayout-4.0-swing.jar
includes=**
jar.compress=false
javac.classpath=\
${file.reference.JGoogleAnalytics_0.3.jar}:\
${file.reference.jhall.jar}:\
${file.reference.Jmol-12.1.13.jar}:\
+ ${file.reference.miglayout-4.0-swing.jar}:\
${file.reference.log4j-1.2.8.jar}:\
${file.reference.mail.jar}:\
${file.reference.min-jaba-client.jar}:\
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?><!--
+ Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+
+ This file is part of Jalview.
+
+ 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.
+
+ 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/>.
+ -->
+
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<?xml version="1.0"?>\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
<?xml version="1.0"?>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<?xml version="1.0" encoding="UTF-8"?>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<?xml version="1.0" encoding="UTF-8"?>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<?xml version="1.0" encoding="UTF-8"?>\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
+###############################################################################
+# Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+# Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+#
+# This file is part of Jalview.
+#
+# 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.
+#
+# 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/>.
+###############################################################################
#\r
# Property file for SourceCodeGenerator for jalview project XML for parsing without descriptors\r
#\r
+###############################################################################
+# Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+# Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+#
+# This file is part of Jalview.
+#
+# 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.
+#
+# 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/>.
+###############################################################################
#\r
# Property file for SourceCodeGenerator for jalview project XML\r
#\r
<?xml version="1.0" encoding="UTF-8"?>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<xs:element name="structureState" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
- <xs:extension base="xs:string">
+ <xs:extension base="xs:string">
+ <xs:attributeGroup ref="jv:swingwindow"/>
<xs:attribute name="visible" type="xs:boolean"/>
- <xs:attribute name="xpos" type="xs:int"/>
- <xs:attribute name="ypos" type="xs:int"/>
- <xs:attribute name="width" type="xs:int"/>
- <xs:attribute name="height" type="xs:int"/>
<xs:attribute name="viewId" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>additional identifier which properly disambiguates
</xs:documentation></xs:annotation></xs:attribute>
</xs:extension>
- </xs:simpleContent>
+ </xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
+ <xs:attributeGroup ref="jv:swingwindow"/>
<xs:attribute name="conservationSelected" type="xs:boolean"/>
<xs:attribute name="pidSelected" type="xs:boolean"/>
<xs:attribute name="bgColour" type="xs:string"/>
<xs:attribute name="showSequenceLogo" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="ignoreGapsinConsensus" type="xs:boolean" use="optional" default="true"/>
- <xs:attribute name="xpos" type="xs:int"/>
- <xs:attribute name="ypos" type="xs:int"/>
- <xs:attribute name="width" type="xs:int"/>
- <xs:attribute name="height" type="xs:int"/>
<xs:attribute name="startRes" type="xs:int"/>
<xs:attribute name="startSeq" type="xs:int"/>
<xs:attribute name="fontName" type="xs:string"/>
</xs:documentation>
</xs:annotation>
</xs:attribute>
- </xs:complexType>
+ </xs:complexType>
</xs:element>
<xs:element name="UserColours" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
</xs:element>
<xs:element name="tree" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
- <xs:sequence minOccurs="0">
- <xs:element name="title" type="xs:string"/>
- <xs:element name="newick" type="xs:string"/>
- </xs:sequence>
- <xs:attribute name="width" type="xs:int"/>
- <xs:attribute name="height" type="xs:int"/>
- <xs:attribute name="xpos" type="xs:int"/>
- <xs:attribute name="ypos" type="xs:int"/>
- <xs:attribute name="fontName" type="xs:string"/>
- <xs:attribute name="fontSize" type="xs:int"/>
- <xs:attribute name="fontStyle" type="xs:int"/>
- <xs:attribute name="threshold" type="xs:float"/>
- <xs:attribute name="showBootstrap" type="xs:boolean"/>
- <xs:attribute name="showDistances" type="xs:boolean"/>
- <xs:attribute name="markUnlinked" type="xs:boolean"/>
- <xs:attribute name="fitToWindow" type="xs:boolean"/>
- <xs:attribute name="currentTree" type="xs:boolean"/>
- <xs:attribute name="id" type="xs:ID" use="optional">
- <xs:annotation><xs:documentation>Tree ID added for binding tree visualization settings to vamsas document trees in jalview 2.4.1</xs:documentation></xs:annotation>
- </xs:attribute>
- </xs:complexType>
+ <xs:sequence minOccurs="0">
+ <xs:element name="title" type="xs:string"/>
+ <xs:element name="newick" type="xs:string"/>
+ </xs:sequence>
+ <xs:attribute name="fontName" type="xs:string"/>
+ <xs:attribute name="fontSize" type="xs:int"/>
+ <xs:attribute name="fontStyle" type="xs:int"/>
+ <xs:attribute name="threshold" type="xs:float"/>
+ <xs:attribute name="showBootstrap" type="xs:boolean"/>
+ <xs:attribute name="showDistances" type="xs:boolean"/>
+ <xs:attribute name="markUnlinked" type="xs:boolean"/>
+ <xs:attribute name="fitToWindow" type="xs:boolean"/>
+ <xs:attribute name="currentTree" type="xs:boolean"/>
+ <xs:attribute name="id" type="xs:ID" use="optional">
+ <xs:annotation><xs:documentation>Tree ID added for binding tree visualization settings to vamsas document trees in jalview 2.4.1</xs:documentation></xs:annotation>
+ </xs:attribute>
+ <xs:attributeGroup ref="jv:swingwindow"/>
+ </xs:complexType>
</xs:element>
<xs:element name="FeatureSettings" minOccurs="0">
<xs:complexType>
<xs:attribute name="type" type="xs:string" use="optional"/>
<xs:attribute name="file" type="xs:string"/>
</xs:complexType>
+ <!--
+ <xs:complexType name="reportWindow">
+ <xs:annotation>
+ <xs:documentation>Generic type for windows containing mime-typed data associated with other jalview windows</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string" use="required"/>
+ <xs:attribute name="type" type="xs:string" use="optional"/>
+ <xs:attribute name="file" type="xs:string" use="optional"/>
+ </xs:complexType>
+ -->
+ <xs:attributeGroup name="swingwindow">
+ <xs:annotation>
+ <xs:documentation>
+ base attributes for windows displayed in Jalview desktop.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="width" type="xs:int"/>
+ <xs:attribute name="height" type="xs:int"/>
+ <xs:attribute name="xpos" type="xs:int"/>
+ <xs:attribute name="ypos" type="xs:int"/>
+ </xs:attributeGroup>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
<?xml version="1.0" encoding="UTF-8"?>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<?xml version="1.0" encoding="UTF-8"?>\r
<!--\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+###############################################################################
+# Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+# Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+#
+# This file is part of Jalview.
+#
+# 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.
+#
+# 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/>.
+###############################################################################
# THE CASTOR PROPERTIES FILE\r
# This file specifies values for Castor run-time which may be configured\r
# by the user.\r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*
* You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
- * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2007 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
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * 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.
- *
- * 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
- */
package ext.vamsas;
public interface MuscleWS extends java.rmi.Remote
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*
* You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
- * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2007 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
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * 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.
- *
- * 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
- */
package ext.vamsas;
public interface MuscleWSService extends javax.xml.rpc.Service
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*
* You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
- * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2007 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
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * 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.
- *
- * 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
- */
package ext.vamsas;
public class MuscleWSServiceLocator extends org.apache.axis.client.Service
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*
* You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
- * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2007 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
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * 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.
- *
- * 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
- */
package ext.vamsas;
public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
public AlignSeq(SequenceI s1, String string1, SequenceI s2,
String string2, String type)
{
- SeqInit(s1, string1, s2, string2, type);
+ SeqInit(s1, string1.toUpperCase(), s2, string2.toUpperCase(), type);
}
/**
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
// TODO: JBPNote - decide if this is always an error
// (eg. not when a tree is associated to another alignment which has more
// sequences)
- if (tmp.size() < nSeq)
+ if (tmp.size() != nSeq)
{
addStrays(align, tmp);
}
if (tmp.size() != nSeq)
{
- System.err.println("ERROR: tmp.size()=" + tmp.size() + " != nseq="
- + nSeq + " in getOrderByTree");
+ System.err.println("WARNING: tmp.size()=" + tmp.size() + " != nseq="
+ + nSeq + " in getOrderByTree - tree contains sequences not in alignment");
}
}
{
if (node.element() instanceof SequenceI)
{
- if (!tmp.contains(node.element()))
+ if (!tmp.contains(node.element())) // && (seqset==null || seqset.size()==0 || seqset.contains(tmp)))
{
tmp.addElement((SequenceI) node.element());
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import jalview.datamodel.*;
-/**
- * <p>
- * Title:
- * </p>
- *
- * <p>
- * Description:
- * </p>
- *
- * <p>
- * Copyright: Copyright (c) 2004
- * </p>
- *
- * <p>
- * Company: Dundee University
- * </p>
- *
- * @author not attributable
- * @version 1.0
- */
public class SeqsetUtils
{
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import jalview.datamodel.*;
/**
- * <p>
- * Title:
- * </p>
- * SequenceIdMatcher
- * <p>
- * Description:
- * </p>
- * Routine which does approximate Sequence Id resolution by name using string
+ * Routines for approximate Sequence Id resolution by name using string
* containment (on word boundaries) rather than equivalence. It also attempts to
* resolve ties where no exact match is available by picking the the id closest
* to the query.
- * <p>
- * Copyright: Copyright (c) 2004
- * </p>
- *
- * <p>
- * Company: Dundee University
- * </p>
- *
- * @author not attributable
- * @version 1.0
*/
public class SequenceIdMatcher
{
-/**
- *
- */
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.api;
import jalview.datamodel.AlignmentI;
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
-/**
- *
- */
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.api;
/**
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import java.awt.*;
import java.awt.event.*;
-import javax.swing.JRadioButtonMenuItem;
-
import jalview.analysis.*;
import jalview.commands.*;
import jalview.datamodel.*;
final String target = urlLink.getTarget(); // link.substring(0,
// link.indexOf("|"));
final String label = urlLink.getLabel();
- if (urlLink.isDynamic())
+ if (seq!=null && urlLink.isDynamic())
{
// collect matching db-refs
cap.setPDBImport(seq);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, "Paste PDB file ", 400, 300);
+ jalview.bin.JalviewLite.addFrame(frame, "Paste PDB file for sequence "+seq.getName(), 400, 300);
}
}
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
{\r
viewport.autocalculateConsensus = autoCalculate.getState();\r
}\r
+ else if (evt.getSource() == sortByTree)\r
+ {\r
+ viewport.sortByTree = sortByTree.getState();\r
+ }\r
else if (evt.getSource() == this.centreColumnLabelFlag)\r
{\r
centreColumnLabelFlag_stateChanged();\r
\r
private Hashtable getDisplayedFeatureCols()\r
{\r
- if (alignPanel.getFeatureRenderer() != null)\r
+ if (alignPanel.getFeatureRenderer() != null && viewport.featuresDisplayed!=null)\r
{\r
FeatureRenderer fr = alignPanel.getFeatureRenderer();\r
Hashtable fcols = new Hashtable();\r
\r
if (displayTextbox)\r
{\r
- CutAndPasteTransfer cap = new CutAndPasteTransfer(false, this);\r
+ boolean frimport=false;\r
+ if (features==null || features.equals("No Features Visible"))\r
+ {\r
+ features = "# No features visible - paste some and import them here.";\r
+ frimport=true;\r
+ }\r
+ \r
+ CutAndPasteTransfer cap = new CutAndPasteTransfer(frimport, this);\r
+ if (frimport)\r
+ {\r
+ cap.setAnnotationImport();\r
+ }\r
Frame frame = new Frame();\r
frame.add(cap);\r
jalview.bin.JalviewLite.addFrame(frame, "Features", 600, 500);\r
-\r
cap.setText(features);\r
+ } else {\r
+ if (features==null)\r
+ features = "";\r
}\r
\r
return features;\r
sortByTree(treePanel, title); // treePanel.getTitle());\r
}\r
});\r
-\r
+ \r
treePanel.addWindowListener(new WindowAdapter()\r
{\r
public void windowOpened(WindowEvent e)\r
alignPanel.paintAlignment(true);\r
return true;\r
}\r
+\r
protected void documentation_actionPerformed()\r
{\r
- showURL("http://www.jalview.org/help.html", "HELP");\r
+ alignPanel.av.applet.openJalviewHelpUrl();\r
}\r
\r
protected void about_actionPerformed()\r
}\r
else\r
{\r
- try\r
- {\r
- if (url.indexOf(":") == -1)\r
- {\r
- // TODO: verify (Bas Vroling bug) prepend codebase or server URL to\r
- // form valid URL\r
- // Should really use docbase, not codebase.\r
- if (url.indexOf("/") == 0)\r
- {\r
- String codebase = viewport.applet.getCodeBase().toString();\r
- url = codebase.substring(0, codebase.length()\r
- - viewport.applet.getCodeBase().getFile().length())\r
- + url;\r
- }\r
- else\r
- {\r
- url = viewport.applet.getCodeBase() + url;\r
- }\r
- System.out.println("Show url (prepended codebase): " + url);\r
- }\r
- else\r
- {\r
- System.out.println("Show url: " + url);\r
- }\r
- if (url.indexOf("javascript:") == 0)\r
- {\r
- // no target for the javascript context\r
- viewport.applet.getAppletContext().showDocument(\r
- new java.net.URL(url));\r
- }\r
- else\r
- {\r
- viewport.applet.getAppletContext().showDocument(\r
- new java.net.URL(url), target);\r
- }\r
- } catch (Exception ex)\r
- {\r
- ex.printStackTrace();\r
- }\r
+ viewport.applet.showURL(url, target);\r
}\r
}\r
\r
CheckboxMenuItem autoCalculate = new CheckboxMenuItem(\r
"Autocalculate Consensus", true);\r
\r
+ CheckboxMenuItem sortByTree = new CheckboxMenuItem(\r
+ "Sort Alignment With New Tree", true);\r
+\r
Menu sortByTreeMenu = new Menu();\r
\r
Menu sort = new Menu();\r
sort.setLabel("Sort");\r
calculate.setLabel("Calculate Tree");\r
autoCalculate.addItemListener(this);\r
+ sortByTree.addItemListener(this);\r
inputText.setLabel("Input from textbox");\r
inputText.addActionListener(this);\r
centreColumnLabelFlag.setLabel("Centre column labels");\r
calculateMenu.add(pairwiseAlignmentMenuItem);\r
calculateMenu.add(PCAMenuItem);\r
calculateMenu.add(autoCalculate);\r
+ calculateMenu.add(sortByTree);\r
this.add(statusBar, BorderLayout.SOUTH);\r
pasteMenu.add(pasteNew);\r
pasteMenu.add(pasteThis);\r
{\r
alignPanel.seqPanel.scrollTo(row, column); \r
}\r
+ public void scrollToRow(int row)\r
+ {\r
+ alignPanel.seqPanel.scrollToRow(row); \r
+ }\r
+ public void scrollToColumn(int column)\r
+ {\r
+ alignPanel.seqPanel.scrollToColumn(column); \r
+ }\r
+ /**\r
+ * @return the alignments unique ID.\r
+ */\r
+ public String getSequenceSetId() {\r
+ return viewport.getSequenceSetId();\r
+ }\r
}\r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
if (applet != null)
{
- String param = applet.getParameter("showFullId");
- if (param != null)
- {
- showJVSuffix = Boolean.valueOf(param).booleanValue();
- }
+ showJVSuffix = applet.getDefaultParameter("showFullId", showJVSuffix);
- param = applet.getParameter("showAnnotation");
- if (param != null)
- {
- showAnnotation = Boolean.valueOf(param).booleanValue();
- }
-
- param = applet.getParameter("showConservation");
- if (param != null)
- {
- showConservation = Boolean.valueOf(param).booleanValue();
- }
+ showAnnotation = applet.getDefaultParameter("showAnnotation", showAnnotation);
+
+ showConservation = applet.getDefaultParameter("showConservation", showConservation);
+
+ showQuality = applet.getDefaultParameter("showQuality", showQuality);
- param = applet.getParameter("showQuality");
- if (param != null)
- {
- showQuality = Boolean.valueOf(param).booleanValue();
- }
+ showConsensus = applet.getDefaultParameter("showConsensus", showConsensus);
- param = applet.getParameter("showConsensus");
- if (param != null)
- {
- showConsensus = Boolean.valueOf(param).booleanValue();
- }
+ showUnconserved = applet.getDefaultParameter("showUnconserved", showUnconserved);
- param = applet.getParameter("showUnconserved");
- if (param != null)
- {
- this.showUnconserved = Boolean.valueOf(param).booleanValue();
- }
-
- param = applet.getParameter("upperCase");
+ String param = applet.getParameter("upperCase");
if (param != null)
{
if (param.equalsIgnoreCase("bold"))
upperCasebold = true;
}
}
- param = applet.getParameter("sortByTree");
- if (param != null)
- {
- sortByTree = Boolean.valueOf(param).booleanValue();
- }
- param = applet.getParameter("automaticScrolling");
- if (param!=null) {
- followHighlight = Boolean.valueOf(param).booleanValue();
- followSelection = followHighlight;
- }
- if ((param=applet.getParameter("showSequenceLogo"))!=null) {
- showSequenceLogo=Boolean.valueOf(param).booleanValue();
- }
- if ((param=applet.getParameter("showGroupConsensus"))!=null) {
- showGroupConsensus=Boolean.valueOf(param).booleanValue();
- }
- if ((param=applet.getParameter("showGroupConservation"))!=null) {
- showGroupConservation=Boolean.valueOf(param).booleanValue();
- }
- if ((param=applet.getParameter("showConsensusHistogram"))!=null) {
- showConsensusHistogram=Boolean.valueOf(param).booleanValue();
- }
+ sortByTree = applet.getDefaultParameter("sortByTree", sortByTree);
+
+ followHighlight = applet.getDefaultParameter("automaticScrolling",followHighlight);
+ followSelection = followHighlight;
+
+ showSequenceLogo = applet.getDefaultParameter("showSequenceLogo", showSequenceLogo);
+
+ showGroupConsensus = applet.getDefaultParameter("showGroupConsensus", showGroupConsensus);
+
+ showGroupConservation = applet.getDefaultParameter("showGroupConservation", showGroupConservation);
+
+ showConsensusHistogram = applet.getDefaultParameter("showConsensusHistogram", showConsensusHistogram);
}
}
}
- public boolean followHighlight = false;
+ public boolean followHighlight = true;
public boolean getFollowHighlight()
{
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import jalview.schemes.*;
import java.awt.Rectangle;
+import javax.swing.BoxLayout;
+
public class AnnotationColourChooser extends Panel implements
ActionListener, AdjustmentListener, ItemListener, MouseListener
{
return;
}
- minColour.setBackground(av.applet.getDefaultColourParameter("ANNOTATIONCOLOUR_MIN",Color.orange));
- maxColour.setBackground(av.applet.getDefaultColourParameter("ANNOTATIONCOLOUR_MAX",Color.red));
-
+ setDefaultMinMax();
+
if (oldcs instanceof AnnotationColourGradient)
{
AnnotationColourGradient acg = (AnnotationColourGradient) oldcs;
frame = new Frame();
frame.add(this);
- jalview.bin.JalviewLite.addFrame(frame, "Colour by Annotation", 480,
- 145);
+ jalview.bin.JalviewLite.addFrame(frame, "Colour by Annotation", 560,
+ 175);
validate();
}
+ private void setDefaultMinMax()
+ {
+ minColour.setBackground(av.applet.getDefaultColourParameter("ANNOTATIONCOLOUR_MIN",Color.orange));
+ maxColour.setBackground(av.applet.getDefaultColourParameter("ANNOTATIONCOLOUR_MAX",Color.red));
+
+ }
public AnnotationColourChooser()
{
try
cancel.setLabel("Cancel");
cancel.addActionListener(this);
- this.setLayout(borderLayout1);
- jPanel2.setLayout(flowLayout1);
+ defColours.setLabel("Defaults");
+ defColours.addActionListener(this);
+
annotations.addItemListener(this);
- jPanel1.setBackground(Color.white);
- jPanel2.setBackground(Color.white);
- threshold.addItemListener(this);
- jPanel3.setLayout(null);
thresholdValue.addActionListener(this);
-
slider.setBackground(Color.white);
+ slider.setPreferredSize(new Dimension(193,21));
slider.setEnabled(false);
- slider.setBounds(new Rectangle(153, 3, 93, 21));
+ thresholdValue.setPreferredSize(new Dimension(79,22));
thresholdValue.setEnabled(false);
- thresholdValue.setBounds(new Rectangle(248, 2, 79, 22));
thresholdValue.setColumns(5);
- jPanel3.setBackground(Color.white);
currentColours.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
currentColours.setLabel("Use Original Colours");
currentColours.addItemListener(this);
- threshold.setBounds(new Rectangle(11, 3, 139, 22));
thresholdIsMin.setBackground(Color.white);
thresholdIsMin.setLabel("Threshold is min/max");
- thresholdIsMin.setBounds(new Rectangle(328, 3, 135, 23));
+
+ this.setLayout(borderLayout1);
+
+ jPanel1.setBackground(Color.white);
+
+ jPanel2.setLayout(new FlowLayout());
+ jPanel2.setBackground(Color.white);
+ threshold.addItemListener(this);
+ jPanel3.setLayout(new FlowLayout());
+ jPanel3.setBackground(Color.white);
+ Panel jPanel4 = new Panel();
+ jPanel4.setLayout(new BorderLayout());
+ jPanel4.setBackground(Color.white);
+
+
jPanel1.add(ok);
jPanel1.add(cancel);
+
jPanel2.add(annotations);
jPanel2.add(currentColours);
jPanel2.add(minColour);
jPanel2.add(maxColour);
- jPanel3.add(threshold);
- jPanel3.add(slider);
- jPanel3.add(thresholdValue);
- jPanel3.add(thresholdIsMin);
- this.add(jPanel2, java.awt.BorderLayout.NORTH);
- this.add(jPanel3, java.awt.BorderLayout.CENTER);
+
+
+ jPanel4.add(thresholdIsMin, BorderLayout.WEST);
+ jPanel4.add(slider, BorderLayout.CENTER);
+ jPanel4.add(thresholdValue, BorderLayout.EAST);
+
+ Panel jPanel34 = new Panel();
+ jPanel34.setLayout(new BorderLayout());
+ jPanel34.setBackground(Color.white);
+ jPanel34.add(jPanel2, BorderLayout.NORTH);
+ jPanel34.add(threshold, BorderLayout.WEST);
+ jPanel3.add(defColours);
+ jPanel34.add(jPanel3, BorderLayout.EAST);
+ jPanel34.add(jPanel4, BorderLayout.SOUTH);
+
+ this.add(jPanel34, java.awt.BorderLayout.CENTER);
this.add(jPanel1, java.awt.BorderLayout.SOUTH);
+
}
Choice annotations = new Choice();
Button ok = new Button();
Button cancel = new Button();
+
+ Button defColours = new Button();
Panel jPanel1 = new Panel();
{
maxColour_actionPerformed(null);
}
-
+ else if (evt.getSource() == defColours)
+ {
+ defColour_actionPerformed();
+ }
else if (evt.getSource() == ok)
{
changeColour();
new UserDefinedColours(this, "Max Colour", maxColour.getBackground());
}
}
-
+ public void defColour_actionPerformed()
+ {
+ setDefaultMinMax();
+ minColour.repaint();
+ maxColour.repaint();
+ changeColour();
+ }
void changeColour()
{
// Check if combobox is still adjusting
slider.setEnabled(true);
thresholdValue.setEnabled(true);
+ thresholdIsMin.setEnabled(true);
if (aboveThreshold == AnnotationColourGradient.NO_THRESHOLD)
{
slider.setEnabled(false);
thresholdValue.setEnabled(false);
+ thresholdIsMin.setEnabled(false);
thresholdValue.setText("");
}
else if (aboveThreshold != AnnotationColourGradient.NO_THRESHOLD
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import java.awt.image.BufferedImage;
import jalview.datamodel.*;
+import jalview.util.ParseHtmlBodyAndLinks;
public class AnnotationLabels extends Panel implements ActionListener,
MouseListener, MouseMotionListener
if (row > -1)
{
+ ParseHtmlBodyAndLinks phb = new ParseHtmlBodyAndLinks(av.alignment.getAlignmentAnnotation()[row].getDescription(true), true, "\n");
if (tooltip == null)
{
- tooltip = new Tooltip(
- ap.av.alignment.getAlignmentAnnotation()[row]
- .getDescription(true),
- this);
+ tooltip = new Tooltip(phb.getNonHtmlContent(), this);
}
else
{
- tooltip.setTip(ap.av.alignment.getAlignmentAnnotation()[row]
- .getDescription(true));
+ tooltip.setTip(phb.getNonHtmlContent());
}
}
else if (tooltip != null)
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
// look for non-pos features
StringBuffer tooltiptext = new StringBuffer();
-
- if (sequence.getDescription() != null)
+ if (sequence != null)
{
- tooltiptext.append(sequence.getDescription());
- tooltiptext.append("\n");
- }
+ if (sequence.getDescription() != null)
+ {
+ tooltiptext.append(sequence.getDescription());
+ tooltiptext.append("\n");
+ }
- SequenceFeature sf[] = sequence.getSequenceFeatures();
- for (int sl = 0; sf != null && sl < sf.length; sl++)
- {
- if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0)
+ SequenceFeature sf[] = sequence.getSequenceFeatures();
+ for (int sl = 0; sf != null && sl < sf.length; sl++)
{
- boolean nl = false;
- if (sf[sl].getFeatureGroup() != null)
- {
- tooltiptext.append(sf[sl].getFeatureGroup());
- nl = true;
- }
- ;
- if (sf[sl].getType() != null)
- {
- tooltiptext.append(" ");
- tooltiptext.append(sf[sl].getType());
- nl = true;
- }
- ;
- if (sf[sl].getDescription() != null)
- {
- tooltiptext.append(" ");
- tooltiptext.append(sf[sl].getDescription());
- nl = true;
- }
- ;
- if (sf[sl].getScore() != Float.NaN && sf[sl].getScore() != 0f)
- {
- tooltiptext.append(" Score = ");
- tooltiptext.append(sf[sl].getScore());
- nl = true;
- }
- ;
- if (sf[sl].getStatus() != null && sf[sl].getStatus().length() > 0)
- {
- tooltiptext.append(" (");
- tooltiptext.append(sf[sl].getStatus());
- tooltiptext.append(")");
- nl = true;
- }
- ;
- if (nl)
+ if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0)
{
- tooltiptext.append("\n");
+ boolean nl = false;
+ if (sf[sl].getFeatureGroup() != null)
+ {
+ tooltiptext.append(sf[sl].getFeatureGroup());
+ nl = true;
+ }
+ ;
+ if (sf[sl].getType() != null)
+ {
+ tooltiptext.append(" ");
+ tooltiptext.append(sf[sl].getType());
+ nl = true;
+ }
+ ;
+ if (sf[sl].getDescription() != null)
+ {
+ tooltiptext.append(" ");
+ tooltiptext.append(sf[sl].getDescription());
+ nl = true;
+ }
+ ;
+ if (sf[sl].getScore() != Float.NaN && sf[sl].getScore() != 0f)
+ {
+ tooltiptext.append(" Score = ");
+ tooltiptext.append(sf[sl].getScore());
+ nl = true;
+ }
+ ;
+ if (sf[sl].getStatus() != null && sf[sl].getStatus().length() > 0)
+ {
+ tooltiptext.append(" (");
+ tooltiptext.append(sf[sl].getStatus());
+ tooltiptext.append(")");
+ nl = true;
+ }
+ ;
+ if (nl)
+ {
+ tooltiptext.append("\n");
+ }
}
}
}
-
if (tooltiptext.length() == 0)
{
// nothing to display - so clear tooltip if one is visible
// DEFAULT LINK IS FIRST IN THE LINK LIST
int seq = alignPanel.seqPanel.findSeq(e);
- String id = av.getAlignment().getSequenceAt(seq).getName();
+ SequenceI sq = av.getAlignment().getSequenceAt(seq);
+ if (sq==null)
+ {
+ return;
+ }
+ String id = sq.getName();
String target = null;
String url = null;
if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK)
{
Sequence sq = (Sequence) av.getAlignment().getSequenceAt(seq);
+
// build a new links menu based on the current links + any non-positional
// features
Vector nlinks = new Vector();
{
nlinks.addElement(links.elementAt(l));
}
- SequenceFeature sf[] = sq.getSequenceFeatures();
+ SequenceFeature sf[] = sq==null ? null:sq.getSequenceFeatures();
for (int sl = 0; sf != null && sl < sf.length; sl++)
{
if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0)
end = tmp;
lastid = end;
}
- if (av.getSelectionGroup()==null)
+ if (av.getSelectionGroup() == null)
{
av.setSelectionGroup(new SequenceGroup());
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
SequenceI sequence = av.alignment.getSequenceAt(findSeq(evt));
if (evt.getClickCount() > 1)
{
- if (av.getSelectionGroup().getSize() == 1
+ if (av.getSelectionGroup()!=null && av.getSelectionGroup().getSize() == 1
&& av.getSelectionGroup().getEndRes()
- av.getSelectionGroup().getStartRes() < 2)
{
}
if (repaint)
{
+ ap.scalePanelHolder.repaint();
ap.repaint();
- //ap.paintAlignment(false);
}
}
column = column<0 ? ap.av.startRes : column;
ap.scrollTo(row, row, column, true, true);
}
+ /**
+ * scroll to the given row - or nearest visible location
+ * @param row
+ */
+ public void scrollToRow(int row)
+ {
+
+ row = row<0 ? ap.av.startSeq : row;
+ ap.scrollTo(row, row, ap.av.startRes, true, true);
+ }
+ /**
+ * scroll to the given column - or nearest visible location
+ * @param column
+ */
+ public void scrollToColumn(int column)
+ {
+
+ column = column<0 ? ap.av.startRes : column;
+ ap.scrollTo(ap.av.startRes, ap.av.startRes, column, true, true);
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import java.awt.Color;
import java.io.*;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
import java.util.*;
import org.apache.log4j.*;
* </li>
* <li>logs.Jalview.Level - Cache.log stringified level. <br>
* </li>
- * <li>DISCOVERY_START - Boolean - controls if discovery services are queried on
- * startup</li>
- * <li>DISCOVERY_URLS - comma separated list of Discovery Service endpoints.</li>
* <li>SCREEN_WIDTH</li>
* <li>SCREEN_HEIGHT</li>
* <li>SCREEN_Y=285</li>
* <li>SHOW_MEMUSAGE boolean show memory usage and warning indicator on desktop
* (false)</li>
* <li>VERSION_CHECK (true) check for the latest release version from
- * www.jalview.org</li>
+ * www.jalview.org (or the alias given by the www.jalview.org property)</li>
* <li>SHOW_NPFEATS_TOOLTIP (true) show non-positional features in the Sequence
* ID tooltip</li>
* <li>SHOW_DBREFS_TOOLTIP (true) show Database Cross References in the Sequence
* warning dialog box is displayed.</li>
* <li>ANNOTATIONCOLOUR_MIN (orange) Shade used for minimum value of annotation when shading by annotation</li>
* <li>ANNOTATIONCOLOUR_MAX (red) Shade used for maximum value of annotation when shading by annotation</li>
- *
- * <li></li>
+ * <li>www.jalview.org (http://www.jalview.org) a property enabling all HTTP requests to be redirected to a mirror of http://www.jalview.org</li>
*
* <li></li>
*
* </ul>
- *
+ * Deprecated settings:
+ * <ul>
+ * * <li>DISCOVERY_START - Boolean - controls if discovery services are queried on
+ * startup (JWS1 services only)</li>
+ * <li>DISCOVERY_URLS - comma separated list of Discovery Service endpoints. (JWS1 services only)</li>
+ * <li>SHOW_JWS1_SERVICES (true) enable or disable the original Jalview 2 services in the desktop GUI</li>
+ * <li>ENABLE_RSBS_EDITOR (false for 2.7 release) enable or disable RSBS editing panel in web service preferences</li>
+ * </ul>
* @author $author$
* @version $Revision$
*/
System.setProperty("sun.net.client.defaultConnectTimeout",
"5000");
java.net.URL url = new java.net.URL(
- "http://www.jalview.org/webstart/jalview.jnlp");
+ Cache.getDefault("www.jalview.org", "http://www.jalview.org")+"/webstart/jalview.jnlp");
BufferedReader in = new BufferedReader(new InputStreamReader(
url.openStream()));
String line = null;
}
return (col==null) ? defcolour: col;
}
+
+ /**
+ * store a colour as a Jalview user default property
+ * @param property
+ * @param colour
+ */
+ public static void setColourProperty(String property, Color colour)
+ {
+ setProperty(property, jalview.util.Format
+ .getHexString(colour));
+ }
+
+ public static final DateFormat date_format = SimpleDateFormat.getDateTimeInstance();
+
+ /**
+ * store a date in a jalview property
+ * @param string
+ * @param time
+ */
+ public static void setDateProperty(String property, Date time)
+ {
+ setProperty(property, date_format.format(time));
+ }
+ /**
+ * read a date stored in a jalview property
+ * @param property
+ * @return valid date as stored by setDateProperty, or null
+ *
+ */
+ public static Date getDateProperty(String property)
+ {
+ String val = getProperty(property);
+ if (val!=null)
+ {
+ try {
+ return date_format.parse(val);
+ } catch (Exception ex)
+ {
+ System.err.println("Invalid or corrupt date in property '"+property+"' : value was '"+val+"'");
+ }
+ }
+ return null;
+ }
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.reflect.Constructor;
+import java.net.MalformedURLException;
+import java.net.URI;
import java.net.URL;
import java.net.URLDecoder;
import java.security.AllPermission;
}
}
}
+ long progress=-1;
// Finally, deal with the remaining input data.
if (file != null)
{
+ if (!headless)
+ {
+ desktop.setProgressBar("Processing commandline arguments...", progress=System.currentTimeMillis());
+ }
System.out.println("Opening file: " + file);
if (!file.startsWith("http://"))
&& jalview.bin.Cache.getDefault("SHOW_STARTUP_FILE", true))
{
file = jalview.bin.Cache.getDefault("STARTUP_FILE",
- "http://www.jalview.org/examples/exampleFile_2_3.jar");
-
+ jalview.bin.Cache.getDefault("www.jalview.org", "http://www.jalview.org")+"/examples/exampleFile_2_7.jar");
+ if (file.equals("http://www.jalview.org/examples/exampleFile_2_3.jar"))
+ {
+ // hardwire upgrade of the startup file
+ file.replace("_2_3.jar","_2_7.jar");
+ // and remove the stale setting
+ jalview.bin.Cache.removeProperty("STARTUP_FILE");
+ }
+
protocol = "File";
if (file.indexOf("http:") > -1)
// and finally, turn off batch mode indicator - if the desktop still exists
if (desktop != null)
{
+ if (progress!=-1) {
+ desktop.setProgressBar(null, progress);
+ }
desktop.setInBatchMode(false);
}
}
System.err
.println("Sorry. Groovy support is currently only available when running with the Jalview GUI enabled.");
}
- File sfile = null;
+ /**
+ * for scripts contained in files
+ */
+ File tfile = null;
+ /**
+ * script's URI
+ */
+ URL sfile = null;
if (groovyscript.trim().equals("STDIN"))
{
// read from stdin into a tempfile and execute it
try
{
- sfile = File.createTempFile("jalview", "groovy");
+ tfile = File.createTempFile("jalview", "groovy");
PrintWriter outfile = new PrintWriter(new OutputStreamWriter(
- new FileOutputStream(sfile)));
+ new FileOutputStream(tfile)));
BufferedReader br = new BufferedReader(
new java.io.InputStreamReader(System.in));
String line = null;
} catch (Exception ex)
{
System.err.println("Failed to read from STDIN into tempfile "
- + ((sfile == null) ? "(tempfile wasn't created)" : sfile
+ + ((tfile == null) ? "(tempfile wasn't created)" : tfile
.toString()));
ex.printStackTrace();
return;
}
+ try {
+ sfile = tfile.toURI().toURL();
+ } catch (Exception x)
+ {
+ System.err.println("Unexpected Malformed URL Exception for temporary file created from STDIN: "+tfile.toURI());
+ x.printStackTrace();
+ return;
+ }
}
else
{
- sfile = new File(groovyscript);
- }
- if (!sfile.exists())
- {
- System.err.println("File '" + groovyscript + "' does not exist.");
- return;
- }
- if (!sfile.canRead())
- {
- System.err.println("File '" + groovyscript + "' cannot be read.");
- return;
- }
- if (sfile.length() < 1)
- {
- System.err.println("File '" + groovyscript + "' is empty.");
- return;
+ try
+ {
+ sfile = new URI(groovyscript).toURL();
+ } catch (Exception x)
+ {
+ tfile = new File(groovyscript);
+ if (!tfile.exists())
+ {
+ System.err.println("File '" + groovyscript + "' does not exist.");
+ return;
+ }
+ if (!tfile.canRead())
+ {
+ System.err.println("File '" + groovyscript + "' cannot be read.");
+ return;
+ }
+ if (tfile.length() < 1)
+ {
+ System.err.println("File '" + groovyscript + "' is empty.");
+ return;
+ }
+ try {
+ sfile = tfile.getAbsoluteFile().toURI().toURL();
+ } catch (Exception ex)
+ {
+ System.err.println("Failed to create a file URL for "+tfile.getAbsoluteFile());
+ return;
+ }
+ }
}
boolean success = false;
try
*/
Class[] bspec;
Object[] binding;
- int blen=((jalviewContext[0]==null) ? 0 : 1) + ((jalviewContext[1]==null) ? 0 : 1);
- String cnames[] = new String[] { "Jalview", "currentAlFrame"};
- bspec=new Class[blen*2];
- binding=new Object[blen*2];
- blen=0;
- ClassLoader cl=null;
- for (int jc=0;jc<jalviewContext.length;jc++)
- {
- if (jalviewContext[jc]!=null) {
- if (cl==null)
- {
- cl = jalviewContext[jc].getClass().getClassLoader();
- }
- bspec[blen*2] = String.class;
- bspec[blen*2+1] = Object.class;
- binding[blen*2]=cnames[jc];
- binding[blen*2+1]=jalviewContext[jc];
- blen++;
+ int blen = ((jalviewContext[0] == null) ? 0 : 1)
+ + ((jalviewContext[1] == null) ? 0 : 1);
+ String cnames[] = new String[]
+ { "Jalview", "currentAlFrame" };
+ bspec = new Class[blen * 2];
+ binding = new Object[blen * 2];
+ blen = 0;
+ ClassLoader cl = null;
+ Map vbinding = new Hashtable();
+ for (int jc = 0; jc < jalviewContext.length; jc++)
+ {
+ if (jalviewContext[jc] != null)
+ {
+ if (cl == null)
+ {
+ cl = jalviewContext[jc].getClass().getClassLoader();
+ }
+ bspec[blen * 2] = String.class;
+ bspec[blen * 2 + 1] = Object.class;
+ binding[blen * 2] = cnames[jc];
+ binding[blen * 2 + 1] = jalviewContext[jc];
+ vbinding.put(cnames[jc], jalviewContext[jc]);
+ blen++;
}
}
Class gbindingc = cl.loadClass("groovy.lang.Binding");
- Constructor gbcons = gbindingc.getConstructor(null);
- Object gbinding = gbcons.newInstance(null);
-
- java.lang.reflect.Method setvar = gbindingc.getMethod("setVariable",
- bspec);
-
- setvar.invoke(gbinding, binding);
+ Constructor gbcons;
+ Object gbinding;
+ try
+ {
+ gbcons = gbindingc.getConstructor(Map.class);
+ gbinding = gbcons.newInstance(vbinding);
+ } catch (NoSuchMethodException x)
+ {
+ // old style binding config - using series of string/object values to
+ // setVariable.
+ gbcons = gbindingc.getConstructor(null);
+ gbinding = gbcons.newInstance(null);
+ java.lang.reflect.Method setvar = gbindingc.getMethod(
+ "setVariable", bspec);
+ setvar.invoke(gbinding, binding);
+ }
+ ;
Class gsec = cl.loadClass("groovy.util.GroovyScriptEngine");
Constructor gseccons = gsec.getConstructor(new Class[]
{ URL[].class }); // String[].class });
Object gse = gseccons.newInstance(new Object[]
{ new URL[]
- { sfile.toURL() } }); // .toString() } });
+ { sfile } }); // .toString() } });
java.lang.reflect.Method run = gsec.getMethod("run", new Class[]
{ String.class, gbindingc });
run.invoke(gse, new Object[]
- { sfile.getName(), gbinding });
+ { sfile.toString(), gbinding });
success = true;
} catch (Exception e)
{
{
// delete temp file that we made - but only if it was successfully
// executed
- sfile.delete();
+ tfile.delete();
}
}
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
import java.awt.Button;\r
import java.awt.Color;\r
import java.awt.Component;\r
+import java.awt.EventQueue;\r
import java.awt.Font;\r
import java.awt.Frame;\r
import java.awt.Graphics;\r
import java.awt.event.WindowEvent;\r
import java.io.BufferedReader;\r
import java.io.InputStreamReader;\r
+import java.net.URL;\r
import java.util.Hashtable;\r
import java.util.StringTokenizer;\r
import java.util.Vector;\r
* @author $author$\r
* @version $Revision: 1.92 $\r
*/\r
-public class JalviewLite extends Applet implements StructureSelectionManagerProvider, JalviewLiteJsApi\r
+public class JalviewLite extends Applet implements\r
+ StructureSelectionManagerProvider, JalviewLiteJsApi\r
{\r
\r
+ public StructureSelectionManager getStructureSelectionManager()\r
+ {\r
+ return StructureSelectionManager.getStructureSelectionManager(this);\r
+ }\r
+\r
// /////////////////////////////////////////\r
// The following public methods maybe called\r
// externally, eg via javascript in HTML page\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#getSelectedSequences()\r
*/\r
public String getSelectedSequences()\r
return getSelectedSequencesFrom(getDefaultTargetFrame());\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#getSelectedSequences(java.lang.String)\r
*/\r
public String getSelectedSequences(String sep)\r
return getSelectedSequencesFrom(getDefaultTargetFrame(), sep);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getSelectedSequencesFrom(jalview.appletgui.AlignFrame)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getSelectedSequencesFrom(jalview.appletgui\r
+ * .AlignFrame)\r
*/\r
public String getSelectedSequencesFrom(AlignFrame alf)\r
{\r
return getSelectedSequencesFrom(alf, separator); // ""+0x00AC);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getSelectedSequencesFrom(jalview.appletgui.AlignFrame, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getSelectedSequencesFrom(jalview.appletgui\r
+ * .AlignFrame, java.lang.String)\r
*/\r
public String getSelectedSequencesFrom(AlignFrame alf, String sep)\r
{\r
return result.toString();\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#highlight(java.lang.String, java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#highlight(java.lang.String,\r
+ * java.lang.String, java.lang.String)\r
*/\r
public void highlight(String sequenceId, String position,\r
String alignedPosition)\r
alignedPosition);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#highlightIn(jalview.appletgui.AlignFrame, java.lang.String, java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#highlightIn(jalview.appletgui.AlignFrame,\r
+ * java.lang.String, java.lang.String, java.lang.String)\r
*/\r
- public void highlightIn(AlignFrame alf, String sequenceId,\r
- String position, String alignedPosition)\r
+ public void highlightIn(final AlignFrame alf, final String sequenceId,\r
+ final String position, final String alignedPosition)\r
{\r
// TODO: could try to highlight in all alignments if alf==null\r
jalview.analysis.SequenceIdMatcher matcher = new jalview.analysis.SequenceIdMatcher(\r
alf.viewport.getAlignment().getSequencesArray());\r
- SequenceI sq = matcher.findIdMatch(sequenceId);\r
+ final SequenceI sq = matcher.findIdMatch(sequenceId);\r
if (sq != null)\r
{\r
- int pos, apos = -1;\r
+ int apos = -1;\r
try\r
{\r
apos = new Integer(position).intValue();\r
{\r
return;\r
}\r
+ final StructureSelectionManagerProvider me = this;\r
+ final int pos = apos;\r
// use vamsas listener to broadcast to all listeners in scope\r
if (alignedPosition != null\r
&& (alignedPosition.trim().length() == 0 || alignedPosition\r
.toLowerCase().indexOf("false") > -1))\r
{\r
- StructureSelectionManager.getStructureSelectionManager(this)\r
- .mouseOverVamsasSequence(sq, sq.findIndex(apos), null);\r
+ java.awt.EventQueue.invokeLater(new Runnable()\r
+ {\r
+ @Override\r
+ public void run()\r
+ {\r
+ StructureSelectionManager.getStructureSelectionManager(me)\r
+ .mouseOverVamsasSequence(sq, sq.findIndex(pos), null);\r
+ }\r
+ });\r
}\r
else\r
{\r
- StructureSelectionManager.getStructureSelectionManager(this)\r
- .mouseOverVamsasSequence(sq, apos, null);\r
+ java.awt.EventQueue.invokeLater(new Runnable()\r
+ {\r
+ @Override\r
+ public void run()\r
+ {\r
+ StructureSelectionManager.getStructureSelectionManager(me)\r
+ .mouseOverVamsasSequence(sq, pos, null);\r
+ }\r
+ });\r
}\r
-\r
}\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#select(java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#select(java.lang.String,\r
+ * java.lang.String)\r
*/\r
public void select(String sequenceIds, String columns)\r
{\r
selectIn(getDefaultTargetFrame(), sequenceIds, columns, separator);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#select(java.lang.String, java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#select(java.lang.String,\r
+ * java.lang.String, java.lang.String)\r
*/\r
public void select(String sequenceIds, String columns, String sep)\r
{\r
selectIn(getDefaultTargetFrame(), sequenceIds, columns, sep);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#selectIn(jalview.appletgui.AlignFrame, java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#selectIn(jalview.appletgui.AlignFrame,\r
+ * java.lang.String, java.lang.String)\r
*/\r
public void selectIn(AlignFrame alf, String sequenceIds, String columns)\r
{\r
selectIn(alf, sequenceIds, columns, separator);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#selectIn(jalview.appletgui.AlignFrame, java.lang.String, java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#selectIn(jalview.appletgui.AlignFrame,\r
+ * java.lang.String, java.lang.String, java.lang.String)\r
*/\r
- public void selectIn(AlignFrame alf, String sequenceIds, String columns,\r
- String sep)\r
+ public void selectIn(final AlignFrame alf, String sequenceIds,\r
+ String columns, String sep)\r
{\r
if (sep == null || sep.length() == 0)\r
{\r
// deparse fields\r
String[] ids = separatorListToArray(sequenceIds, sep);\r
String[] cols = separatorListToArray(columns, sep);\r
- SequenceGroup sel = new SequenceGroup();\r
- ColumnSelection csel = new ColumnSelection();\r
+ final SequenceGroup sel = new SequenceGroup();\r
+ final ColumnSelection csel = new ColumnSelection();\r
AlignmentI al = alf.viewport.getAlignment();\r
jalview.analysis.SequenceIdMatcher matcher = new jalview.analysis.SequenceIdMatcher(\r
alf.viewport.getAlignment().getSequencesArray());\r
}\r
sel.setStartRes(start);\r
sel.setEndRes(end);\r
- alf.select(sel, csel);\r
+ EventQueue.invokeLater(new Runnable()\r
+ {\r
+ @Override\r
+ public void run()\r
+ {\r
+ alf.select(sel, csel);\r
+ }\r
+ });\r
}\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getSelectedSequencesAsAlignment(java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getSelectedSequencesAsAlignment(java.lang.\r
+ * String, java.lang.String)\r
*/\r
public String getSelectedSequencesAsAlignment(String format, String suffix)\r
{\r
format, suffix);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getSelectedSequencesAsAlignmentFrom(jalview.appletgui.AlignFrame, java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getSelectedSequencesAsAlignmentFrom(jalview\r
+ * .appletgui.AlignFrame, java.lang.String, java.lang.String)\r
*/\r
public String getSelectedSequencesAsAlignmentFrom(AlignFrame alf,\r
String format, String suffix)\r
return "";\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#getAlignmentOrder()\r
*/\r
public String getAlignmentOrder()\r
return getAlignmentOrderFrom(getDefaultTargetFrame());\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getAlignmentOrderFrom(jalview.appletgui.AlignFrame)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getAlignmentOrderFrom(jalview.appletgui.AlignFrame\r
+ * )\r
*/\r
public String getAlignmentOrderFrom(AlignFrame alf)\r
{\r
return getAlignmentOrderFrom(alf, separator);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getAlignmentOrderFrom(jalview.appletgui.AlignFrame, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getAlignmentOrderFrom(jalview.appletgui.AlignFrame\r
+ * , java.lang.String)\r
*/\r
public String getAlignmentOrderFrom(AlignFrame alf, String sep)\r
{\r
return arrayToSeparatorList(order);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#orderBy(java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#orderBy(java.lang.String,\r
+ * java.lang.String)\r
*/\r
public String orderBy(String order, String undoName)\r
{\r
return orderBy(order, undoName, separator);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#orderBy(java.lang.String, java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#orderBy(java.lang.String,\r
+ * java.lang.String, java.lang.String)\r
*/\r
public String orderBy(String order, String undoName, String sep)\r
{\r
return orderAlignmentBy(getDefaultTargetFrame(), order, undoName, sep);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#orderAlignmentBy(jalview.appletgui.AlignFrame, java.lang.String, java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#orderAlignmentBy(jalview.appletgui.AlignFrame,\r
+ * java.lang.String, java.lang.String, java.lang.String)\r
*/\r
public String orderAlignmentBy(AlignFrame alf, String order,\r
String undoName, String sep)\r
return "";\r
}\r
;\r
- AlignmentOrder aorder = new AlignmentOrder(sqs);\r
+ final AlignmentOrder aorder = new AlignmentOrder(sqs);\r
\r
if (undoName != null && undoName.trim().length() == 0)\r
{\r
undoName = null;\r
}\r
-\r
- return alf.sortBy(aorder, undoName) ? "true" : "";\r
+ final String _undoName = undoName;\r
+ // TODO: deal with synchronization here: cannot raise any events until after\r
+ // this has returned.\r
+ return alf.sortBy(aorder, _undoName) ? "true" : "";\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#getAlignment(java.lang.String)\r
*/\r
public String getAlignment(String format)\r
return getAlignmentFrom(getDefaultTargetFrame(), format, "true");\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getAlignmentFrom(jalview.appletgui.AlignFrame, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getAlignmentFrom(jalview.appletgui.AlignFrame,\r
+ * java.lang.String)\r
*/\r
public String getAlignmentFrom(AlignFrame alf, String format)\r
{\r
return getAlignmentFrom(alf, format, "true");\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getAlignment(java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#getAlignment(java.lang.String,\r
+ * java.lang.String)\r
*/\r
public String getAlignment(String format, String suffix)\r
{\r
return getAlignmentFrom(getDefaultTargetFrame(), format, suffix);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getAlignmentFrom(jalview.appletgui.AlignFrame, java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getAlignmentFrom(jalview.appletgui.AlignFrame,\r
+ * java.lang.String, java.lang.String)\r
*/\r
public String getAlignmentFrom(AlignFrame alf, String format,\r
String suffix)\r
}\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#loadAnnotation(java.lang.String)\r
*/\r
public void loadAnnotation(String annotation)\r
loadAnnotationFrom(getDefaultTargetFrame(), annotation);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#loadAnnotationFrom(jalview.appletgui.AlignFrame, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#loadAnnotationFrom(jalview.appletgui.AlignFrame\r
+ * , java.lang.String)\r
*/\r
public void loadAnnotationFrom(AlignFrame alf, String annotation)\r
{\r
}\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#getFeatures(java.lang.String)\r
*/\r
public String getFeatures(String format)\r
return getFeaturesFrom(getDefaultTargetFrame(), format);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getFeaturesFrom(jalview.appletgui.AlignFrame, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getFeaturesFrom(jalview.appletgui.AlignFrame,\r
+ * java.lang.String)\r
*/\r
public String getFeaturesFrom(AlignFrame alf, String format)\r
{\r
return alf.outputFeatures(false, format);\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#getAnnotation()\r
*/\r
public String getAnnotation()\r
return getAnnotationFrom(getDefaultTargetFrame());\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getAnnotationFrom(jalview.appletgui.AlignFrame)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getAnnotationFrom(jalview.appletgui.AlignFrame\r
+ * )\r
*/\r
public String getAnnotationFrom(AlignFrame alf)\r
{\r
return alf.outputAnnotations(false);\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#newView()\r
*/\r
public AlignFrame newView()\r
return newViewFrom(getDefaultTargetFrame());\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#newView(java.lang.String)\r
*/\r
public AlignFrame newView(String name)\r
return newViewFrom(getDefaultTargetFrame(), name);\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#newViewFrom(jalview.appletgui.AlignFrame)\r
*/\r
public AlignFrame newViewFrom(AlignFrame alf)\r
return alf.newView(null);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#newViewFrom(jalview.appletgui.AlignFrame, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#newViewFrom(jalview.appletgui.AlignFrame,\r
+ * java.lang.String)\r
*/\r
public AlignFrame newViewFrom(AlignFrame alf, String name)\r
{\r
return alf.newView(name);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#loadAlignment(java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#loadAlignment(java.lang.String,\r
+ * java.lang.String)\r
*/\r
public AlignFrame loadAlignment(String text, String title)\r
{\r
return null;\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#setMouseoverListener(java.lang.String)\r
*/\r
public void setMouseoverListener(String listener)\r
\r
private Vector<jalview.javascript.JSFunctionExec> javascriptListeners = new Vector<jalview.javascript.JSFunctionExec>();\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#setMouseoverListener(jalview.appletgui.AlignFrame, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#setMouseoverListener(jalview.appletgui.AlignFrame\r
+ * , java.lang.String)\r
*/\r
public void setMouseoverListener(AlignFrame af, String listener)\r
{\r
}\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#setSelectionListener(java.lang.String)\r
*/\r
public void setSelectionListener(String listener)\r
setSelectionListener(null, listener);\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#setSelectionListener(jalview.appletgui.AlignFrame, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#setSelectionListener(jalview.appletgui.AlignFrame\r
+ * , java.lang.String)\r
*/\r
public void setSelectionListener(AlignFrame af, String listener)\r
{\r
}\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#setStructureListener(java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#setStructureListener(java.lang.String,\r
+ * java.lang.String)\r
*/\r
public void setStructureListener(String listener, String modelSet)\r
{\r
}\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#removeJavascriptListener(jalview.appletgui.AlignFrame, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#removeJavascriptListener(jalview.appletgui\r
+ * .AlignFrame, java.lang.String)\r
*/\r
public void removeJavascriptListener(AlignFrame af, String listener)\r
{\r
\r
public void stop()\r
{\r
- System.err.println("Applet "+getName()+" stop().");\r
+ System.err.println("Applet " + getName() + " stop().");\r
tidyUp();\r
}\r
+\r
public void destroy()\r
{\r
- System.err.println("Applet "+getName()+" destroy().");\r
+ System.err.println("Applet " + getName() + " destroy().");\r
tidyUp();\r
}\r
+\r
private void tidyUp()\r
{\r
removeAll();\r
- if (currentAlignFrame!=null && currentAlignFrame.viewport!=null\r
- && currentAlignFrame.viewport.applet!=null)\r
+ if (currentAlignFrame != null && currentAlignFrame.viewport != null\r
+ && currentAlignFrame.viewport.applet != null)\r
{\r
AlignViewport av = currentAlignFrame.viewport;\r
currentAlignFrame.closeMenuItem_actionPerformed();\r
- av.applet=null;\r
- currentAlignFrame=null;\r
+ av.applet = null;\r
+ currentAlignFrame = null;\r
}\r
if (javascriptListeners != null)\r
{\r
while (javascriptListeners.size() > 0)\r
{\r
- jalview.javascript.JSFunctionExec mol = javascriptListeners.elementAt(0);\r
+ jalview.javascript.JSFunctionExec mol = javascriptListeners\r
+ .elementAt(0);\r
javascriptListeners.removeElement(mol);\r
if (mol instanceof SelectionListener)\r
{\r
StructureSelectionManager.getStructureSelectionManager(this)\r
.removeStructureViewerListener(mol, null);\r
}\r
- mol.jvlite=null;\r
+ mol.jvlite = null;\r
}\r
}\r
- if (jsFunctionExec!=null) {\r
+ if (jsFunctionExec != null)\r
+ {\r
jsFunctionExec.stopQueue();\r
- jsFunctionExec.jvlite=null;\r
+ jsFunctionExec.jvlite = null;\r
}\r
- initialAlignFrame=null;\r
+ initialAlignFrame = null;\r
jsFunctionExec = null;\r
- javascriptListeners=null;\r
+ javascriptListeners = null;\r
StructureSelectionManager.release(this);\r
}\r
+\r
private jalview.javascript.JSFunctionExec jsFunctionExec;\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#mouseOverStructure(java.lang.String, java.lang.String, java.lang.String)\r
+\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#mouseOverStructure(java.lang.String,\r
+ * java.lang.String, java.lang.String)\r
*/\r
- public void mouseOverStructure(String pdbResNum, String chain,\r
- String pdbfile)\r
+ public void mouseOverStructure(final String pdbResNum,\r
+ final String chain, final String pdbfile)\r
{\r
- try\r
+ final StructureSelectionManagerProvider me = this;\r
+ java.awt.EventQueue.invokeLater(new Runnable()\r
{\r
- StructureSelectionManager.getStructureSelectionManager(this)\r
- .mouseOverStructure(new Integer(pdbResNum).intValue(), chain,\r
- pdbfile);\r
- if (debug)\r
+ @Override\r
+ public void run()\r
{\r
- System.err.println("mouseOver for '" + pdbResNum + "' in chain '"\r
- + chain + "' in structure '" + pdbfile + "'");\r
+ try\r
+ {\r
+ StructureSelectionManager.getStructureSelectionManager(me)\r
+ .mouseOverStructure(new Integer(pdbResNum).intValue(),\r
+ chain, pdbfile);\r
+ if (debug)\r
+ {\r
+ System.err.println("mouseOver for '" + pdbResNum\r
+ + "' in chain '" + chain + "' in structure '" + pdbfile\r
+ + "'");\r
+ }\r
+ } catch (NumberFormatException e)\r
+ {\r
+ System.err.println("Ignoring invalid residue number string '"\r
+ + pdbResNum + "'");\r
+ }\r
+\r
}\r
- } catch (NumberFormatException e)\r
+ });\r
+ }\r
+\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#scrollViewToIn(jalview.appletgui.AlignFrame,\r
+ * java.lang.String, java.lang.String)\r
+ */\r
+ public void scrollViewToIn(final AlignFrame alf, final String topRow,\r
+ final String leftHandColumn)\r
+ {\r
+ java.awt.EventQueue.invokeLater(new Runnable()\r
{\r
- System.err.println("Ignoring invalid residue number string '"\r
- + pdbResNum + "'");\r
- }\r
+ @Override\r
+ public void run()\r
+ {\r
+ try\r
+ {\r
+ alf.scrollTo(new Integer(topRow).intValue(), new Integer(\r
+ leftHandColumn).intValue());\r
+\r
+ } catch (Exception ex)\r
+ {\r
+ System.err.println("Couldn't parse integer arguments (topRow='"\r
+ + topRow + "' and leftHandColumn='" + leftHandColumn\r
+ + "')");\r
+ ex.printStackTrace();\r
+ }\r
+ }\r
+ });\r
}\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#scrollViewToIn(jalview.appletgui.AlignFrame, java.lang.String, java.lang.String)\r
+\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.javascript.JalviewLiteJsApi#scrollViewToRowIn(jalview.appletgui\r
+ * .AlignFrame, java.lang.String)\r
*/\r
- public void scrollViewToIn(AlignFrame alf, String topRow, String leftHandColumn)\r
+ @Override\r
+ public void scrollViewToRowIn(final AlignFrame alf, final String topRow)\r
{\r
- try {\r
- alf.scrollTo(new Integer(topRow).intValue(), new Integer(leftHandColumn).intValue());\r
- \r
- } catch (Exception ex)\r
+\r
+ java.awt.EventQueue.invokeLater(new Runnable()\r
{\r
- System.err.println("Couldn't parse integer arguments (topRow='"+topRow+"' and leftHandColumn='"+leftHandColumn+"'");\r
- ex.printStackTrace();\r
- }\r
+ @Override\r
+ public void run()\r
+ {\r
+ try\r
+ {\r
+ alf.scrollToRow(new Integer(topRow).intValue());\r
+\r
+ } catch (Exception ex)\r
+ {\r
+ System.err.println("Couldn't parse integer arguments (topRow='"\r
+ + topRow + "')");\r
+ ex.printStackTrace();\r
+ }\r
+\r
+ }\r
+ });\r
+ }\r
+\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.javascript.JalviewLiteJsApi#scrollViewToColumnIn(jalview.appletgui\r
+ * .AlignFrame, java.lang.String)\r
+ */\r
+ @Override\r
+ public void scrollViewToColumnIn(final AlignFrame alf,\r
+ final String leftHandColumn)\r
+ {\r
+ java.awt.EventQueue.invokeLater(new Runnable()\r
+ {\r
+\r
+ @Override\r
+ public void run()\r
+ {\r
+ try\r
+ {\r
+ alf.scrollToColumn(new Integer(leftHandColumn).intValue());\r
+\r
+ } catch (Exception ex)\r
+ {\r
+ System.err\r
+ .println("Couldn't parse integer arguments (leftHandColumn='"\r
+ + leftHandColumn + "')");\r
+ ex.printStackTrace();\r
+ }\r
+ }\r
+ });\r
+\r
}\r
\r
// //////////////////////////////////////////////\r
{\r
vp.applet.currentAlignFrame = null;\r
}\r
- vp.applet=null;\r
- vp=null;\r
- \r
+ vp.applet = null;\r
+ vp = null;\r
+\r
}\r
lastFrameX -= 40;\r
lastFrameY -= 40;\r
{\r
if (file.indexOf("://") == -1)\r
{\r
- String fl = applet.getDocumentBase() + file;\r
+ String fl = applet.resolveUrlForLocalOrAbsolute(file,\r
+ getDocumentBase());\r
try\r
{\r
if (new java.net.URL(fl).openStream() != null)\r
{\r
}\r
;\r
- fl = applet.getCodeBase() + file;\r
+ fl = applet.resolveUrlForLocalOrAbsolute(file, getCodeBase());\r
try\r
{\r
if (new java.net.URL(fl).openStream() != null)\r
{\r
if (debug)\r
{\r
- if (debug)\r
- {\r
- System.err.println("Prepended codebase for resource: '"\r
- + file + "'");\r
- }\r
- return fl;\r
+ System.err.println("Prepended codebase for resource: '"\r
+ + file + "'");\r
}\r
+ return fl;\r
}\r
} catch (Exception x)\r
{\r
// IDS include pipes.\r
\r
/**\r
- * set to enable the URL based javascript execution mechanism \r
+ * set to enable the URL based javascript execution mechanism\r
*/\r
- public boolean jsfallbackEnabled=false;\r
+ public boolean jsfallbackEnabled = false;\r
\r
/**\r
* parse the string into a list\r
return "" + separator;\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#getFeatureGroups()\r
*/\r
public String getFeatureGroups()\r
return lst;\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getFeatureGroupsOn(jalview.appletgui.AlignFrame)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getFeatureGroupsOn(jalview.appletgui.AlignFrame\r
+ * )\r
*/\r
public String getFeatureGroupsOn(AlignFrame alf)\r
{\r
return lst;\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#getFeatureGroupsOfState(boolean)\r
*/\r
public String getFeatureGroupsOfState(boolean visible)\r
.getFeatureGroupsOfState(visible));\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getFeatureGroupsOfStateOn(jalview.appletgui.AlignFrame, boolean)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * jalview.bin.JalviewLiteJsApi#getFeatureGroupsOfStateOn(jalview.appletgui\r
+ * .AlignFrame, boolean)\r
*/\r
public String getFeatureGroupsOfStateOn(AlignFrame alf, boolean visible)\r
{\r
return arrayToSeparatorList(alf.getFeatureGroupsOfState(visible));\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#setFeatureGroupStateOn(jalview.appletgui.AlignFrame, java.lang.String, boolean)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#setFeatureGroupStateOn(jalview.appletgui.\r
+ * AlignFrame, java.lang.String, boolean)\r
*/\r
- public void setFeatureGroupStateOn(AlignFrame alf, String groups,\r
- boolean state)\r
+ public void setFeatureGroupStateOn(final AlignFrame alf,\r
+ final String groups, boolean state)\r
{\r
- boolean st = state;// !(state==null || state.equals("") ||\r
+ final boolean st = state;// !(state==null || state.equals("") ||\r
// state.toLowerCase().equals("false"));\r
- alf.setFeatureGroupState(separatorListToArray(groups), st);\r
+ java.awt.EventQueue.invokeLater(new Runnable()\r
+ {\r
+ @Override\r
+ public void run()\r
+ {\r
+ alf.setFeatureGroupState(separatorListToArray(groups), st);\r
+ }\r
+ });\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#setFeatureGroupState(java.lang.String, boolean)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#setFeatureGroupState(java.lang.String,\r
+ * boolean)\r
*/\r
public void setFeatureGroupState(String groups, boolean state)\r
{\r
setFeatureGroupStateOn(getDefaultTargetFrame(), groups, state);\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#getSeparator()\r
*/\r
public String getSeparator()\r
return separator;\r
}\r
\r
- /* (non-Javadoc)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
* @see jalview.bin.JalviewLiteJsApi#setSeparator(java.lang.String)\r
*/\r
public void setSeparator(String separator)\r
return false;\r
}\r
\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#addPdbFile(jalview.appletgui.AlignFrame, java.lang.String, java.lang.String, java.lang.String)\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#addPdbFile(jalview.appletgui.AlignFrame,\r
+ * java.lang.String, java.lang.String, java.lang.String)\r
*/\r
public boolean addPdbFile(AlignFrame alFrame, String sequenceId,\r
String pdbEntryString, String pdbFile)\r
\r
public void start()\r
{\r
-// callInitCallback();\r
+ // callInitCallback();\r
}\r
- private Hashtable<String,long[]> jshashes=new Hashtable<String,long[]>();\r
- private Hashtable<String,Hashtable<String,String[]>> jsmessages=new Hashtable<String,Hashtable<String,String[]>>();\r
+\r
+ private Hashtable<String, long[]> jshashes = new Hashtable<String, long[]>();\r
+\r
+ private Hashtable<String, Hashtable<String, String[]>> jsmessages = new Hashtable<String, Hashtable<String, String[]>>();\r
+\r
public void setJsMessageSet(String messageclass, String viewId,\r
String[] colcommands)\r
{\r
- Hashtable<String,String[]> msgset = jsmessages.get(messageclass);\r
- if (msgset==null)\r
+ Hashtable<String, String[]> msgset = jsmessages.get(messageclass);\r
+ if (msgset == null)\r
{\r
- msgset=new Hashtable<String,String[]>();\r
+ msgset = new Hashtable<String, String[]>();\r
jsmessages.put(messageclass, msgset);\r
}\r
msgset.put(viewId, colcommands);\r
long[] l = new long[colcommands.length];\r
- for (int i=0;i<colcommands.length;i++) { l[i] = colcommands[i].hashCode();}\r
- jshashes.put(messageclass+"|"+viewId,l);\r
+ for (int i = 0; i < colcommands.length; i++)\r
+ {\r
+ l[i] = colcommands[i].hashCode();\r
+ }\r
+ jshashes.put(messageclass + "|" + viewId, l);\r
}\r
- /* (non-Javadoc)\r
- * @see jalview.bin.JalviewLiteJsApi#getJsMessage(java.lang.String, java.lang.String)\r
+\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see jalview.bin.JalviewLiteJsApi#getJsMessage(java.lang.String,\r
+ * java.lang.String)\r
*/\r
public String getJsMessage(String messageclass, String viewId)\r
{\r
- Hashtable<String,String[]> msgset = jsmessages.get(messageclass);\r
- if (msgset!=null)\r
+ Hashtable<String, String[]> msgset = jsmessages.get(messageclass);\r
+ if (msgset != null)\r
{\r
String[] msgs = msgset.get(viewId);\r
- if (msgs!=null)\r
+ if (msgs != null)\r
{\r
- for (int i=0;i<msgs.length;i++) {\r
- if (msgs[i]!=null) {\r
+ for (int i = 0; i < msgs.length; i++)\r
+ {\r
+ if (msgs[i] != null)\r
+ {\r
String m = msgs[i];\r
- msgs[i]=null;\r
+ msgs[i] = null;\r
return m;\r
}\r
}\r
public boolean isJsMessageSetChanged(String string, String string2,\r
String[] colcommands)\r
{\r
- long[] l=jshashes.get(string+"|"+string2);\r
- if (l==null && colcommands!=null)\r
+ long[] l = jshashes.get(string + "|" + string2);\r
+ if (l == null && colcommands != null)\r
{\r
return true;\r
}\r
- for (int i=0;i<colcommands.length;i++) { if (l[i] != colcommands[i].hashCode()) { return true; }}\r
+ for (int i = 0; i < colcommands.length; i++)\r
+ {\r
+ if (l[i] != colcommands[i].hashCode())\r
+ {\r
+ return true;\r
+ }\r
+ }\r
return false;\r
}\r
\r
- private Vector jsExecQueue=new Vector();\r
+ private Vector jsExecQueue = new Vector();\r
+\r
public Vector getJsExecQueue()\r
{\r
return jsExecQueue;\r
\r
public void setExecutor(JSFunctionExec jsFunctionExec2)\r
{\r
- jsFunctionExec=jsFunctionExec2;\r
+ jsFunctionExec = jsFunctionExec2;\r
}\r
\r
/**\r
- * return the given colour value parameter or the given default if parameter not given\r
+ * return the given colour value parameter or the given default if parameter\r
+ * not given\r
+ * \r
* @param colparam\r
* @param defcolour\r
* @return\r
public Color getDefaultColourParameter(String colparam, Color defcolour)\r
{\r
String colprop = getParameter(colparam);\r
- if (colprop==null || colprop.trim().length()==0)\r
+ if (colprop == null || colprop.trim().length() == 0)\r
{\r
return defcolour;\r
}\r
- Color col = jalview.schemes.ColourSchemeProperty.getAWTColorFromName(colprop);\r
- if (col==null)\r
+ Color col = jalview.schemes.ColourSchemeProperty\r
+ .getAWTColorFromName(colprop);\r
+ if (col == null)\r
{\r
- try {\r
+ try\r
+ {\r
col = new jalview.schemes.UserColourScheme(colprop).findColour('A');\r
} catch (Exception ex)\r
{\r
- System.err.println("Couldn't parse '"+colprop+"' as a colour for "+colparam);\r
- col=null;\r
+ System.err.println("Couldn't parse '" + colprop\r
+ + "' as a colour for " + colparam);\r
+ col = null;\r
}\r
}\r
- return (col==null) ? defcolour: col;\r
+ return (col == null) ? defcolour : col;\r
+\r
+ }\r
+\r
+ public void openJalviewHelpUrl()\r
+ {\r
+ String helpUrl = getParameter("jalviewhelpurl");\r
+ if (helpUrl == null || helpUrl.trim().length() < 5)\r
+ {\r
+ helpUrl = "http://www.jalview.org/help.html";\r
+ }\r
+ showURL(helpUrl, "HELP");\r
+ }\r
+\r
+ /**\r
+ * form a complete URL given a path to a resource and a reference location on\r
+ * the same server\r
+ * \r
+ * @param url\r
+ * - an absolute path on the same server as localref or a document\r
+ * located relative to localref\r
+ * @param localref\r
+ * - a URL on the same server as url\r
+ * @return a complete URL for the resource located by url\r
+ */\r
+ private String resolveUrlForLocalOrAbsolute(String url, URL localref)\r
+ {\r
+ String codebase = localref.toString();\r
+ if (url.indexOf("/") == 0)\r
+ {\r
+ url = codebase.substring(0, codebase.length()\r
+ - localref.getFile().length())\r
+ + url;\r
+ }\r
+ else\r
+ {\r
+ url = localref + url;\r
+ }\r
+ return url;\r
+ }\r
\r
+ /**\r
+ * open a URL in the browser - resolving it according to relative refs and\r
+ * coping with javascript: protocol if necessary.\r
+ * \r
+ * @param url\r
+ * @param target\r
+ */\r
+ public void showURL(String url, String target)\r
+ {\r
+ try\r
+ {\r
+ if (url.indexOf(":") == -1)\r
+ {\r
+ // TODO: verify (Bas Vroling bug) prepend codebase or server URL to\r
+ // form valid URL\r
+ // Should really use docbase, not codebase.\r
+ URL prepend;\r
+ url = resolveUrlForLocalOrAbsolute(\r
+ url,\r
+ prepend = getDefaultParameter("resolvetocodebase", false) ? getDocumentBase()\r
+ : getCodeBase());\r
+ if (debug)\r
+ {\r
+ System.err\r
+ .println("Show url (prepended "\r
+ + prepend\r
+ + " - toggle resolvetocodebase if code/docbase resolution is wrong): "\r
+ + url);\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if (debug)\r
+ {\r
+ System.err.println("Show url: " + url);\r
+ }\r
+ }\r
+ if (url.indexOf("javascript:") == 0)\r
+ {\r
+ // no target for the javascript context\r
+ getAppletContext().showDocument(new java.net.URL(url));\r
+ }\r
+ else\r
+ {\r
+ getAppletContext().showDocument(new java.net.URL(url), target);\r
+ }\r
+ } catch (Exception ex)\r
+ {\r
+ ex.printStackTrace();\r
+ }\r
}\r
\r
/**\r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
replace(edits[e]);
break;
//TODO:add deleteNuc for UNDO
- case INSERT_NUC:
- insertNuc(edits[e]);
- break;
+// case INSERT_NUC:
+// insertNuc(edits[e]);
+// break;
}
}
}
{
command.seqs[s].insertCharAt(command.position, command.number,
command.gapChar);
- System.out.println("pos: "+command.position+" number: "+command.number);
- }
-
- adjustAnnotations(command, true, false, null);
- }
-
- final void insertNuc(Edit command)
- {
-
- for (int s = 0; s < command.seqs.length; s++)
- {
- System.out.println("pos: "+command.position+" number: "+command.number);
- command.seqs[s].insertCharAt(command.position, command.number,'A');
+// System.out.println("pos: "+command.position+" number: "+command.number);
}
adjustAnnotations(command, true, false, null);
}
+//
+// final void insertNuc(Edit command)
+// {
+//
+// for (int s = 0; s < command.seqs.length; s++)
+// {
+// System.out.println("pos: "+command.position+" number: "+command.number);
+// command.seqs[s].insertCharAt(command.position, command.number,'A');
+// }
+//
+// adjustAnnotations(command, true, false, null);
+// }
final void deleteGap(Edit command)
{
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
{
if (seqname && this.sequenceRef != null)
{
+ int i=description.toLowerCase().indexOf("<html>");
+ if (i>-1)
+ {
+ // move the html tag to before the sequence reference.
+ return "<html>"+sequenceRef.getName()+" : "+description.substring(i+6);
+ }
return sequenceRef.getName() + " : " + description;
}
return description;
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import java.util.*;
-/**
- * <p>
- * Title:
- * </p>
- *
- * <p>
- * Description:
- * </p>
- *
- * <p>
- * Copyright: Copyright (c) 2004
- * </p>
- *
- * <p>
- * Company: Dundee University
- * </p>
- *
- * @author not attributable
- * @version 1.0
- */
public class AlignmentOrder
{
// JBPNote : this method would return a vector containing all sequences in
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
*/\r
package jalview.datamodel;\r
\r
-/**\r
- * <p>\r
- * Title:\r
- * </p>\r
- * \r
- * <p>\r
- * Description:\r
- * </p>\r
- * \r
- * <p>\r
- * Copyright: Copyright (c) 2004\r
- * </p>\r
- * \r
- * <p>\r
- * Company: Dundee University\r
- * </p>\r
- * \r
- * @author not attributable\r
- * @version 1.0\r
- */\r
public abstract class CigarSimple extends CigarBase\r
{\r
/**\r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
}
if (cs != null)
{
- cs.setConservation(c);
-
- if (cs instanceof ClustalxColourScheme)
+ if (cs.conservationApplied())
{
- ((ClustalxColourScheme) cs)
- .resetClustalX(sequences, getWidth());
+ cs.setConservation(c);
+
+ if (cs instanceof ClustalxColourScheme)
+ {
+ ((ClustalxColourScheme) cs).resetClustalX(sequences,
+ getWidth());
+ }
}
}
}
private boolean showConsensusHistogram;
/**
- * set this alignmentAnnotation object as the one used to render consensus annotation
+ * set this alignmentAnnotation object as the one used to render consensus
+ * annotation
+ *
* @param aan
*/
public void setConsensus(AlignmentAnnotation aan)
{
- if (consensus==null)
+ if (consensus == null)
{
- consensus=aan;
+ consensus = aan;
}
}
-
+
/**
*
* @return automatically calculated consensus row
}
/**
- * set this alignmentAnnotation object as the one used to render consensus annotation
+ * set this alignmentAnnotation object as the one used to render consensus
+ * annotation
+ *
* @param aan
*/
public void setConservationRow(AlignmentAnnotation aan)
{
- if (conservation==null)
+ if (conservation == null)
{
- conservation=aan;
+ conservation = aan;
}
}
+
/**
* get the conservation annotation row for this group
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
}\r
if (matches)\r
{\r
- pdbentry[pe].setId(pdb.id);\r
// add an entry for every chain in the model\r
for (int i = 0; i < pdb.chains.size(); i++)\r
{\r
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/**\r
* \r
*/\r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import jalview.schemes.TurnColourScheme;
import jalview.schemes.UserColourScheme;
import jalview.schemes.ZappoColourScheme;
+import jalview.ws.WSMenuEntryProviderI;
import jalview.ws.jws1.Discoverer;
import jalview.ws.jws2.Jws2Discoverer;
}
break;
- case KeyEvent.VK_A:
- if (viewport.cursorMode)
- {
- alignPanel.seqPanel.insertNucAtCursor(false,"A");
- //System.out.println("A");
- }
- break;
+ //case KeyEvent.VK_A:
+ // if (viewport.cursorMode)
+ // {
+ // alignPanel.seqPanel.insertNucAtCursor(false,"A");
+ // //System.out.println("A");
+ // }
+ // break;
/*
case KeyEvent.VK_CLOSE_BRACKET:
if (viewport.cursorMode)
applyToAllGroups.setState(av.colourAppliesToAllGroups);
showNpFeatsMenuitem.setSelected(av.isShowNpFeats());
showDbRefsMenuitem.setSelected(av.isShowDbRefs());
-
+ autoCalculate.setSelected(av.autoCalculateConsensus);
+ sortByTree.setSelected(av.sortByTree);
+ listenToViewSelections.setSelected(av.followSelection);
+
setShowProductsEnabled();
updateEditMenuBar();
.getAlignment().getSequences());
}
}
+ public void sortByTreeOption_actionPerformed(ActionEvent e)
+ {
+ viewport.sortByTree = sortByTree.isSelected();
+ }
+ @Override
+ protected void listenToViewSelections_actionPerformed(ActionEvent e)
+ {
+ viewport.followSelection = listenToViewSelections.isSelected();
+ }
/**
* DOCUMENT ME!
*
for (i = 0; i < treePanels.size(); i++)
{
- TreePanel tp = (TreePanel) treePanels.elementAt(i);
+ final TreePanel tp = (TreePanel) treePanels.elementAt(i);
final JMenuItem item = new JMenuItem(tp.getTitle());
final NJTree tree = ((TreePanel) treePanels.elementAt(i)).getTree();
item.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
- SequenceI[] oldOrder = viewport.getAlignment()
- .getSequencesArray();
- AlignmentSorter.sortByTree(viewport.getAlignment(), tree);
-
- addHistoryItem(new OrderCommand("Tree Sort", oldOrder,
- viewport.alignment));
-
- alignPanel.paintAlignment(true);
+ tp.sortByTree_actionPerformed(null);
+ addHistoryItem(tp.sortAlignmentIn(alignPanel));
+
}
});
// object broker mechanism.
final Vector wsmenu = new Vector();
final IProgressIndicator af = me;
- if (Cache.getDefault("SHOW_JWS1_SERVICES", true)
- && Discoverer.services != null
+ final JMenu msawsmenu = new JMenu("Alignment");
+ final JMenu secstrmenu = new JMenu(
+ "Secondary Structure Prediction");
+ final JMenu seqsrchmenu = new JMenu(
+ "Sequence Database Search");
+ final JMenu analymenu = new JMenu(
+ "Analysis");
+ // JAL-940 - only show secondary structure prediction services from the legacy server
+ if (// Cache.getDefault("SHOW_JWS1_SERVICES", true)
+ // &&
+ Discoverer.services != null
&& (Discoverer.services.size() > 0))
{
// TODO: refactor to allow list of AbstractName/Handler bindings to
// be
// stored or retrieved from elsewhere
- Vector msaws = (Vector) Discoverer.services.get("MsaWS");
+ Vector msaws = null; // (Vector) Discoverer.services.get("MsaWS");
Vector secstrpr = (Vector) Discoverer.services
.get("SecStrPred");
- Vector seqsrch = (Vector) Discoverer.services.get("SeqSearch");
+ Vector seqsrch = null; // (Vector) Discoverer.services.get("SeqSearch");
// TODO: move GUI generation code onto service implementation - so a
// client instance attaches itself to the GUI with method call like
// jalview.ws.MsaWSClient.bind(servicehandle, Desktop.instance,
if (msaws != null)
{
// Add any Multiple Sequence Alignment Services
- final JMenu msawsmenu = new JMenu("Alignment");
for (int i = 0, j = msaws.size(); i < j; i++)
{
final ext.vamsas.ServiceHandle sh = (ext.vamsas.ServiceHandle) msaws
impl.attachWSMenuEntry(msawsmenu, me);
}
- wsmenu.add(msawsmenu);
}
if (secstrpr != null)
{
// Add any secondary structure prediction services
- final JMenu secstrmenu = new JMenu(
- "Secondary Structure Prediction");
for (int i = 0, j = secstrpr.size(); i < j; i++)
{
final ext.vamsas.ServiceHandle sh = (ext.vamsas.ServiceHandle) secstrpr
.getServiceClient(sh);
impl.attachWSMenuEntry(secstrmenu, me);
}
- wsmenu.add(secstrmenu);
}
if (seqsrch != null)
{
// Add any sequence search services
- final JMenu seqsrchmenu = new JMenu(
- "Sequence Database Search");
for (int i = 0, j = seqsrch.size(); i < j; i++)
{
final ext.vamsas.ServiceHandle sh = (ext.vamsas.ServiceHandle) seqsrch
.getServiceClient(sh);
impl.attachWSMenuEntry(seqsrchmenu, me);
}
- wsmenu.add(seqsrchmenu);
}
}
{
if (jws2servs.hasServices())
{
- JMenu jws2men = new JMenu("Jaba Web Services");
- jws2servs.attachWSMenuEntry(jws2men, me);
- for (int i = 0, iSize = jws2men.getMenuComponentCount(); i < iSize; i++)
- {
- wsmenu.add(jws2men.getMenuComponent(i));
- }
+ jws2servs.attachWSMenuEntry(msawsmenu, me);
}
}
}
+ // Add all submenus in the order they should appear on the web services menu
+ wsmenu.add(msawsmenu);
+ wsmenu.add(secstrmenu);
+ wsmenu.add(analymenu);
+ // No search services yet
+ // wsmenu.add(seqsrchmenu);
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
{
try
{
-
- resetWebServiceMenu();
- // finally, add the whole shebang onto the webservices menu
+ webService.removeAll();
+ // first, add discovered services onto the webservices menu
if (wsmenu.size() > 0)
{
for (int i = 0, j = wsmenu.size(); i < j; i++)
}
else
{
- me.webService.add(me.webServiceNoServices);
+ webService.add(me.webServiceNoServices);
}
+ build_urlServiceMenu(me.webService);
+ build_fetchdbmenu(webService);
} catch (Exception e)
{
}
}
- /**
- * empty the web service menu and add any ad-hoc functions not dynamically
- * discovered.
- *
- */
- private void resetWebServiceMenu()
- {
- webService.removeAll();
- build_fetchdbmenu(webService);
- build_urlServiceMenu(webService);
- }
/**
* construct any groupURL type service menu entries.
*/
private void build_urlServiceMenu(JMenu webService)
{
- if (Cache.getDefault("SHOW_ENFIN_SERVICES", true))
- {
- jalview.ws.EnfinEnvision2OneWay.getInstance().attachWSMenuEntry(
- webService, this);
- }
// TODO: remove this code when 2.7 is released
// DEBUG - alignmentView
/*
// TODO: refactor to RestClient discoverer and merge menu entries for
// rest-style services with other types of analysis/calculation service
// SHmmr test client - still being implemented.
- jalview.ws.rest.RestClient.makeShmmrRestClient().attachWSMenuEntry(
- webService, this);
// DEBUG - alignmentView
+
+ for (jalview.ws.rest.RestClient client: jalview.ws.rest.RestClient.getRestClients()) {
+ client.attachWSMenuEntry(JvSwingUtils.findOrCreateMenu(webService, client.getAction()), this);
+ }
+
+ if (Cache.getDefault("SHOW_ENFIN_SERVICES", true))
+ {
+ jalview.ws.EnfinEnvision2OneWay.getInstance().attachWSMenuEntry(
+ webService, this);
+ }
}
/*
viewport.updateSequenceIdColours();
buildSortByAnnotationScoresMenu();
alignPanel.paintAlignment(true);
- System.out.println("Hallo");
}
} catch (Exception ex)
{
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import java.awt.*;
import java.awt.event.*;
+
import javax.swing.*;
import javax.swing.event.*;
+import net.miginfocom.swing.MigLayout;
+
import jalview.bin.Cache;
import jalview.datamodel.*;
import jalview.schemes.*;
frame = new JInternalFrame();
frame.setContentPane(this);
frame.setLayer(JLayeredPane.PALETTE_LAYER);
- Desktop.addInternalFrame(frame, "Colour by Annotation", 480, 145);
+ Desktop.addInternalFrame(frame, "Colour by Annotation", 520, 215);
slider.addChangeListener(new ChangeListener()
{
}
// Always get default shading from preferences.
- minColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MIN", Color.orange));
- maxColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MAX", Color.red));
-
+ setDefaultMinMax();
+
if (oldcs instanceof AnnotationColourGradient)
{
AnnotationColourGradient acg = (AnnotationColourGradient) oldcs;
}
+ private void setDefaultMinMax()
+ {
+ minColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MIN", Color.orange));
+ maxColour.setBackground(Cache.getDefaultColour("ANNOTATIONCOLOUR_MAX", Color.red));
+ }
+
public AnnotationColourChooser()
{
try
private void jbInit() throws Exception
{
- minColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ minColour.setFont(JvSwingUtils.getLabelFont());
minColour.setBorder(BorderFactory.createEtchedBorder());
minColour.setPreferredSize(new Dimension(40, 20));
minColour.setToolTipText("Minimum Colour");
}
}
});
- maxColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ maxColour.setFont(JvSwingUtils.getLabelFont());
maxColour.setBorder(BorderFactory.createEtchedBorder());
maxColour.setPreferredSize(new Dimension(40, 20));
maxColour.setToolTipText("Maximum Colour");
cancel_actionPerformed(e);
}
});
- this.setLayout(borderLayout1);
- jPanel2.setLayout(flowLayout1);
+ defColours.setOpaque(false);
+ defColours.setText("Defaults");
+ defColours.setToolTipText("Reset min and max colours to defaults from user preferences.");
+ defColours.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent arg0)
+ {
+ resetColours_actionPerformed(arg0);
+ }
+ });
+
annotations.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
annotations_actionPerformed(e);
}
});
- jPanel1.setBackground(Color.white);
- jPanel2.setBackground(Color.white);
threshold.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
threshold_actionPerformed(e);
}
});
- jPanel3.setLayout(flowLayout2);
thresholdValue.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
slider.setPreferredSize(new Dimension(100, 32));
thresholdValue.setEnabled(false);
thresholdValue.setColumns(7);
- jPanel3.setBackground(Color.white);
- currentColours.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ currentColours.setFont(JvSwingUtils.getLabelFont());
currentColours.setOpaque(false);
currentColours.setText("Use Original Colours");
currentColours.addActionListener(new ActionListener()
}
});
thresholdIsMin.setBackground(Color.white);
+ thresholdIsMin.setFont(JvSwingUtils.getLabelFont());
thresholdIsMin.setText("Threshold is Min/Max");
thresholdIsMin.addActionListener(new ActionListener()
{
thresholdIsMin_actionPerformed(actionEvent);
}
});
+ this.setLayout(borderLayout1);
+ jPanel2.setLayout(new MigLayout("","[left][center][right]","[][][]"));
+ jPanel1.setBackground(Color.white);
+ jPanel2.setBackground(Color.white);
+
jPanel1.add(ok);
jPanel1.add(cancel);
jPanel2.add(annotations);
jPanel2.add(currentColours);
- jPanel2.add(minColour);
- jPanel2.add(maxColour);
- this.add(jPanel3, java.awt.BorderLayout.CENTER);
- jPanel3.add(threshold);
- jPanel3.add(slider);
- jPanel3.add(thresholdValue);
- jPanel3.add(thresholdIsMin);
+ JPanel colpanel = new JPanel(new FlowLayout());
+ colpanel.setBackground(Color.white);
+ colpanel.add(minColour);
+ colpanel.add(maxColour);
+ jPanel2.add(colpanel, "wrap");
+
+ jPanel2.add(threshold);
+ jPanel2.add(defColours,"skip 1, wrap");
+ jPanel2.add(thresholdIsMin);
+ jPanel2.add(slider, "grow");
+ jPanel2.add(thresholdValue, "grow");
this.add(jPanel1, java.awt.BorderLayout.SOUTH);
- this.add(jPanel2, java.awt.BorderLayout.NORTH);
+ this.add(jPanel2, java.awt.BorderLayout.CENTER);
+ }
+
+ protected void resetColours_actionPerformed(ActionEvent arg0)
+ {
+ setDefaultMinMax();
+ changeColour();
}
JComboBox annotations;
JPanel minColour = new JPanel();
JPanel maxColour = new JPanel();
-
+ JButton defColours = new JButton();
JButton ok = new JButton();
JButton cancel = new JButton();
JPanel jPanel1 = new JPanel();
-
JPanel jPanel2 = new JPanel();
-
+
BorderLayout borderLayout1 = new BorderLayout();
JComboBox threshold = new JComboBox();
- FlowLayout flowLayout1 = new FlowLayout();
-
- JPanel jPanel3 = new JPanel();
-
- FlowLayout flowLayout2 = new FlowLayout();
JSlider slider = new JSlider();
slider.setEnabled(true);
thresholdValue.setEnabled(true);
+ thresholdIsMin.setEnabled(true);
if (aboveThreshold == AnnotationColourGradient.NO_THRESHOLD)
{
slider.setEnabled(false);
thresholdValue.setEnabled(false);
thresholdValue.setText("");
+ thresholdIsMin.setEnabled(false);
}
else if (aboveThreshold != AnnotationColourGradient.NO_THRESHOLD
&& currentAnnotation.threshold == null)
public void cancel_actionPerformed(ActionEvent e)
{
reset();
+ // ensure all original colouring is propagated to listeners.
+ ap.paintAlignment(true);
try
{
frame.setClosed(true);
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
frame = new JInternalFrame();\r
frame.setContentPane(this);\r
frame.setLayer(JLayeredPane.PALETTE_LAYER);\r
- Desktop.addInternalFrame(frame, "", 260, 125);\r
+ Desktop.addInternalFrame(frame, "", frame.getPreferredSize().width, frame.getPreferredSize().height);\r
}\r
\r
public void exportFeatures(AlignmentPanel ap)\r
\r
private void jbInit() throws Exception\r
{\r
- this.setLayout(flowLayout1);\r
+ this.setLayout(new BorderLayout());\r
+ \r
toFile.setText("to File");\r
toFile.addActionListener(new ActionListener()\r
{\r
buttonGroup.add(jalviewFormat);\r
buttonGroup.add(GFFFormat);\r
buttonGroup.add(CSVFormat);\r
- this.add(jPanel3, null);\r
- this.add(jPanel1, null);\r
+ this.add(jPanel3, BorderLayout.CENTER);\r
+ this.add(jPanel1, BorderLayout.SOUTH);\r
}\r
\r
JPanel jPanel1 = new JPanel();\r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
package jalview.gui;
import java.util.*;
+import java.util.regex.Pattern;
import java.awt.*;
import java.awt.datatransfer.*;
&& ap.av.alignment.getAlignmentAnnotation().length > selectedRow)
{
AlignmentAnnotation aa = ap.av.alignment.getAlignmentAnnotation()[selectedRow];
-
- StringBuffer desc = new StringBuffer("<html>");
-
+
+ StringBuffer desc = new StringBuffer();
if (aa.description != null
&& !aa.description.equals("New description"))
{
- desc.append(aa.getDescription(true));
- if (aa.hasScore)
- desc.append("<br>");
+ // TODO: we could refactor and merge this code with the code in jalview.gui.SeqPanel.mouseMoved(..) that formats sequence feature tooltips
+ desc.append(aa.getDescription(true).trim());
+ // check to see if the description is an html fragment.
+ if (desc.length()<6 || (desc.substring(0,6).toLowerCase().indexOf("<html>")<0))
+ {
+ // clean the description ready for embedding in html
+ desc = new StringBuffer(Pattern.compile("<").matcher(desc).replaceAll("<"));
+ desc.insert(0, "<html>");
+ } else {
+ // remove terminating html if any
+ int i=desc.substring(desc.length()-7).toLowerCase().lastIndexOf("</html>");
+ if (i>-1) {
+ desc.setLength(desc.length()-7+i);
+ }
+ }
+ if (aa.hasScore())
+ {
+ desc.append("<br/>");
+ }
+
+
+ } else {
+ // begin the tooltip's html fragment
+ desc.append("<html>");
}
if (aa.hasScore())
{
- desc.append("Score: " + aa.score);
+ // TODO: limit precision of score to avoid noise from imprecise doubles (64.7 becomes 64.7+/some tiny value).
+ desc.append(" Score: " + aa.score);
}
- if (desc.length() != 6)
+ if (desc.length() > 6)
{
desc.append("</html>");
this.setToolTipText(desc.toString());
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
* @param ap
*/
public AppJmol(PDBEntry pdbentry, SequenceI[] seq, String[] chains,
- AlignmentPanel ap)
+ final AlignmentPanel ap)
{
progressBar = ap.alignFrame;
// ////////////////////////////////
{
if (frames[i] instanceof AppJmol)
{
- AppJmol topJmol = ((AppJmol) frames[i]);
+ final AppJmol topJmol = ((AppJmol) frames[i]);
// JBPNOTE: this looks like a binding routine, rather than a gui
// routine
for (int pe = 0; pe < topJmol.jmb.pdbentry.length; pe++)
{
topJmol.jmb.addSequence(pe, seq);
topJmol.addAlignmentPanel(ap);
+ // add it to the set used for colouring
+ topJmol.useAlignmentPanelForColourbyseq(ap);
topJmol.buildJmolActionMenu();
+ ap.getStructureSelectionManager().sequenceColoursChanged(ap);
break;
}
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
public void updateColours(Object source)
{
AlignmentPanel ap = (AlignmentPanel) source,topap;
- // ignore events from unrelated or non-user interactive frames
- if ((topap=appJmolWindow.getAlignmentPanelFor(ap.av.getAlignment()))==null || topap.alignFrame.getCurrentView() != ap.av || !appJmolWindow.isUsedforcolourby(ap))
+ // ignore events from panels not used to colour this view
+ if (!appJmolWindow.isUsedforcolourby(ap))
return;
if (!isLoadingFromArchive()) {
colourBySequence(ap.av.getShowSequenceFeatures(), ap);
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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 javax.swing.JOptionPane;
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.bin.Cache;
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.beans.PropertyChangeListener;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.AbstractAction;
+import javax.swing.AbstractButton;
+import javax.swing.Action;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.DefaultListModel;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JToolBar;
+import javax.swing.ListSelectionModel;
+import javax.swing.SwingUtilities;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import org.robsite.jswingreader.action.MarkChannelAsRead;
+import org.robsite.jswingreader.action.MarkChannelAsUnread;
+import org.robsite.jswingreader.action.MarkItemAsRead;
+import org.robsite.jswingreader.action.MarkItemAsUnread;
+import org.robsite.jswingreader.action.UpdatableAction;
+import org.robsite.jswingreader.model.Channel;
+import org.robsite.jswingreader.model.ChannelListModel;
+import org.robsite.jswingreader.model.Item;
+import org.robsite.jswingreader.model.SimpleRSSParser;
+import org.robsite.jswingreader.ui.BlogContentPane;
+import org.robsite.jswingreader.ui.ItemReadTimer;
+import org.robsite.jswingreader.ui.Main;
+import org.robsite.jswingreader.ui.util.ContextMenuMouseAdapter;
+
+/**
+ * Blog reading window, adapted from JSwingReader's
+ * org.robsite.jswingreader.ui.MainWindow class
+ */
+
+public class BlogReader extends JPanel
+{
+ private JButton buttonRefresh = new JButton();
+
+ private JToolBar toolBar = new JToolBar();
+
+ private JLabel statusBar = new JLabel();
+
+ private JPanel panelMain = new JPanel();
+
+ private BorderLayout layoutMain = new BorderLayout();
+
+ private BorderLayout borderLayout1 = new BorderLayout();
+
+ private JPanel topPanel = new JPanel();
+
+ private JPanel bottomPanel = new JPanel();
+
+ private JSplitPane topBottomSplitPane = new JSplitPane();
+
+ private JList listItems = new JList(new DefaultListModel());
+
+ // SWITCH IN JALVIEW HTML VIEWER PANE HERE
+ private BlogContentPane textDescription = new BlogContentPane();
+
+ // ADD IN JALVIEW BANNER FOR PRETTINESS
+ private BorderLayout borderLayout4 = new BorderLayout();
+
+ private BorderLayout borderLayout5 = new BorderLayout();
+
+ private ChannelListModel _channelModel = null;
+
+ private JList listChannels = new JList();
+
+ private Action exitAction = new Action()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent arg0)
+ {
+ if (xf!=null)
+ {
+ xf.dispose();
+ }
+ xf=null;jd=null;
+ if (parent != null)
+ {
+ parent.showNews(false);
+ }
+
+ }
+
+ @Override
+ public void setEnabled(boolean arg0)
+ {
+
+ }
+
+ @Override
+ public void removePropertyChangeListener(PropertyChangeListener arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void putValue(String arg0, Object arg1)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean isEnabled()
+ {
+ // TODO Auto-generated method stub
+ return true;
+ }
+
+ @Override
+ public Object getValue(String arg0)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void addPropertyChangeListener(PropertyChangeListener arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+ };
+
+ private JFrame xf = null;
+
+ private JalviewDialog jd = null;
+
+ private JalviewDialog createDialog()
+ {
+
+ return jd = new JalviewDialog()
+ {
+
+ @Override
+ protected void raiseClosed()
+ {
+ if (parent != null)
+ {
+ Cache.log.info("News window closed.");
+ jd=null;
+ parent.showNews(false);
+ }
+ }
+
+ @Override
+ protected void okPressed()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ protected void cancelPressed()
+ {
+ // TODO Auto-generated method stub
+
+ }
+ };
+ };
+
+ private JLabel lblChannels = new JLabel();
+
+ private List _updatableActions = new ArrayList();
+
+ private ItemReadTimer _itemTimer = null;
+
+ private JPopupMenu _popupItems = null;
+
+ private JPopupMenu _popupChannels = null;
+
+ private String lastm = "";
+
+ private boolean newsnew = false;
+
+ private Desktop parent = null;
+
+ BlogReader()
+ {
+ this(null);
+ }
+
+ // should we ignore fake gui events
+ private boolean updating = false;
+
+ public BlogReader(Desktop desktop)
+ {
+ Cache.log.info("Constructing news reader.");
+
+ parent = desktop;
+ _channelModel = new ChannelListModel();
+ // Construct our jalview news channel
+ Channel chan = new Channel();
+ chan.setURL(jalview.bin.Cache.getDefault(
+ "JALVIEW_NEWS_RSS",
+ jalview.bin.Cache.getDefault("www.jalview.org",
+ "http://www.jalview.org") + "/feeds/desktop/rss"));
+ loadLastM();
+ _channelModel.addChannel(chan);
+ updating = true;
+ try
+ {
+ jbInit();
+ postInit();
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ initItems(chan);
+ updating = false;
+ boolean setvisible = checkForNew(chan, true);
+
+ if (setvisible)
+ {
+
+ Cache.log.info("Will show jalview news automatically");
+ showNews();
+ }
+ Cache.log.info("Completed construction of reader.");
+
+ }
+
+ /**
+ * check if the news panel's container is visible
+ */
+ public boolean isVisible()
+ {
+ if (parent == null)
+ {
+ return xf != null && xf.isVisible();
+ }
+ return jd != null && jd.isVisible();
+ }
+
+ /**
+ * display the container for the news panel
+ */
+ public void showNews()
+ {
+ final BlogReader me = this;
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ Rectangle bounds = new Rectangle(5, 5, 550, 350);
+ if (parent == null)
+ {
+ xf = new JFrame();
+ xf.setContentPane(me);
+ xf.addWindowListener(new WindowAdapter()
+ {
+ public void windowClosing(WindowEvent e)
+ {
+ ActionEvent actionEvent = new ActionEvent(this,
+ ActionEvent.ACTION_FIRST, (String) exitAction
+ .getValue(Action.NAME));
+ exitAction.actionPerformed(actionEvent);
+ }
+
+ public void windowOpened(WindowEvent e)
+ {
+ }
+ });
+ me.setSize(new Dimension(550, 350));
+ xf.setVisible(true);
+ }
+ else
+ {
+ createDialog();
+ bounds = new Rectangle(5, 5, 550, 350);
+ jd.initDialogFrame(me, true, false, "News from www.jalview.org",
+ bounds.width, bounds.height);
+ Cache.log.info("Displaying news.");
+ jd.waitForInput();
+ }
+ }
+ });
+ }
+
+ /**
+ * update hasnew flag and mark all new messages as unread.
+ */
+ private boolean checkForNew(Channel chan, boolean updateItems)
+ {
+
+ if (!updating || updateItems)
+ {
+ newsnew = false;
+ }
+ java.util.Date earliest = null;
+ try
+ {
+ earliest = new SimpleDateFormat("YYYY-MM-DD").parse(chan
+ .getHTTPLastModified());
+ } catch (Exception x)
+ {
+ }
+ ;
+ if (chan != null && chan.getItems() != null)
+ {
+ Cache.log.debug("Scanning news items: newsnew=" + newsnew
+ + " and lastDate is " + lastDate);
+ for (Item i : (List<Item>) chan.getItems())
+ {
+ boolean isread = lastDate == null ? false
+ : (i.getPublishDate() != null && !lastDate.before(i
+ .getPublishDate()));
+
+ if (!updating || updateItems)
+ {
+ newsnew |= !isread;
+ }
+ if (updateItems)
+ {
+ i.setRead(isread);
+ }
+ if (i.getPublishDate() != null && !i.isRead())
+ {
+ if (earliest == null || earliest.after(i.getPublishDate()))
+ {
+ earliest = i.getPublishDate();
+ }
+ }
+ }
+ }
+ if (!updateItems && !updating && lastDate == null)
+ {
+ lastDate = earliest;
+ }
+ return newsnew;
+ }
+
+ java.util.Date lastDate = null;
+
+ private void loadLastM()
+ {
+ lastDate = Cache.getDateProperty("JALVIEW_NEWS_RSS_LASTMODIFIED");
+ }
+
+ private void saveLastM(Item item)
+ {
+ if (item != null)
+ {
+ if (item.getPublishDate() != null)
+ {
+ if (lastDate == null || item.getPublishDate().after(lastDate))
+ {
+ lastDate = item.getPublishDate();
+ }
+ }
+
+ if (_channelModel.getElementAt(0) != null)
+ {
+ checkForNew((Channel) _channelModel.getElementAt(0), false);
+ }
+ if (lastDate != null)
+ {
+ jalview.bin.Cache.setDateProperty("JALVIEW_NEWS_RSS_LASTMODIFIED",
+ lastDate);
+ jalview.bin.Cache.log.info("Saved last read date as "
+ + jalview.bin.Cache.date_format.format(lastDate));
+
+ }
+ }
+ }
+
+ private void jbInit() throws Exception
+ {
+ setLayout(layoutMain);
+ panelMain.setLayout(borderLayout1);
+ topPanel.setLayout(borderLayout5);
+ bottomPanel.setLayout(borderLayout4);
+ topBottomSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
+ topBottomSplitPane.setDividerLocation(100);
+ topBottomSplitPane.setTopComponent(topPanel);
+ topBottomSplitPane.setBottomComponent(bottomPanel);
+ JScrollPane spTextDescription = new JScrollPane(textDescription);
+ textDescription.setText("");
+ statusBar.setText(" [Status] ");
+ buttonRefresh.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ refreshNews();
+ }
+ });
+ add(statusBar, BorderLayout.SOUTH);
+ toolBar.add(buttonRefresh);
+ toolBar.addSeparator();
+ JLabel about = new JLabel(
+ "brought to you by JSwingReader (jswingreader.sourceforge.net)");
+ toolBar.add(about);
+ toolBar.setFloatable(false);
+ add(toolBar, BorderLayout.NORTH);
+ panelMain.add(topBottomSplitPane, BorderLayout.CENTER);
+ add(panelMain, BorderLayout.CENTER);
+ JScrollPane spListItems = new JScrollPane(listItems);
+ listItems
+ .setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
+ topPanel.add(spListItems, BorderLayout.CENTER);
+ bottomPanel.add(spTextDescription, BorderLayout.CENTER);
+ listChannels.setModel(_channelModel);
+
+ listItems.addMouseListener(new java.awt.event.MouseAdapter()
+ {
+ public void mouseClicked(MouseEvent e)
+ {
+ listItems_mouseClicked(e);
+ }
+ });
+ _popupItems = _buildItemsPopupMenu();
+ _popupChannels = _buildChannelsPopupMenu();
+ ContextMenuMouseAdapter popupAdapter = new ContextMenuMouseAdapter(
+ _popupItems);
+ ContextMenuMouseAdapter popupChannelsAdapter = new ContextMenuMouseAdapter(
+ _popupChannels);
+ listItems.addMouseListener(popupAdapter);
+ listItems.setCellRenderer(new ItemsRenderer());
+ lblChannels.setText("Channels");
+ }
+
+ private void postInit()
+ {
+ // clear the default hyperlink listener and replace with our own.
+ for (HyperlinkListener hll : textDescription.getHyperlinkListeners())
+ {
+ textDescription.removeHyperlinkListener(hll);
+ }
+ textDescription.addHyperlinkListener(new HyperlinkListener()
+ {
+ public void hyperlinkUpdate(HyperlinkEvent e)
+ {
+ if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
+ {
+ Desktop.showUrl(e.getURL().toExternalForm());
+ }
+ }
+ });
+
+ listItems.addListSelectionListener(new ListSelectionListener()
+ {
+ public void valueChanged(ListSelectionEvent e)
+ {
+ if (e.getValueIsAdjusting() == false)
+ {
+ _itemsValueChanged(listItems);
+ }
+ }
+ });
+ listChannels.setSelectedIndex(1);
+ _updateAllActions();
+ _updateToolbarButtons();
+
+ _itemTimer = new ItemReadTimer(listChannels, listItems);
+ _itemsValueChanged(listItems);
+ }
+
+ public class LaunchJvBrowserOnItem extends AbstractAction implements
+ UpdatableAction
+ {
+ JList _listItems = null;
+
+ public LaunchJvBrowserOnItem(JList listItems)
+ {
+ super("Open in Browser");
+ this.putValue(MNEMONIC_KEY, new Integer(KeyEvent.VK_O));
+ this.putValue(Action.LONG_DESCRIPTION, "Open in Browser");
+ _listItems = listItems;
+ }
+
+ public void actionPerformed(ActionEvent e)
+ {
+ Object o = _listItems.getSelectedValue();
+ if (o instanceof Item)
+ {
+ Item item = (Item) o;
+ item.setRead(true);
+ _listItems.repaint();
+
+ Desktop.showUrl(item.getLink());
+ }
+ }
+
+ public void update(Object o)
+ {
+ setEnabled(true);
+ if (_listItems == null || _listItems.getModel().getSize() == 0)
+ {
+ setEnabled(false);
+ }
+ else if (_listItems.getSelectedIndex() == -1)
+ {
+ setEnabled(false);
+ }
+ }
+
+ }
+
+ private JPopupMenu _buildItemsPopupMenu()
+ {
+ JPopupMenu popup = new JPopupMenu();
+ popup.add(new JMenuItem(new LaunchJvBrowserOnItem(listItems)));
+ popup.addSeparator();
+ popup.add(new JMenuItem(new MarkItemAsRead(listItems)));
+ popup.add(new JMenuItem(new MarkItemAsUnread(listItems)));
+ return popup;
+ }
+
+ private JPopupMenu _buildChannelsPopupMenu()
+ {
+ JPopupMenu popup = new JPopupMenu();
+ popup.add(new JMenuItem(new MarkChannelAsRead(listChannels, listItems)));
+ popup.add(new JMenuItem(
+ new MarkChannelAsUnread(listChannels, listItems)));
+ return popup;
+ }
+
+ private void initItems(Channel channel)
+ {
+ if (channel == null)
+ {
+ channel = new Channel();
+ }
+ if (!channel.isOpen() && channel.getURL() != null)
+ {
+ try
+ {
+ SimpleRSSParser.parse(channel);
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ DefaultListModel itemsModel = (DefaultListModel) listItems.getModel();
+ itemsModel.clear();
+ Iterator iter = (channel.getItems() != null) ? channel.getItems()
+ .iterator() : Collections.EMPTY_LIST.iterator();
+ while (iter.hasNext())
+ {
+ itemsModel.addElement(iter.next());
+ }
+ if (itemsModel.getSize() > 0)
+ {
+ listItems.setSelectedIndex(0);
+ _itemsValueChanged(listItems);
+ }
+ setStatusBarText(channel.getURL());
+ _updateAllActions();
+ }
+
+ private void _itemsValueChanged(JList itemList)
+ {
+ Item item = (Item) itemList.getSelectedValue();
+ if (item == null)
+ {
+ if (itemList.getModel().getSize() > 0)
+ {
+ item = (Item) itemList.getModel().getElementAt(0);
+ }
+ if (item == null)
+ {
+ item = new Item();
+ }
+ else
+ {
+ itemList.setSelectedIndex(0);
+ }
+ }
+
+ if (_itemTimer != null)
+ {
+ // prefer a shorter delay than 5s
+ _itemTimer.setDelay(300);
+ _itemTimer.start();
+ _itemTimer.setLastItem(item);
+ final Item lastitem = item;
+ _itemTimer.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ saveLastM(lastitem);
+ }
+ });
+ }
+
+ setStatusBarText(item.getLink());
+ textDescription.setBlogText(item);
+ _updateAllActions();
+ }
+
+ public void setStatusBarText(String text)
+ {
+ statusBar.setText(text);
+ }
+
+ private void _updateAllActions()
+ {
+ Iterator iter = _updatableActions.iterator();
+ while (iter.hasNext())
+ {
+ UpdatableAction action = (UpdatableAction) iter.next();
+ action.update(this);
+ }
+ }
+
+ private void _updateToolbarButtons()
+ {
+ Map general = (Map) Main.getPreferences().get("general");
+ if (general == null)
+ {
+ return;
+ }
+
+ Component[] components = toolBar.getComponents();
+ for (int i = 0; i < components.length; i++)
+ {
+ Component component = components[i];
+ if (component instanceof JButton)
+ {
+ JButton button = (JButton) component;
+ if (Boolean.toString(false).equals(general.get("useToolBarText")))
+ {
+ // Remove the text if preferences state no toolbar text
+ button.setText("");
+ }
+ if (Boolean.toString(true).equals(general.get("radioTextBelow")))
+ {
+ button.setVerticalTextPosition(AbstractButton.BOTTOM);
+ button.setHorizontalTextPosition(AbstractButton.CENTER);
+ }
+ else if (Boolean.toString(true).equals(
+ general.get("radioTextRight")))
+ {
+ button.setVerticalTextPosition(AbstractButton.CENTER);
+ button.setHorizontalTextPosition(AbstractButton.RIGHT);
+ }
+ }
+ }
+ }
+
+ private void listItems_mouseClicked(MouseEvent e)
+ {
+ if (e.getClickCount() == 2 && e.getModifiersEx() == MouseEvent.NOBUTTON)
+ {
+ Item item = (Item) listItems.getSelectedValue();
+ item.setRead(true);
+ saveLastM(item);
+ if (_itemTimer != null)
+ {
+ _itemTimer.stop();
+ }
+
+ Action action = new LaunchJvBrowserOnItem(listItems);
+ ActionEvent event = new ActionEvent(this,
+ ActionEvent.ACTION_PERFORMED, "LaunchBrowserOnItem");
+ action.actionPerformed(event);
+ }
+ }
+
+ /**
+ * force the news panel to refresh
+ */
+ public void refreshNews()
+ {
+ try
+ {
+ initItems((Channel) _channelModel.getElementAt(0));
+
+ } catch (Exception x)
+ {
+ }
+ }
+
+ public static void main(String args[])
+ {
+ // this tests the detection of new news based on the last read date stored
+ // in jalview properties
+ jalview.bin.Cache.loadProperties(null);
+ jalview.bin.Cache.initLogger();
+ // test will advance read date each time
+ Calendar today = Calendar.getInstance(), lastread = Calendar
+ .getInstance();
+ lastread.set(1983, 01, 01);
+ while (lastread.before(today))
+ {
+ Cache.setDateProperty("JALVIEW_NEWS_RSS_LASTMODIFIED",
+ lastread.getTime());
+ BlogReader me = new BlogReader();
+ System.out.println("Set last date to "
+ + jalview.bin.Cache.date_format.format(lastread.getTime()));
+ if (me.isNewsNew())
+ {
+ Cache.log.info("There is news to read.");
+ }
+ else
+ {
+ Cache.log.info("There is no new news.");
+ me.xf.setTitle("Testing : Last read is " + me.lastDate);
+ me.showNews();
+ me.xf.toFront();
+ }
+ Cache.log.info("Waiting for closure.");
+ do
+ {
+ try
+ {
+ Thread.sleep(300);
+ } catch (InterruptedException x)
+ {
+ }
+ ;
+ } while (me.isVisible());
+
+ if (me.isNewsNew())
+ {
+ Cache.log.info("Still new news after reader displayed.");
+ }
+ if (lastread.getTime().before(me.lastDate))
+ {
+ Cache.log.info("The news was read.");
+ lastread.setTime(me.lastDate);
+ }
+ else
+ {
+ lastread.add(Calendar.MONTH, 1);
+ }
+
+ }
+ }
+
+ boolean isNewsNew()
+ {
+ return newsnew;
+ }
+}
+
+class ChannelsRenderer extends DefaultListCellRenderer
+{
+ private final static Icon _icon = new ImageIcon(
+ Main.class.getResource("image/ComposeMail16.gif"));
+
+ public Component getListCellRendererComponent(JList list, Object value,
+ int index, boolean isSelected, boolean cellHasFocus)
+ {
+ JLabel component = (JLabel) super.getListCellRendererComponent(list,
+ value, index, isSelected, cellHasFocus);
+ component.setIcon(ChannelsRenderer._icon);
+ if (value instanceof Channel)
+ {
+ Channel channel = (Channel) value;
+ component.setText(channel.getTitle() + " ("
+ + channel.getUnreadItemCount() + ")");
+ component.setToolTipText(channel.getURL());
+ }
+ return component;
+ }
+}
+
+class ItemsRenderer extends DefaultListCellRenderer
+{
+ private final static Icon _icon = new ImageIcon(
+ Main.class.getResource("image/ComposeMail16.gif"));
+
+ public Component getListCellRendererComponent(JList list, Object value,
+ int index, boolean isSelected, boolean cellHasFocus)
+ {
+ JLabel component = (JLabel) super.getListCellRendererComponent(list,
+ value, index, isSelected, cellHasFocus);
+ component.setIcon(ItemsRenderer._icon);
+ if (value instanceof Item)
+ {
+ Item item = (Item) value;
+ if (item.getPublishDate() != null)
+ {
+ component.setText(DateFormat.getDateInstance().format(
+ item.getPublishDate())
+ + " " + item.getTitle());
+ }
+ component.setToolTipText(item.getLink());
+ if (!item.isRead())
+ {
+ component.setFont(component.getFont().deriveFont(Font.BOLD));
+ }
+ else
+ {
+ component.setFont(component.getFont().deriveFont(Font.PLAIN));
+ }
+ }
+ return component;
+ }
+}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
package jalview.gui;
import jalview.bin.Cache;
-import jalview.io.*;
+import jalview.io.FileLoader;
+import jalview.io.FormatAdapter;
+import jalview.io.IdentifyFile;
+import jalview.io.JalviewFileChooser;
+import jalview.io.JalviewFileView;
import jalview.ws.params.ParamManager;
-import java.awt.*;
-import java.awt.datatransfer.*;
-import java.awt.dnd.*;
-import java.awt.event.*;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.GridLayout;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Toolkit;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.ClipboardOwner;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.dnd.DropTargetEvent;
+import java.awt.dnd.DropTargetListener;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyVetoException;
import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
-import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.net.URL;
-import java.net.URLConnection;
-import java.nio.channels.ReadableByteChannel;
-import java.util.*;
-
-import javax.swing.*;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import javax.swing.DefaultDesktopManager;
+import javax.swing.DesktopManager;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.JDesktopPane;
+import javax.swing.JFrame;
+import javax.swing.JInternalFrame;
+import javax.swing.JLabel;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JProgressBar;
+import javax.swing.SwingUtilities;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
private JalviewChangeSupport changeSupport = new JalviewChangeSupport();
/**
+ * news reader - null if it was never started.
+ */
+ private BlogReader jvnews=null;
+
+ /**
* @param listener
* @see jalview.gui.JalviewChangeSupport#addJalviewPropertyChangeListener(java.beans.PropertyChangeListener)
*/
showConsole(showjconsole);
+ showNews.setVisible(false);
+ final Desktop me = this;
+ // Thread off the news reader, in case there are connection problems.
+ new Thread( new Runnable() {
+ @Override
+ public void run()
+ {
+ Cache.log.debug("Starting news thread.");
+
+ jvnews = new BlogReader(me);
+ showNews.setVisible(true);
+ Cache.log.debug("Completed news thread.");
+ }
+ }).start();
+
this.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent evt)
}
}
});
-
+ this.addFocusListener(new FocusListener()
+ {
+
+ @Override
+ public void focusLost(FocusEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void focusGained(FocusEvent e)
+ {
+ Cache.log.debug("Relaying windows after focus gain");
+ // make sure that we sort windows properly after we gain focus
+ instance.relayerWindows();
+ }
+ });
this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this));
// Spawn a thread that shows the splashscreen
SwingUtilities.invokeLater(new Runnable()
});
}
+ protected void showNews_actionPerformed(ActionEvent e)
+ {
+ showNews(showNews.isSelected());
+ }
+ void showNews(boolean visible)
+ {
+ {
+ Cache.log.debug((visible?"Showing":"Hiding")+" news.");
+ showNews.setSelected(visible);
+ if (visible && !jvnews.isVisible())
+ {
+ new Thread(new Runnable() {
+ @Override
+ public void run()
+ {
+ long instance=System.currentTimeMillis();
+ Desktop.instance.setProgressBar("Refreshing news", instance);
+ jvnews.refreshNews();
+ Desktop.instance.setProgressBar(null, instance);
+ jvnews.showNews();
+ }
+ }).start();
+ }
+ }
+ }
+
/**
* recover the last known dimensions for a jalview window
*
storeLastKnownDimensions("JAVA_CONSOLE_", jconsole.getBounds());
jconsole.stopConsole();
}
+ if (jvnews!=null)
+ {
+ storeLastKnownDimensions("JALVIEW_RSS_WINDOW_", jvnews.getBounds());
+
+ }
+
System.exit(0);
}
{
message.append("\n\n!! Jalview version "
+ jalview.bin.Cache.getProperty("LATEST_VERSION")
- + " is available for download from http://www.jalview.org !!\n");
+ + " is available for download from "+jalview.bin.Cache.getDefault("www.jalview.org","http://www.jalview.org")+" !!\n");
}
// TODO: update this text for each release or centrally store it for lite
}
JPanel progressPanel;
-
+ ArrayList<JPanel> fileLoadingPanels=new ArrayList<JPanel>();
public void startLoading(final String fileName)
{
if (fileLoadingCount == 0)
{
- addProgressPanel("Loading File: " + fileName + " ");
-
+ fileLoadingPanels.add(addProgressPanel("Loading File: " + fileName + " "));
}
fileLoadingCount++;
}
- private JProgressBar addProgressPanel(String string)
+ private JPanel addProgressPanel(String string)
{
if (progressPanel == null)
{
- progressPanel = new JPanel(new BorderLayout());
+ progressPanel = new JPanel(new GridLayout(1,1));
totalProgressCount = 0;
+ instance.getContentPane().add(progressPanel, BorderLayout.SOUTH);
}
+ JPanel thisprogress=new JPanel(new BorderLayout(10,5));
JProgressBar progressBar = new JProgressBar();
progressBar.setIndeterminate(true);
- progressPanel.add(new JLabel(string), BorderLayout.WEST);
+ thisprogress.add(new JLabel(string), BorderLayout.WEST);
- progressPanel.add(progressBar, BorderLayout.CENTER);
-
- instance.getContentPane().add(progressPanel, BorderLayout.SOUTH);
- totalProgressCount++;
- validate();
- return progressBar;
+ thisprogress.add(progressBar, BorderLayout.CENTER);
+ progressPanel.add(thisprogress);
+ ((GridLayout)progressPanel.getLayout()).setRows(((GridLayout)progressPanel.getLayout()).getRows()+1);
+ ++totalProgressCount;
+ instance.validate();
+ return thisprogress;
}
int totalProgressCount = 0;
- private void removeProgressPanel(JProgressBar progbar)
+ private void removeProgressPanel(JPanel progbar)
{
if (progressPanel != null)
{
progressPanel.remove(progbar);
+ GridLayout gl = (GridLayout) progressPanel.getLayout();
+ gl.setRows(gl.getRows()-1);
if (--totalProgressCount < 1)
{
this.getContentPane().remove(progressPanel);
fileLoadingCount--;
if (fileLoadingCount < 1)
{
- if (progressPanel != null)
+ for (JPanel flp : fileLoadingPanels)
{
- this.getContentPane().remove(progressPanel);
- progressPanel = null;
+ removeProgressPanel(flp);
}
+ fileLoadingPanels.clear();
fileLoadingCount = 0;
}
validate();
if (value == JalviewFileChooser.APPROVE_OPTION)
{
java.io.File choice = chooser.getSelectedFile();
- JProgressBar progpanel = addProgressPanel("Saving VAMSAS Document to "
+ JPanel progpanel = addProgressPanel("Saving VAMSAS Document to "
+ choice.getName());
jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice.getParent());
String warnmsg = null;
}
}
- JProgressBar vamUpdate = null;
+ JPanel vamUpdate = null;
/**
* hide vamsas user gui bits when a vamsas document event is being handled.
}
+ /**
+ * fixes stacking order after a modal dialog to ensure windows that should be on top actually are
+ */
+ public void relayerWindows()
+ {
+
+ }
+
protected JMenuItem groovyShell;
public void doGroovyCheck()
/**
* Progress bars managed by the IProgressIndicator method.
*/
- private Hashtable progressBars, progressBarHandlers;
+ private Hashtable<Long,JPanel> progressBars;
+ private Hashtable<Long,IProgressIndicatorHandler> progressBarHandlers;
/*
* (non-Javadoc)
{
if (progressBars == null)
{
- progressBars = new Hashtable();
- progressBarHandlers = new Hashtable();
+ progressBars = new Hashtable<Long,JPanel>();
+ progressBarHandlers = new Hashtable<Long,IProgressIndicatorHandler>();
}
if (progressBars.get(new Long(id)) != null)
{
- JProgressBar progressPanel = (JProgressBar) progressBars
+ JPanel progressPanel = progressBars
.remove(new Long(id));
if (progressBarHandlers.contains(new Long(id)))
{
// register PCS handler for desktop.
discoverer.addPropertyChangeListener(changeSupport);
}
- if (Cache.getDefault("SHOW_JWS1_SERVICES", true))
+ // JAL-940 - disabled JWS1 service configuration - always start discoverer until we phase out completely
+ if (true)
{
(t0 = new Thread(discoverer)).start();
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
private void jbInit() throws Exception
{
- lineart.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ lineart.setFont(JvSwingUtils.getLabelFont());
lineart.setText("Lineart");
- text.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ text.setFont(JvSwingUtils.getLabelFont());
text.setText("Text");
text.setSelected(true);
- askAgain.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ askAgain.setFont(JvSwingUtils.getLabelFont());
askAgain.setText("Don\'t ask me again");
ok.setText("OK");
ok.addActionListener(new ActionListener()
cancel_actionPerformed(e);
}
});
- jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ jLabel1.setFont(JvSwingUtils.getLabelFont());
jLabel1.setText("Select EPS character rendering style");
this.setLayout(borderLayout1);
jPanel3.setBorder(BorderFactory.createEtchedBorder());
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import jalview.schemes.*;
import java.awt.Dimension;
-public class FeatureColourChooser extends JPanel
+public class FeatureColourChooser extends JalviewDialog
{
- JDialog frame;
-
// FeatureSettings fs;
FeatureRenderer fr;
this.fr = frender;
this.type = type;
ap = fr.ap;
- frame = new JDialog(Desktop.instance, true);
- frame.setTitle("Graduated Feature Colour for " + type);
- Rectangle deskr = Desktop.instance.getBounds();
- frame.setBounds(new Rectangle((int) (deskr.getCenterX() - 240),
- (int) (deskr.getCenterY() - 92), 480, 185));
- frame.setContentPane(this);
+ initDialogFrame(this,true, block,"Graduated Feature Colour for " + type, 480, 185);
// frame.setLayer(JLayeredPane.PALETTE_LAYER);
// Desktop.addInternalFrame(frame, "Graduated Feature Colour for "+type,
// 480, 145);
adjusting = false;
changeColour();
- if (!block)
- {
- new Thread(new Runnable()
- {
-
- public void run()
- {
- frame.show();
- }
-
- }).start();
- }
- else
- {
- frame.show();
- }
+ waitForInput();
}
public FeatureColourChooser()
private void jbInit() throws Exception
{
- minColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ minColour.setFont(JvSwingUtils.getLabelFont());
minColour.setBorder(BorderFactory.createLineBorder(Color.black));
minColour.setPreferredSize(new Dimension(40, 20));
minColour.setToolTipText("Minimum Colour");
}
}
});
- maxColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ maxColour.setFont(JvSwingUtils.getLabelFont());
maxColour.setBorder(BorderFactory.createLineBorder(Color.black));
maxColour.setPreferredSize(new Dimension(40, 20));
maxColour.setToolTipText("Maximum Colour");
});
maxColour.setBorder(new LineBorder(Color.black));
minText.setText("Min:");
- minText.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ minText.setFont(JvSwingUtils.getLabelFont());
maxText.setText("Max:");
- maxText.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
- ok.setOpaque(false);
- ok.setText("OK");
- ok.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- ok_actionPerformed(e);
- }
- });
- cancel.setOpaque(false);
- cancel.setText("Cancel");
- cancel.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- cancel_actionPerformed(e);
- }
- });
+ maxText.setFont(JvSwingUtils.getLabelFont());
this.setLayout(borderLayout1);
jPanel2.setLayout(flowLayout1);
jPanel1.setBackground(Color.white);
JPanel maxColour = new JPanel();
- JButton ok = new JButton();
-
- JButton cancel = new JButton();
-
JPanel colourPanel = new JPanel();
JPanel jPanel1 = new JPanel();
ap.paintAlignment(false);
}
- private void raiseClosed()
+ protected void raiseClosed()
{
if (this.colourEditor != null)
{
}
}
- public void ok_actionPerformed(ActionEvent e)
+ public void okPressed()
{
changeColour();
- try
- {
- frame.dispose();
- raiseClosed();
- } catch (Exception ex)
- {
- }
}
- public void cancel_actionPerformed(ActionEvent e)
+
+ public void cancelPressed()
{
reset();
- try
- {
- frame.dispose();
- // frame.setClosed(true);
- raiseClosed();
- } catch (Exception ex)
- {
- }
}
void reset()
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
panel = new JPanel();
panel.add(new JLabel("Description: ", JLabel.RIGHT));
- description.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ description.setFont(JvSwingUtils.getTextAreaFont());
description.setLineWrap(true);
panel.add(new JScrollPane(description));
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
settingsPane.setLayout(borderLayout2);
dasSettingsPane.setLayout(borderLayout3);
bigPanel.setLayout(borderLayout4);
- invert.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ invert.setFont(JvSwingUtils.getLabelFont());
invert.setText("Invert Selection");
invert.addActionListener(new ActionListener()
{
invertSelection();
}
});
- optimizeOrder.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ optimizeOrder.setFont(JvSwingUtils.getLabelFont());
optimizeOrder.setText("Optimise Order");
optimizeOrder.addActionListener(new ActionListener()
{
orderByAvWidth();
}
});
- sortByScore.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ sortByScore.setFont(JvSwingUtils.getLabelFont());
sortByScore.setText("Seq sort by Score");
sortByScore.addActionListener(new ActionListener()
{
sortByScore(null);
}
});
- sortByDens.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ sortByDens.setFont(JvSwingUtils.getLabelFont());
sortByDens.setText("Seq Sort by density");
sortByDens.addActionListener(new ActionListener()
{
sortByDens(null);
}
});
- cancel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ cancel.setFont(JvSwingUtils.getLabelFont());
cancel.setText("Cancel");
cancel.addActionListener(new ActionListener()
{
close();
}
});
- ok.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ ok.setFont(JvSwingUtils.getLabelFont());
ok.setText("OK");
ok.addActionListener(new ActionListener()
{
close();
}
});
- loadColours.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ loadColours.setFont(JvSwingUtils.getLabelFont());
loadColours.setText("Load Colours");
loadColours.addActionListener(new ActionListener()
{
load();
}
});
- saveColours.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ saveColours.setFont(JvSwingUtils.getLabelFont());
saveColours.setText("Save Colours");
saveColours.addActionListener(new ActionListener()
{
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
// build a new links menu based on the current links + any non-positional
// features
Vector nlinks = new Vector(Preferences.sequenceURLLinks);
- SequenceFeature sf[] = sq.getDatasetSequence().getSequenceFeatures();
+ SequenceFeature sf[] = sq==null ? null : sq.getDatasetSequence().getSequenceFeatures();
for (int sl = 0; sf != null && sl < sf.length; sl++)
{
if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0)
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
an.setCentreColLabels(aa[i].centreColLabels);
an.setScaleColLabels(aa[i].scaleColLabel);
an.setShowAllColLabels(aa[i].showAllColLabels);
-
+
if (aa[i].graph > 0)
{
an.setGraph(true);
an.addAnnotationElement(ae);
if (aa[i].autoCalculated)
{
- // only write one non-null entry into the annotation row - sufficient to get the visualization attributes necessary to display data
+ // only write one non-null entry into the annotation row -
+ // sufficient to get the visualization attributes necessary to
+ // display data
continue;
}
}
Vector settingsAdded = new Vector();
Object gstyle = null;
GraduatedColor gcol = null;
- for (int ro = 0; ro < renderOrder.length; ro++)
+ if (renderOrder != null)
{
- gstyle = ap.seqPanel.seqCanvas.getFeatureRenderer()
- .getFeatureStyle(renderOrder[ro]);
- Setting setting = new Setting();
- setting.setType(renderOrder[ro]);
- if (gstyle instanceof GraduatedColor)
- {
- gcol = (GraduatedColor) gstyle;
- setting.setColour(gcol.getMaxColor().getRGB());
- setting.setMincolour(gcol.getMinColor().getRGB());
- setting.setMin(gcol.getMin());
- setting.setMax(gcol.getMax());
- setting.setColourByLabel(gcol.isColourByLabel());
- setting.setAutoScale(gcol.isAutoScale());
- setting.setThreshold(gcol.getThresh());
- setting.setThreshstate(gcol.getThreshType());
- }
- else
+ for (int ro = 0; ro < renderOrder.length; ro++)
{
- setting.setColour(ap.seqPanel.seqCanvas.getFeatureRenderer()
- .getColour(renderOrder[ro]).getRGB());
- }
+ gstyle = ap.seqPanel.seqCanvas.getFeatureRenderer()
+ .getFeatureStyle(renderOrder[ro]);
+ Setting setting = new Setting();
+ setting.setType(renderOrder[ro]);
+ if (gstyle instanceof GraduatedColor)
+ {
+ gcol = (GraduatedColor) gstyle;
+ setting.setColour(gcol.getMaxColor().getRGB());
+ setting.setMincolour(gcol.getMinColor().getRGB());
+ setting.setMin(gcol.getMin());
+ setting.setMax(gcol.getMax());
+ setting.setColourByLabel(gcol.isColourByLabel());
+ setting.setAutoScale(gcol.isAutoScale());
+ setting.setThreshold(gcol.getThresh());
+ setting.setThreshstate(gcol.getThreshType());
+ }
+ else
+ {
+ setting.setColour(ap.seqPanel.seqCanvas.getFeatureRenderer()
+ .getColour(renderOrder[ro]).getRGB());
+ }
- setting.setDisplay(av.featuresDisplayed
- .containsKey(renderOrder[ro]));
- float rorder = ap.seqPanel.seqCanvas.getFeatureRenderer().getOrder(
- renderOrder[ro]);
- if (rorder > -1)
- {
- setting.setOrder(rorder);
+ setting.setDisplay(av.featuresDisplayed
+ .containsKey(renderOrder[ro]));
+ float rorder = ap.seqPanel.seqCanvas.getFeatureRenderer()
+ .getOrder(renderOrder[ro]);
+ if (rorder > -1)
+ {
+ setting.setOrder(rorder);
+ }
+ fs.addSetting(setting);
+ settingsAdded.addElement(renderOrder[ro]);
}
- fs.addSetting(setting);
- settingsAdded.addElement(renderOrder[ro]);
}
// Make sure we save none displayed feature settings
/**
* store any annotations which forward reference a group's ID
*/
- Hashtable<String,ArrayList<jalview.datamodel.AlignmentAnnotation>> groupAnnotRefs = new Hashtable<String,ArrayList<jalview.datamodel.AlignmentAnnotation>>();
+ Hashtable<String, ArrayList<jalview.datamodel.AlignmentAnnotation>> groupAnnotRefs = new Hashtable<String, ArrayList<jalview.datamodel.AlignmentAnnotation>>();
if (vamsasSet.getAnnotationCount() > 0)
{
an[i].setAutoCalculated(true);
}
}
- if (autoForView || (an[i].hasAutoCalculated() && an[i].isAutoCalculated())) {
+ if (autoForView
+ || (an[i].hasAutoCalculated() && an[i].isAutoCalculated()))
+ {
// remove ID - we don't recover annotation from other views for
// view-specific annotation
an[i].setId(null);
if (an[i].getGraph())
{
- float llim=0,hlim=0;
- // if (autoForView || an[i].isAutoCalculated()) {
- // hlim=11f;
- // }
+ float llim = 0, hlim = 0;
+ // if (autoForView || an[i].isAutoCalculated()) {
+ // hlim=11f;
+ // }
jaa = new jalview.datamodel.AlignmentAnnotation(an[i].getLabel(),
- an[i].getDescription(), anot, llim, hlim, an[i].getGraphType());
+ an[i].getDescription(), anot, llim, hlim,
+ an[i].getGraphType());
jaa.graphGroup = an[i].getGraphGroup();
an[i].getThresholdLine().getColour())));
}
- if (autoForView || an[i].isAutoCalculated()) {
- // Hardwire the symbol display line to ensure that labels for histograms are displayed
- jaa.hasText=true;
+ if (autoForView || an[i].isAutoCalculated())
+ {
+ // Hardwire the symbol display line to ensure that labels for
+ // histograms are displayed
+ jaa.hasText = true;
}
}
else
// and make a note of any group association
if (an[i].getGroupRef() != null && an[i].getGroupRef().length() > 0)
{
- ArrayList<jalview.datamodel.AlignmentAnnotation> aal=groupAnnotRefs.get(an[i].getGroupRef());
- if (aal==null) {
+ ArrayList<jalview.datamodel.AlignmentAnnotation> aal = groupAnnotRefs
+ .get(an[i].getGroupRef());
+ if (aal == null)
+ {
aal = new ArrayList<jalview.datamodel.AlignmentAnnotation>();
- groupAnnotRefs.put(an[i].getGroupRef(),aal);
+ groupAnnotRefs.put(an[i].getGroupRef(), aal);
}
aal.add(jaa);
}
if (jaa.autoCalculated)
{
autoAlan.add(new JvAnnotRow(i, jaa));
- } else
+ }
+ else
// if (!autoForView)
{
- // add autocalculated group annotation and any user created annotation for the view
+ // add autocalculated group annotation and any user created annotation
+ // for the view
al.addAnnotation(jaa);
}
}
.get(groups[i].getId());
if (jaal != null)
{
- for (jalview.datamodel.AlignmentAnnotation jaa:jaal) {
+ for (jalview.datamodel.AlignmentAnnotation jaa : jaal)
+ {
jaa.groupRef = sg;
if (jaa.autoCalculated)
{
- // match up and try to set group autocalc alignment row for this annotation
- if (jaa.label.startsWith("Consensus for ")) {
+ // match up and try to set group autocalc alignment row for this
+ // annotation
+ if (jaa.label.startsWith("Consensus for "))
+ {
sg.setConsensus(jaa);
}
- // match up and try to set group autocalc alignment row for this annotation
- if (jaa.label.startsWith("Conservation for ")) {
+ // match up and try to set group autocalc alignment row for this
+ // annotation
+ if (jaa.label.startsWith("Conservation for "))
+ {
sg.setConservationRow(jaa);
- }
}
+ }
}
}
}
{ x, y, width, height }, "",
new Hashtable<String, Object[]>(), new boolean[]
{ false, false, true } });
- // Legacy pre-2.7 conversion JAL-823 :
- // do not assume any view has to be linked for colour by sequence
+ // Legacy pre-2.7 conversion JAL-823 :
+ // do not assume any view has to be linked for colour by
+ // sequence
}
-
+
// assemble String[] { pdb files }, String[] { id for each
// file }, orig_fileloc, SequenceI[][] {{ seqs_file 1 }, {
// seqs_file 2}, boolean[] {
.getStructureState(s).getColourwithAlignPanel()
: false;
// default for pre-2.7 projects is that Jmol colouring is enabled
- ((boolean[])jmoldat[3])[2] &=ids[p].getStructureState(s).hasColourByJmol() ? ids[p].getStructureState(s).getColourByJmol() : true;
+ ((boolean[]) jmoldat[3])[2] &= ids[p].getStructureState(s)
+ .hasColourByJmol() ? ids[p].getStructureState(s)
+ .getColourByJmol() : true;
if (((String) jmoldat[1]).length() < ids[p]
.getStructureState(s).getContent().length())
jmoldat[1] = ids[p].getStructureState(s).getContent();
}
}
- Object[] seqstrmaps = (Object[]) ((Hashtable) jmoldat[2])
- .get(ids[p].getFile());
- if (seqstrmaps == null)
+ if (ids[p].getFile() != null)
{
- ((Hashtable) jmoldat[2]).put(
- new File(ids[p].getFile()).toString(),
- seqstrmaps = new Object[]
- { pdbFile, ids[p].getId(), new Vector(),
- new Vector() });
+ Object[] seqstrmaps = (Object[]) ((Hashtable) jmoldat[2])
+ .get(ids[p].getFile());
+ if (seqstrmaps == null)
+ {
+ ((Hashtable) jmoldat[2]).put(
+ new File(ids[p].getFile()).toString(),
+ seqstrmaps = new Object[]
+ { pdbFile, ids[p].getId(), new Vector(),
+ new Vector() });
+ }
+ if (!((Vector) seqstrmaps[2]).contains(seq))
+ {
+ ((Vector) seqstrmaps[2]).addElement(seq);
+ // ((Vector)seqstrmaps[3]).addElement(n) :
+ // in principle, chains
+ // should be stored here : do we need to
+ // TODO: store and recover seq/pdb_id :
+ // chain mappings
+ }
}
- if (!((Vector) seqstrmaps[2]).contains(seq))
+ else
{
- ((Vector) seqstrmaps[2]).addElement(seq);
- // ((Vector)seqstrmaps[3]).addElement(n) : in principle, chains
- // should be stored here : do we need to
- // TODO: store and recover seq/pdb_id : chain mappings
+ errorMessage = ("The Jmol views in this project were imported\nfrom an older version of Jalview.\nPlease review the sequence colour associations\nin the Colour by section of the Jmol View menu.\n\nIn the case of problems, see note at\nhttp://issues.jalview.org/browse/JAL-747");
+ warn(errorMessage);
}
}
}
int[] geom = (int[]) svattrib[0];
String state = (String) svattrib[1];
Hashtable<String, Object[]> oldFiles = (Hashtable<String, Object[]>) svattrib[2];
- final boolean useinJmolsuperpos = ((boolean[]) svattrib[3])[0], usetoColourbyseq = ((boolean[]) svattrib[3])[1], jmolColouring=((boolean[])svattrib[3])[2];
+ final boolean useinJmolsuperpos = ((boolean[]) svattrib[3])[0], usetoColourbyseq = ((boolean[]) svattrib[3])[1], jmolColouring = ((boolean[]) svattrib[3])[2];
int x = geom[0], y = geom[1], width = geom[2], height = geom[3];
// collate the pdbfile -> sequence mappings from this view
Vector<String> pdbfilenames = new Vector<String>();
try
{
sview = new AppJmol(pdbf, id, sq, alf.alignPanel,
- useinJmolsuperpos, usetoColourbyseq, jmolColouring, fileloc,
- rect, vid);
+ useinJmolsuperpos, usetoColourbyseq,
+ jmolColouring, fileloc, rect, vid);
} catch (OutOfMemoryError ex)
{
new OOMWarning("restoring structure view for PDB id "
SequenceI[] seq = (SequenceI[]) ((Vector<SequenceI>) filedat[2])
.toArray(new SequenceI[0]);
((AppJmol) comp).jmb.ssm.setMapping(seq, null, pdbFile,
- jalview.io.AppletFormatAdapter.FILE);
+ jalview.io.AppletFormatAdapter.FILE);
((AppJmol) comp).jmb.addSequenceForStructFile(pdbFile, seq);
}
// and add the AlignmentPanel's reference to the Jmol view
}
if (usetoColourbyseq)
{
- ((AppJmol) comp).useAlignmentPanelForColourbyseq(ap, !jmolColouring);
+ ((AppJmol) comp).useAlignmentPanelForColourbyseq(ap,
+ !jmolColouring);
}
else
{
Desktop.addInternalFrame(af, view.getTitle(), view.getWidth(),
view.getHeight());
af.alignPanel.updateAnnotation(false); // recompute any autoannotation
- reorderAutoannotation(af,al,autoAlan);
+ reorderAutoannotation(af, al, autoAlan);
return af;
}
private void reorderAutoannotation(AlignFrame af, Alignment al,
ArrayList<JvAnnotRow> autoAlan)
{
- // copy over visualization settings for autocalculated annotation in the
+ // copy over visualization settings for autocalculated annotation in the
// view
if (al.getAlignmentAnnotation() != null)
{
if (valan != null)
{
// delete the auto calculated row from the alignment
- al.deleteAnnotation(al.getAlignmentAnnotation()[h],false);
+ al.deleteAnnotation(al.getAlignmentAnnotation()[h], false);
hSize--;
h--;
if (valan != nullAnnot)
{
- if (jalan!=valan.template) {
+ if (jalan != valan.template)
+ {
// newly created autoannotation row instance
// so keep a reference to the visible annotation row
// and copy over all relevant attributes
- if (valan.template.graphHeight >= 0)
-
- {
- jalan.graphHeight = valan.template.graphHeight;
- }
- jalan.visible = valan.template.visible;
+ if (valan.template.graphHeight >= 0)
+
+ {
+ jalan.graphHeight = valan.template.graphHeight;
+ }
+ jalan.visible = valan.template.visible;
}
reorder.add(new JvAnnotRow(valan.order, jalan));
}
}
}
}
- int s=0,srt[] = new int[reorder.size()];
+ int s = 0, srt[] = new int[reorder.size()];
JvAnnotRow[] rws = new JvAnnotRow[reorder.size()];
- for (JvAnnotRow jvar:reorder) {
+ for (JvAnnotRow jvar : reorder)
+ {
rws[s] = jvar;
- srt[s++]=jvar.order;
+ srt[s++] = jvar.order;
}
reorder.clear();
jalview.util.QuickSort.sort(srt, rws);
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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 java.beans.PropertyChangeEvent;
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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 java.awt.Container;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.WindowEvent;
+import java.awt.event.WindowListener;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+
+/**
+ * Boilerplate dialog class. Implements basic functionality necessary for model blocking/non-blocking dialogs
+ * with an OK and Cancel button ready to add to the content pane.
+ * @author jimp
+ *
+ */
+public abstract class JalviewDialog extends JPanel
+{
+
+ protected JDialog frame;
+ protected JButton ok = new JButton();
+ protected JButton cancel = new JButton();
+ boolean block=false;
+
+ public void waitForInput()
+ {
+ if (!block)
+ {
+ new Thread(new Runnable()
+ {
+
+ public void run()
+ {
+ frame.setVisible(true);
+ }
+
+ }).start();
+ }
+ else
+ {
+ frame.setVisible(true);
+ }
+ }
+
+ protected void initDialogFrame(Container content,
+ boolean modal, boolean block, String title, int width, int height)
+ {
+
+ frame = new JDialog(Desktop.instance, true);
+ frame.setTitle(title);
+ if (Desktop.instance!=null)
+ {
+ Rectangle deskr = Desktop.instance.getBounds();
+ frame.setBounds(new Rectangle((int) (deskr.getCenterX() - width/2),
+ (int) (deskr.getCenterY() - height/2), width, height));
+ } else {
+ frame.setSize(width,height);
+ }
+ frame.setContentPane(content);
+ this.block = block;
+
+ ok.setOpaque(false);
+ ok.setText("OK");
+ ok.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ okPressed();
+ closeDialog();
+ }
+ });
+ cancel.setOpaque(false);
+ cancel.setText("Cancel");
+ cancel.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ cancelPressed();
+ closeDialog();
+ }
+ });
+ frame.addWindowListener(new WindowListener()
+ {
+
+ @Override
+ public void windowOpened(WindowEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void windowIconified(WindowEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void windowDeiconified(WindowEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void windowDeactivated(WindowEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void windowClosing(WindowEvent e)
+ {
+ // user has cancelled the dialog
+ closeDialog();
+ }
+
+ @Override
+ public void windowClosed(WindowEvent e)
+ {
+ }
+
+ @Override
+ public void windowActivated(WindowEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+ });
+ }
+ /**
+ * clean up and raise the 'dialog closed' event by calling raiseClosed
+ */
+ protected void closeDialog()
+ {
+ try
+ {
+ frame.dispose();
+ raiseClosed();
+ } catch (Exception ex)
+ {
+ }
+ }
+
+ protected abstract void raiseClosed();
+ protected abstract void okPressed();
+ protected abstract void cancelPressed();
+
+}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import java.awt.Color;
import java.awt.Font;
+import java.awt.Rectangle;
import java.awt.event.ActionListener;
import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
import javax.swing.SwingConstants;
/**
return button;
}
+ /**
+ * find or add a submenu with the given title in the given menu
+ *
+ * @param menu
+ * @param submenu
+ * @return the new or existing submenu
+ */
+ public static JMenu findOrCreateMenu(JMenu menu, String submenu)
+ {
+ JMenu submenuinstance = null;
+ for (int i = 0, iSize = menu.getMenuComponentCount(); i < iSize; i++)
+ {
+ if (menu.getMenuComponent(i) instanceof JMenu
+ && ((JMenu) menu.getMenuComponent(i)).getText().equals(
+ submenu))
+ {
+ submenuinstance = (JMenu) menu.getMenuComponent(i);
+ }
+ }
+ if (submenuinstance == null)
+ {
+ submenuinstance = new JMenu(submenu);
+ menu.add(submenuinstance);
+ }
+ return submenuinstance;
+
+ }
+
+ /**
+ *
+ * @param panel
+ * @param tooltip
+ * @param label
+ * @param valBox
+ * @return the GUI element created that was added to the layout so it's attributes can be changed.
+ */
+ public static JPanel addtoLayout(JPanel panel, String tooltip, JComponent label, JComponent valBox)
+ {
+ JPanel laypanel = new JPanel(),labPanel=new JPanel(), valPanel=new JPanel();
+ // laypanel.setSize(panel.getPreferredSize());
+ // laypanel.setLayout(null);
+ labPanel.setBounds(new Rectangle(7, 7, 158, 23));
+ valPanel.setBounds(new Rectangle(172, 7, 270,23));
+ //labPanel.setLayout(new GridLayout(1,1));
+ //valPanel.setLayout(new GridLayout(1,1));
+ labPanel.add(label);
+ valPanel.add(valBox);
+ laypanel.add(labPanel);
+ laypanel.add(valPanel);
+ valPanel.setToolTipText(tooltip);
+ labPanel.setToolTipText(tooltip);
+ valBox.setToolTipText(tooltip);
+ panel.add(laypanel);
+ panel.validate();
+ return laypanel;
+ }
+
+ public static void mgAddtoLayout(JPanel cpanel, String tooltip,
+ JLabel jLabel, JComponent name)
+ {
+ mgAddtoLayout(cpanel, tooltip, jLabel, name,null);
+ }
+ public static void mgAddtoLayout(JPanel cpanel, String tooltip,
+ JLabel jLabel, JComponent name, String params)
+ {
+ cpanel.add(jLabel);
+ if (params==null) {
+ cpanel.add(name);
+ } else {cpanel.add(name, params);
+ }
+ name.setToolTipText(tooltip);
+ jLabel.setToolTipText(tooltip);
+ }
+
+ /**
+ * standard font for labels and check boxes in dialog boxes
+ * @return
+ */
+
+ public static Font getLabelFont()
+ {
+ return getLabelFont(false,false);
+ }
+ public static Font getLabelFont(boolean bold, boolean italic)
+ {
+ return new java.awt.Font("Verdana", (!bold && !italic) ? Font.PLAIN : (bold ? Font.BOLD : 0) + (italic ? Font.ITALIC : 0), 11);
+ }
+
+ /**
+ * standard font for editable text areas
+ * @return
+ */
+ public static Font getTextAreaFont()
+ {
+ return getLabelFont(false,false);
+ }
+
+ /**
+ * clean up a swing menu.
+ * Removes any empty submenus without selection listeners.
+ * @param webService
+ */
+ public static void cleanMenu(JMenu webService)
+ {
+ for (int i=0;i<webService.getItemCount(); )
+ {
+ JMenuItem item = webService.getItem(i);
+ if (item instanceof JMenu && ((JMenu)item).getItemCount()==0)
+ {
+ webService.remove(i);
+ } else {
+ i++;
+ }
+ }
+ }
+
}
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.params.ArgumentI;
+import jalview.ws.params.OptionI;
+import jalview.ws.params.ParameterI;
+import jalview.ws.params.ValueConstrainI;
+import jalview.ws.params.ValueConstrainI.ValueType;
+
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.GridLayout;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.JScrollPane;
+import javax.swing.JSlider;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import net.miginfocom.swing.MigLayout;
+
+/**
+ * GUI generator/manager for options and parameters. Originally abstracted from
+ * the WsJobParameters dialog box.
+ *
+ * @author jprocter
+ *
+ */
+public class OptsAndParamsPage
+{
+ /**
+ * compact or verbose style parameters
+ */
+ boolean compact = false;
+
+ public class OptionBox extends JPanel implements MouseListener,
+ ActionListener
+ {
+ JCheckBox enabled = new JCheckBox();
+
+ final URL finfo;
+
+ boolean hasLink = false;
+
+ boolean initEnabled = false;
+
+ String initVal = null;
+
+ OptionI option;
+
+ JLabel optlabel = new JLabel();
+
+ JComboBox val = new JComboBox();
+
+ public OptionBox(OptionI opt)
+ {
+ option = opt;
+ setLayout(new BorderLayout());
+ enabled.setSelected(opt.isRequired()); // TODO: lock required options
+ enabled.setFont(new Font("Verdana", Font.PLAIN, 11));
+ enabled.setText("");
+ enabled.setText(opt.getName());
+ enabled.addActionListener(this);
+ finfo = option.getFurtherDetails();
+ String desc = opt.getDescription();
+ if (finfo != null)
+ {
+ hasLink = true;
+
+ enabled.setToolTipText("<html>"
+ + JvSwingUtils
+ .wrapTooltip(((desc == null) ? "see further details by right-clicking"
+ : desc)
+ + "<br><img src=\"" + linkImageURL + "\"/>")
+ + "</html>");
+ enabled.addMouseListener(this);
+ }
+ else
+ {
+ if (desc != null)
+ {
+ enabled.setToolTipText("<html>"
+ + JvSwingUtils.wrapTooltip(opt.getDescription())
+ + "</html>");
+ }
+ }
+ add(enabled, BorderLayout.NORTH);
+ if (opt.getPossibleValues().size() > 1)
+ {
+ setLayout(new GridLayout(1, 2));
+ for (Object str : opt.getPossibleValues())
+ {
+ val.addItem((String) str);
+ }
+ val.setSelectedItem((String) opt.getValue());
+ val.addActionListener(this);
+ add(val, BorderLayout.SOUTH);
+ }
+ // TODO: add actionListeners for popup (to open further info),
+ // and to update list of parameters if an option is enabled
+ // that takes a value. JBPNote: is this TODO still valid ?
+ setInitialValue();
+ }
+
+ public void actionPerformed(ActionEvent e)
+ {
+ if (e.getSource() != enabled)
+ {
+ enabled.setSelected(true);
+ }
+ checkIfModified();
+ }
+
+ private void checkIfModified()
+ {
+ boolean notmod = (initEnabled == enabled.isSelected());
+ if (enabled.isSelected())
+ {
+ if (initVal != null)
+ {
+ notmod &= initVal.equals(val.getSelectedItem());
+ }
+ else
+ {
+ // compare against default service setting
+ notmod &= option.getValue() == null
+ || option.getValue().equals(val.getSelectedItem());
+ }
+ }
+ else
+ {
+ notmod &= initVal == null;
+ }
+ poparent.argSetModified(this, !notmod);
+ }
+
+ public OptionI getOptionIfEnabled()
+ {
+ if (!enabled.isSelected())
+ {
+ return null;
+ }
+ OptionI opt = option.copy();
+
+ if (val.getSelectedItem() != null)
+ {
+ opt.setValue((String) val.getSelectedItem());
+ }
+ return opt;
+ }
+
+ public void mouseClicked(MouseEvent e)
+ {
+ if (javax.swing.SwingUtilities.isRightMouseButton(e))
+ {
+ showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
+ }
+ }
+
+ public void mouseEntered(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void mouseExited(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void mousePressed(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void mouseReleased(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void resetToDefault()
+ {
+ enabled.setSelected(false);
+ if (option.isRequired())
+ {
+ // Apply default value
+ selectOption(option, option.getValue());
+ }
+ }
+
+ public void setInitialValue()
+ {
+ initEnabled = enabled.isSelected();
+ if (option.getPossibleValues() != null
+ && option.getPossibleValues().size() > 1)
+ {
+ initVal = (String) val.getSelectedItem();
+ }
+ else
+ {
+ initVal = (initEnabled) ? option.getValue() : null;
+ }
+ }
+
+ }
+
+ public class ParamBox extends JPanel implements ChangeListener,
+ ActionListener, MouseListener
+ {
+ boolean adjusting = false;
+
+ boolean choice = false;
+
+ JComboBox choicebox;
+
+ JPanel controlPanel = new JPanel();
+
+ boolean descisvisible = false;
+
+ JScrollPane descPanel = new JScrollPane();
+
+ final URL finfo;
+
+ boolean integ = false;
+
+ Object lastVal;
+
+ ParameterI parameter;
+
+ final OptsParametersContainerI pmdialogbox;
+
+ JPanel settingPanel = new JPanel();
+
+ JButton showDesc = new JButton();
+
+ JSlider slider = null;
+
+ JTextArea string = new JTextArea();
+
+ ValueConstrainI validator = null;
+
+ JTextField valueField = null;
+
+ public ParamBox(final OptsParametersContainerI pmlayout, ParameterI parm)
+ {
+ pmdialogbox = pmlayout;
+ finfo = parm.getFurtherDetails();
+ validator = parm.getValidValue();
+ parameter = parm;
+ if (validator != null)
+ {
+ integ = validator.getType() == ValueType.Integer;
+ }
+ else
+ {
+ if (parameter.getPossibleValues() != null)
+ {
+ choice = true;
+ }
+ }
+
+ if (!compact)
+ {
+ makeExpanderParam(parm);
+ }
+ else
+ {
+ makeCompactParam(parm);
+
+ }
+ }
+
+ private void makeCompactParam(ParameterI parm)
+ {
+ setLayout(new MigLayout("","[][grow]"));
+
+ String ttipText=null;
+
+ controlPanel.setLayout(new BorderLayout());
+
+ if (parm.getDescription() != null
+ && parm.getDescription().trim().length() > 0)
+ {
+ // Only create description boxes if there actually is a description.
+ ttipText = ("<html>"
+ + JvSwingUtils
+ .wrapTooltip(parm.getDescription()+(finfo!=null ?"<br><img src=\""
+ + linkImageURL
+ + "\"/> Right click for further information.":""))
+ + "</html>");
+ }
+
+ JvSwingUtils.mgAddtoLayout(this, ttipText, new JLabel(parm.getName()),controlPanel, "");
+ updateControls(parm);
+ validate();
+ }
+
+ private void makeExpanderParam(ParameterI parm)
+ {
+ setPreferredSize(new Dimension(PARAM_WIDTH, PARAM_CLOSEDHEIGHT));
+ setBorder(new TitledBorder(parm.getName()));
+ setLayout(null);
+ showDesc.setFont(new Font("Verdana", Font.PLAIN, 6));
+ showDesc.setText("+");
+ string.setFont(new Font("Verdana", Font.PLAIN, 11));
+ string.setBackground(getBackground());
+
+ string.setEditable(false);
+ descPanel.getViewport().setView(string);
+
+ descPanel.setVisible(false);
+
+ JPanel firstrow = new JPanel();
+ firstrow.setLayout(null);
+ controlPanel.setLayout(new BorderLayout());
+ controlPanel.setBounds(new Rectangle(39, 10, PARAM_WIDTH - 70,
+ PARAM_CLOSEDHEIGHT - 50));
+ firstrow.add(controlPanel);
+ firstrow.setBounds(new Rectangle(10, 20, PARAM_WIDTH - 30,
+ PARAM_CLOSEDHEIGHT - 30));
+
+ final ParamBox me = this;
+
+ if (parm.getDescription() != null
+ && parm.getDescription().trim().length() > 0)
+ {
+ // Only create description boxes if there actually is a description.
+ if (finfo != null)
+ {
+ showDesc.setToolTipText("<html>"
+ + JvSwingUtils
+ .wrapTooltip("Click to show brief description<br><img src=\""
+ + linkImageURL
+ + "\"/> Right click for further information.")
+ + "</html>");
+ showDesc.addMouseListener(this);
+ }
+ else
+ {
+ showDesc.setToolTipText("<html>"
+ + JvSwingUtils
+ .wrapTooltip("Click to show brief description.")
+ + "</html>");
+ }
+ showDesc.addActionListener(new ActionListener()
+ {
+
+ public void actionPerformed(ActionEvent e)
+ {
+ descisvisible = !descisvisible;
+ descPanel.setVisible(descisvisible);
+ descPanel.getVerticalScrollBar().setValue(0);
+ me.setPreferredSize(new Dimension(PARAM_WIDTH,
+ (descisvisible) ? PARAM_HEIGHT : PARAM_CLOSEDHEIGHT));
+ me.validate();
+ pmdialogbox.refreshParamLayout();
+ }
+ });
+ string.setWrapStyleWord(true);
+ string.setLineWrap(true);
+ string.setColumns(32);
+ string.setText(parm.getDescription());
+ showDesc.setBounds(new Rectangle(10, 10, 16, 16));
+ firstrow.add(showDesc);
+ }
+ add(firstrow);
+ validator = parm.getValidValue();
+ parameter = parm;
+ if (validator != null)
+ {
+ integ = validator.getType() == ValueType.Integer;
+ }
+ else
+ {
+ if (parameter.getPossibleValues() != null)
+ {
+ choice = true;
+ }
+ }
+ updateControls(parm);
+ descPanel.setBounds(new Rectangle(10, PARAM_CLOSEDHEIGHT,
+ PARAM_WIDTH - 20, PARAM_HEIGHT - PARAM_CLOSEDHEIGHT - 5));
+ add(descPanel);
+ validate();
+ }
+
+ public void actionPerformed(ActionEvent e)
+ {
+ if (adjusting)
+ {
+ return;
+ }
+ if (!choice)
+ {
+ updateSliderFromValueField();
+ }
+ checkIfModified();
+ }
+
+ private void checkIfModified()
+ {
+ Object cstate = updateSliderFromValueField();
+ boolean notmod = false;
+ if (cstate.getClass() == lastVal.getClass())
+ {
+ if (cstate instanceof int[])
+ {
+ notmod = (((int[]) cstate)[0] == ((int[]) lastVal)[0]);
+ }
+ else if (cstate instanceof float[])
+ {
+ notmod = (((float[]) cstate)[0] == ((float[]) lastVal)[0]);
+ }
+ else if (cstate instanceof String[])
+ {
+ notmod = (((String[]) cstate)[0].equals(((String[]) lastVal)[0]));
+ }
+ }
+ pmdialogbox.argSetModified(this, !notmod);
+ }
+
+ @Override
+ public int getBaseline(int width, int height)
+ {
+ return 0;
+ }
+
+ // from
+ // http://stackoverflow.com/questions/2743177/top-alignment-for-flowlayout
+ // helpful hint of using the Java 1.6 alignBaseLine property of FlowLayout
+ @Override
+ public Component.BaselineResizeBehavior getBaselineResizeBehavior()
+ {
+ return Component.BaselineResizeBehavior.CONSTANT_ASCENT;
+ }
+
+ public int getBoxHeight()
+ {
+ return (descisvisible ? PARAM_HEIGHT : PARAM_CLOSEDHEIGHT);
+ }
+
+ public ParameterI getParameter()
+ {
+ ParameterI prm = parameter.copy();
+ if (choice)
+ {
+ prm.setValue((String) choicebox.getSelectedItem());
+ }
+ else
+ {
+ prm.setValue(valueField.getText());
+ }
+ return prm;
+ }
+
+ public void init()
+ {
+ // reset the widget's initial value.
+ lastVal = null;
+ }
+
+ public void mouseClicked(MouseEvent e)
+ {
+ if (javax.swing.SwingUtilities.isRightMouseButton(e))
+ {
+ showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
+ }
+ }
+
+ public void mouseEntered(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void mouseExited(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void mousePressed(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void mouseReleased(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void stateChanged(ChangeEvent e)
+ {
+ if (!adjusting)
+ {
+ valueField.setText(""
+ + ((integ) ? ("" + (int) slider.getValue())
+ : ("" + (float) (slider.getValue() / 1000f))));
+ checkIfModified();
+ }
+
+ }
+
+ public void updateControls(ParameterI parm)
+ {
+ adjusting = true;
+ boolean init = (choicebox == null && valueField == null);
+ if (init)
+ {
+ if (choice)
+ {
+ choicebox = new JComboBox();
+ choicebox.addActionListener(this);
+ controlPanel.add(choicebox, BorderLayout.CENTER);
+ }
+ else
+ {
+ slider = new JSlider();
+ slider.addChangeListener(this);
+ valueField = new JTextField();
+ valueField.addActionListener(this);
+ valueField.addKeyListener(new KeyListener()
+ {
+
+ @Override
+ public void keyTyped(KeyEvent e)
+ {
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e)
+ {
+ if (valueField.getText().trim().length()>0)
+ {
+ actionPerformed(null);
+ }
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e)
+ {
+ }
+ });
+ valueField.setPreferredSize(new Dimension(60, 25));
+ controlPanel.add(slider, BorderLayout.WEST);
+ controlPanel.add(valueField, BorderLayout.EAST);
+
+ }
+ }
+
+ if (parm != null)
+ {
+ if (choice)
+ {
+ if (init)
+ {
+ List vals = parm.getPossibleValues();
+ for (Object val : vals)
+ {
+ choicebox.addItem(val);
+ }
+ }
+
+ if (parm.getValue() != null)
+ {
+ choicebox.setSelectedItem(parm.getValue());
+ }
+ }
+ else
+ {
+ valueField.setText(parm.getValue());
+ }
+ }
+ lastVal = updateSliderFromValueField();
+ adjusting = false;
+ }
+
+ public Object updateSliderFromValueField()
+ {
+ int iVal;
+ float fVal;
+ if (validator != null)
+ {
+ if (integ)
+ {
+ iVal = 0;
+ try
+ {
+ valueField.setText(valueField.getText().trim());
+ iVal = Integer.valueOf(valueField.getText());
+ if (validator.getMin() != null
+ && validator.getMin().intValue() > iVal)
+ {
+ iVal = validator.getMin().intValue();
+ // TODO: provide visual indication that hard limit was reached for
+ // this parameter
+ }
+ if (validator.getMax() != null
+ && validator.getMax().intValue() < iVal)
+ {
+ iVal = validator.getMax().intValue();
+ // TODO: provide visual indication that hard limit was reached for
+ // this parameter
+ }
+ } catch (Exception e)
+ {
+ }
+ ;
+ if (validator.getMin() != null && validator.getMax() != null)
+ {
+ slider.getModel().setRangeProperties(iVal, 1,
+ validator.getMin().intValue(),
+ validator.getMax().intValue(), true);
+ }
+ else
+ {
+ slider.setVisible(false);
+ }
+ return new int[]
+ { iVal };
+ }
+ else
+ {
+ fVal = 0f;
+ try
+ {
+ fVal = Float.valueOf(valueField.getText());
+ if (validator.getMin() != null
+ && validator.getMin().floatValue() > fVal)
+ {
+ fVal = validator.getMin().floatValue();
+ // TODO: provide visual indication that hard limit was reached for
+ // this parameter
+ }
+ if (validator.getMax() != null
+ && validator.getMax().floatValue() < fVal)
+ {
+ fVal = validator.getMax().floatValue();
+ // TODO: provide visual indication that hard limit was reached for
+ // this parameter
+ }
+ } catch (Exception e)
+ {
+ }
+ ;
+ if (validator.getMin() != null && validator.getMax() != null)
+ {
+ slider.getModel().setRangeProperties((int) fVal * 1000, 1,
+ (int) validator.getMin().floatValue() * 1000,
+ (int) validator.getMax().floatValue() * 1000, true);
+ }
+ else
+ {
+ slider.setVisible(false);
+ }
+ return new float[]
+ { fVal };
+ }
+ }
+ else
+ {
+ if (!choice)
+ {
+ slider.setVisible(false);
+ return new String[]
+ { valueField.getText().trim() };
+ }
+ else
+ {
+ return new String[]
+ { (String) choicebox.getSelectedItem() };
+ }
+ }
+
+ }
+ }
+
+ public static final int PARAM_WIDTH = 340;
+
+ public static final int PARAM_HEIGHT = 150;
+
+ public static final int PARAM_CLOSEDHEIGHT = 80;
+
+ public OptsAndParamsPage(OptsParametersContainerI paramContainer)
+ {
+ this(paramContainer,false);
+ }
+ public OptsAndParamsPage(OptsParametersContainerI paramContainer, boolean compact)
+ {
+ poparent = paramContainer;
+ this.compact=compact;
+ }
+
+ public static void showUrlPopUp(JComponent invoker, final String finfo,
+ int x, int y)
+ {
+
+ JPopupMenu mnu = new JPopupMenu();
+ JMenuItem mitem = new JMenuItem("View " + finfo);
+ mitem.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ Desktop.showUrl(finfo);
+
+ }
+ });
+ mnu.add(mitem);
+ mnu.show(invoker, x, y);
+ }
+
+ URL linkImageURL = getClass().getResource("/images/link.gif");
+
+ Map<String, OptionBox> optSet = new Hashtable<String, OptionBox>();
+
+ Map<String, ParamBox> paramSet = new Hashtable<String, ParamBox>();
+
+ public Map<String, OptionBox> getOptSet()
+ {
+ return optSet;
+ }
+
+ public void setOptSet(Map<String, OptionBox> optSet)
+ {
+ this.optSet = optSet;
+ }
+
+ public Map<String, ParamBox> getParamSet()
+ {
+ return paramSet;
+ }
+
+ public void setParamSet(Map<String, ParamBox> paramSet)
+ {
+ this.paramSet = paramSet;
+ }
+
+ OptsParametersContainerI poparent;
+
+ OptionBox addOption(OptionI opt)
+ {
+ OptionBox cb = optSet.get(opt.getName());
+ if (cb == null)
+ {
+ cb = new OptionBox(opt);
+ optSet.put(opt.getName(), cb);
+ // jobOptions.add(cb, FlowLayout.LEFT);
+ }
+ return cb;
+ }
+
+ ParamBox addParameter(ParameterI arg)
+ {
+ ParamBox pb = paramSet.get(arg.getName());
+ if (pb == null)
+ {
+ pb = new ParamBox(poparent, arg);
+ paramSet.put(arg.getName(), pb);
+ // paramList.add(pb);
+ }
+ pb.init();
+ // take the defaults from the parameter
+ pb.updateControls(arg);
+ return pb;
+ }
+
+ void selectOption(OptionI option, String string)
+ {
+ OptionBox cb = optSet.get(option.getName());
+ if (cb == null)
+ {
+ cb = addOption(option);
+ }
+ cb.enabled.setSelected(string != null); // initial state for an option.
+ if (string != null)
+ {
+ if (option.getPossibleValues().contains(string))
+ {
+ cb.val.setSelectedItem(string);
+ }
+ else
+ {
+ throw new Error("Invalid value " + string + " for option " + option);
+ }
+
+ }
+ if (option.isRequired() && !cb.enabled.isSelected())
+ {
+ // TODO: indicate paramset is not valid.. option needs to be selected!
+ }
+ cb.setInitialValue();
+ }
+
+ void setParameter(ParameterI arg)
+ {
+ ParamBox pb = paramSet.get(arg.getName());
+ if (pb == null)
+ {
+ addParameter(arg);
+ }
+ else
+ {
+ pb.updateControls(arg);
+ }
+
+ }
+
+ /**
+ * recover options and parameters from GUI
+ *
+ * @return
+ */
+ public List<ArgumentI> getCurrentSettings()
+ {
+ List<ArgumentI> argSet = new ArrayList<ArgumentI>();
+ for (OptionBox opts : getOptSet().values())
+ {
+ OptionI opt = opts.getOptionIfEnabled();
+ if (opt != null)
+ {
+ argSet.add(opt);
+ }
+ }
+ for (ParamBox parambox : getParamSet().values())
+ {
+ ParameterI parm = parambox.getParameter();
+ if (parm != null)
+ {
+ argSet.add(parm);
+ }
+ }
+
+ return argSet;
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.gui.OptsAndParamsPage.ParamBox;
+import jalview.gui.OptsAndParamsPage.OptionBox;
+
+public interface OptsParametersContainerI
+{
+
+ void refreshParamLayout();
+
+ void argSetModified(Object modifiedElement, boolean b);
+
+}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
protected JRadioButtonMenuItem BLOSUM62Colour = new JRadioButtonMenuItem();
- protected JRadioButtonMenuItem purinePyrimidineColour = new JRadioButtonMenuItem();
-
- // protected JRadioButtonMenuItem covariationColour = new
- // JRadioButtonMenuItem();
-
JRadioButtonMenuItem noColourmenuItem = new JRadioButtonMenuItem();
protected JCheckBoxMenuItem conservationMenuItem = new JCheckBoxMenuItem();
* @param links
* @param groupLinks
*/
- public PopupMenu(final AlignmentPanel ap, final Sequence seq,
- final Vector links, final Vector groupLinks)
+ public PopupMenu(final AlignmentPanel ap, Sequence seq, Vector links,
+ Vector groupLinks)
{
// /////////////////////////////////////////////////////////
// If this is activated from the sequence panel, the user may want to
colours.add(userDefinedColour);
colours.add(PIDColour);
colours.add(BLOSUM62Colour);
- colours.add(purinePyrimidineColour);
- // colours.add(covariationColour);
for (int i = 0; i < jalview.io.FormatAdapter.WRITEABLE_FORMATS.length; i++)
{
e.printStackTrace();
}
+ JMenuItem menuItem;
if (seq != null)
{
sequenceMenu.setText(sequence.getName());
- JMenuItem menuItem;
if (seq.getDatasetSequence().getPDBId() != null
&& seq.getDatasetSequence().getPDBId().size() > 0)
{
{
public void actionPerformed(ActionEvent e)
{
- // TODO re JAL-860: optionally open dialog or provide a menu entry
- // allowing user to open just one structure per sequence
- new AppJmol(pdb, ap.av.collateForPDB(new PDBEntry[]
- { pdb })[0], null, ap);
+ // TODO re JAL-860: optionally open dialog or provide a menu entry allowing user to open just one structure per sequence
+ new AppJmol(pdb, ap.av.collateForPDB(new PDBEntry[] { pdb })[0], null, ap);
// new PDBViewer(pdb, seqs2, null, ap, AppletFormatAdapter.FILE);
}
}
else
{
- if (ap.av.alignment.isNucleotide() == false)
- {
- structureMenu.remove(viewStructureMenu);
- }
+ structureMenu.remove(viewStructureMenu);
// structureMenu.remove(colStructureMenu);
}
- if (ap.av.alignment.isNucleotide() == true)
- {
- AlignmentAnnotation[] aa = ap.av.alignment.getAlignmentAnnotation();
- for (int i = 0; i < aa.length; i++)
- {
- if (aa[i].getRNAStruc() != null)
- {
- final String rnastruc = aa[i].getRNAStruc();
-
- menuItem = new JMenuItem();
- menuItem.setText("RNA structure - consensus");
- menuItem.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- new AppVarna(seq.getSequenceAsString(), rnastruc, seq
- .getName(), ap);
- }
- });
- viewStructureMenu.add(menuItem);
- }
- }
-
- // SequenceFeatures[] test = seq.getSequenceFeatures();
-
- if (seq.getAnnotation() != null)
- {
- AlignmentAnnotation seqAnno[] = seq.getAnnotation();
- for (int i = 0; i < seqAnno.length; i++)
- {
- if (seqAnno[i].getRNAStruc() != null)
- {
- final String rnastruc = seqAnno[i].getRNAStruc();
-
- // TODO: make rnastrucF a bit more nice
- menuItem = new JMenuItem();
- menuItem.setText("RNA structure - "+seq.getName());
- menuItem.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- // TODO: VARNA does'nt print gaps in the sequence
- new AppVarna(seq.getSequenceAsString(), rnastruc, seq
- .getName(), ap);
- }
- });
- viewStructureMenu.add(menuItem);
- }
- }
- }
-
-
- }
-
menuItem = new JMenuItem("Hide Sequences");
menuItem.addActionListener(new java.awt.event.ActionListener()
{
});
add(menuItem);
}
-
+ }
+ }
+ // for the case when no sequences are even visible
+ if (ap.av.hasHiddenRows) {
+ {
menuItem = new JMenuItem("Reveal All");
menuItem.addActionListener(new ActionListener()
{
SequenceGroup sg = ap.av.getSelectionGroup();
- if (sg != null)
+ if (sg != null&& sg.getSize()>0)
{
- groupName.setText("Name: " + sg.getName());
+ groupName.setText("Name: "+sg.getName());
groupName.setText("Edit name and description of current group.");
if (sg.cs instanceof ZappoColourScheme)
{
clustalColour.setSelected(true);
}
- else if (sg.cs instanceof PurinePyrimidineColourScheme)
- {
- purinePyrimidineColour.setSelected(true);
- }
- /*
- * else if (sg.cs instanceof CovariationColourScheme) {
- * covariationColour.setSelected(true); }
- */
else
{
noColourmenuItem.setSelected(true);
buildGroupURLMenu(sg, groupLinks);
}
// Add a 'show all structures' for the current selection
- Hashtable<String, PDBEntry> pdbe = new Hashtable<String, PDBEntry>();
- for (SequenceI sq : ap.av.getSequenceSelection())
+ Hashtable<String, PDBEntry> pdbe=new Hashtable<String,PDBEntry>();
+ SequenceI sqass=null;
+ for (SequenceI sq: ap.av.getSequenceSelection())
{
- Vector<PDBEntry> pes = (Vector<PDBEntry>) sq.getDatasetSequence()
- .getPDBId();
- if (pes != null)
- {
- for (PDBEntry pe : pes)
+ Vector<PDBEntry> pes = (Vector<PDBEntry>) sq.getDatasetSequence().getPDBId();
+ if (pes!=null) {
+ for (PDBEntry pe: pes)
{
- pdbe.put(pe.getId(), pe);
+ pdbe.put(pe.getId(), pe);
+ if (sqass==null)
+ {
+ sqass = sq;
+ }
}
}
}
- if (pdbe.size() > 0)
+ if (pdbe.size()>0)
{
- final PDBEntry[] pe = pdbe.values().toArray(
- new PDBEntry[pdbe.size()]);
+ final PDBEntry[] pe = pdbe.values().toArray(new PDBEntry[pdbe.size()]);
final JMenuItem gpdbview;
- structureMenu.add(gpdbview = new JMenuItem("View " + pdbe.size()
- + " structures."));
- gpdbview
- .setToolTipText("Open a new Jmol view with all structures associated with the current selection and superimpose them using the alignment.");
+ if (pdbe.size()==1)
+ {
+ structureMenu.add(gpdbview=new JMenuItem("View structure for "+sqass.getDisplayId(false)));
+ } else {
+ structureMenu.add(gpdbview=new JMenuItem("View all "+pdbe.size()+" structures."));
+ }
+ gpdbview.setToolTipText("Open a new Jmol view with all structures associated with the current selection and superimpose them using the alignment.");
gpdbview.addActionListener(new ActionListener()
{
-
+
@Override
public void actionPerformed(ActionEvent e)
{
continue;
}
final String label = urlLink.getLabel();
- if (urlLink.isDynamic())
+ if (seq!=null && urlLink.isDynamic())
{
// collect matching db-refs
- DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(seq
- .getDBRef(), new String[]
- { urlLink.getTarget() });
+ DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(
+ seq.getDBRef(), new String[]
+ { urlLink.getTarget() });
// collect id string too
String id = seq.getName();
String descr = seq.getDescription();
JMenu[] linkMenus = new JMenu[]
{ null, new JMenu("IDS"), new JMenu("Sequences"),
new JMenu("IDS and Sequences") }; // three types of url that might be
- // created.
+ // created.
SequenceI[] seqs = ap.av.getSelectionAsNewSequence();
String[][] idandseqs = GroupUrlLink.formStrings(seqs);
Hashtable commonDbrefs = new Hashtable();
}
// now create group links for all distinct ID/sequence sets.
boolean addMenu = false; // indicates if there are any group links to give
- // to user
+ // to user
for (int i = 0; i < groupLinks.size(); i++)
{
String link = groupLinks.elementAt(i).toString();
Object[] urlset = null;
try
{
- urlset = urlLink.makeUrlStubs(ids, seqstr, "FromJalview"
- + System.currentTimeMillis(), false);
+ urlset = urlLink.makeUrlStubs(ids, seqstr,
+ "FromJalview" + System.currentTimeMillis(), false);
} catch (UrlStringTooLongException e)
{
}
JMenuItem item = new JMenuItem(label);
item.setToolTipText("open URL (" + urlgenerator.getUrl_prefix()
+ "..) (" + urlgenerator.getNumberInvolved(urlstub) + " seqs)"); // TODO:
- // put
- // in
- // info
- // about
- // what
- // is
- // being
- // sent.
+ // put
+ // in
+ // info
+ // about
+ // what
+ // is
+ // being
+ // sent.
item.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
colourMenu.add(turnColour);
colourMenu.add(buriedColour);
colourMenu.add(nucleotideMenuItem);
- colourMenu.add(purinePyrimidineColour);
- // colourMenu.add(covariationColour);
colourMenu.add(userDefinedColour);
if (jalview.gui.UserDefinedColours.getUserColourSchemes() != null)
BLOSUM62Colour_actionPerformed();
}
});
- purinePyrimidineColour.setText("Purine/Pyrimidine");
- purinePyrimidineColour
- .addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- purinePyrimidineColour_actionPerformed();
- }
- });
- /*
- * covariationColour.addActionListener(new java.awt.event.ActionListener() {
- * public void actionPerformed(ActionEvent e) {
- * covariationColour_actionPerformed(); } });
- */
-
conservationMenuItem.setText("Conservation");
conservationMenuItem
.addActionListener(new java.awt.event.ActionListener()
protected void clustalColour_actionPerformed()
{
SequenceGroup sg = getGroup();
- sg.cs = new ClustalxColourScheme(sg
- .getSequences(ap.av.hiddenRepSequences), ap.av.alignment
- .getWidth());
+ sg.cs = new ClustalxColourScheme(
+ sg.getSequences(ap.av.hiddenRepSequences),
+ ap.av.alignment.getWidth());
refresh();
}
refresh();
}
- protected void purinePyrimidineColour_actionPerformed()
- {
- getGroup().cs = new PurinePyrimidineColourScheme();
- refresh();
- }
-
- /*
- * protected void covariationColour_actionPerformed() { getGroup().cs = new
- * CovariationColourScheme(sequence.getAnnotation()[0]); refresh(); }
- */
/**
* DOCUMENT ME!
*
if (abovePIDColour.isSelected())
{
- sg.cs.setConsensus(AAFrequency.calculate(sg
- .getSequences(ap.av.hiddenRepSequences), sg.getStartRes(), sg
- .getEndRes() + 1));
+ sg.cs.setConsensus(AAFrequency.calculate(
+ sg.getSequences(ap.av.hiddenRepSequences), sg.getStartRes(),
+ sg.getEndRes() + 1));
int threshold = SliderPanel.setPIDSliderSource(ap, sg.cs, getGroup()
.getName());
{
SequenceGroup sg = getGroup();
sg.cs = new PIDColourScheme();
- sg.cs.setConsensus(AAFrequency.calculate(sg
- .getSequences(ap.av.hiddenRepSequences), sg.getStartRes(), sg
- .getEndRes() + 1));
+ sg.cs.setConsensus(AAFrequency.calculate(
+ sg.getSequences(ap.av.hiddenRepSequences), sg.getStartRes(),
+ sg.getEndRes() + 1));
refresh();
}
sg.cs = new Blosum62ColourScheme();
- sg.cs.setConsensus(AAFrequency.calculate(sg
- .getSequences(ap.av.hiddenRepSequences), sg.getStartRes(), sg
- .getEndRes() + 1));
+ sg.cs.setConsensus(AAFrequency.calculate(
+ sg.getSequences(ap.av.hiddenRepSequences), sg.getStartRes(),
+ sg.getEndRes() + 1));
refresh();
}
if (conservationMenuItem.isSelected())
{
Conservation c = new Conservation("Group",
- ResidueProperties.propHash, 3, sg
- .getSequences(ap.av.hiddenRepSequences), sg
- .getStartRes(), sg.getEndRes() + 1);
+ ResidueProperties.propHash, 3,
+ sg.getSequences(ap.av.hiddenRepSequences), sg.getStartRes(),
+ sg.getEndRes() + 1);
c.calculate();
c.verdict(false, ap.av.ConsPercGaps);
return;
}
- AnnotationColourGradient acg = new AnnotationColourGradient(sequence
- .getAnnotation()[0], null,
+ AnnotationColourGradient acg = new AnnotationColourGradient(
+ sequence.getAnnotation()[0], null,
AnnotationColourGradient.NO_THRESHOLD);
acg.predefinedColours = true;
{
SequenceGroup sg = getGroup();
- EditNameDialog dialog = new EditNameDialog(sg.getName(), sg
- .getDescription(), " Group Name ", "Group Description ",
- "Edit Group Name/Description", ap.alignFrame);
+ EditNameDialog dialog = new EditNameDialog(sg.getName(),
+ sg.getDescription(), " Group Name ",
+ "Group Description ", "Edit Group Name/Description",
+ ap.alignFrame);
if (!dialog.accept)
{
*/
void sequenceName_actionPerformed()
{
- EditNameDialog dialog = new EditNameDialog(sequence.getName(), sequence
- .getDescription(), " Sequence Name ",
+ EditNameDialog dialog = new EditNameDialog(sequence.getName(),
+ sequence.getDescription(), " Sequence Name ",
"Sequence Description ", "Edit Sequence Name/Description",
ap.alignFrame);
caseChange = ChangeCaseCommand.TO_LOWER;
}
- ChangeCaseCommand caseCommand = new ChangeCaseCommand(description, sg
- .getSequencesAsArray(ap.av.hiddenRepSequences), startEnd,
+ ChangeCaseCommand caseCommand = new ChangeCaseCommand(description,
+ sg.getSequencesAsArray(ap.av.hiddenRepSequences), startEnd,
caseChange);
ap.alignFrame.addHistoryItem(caseCommand);
{
CutAndPasteTransfer cap = new CutAndPasteTransfer();
cap.setForInput(null);
- Desktop.addInternalFrame(cap, "Alignment output - "
- + e.getActionCommand(), 600, 500);
+ Desktop.addInternalFrame(cap,
+ "Alignment output - " + e.getActionCommand(), 600, 500);
String[] omitHidden = null;
jalview.io.JalviewFileChooser chooser = new jalview.io.JalviewFileChooser(
jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
chooser.setFileView(new jalview.io.JalviewFileView());
- chooser.setDialogTitle("Select a PDB file for "
- + sequence.getDisplayId(false));
- chooser
- .setToolTipText("Load a PDB file and associate it with sequence '"
- + sequence.getDisplayId(false) + "'");
+ chooser.setDialogTitle("Select a PDB file for "+sequence.getDisplayId(false));
+ chooser.setToolTipText("Load a PDB file and associate it with sequence '"+sequence.getDisplayId(false)+"'");
int value = chooser.showOpenDialog(null);
{
String choice = chooser.getSelectedFile().getPath();
jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice);
- new AssociatePdbFileWithSeq().associatePdbWithSeq(choice,
- jalview.io.AppletFormatAdapter.FILE, sequence, true);
+ new AssociatePdbFileWithSeq().associatePdbWithSeq(choice, jalview.io.AppletFormatAdapter.FILE, sequence, true);
}
}
public void colourByStructure(String pdbid)
{
- Annotation[] anots = ap.av.getStructureSelectionManager()
- .colourSequenceFromStructure(sequence, pdbid);
+ Annotation[] anots = ap.av.getStructureSelectionManager().colourSequenceFromStructure(
+ sequence, pdbid);
AlignmentAnnotation an = new AlignmentAnnotation("Structure",
"Coloured by " + pdbid, anots);
if (sequence == null)
sequence = (Sequence) sg.getSequenceAt(0);
- EditNameDialog dialog = new EditNameDialog(sequence
- .getSequenceAsString(sg.getStartRes(), sg.getEndRes() + 1),
- null, "Edit Sequence ", null, "Edit Sequence", ap.alignFrame);
+ EditNameDialog dialog = new EditNameDialog(
+ sequence.getSequenceAsString(sg.getStartRes(),
+ sg.getEndRes() + 1), null, "Edit Sequence ", null,
+ "Edit Sequence", ap.alignFrame);
if (dialog.accept)
{
EditCommand editCommand = new EditCommand("Edit Sequences",
EditCommand.REPLACE, dialog.getName().replace(' ',
- ap.av.getGapCharacter()), sg
- .getSequencesAsArray(ap.av.hiddenRepSequences), sg
- .getStartRes(), sg.getEndRes() + 1, ap.av.alignment);
+ ap.av.getGapCharacter()),
+ sg.getSequencesAsArray(ap.av.hiddenRepSequences),
+ sg.getStartRes(), sg.getEndRes() + 1, ap.av.alignment);
ap.alignFrame.addHistoryItem(editCommand);
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
.getDefault("SHOW_NPFEATS_TOOLTIP", true));
showDbRefTooltip.setSelected(Cache.getDefault("SHOW_DBREFS_TOOLTIP",
true));
-
+ sortByTree.setSelected(Cache.getDefault("SORT_BY_TREE", false));
for (int i = ColourSchemeProperty.FIRST_COLOUR; i <= ColourSchemeProperty.LAST_COLOUR; i++)
{
colour.addItem(ColourSchemeProperty.getColourName(i));
startupCheckbox
.setSelected(Cache.getDefault("SHOW_STARTUP_FILE", true));
startupFileTextfield.setText(Cache.getDefault("STARTUP_FILE",
- "http://www.jalview.org/examples/exampleFile_2_3.jar"));
+ Cache.getDefault("www.jalview.org","http://www.jalview.org")+"/examples/exampleFile_2_3.jar"));
sortby.addItem("No sort");
sortby.addItem("Id");
Cache.applicationProperties.setProperty("SORT_ALIGNMENT", sortby
.getSelectedItem().toString());
- Cache.applicationProperties.setProperty("ANNOTATIONCOLOUR_MIN", minColour.getBackground().toString());
- Cache.applicationProperties.setProperty("ANNOTATIONCOLOUR_MAX", maxColour.getBackground().toString());
+ Cache.setColourProperty("ANNOTATIONCOLOUR_MIN", minColour.getBackground());
+ Cache.setColourProperty("ANNOTATIONCOLOUR_MAX", maxColour.getBackground());
if (epsRendering.getSelectedItem().equals("Prompt each time"))
{
Cache.applicationProperties.setProperty("AUTO_CALC_CONSENSUS",
Boolean.toString(autoCalculateConsCheck.isSelected()));
+ Cache.applicationProperties.setProperty("SORT_BY_TREE",
+ Boolean.toString(sortByTree.isSelected()));
Cache.applicationProperties.setProperty("PAD_GAPS",
Boolean.toString(padGaps.isSelected()));
try
{
wsPrefs.updateWsMenuConfig(true);
+ wsPrefs.refreshWs_actionPerformed(e);
frame.setClosed(true);
} catch (Exception ex)
{
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
(allowCancel) ? JOptionPane.YES_NO_CANCEL_OPTION
: JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
+ // now, ask the desktop to relayer any external windows that might have been obsured
+ if (Desktop.instance!=null)
+ {
+ Desktop.instance.relayerWindows();
+ }
+ // and finish parsing the result
jalview.bin.Cache.log.debug("Got response : " + reply);
if (reply == JOptionPane.YES_OPTION)
{
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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 java.util.ArrayList;
+import java.util.Hashtable;
+
+import javax.swing.JDialog;
+import javax.swing.JInternalFrame;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.event.ListSelectionEvent;
+
+import com.sun.tools.corba.se.idl.InvalidArgument;
+
+import net.miginfocom.swing.MigLayout;
+
+import jalview.jbgui.GRestInputParamEditDialog;
+import jalview.ws.params.ArgumentI;
+import jalview.ws.params.InvalidArgumentException;
+import jalview.ws.params.OptionI;
+import jalview.ws.params.ParameterI;
+import jalview.ws.rest.InputType;
+import jalview.ws.rest.RestServiceDescription;
+
+public class RestInputParamEditDialog extends GRestInputParamEditDialog
+ implements OptsParametersContainerI
+{
+ Hashtable<String, Class> typeclass = new Hashtable<String, Class>();
+
+ Hashtable<String, ArrayList<JPanel>> typeopts = new Hashtable<String, ArrayList<JPanel>>();
+
+ Hashtable<String,OptsAndParamsPage> opanps = new Hashtable<String, OptsAndParamsPage>();
+
+ private InputType getTypeFor(String name)
+ {
+ try
+ {
+ return (InputType) (typeclass.get(name).getConstructor()
+ .newInstance(null));
+ } catch (Throwable x)
+ {
+ System.err
+ .println("Unexpected exception when instantiating rest input type.");
+ x.printStackTrace();
+ }
+ return null;
+ }
+
+ int reply;
+ JalviewDialog frame = new JalviewDialog()
+ {
+
+ @Override
+ protected void raiseClosed()
+ {
+
+ }
+
+ @Override
+ protected void okPressed()
+ {
+ reply=JOptionPane.OK_OPTION;
+ }
+
+ @Override
+ protected void cancelPressed()
+ {
+ reply=JOptionPane.CANCEL_OPTION;
+
+ }
+ };
+ InputType old,current;
+ public RestInputParamEditDialog(
+ RestServiceEditorPane restServiceEditorPane,
+ RestServiceDescription currentservice, InputType toedit)
+ {
+ initFor(restServiceEditorPane, currentservice, toedit);
+ frame.waitForInput();
+ // TODO: warn user if they are about to overwrite an existing parameter because they have used the same name when editing a different parameter.
+ // TODO: make any press of the return key cause 'OK' to be pressed
+ }
+ private void initFor(RestServiceEditorPane restServiceEditorPane,
+ RestServiceDescription currentservice, InputType toedit)
+ {
+ okcancel.add(frame.cancel);
+ okcancel.add(frame.ok);
+ frame.initDialogFrame(dpane, true, true, "Edit parameter for service "+currentservice.getName(), 600,800);
+
+ initTypeLists();
+ reply=JOptionPane.CANCEL_OPTION;
+ old = toedit;
+ current = null;
+ if (old!=null) {
+ setStateFor(old);
+ }
+ updated = updated && reply==JOptionPane.OK_OPTION;
+ frame.validate();
+ }
+
+ public RestInputParamEditDialog(
+ RestServiceEditorPane restServiceEditorPane,
+ RestServiceDescription currentservice, String string)
+ {
+ initFor(restServiceEditorPane, currentservice,null);
+ tok.setText(string);
+ frame.waitForInput();
+ }
+
+ private void setStateFor(InputType current)
+ {
+ tok.setText(current.token);
+ OptsAndParamsPage opanp=opanps.get(current.getURLtokenPrefix());
+ for (OptionI ops:current.getOptions())
+ {
+ if (ops instanceof ParameterI)
+ {
+ opanp.setParameter((ParameterI) ops);
+ } else {
+ if (ops.getValue()!=null && ops.getValue().length()>0) {
+ opanp.selectOption(ops, ops.getValue());
+ }
+ }
+ }
+ typeList.setSelectedValue(current.getURLtokenPrefix(), true);
+ type_SelectionChangedActionPerformed(null);
+ }
+ private void updateCurrentType()
+ {
+ if (typeList.getSelectedValue()!=null) {
+ InputType newType = getTypeFor((String)typeList.getSelectedValue());
+ if (newType!=null) {
+ newType.token = tok.getText().trim();
+ try {
+ newType.configureFromArgumentI(opanps.get(newType.getURLtokenPrefix()).getCurrentSettings());
+ current=newType;
+ updated=true;
+ } catch (InvalidArgumentException ex) {
+ System.err.println("IMPLEMENTATION ERROR: Invalid argument for type : "+typeList.getSelectedValue()+"\n");
+ ex.printStackTrace();
+ }
+ }
+ }
+
+ }
+ private void initTypeLists()
+ {
+ ArrayList<String> types=new ArrayList<String>();
+ // populate type list
+ for (Class type : RestServiceDescription.getInputTypes())
+ {
+
+ InputType jtype = null;
+ try
+ {
+ JPanel inopts = new JPanel(new MigLayout());
+ ArrayList<JPanel> opts = new ArrayList<JPanel>(), prms = new ArrayList<JPanel>();
+ jtype = (InputType) (type.getConstructor().newInstance(null));
+ typeclass.put(jtype.getURLtokenPrefix(), type);
+ // and populate parameters from this type
+ OptsAndParamsPage opanp = new OptsAndParamsPage(this,true);
+ opanps.put(jtype.getURLtokenPrefix(),opanp);
+ for (OptionI opt : jtype.getOptions())
+ {
+
+ if (opt instanceof ParameterI)
+ {
+ prms.add(opanp.addParameter((ParameterI) opt));
+ }
+ else
+ {
+ opts.add(opanp.addOption(opt));
+ }
+ }
+ // then tag the params at the end of the options.
+ for (JPanel pnl : prms)
+ {
+ opts.add(pnl);
+ }
+ typeopts.put(jtype.getURLtokenPrefix(), opts);
+ types.add(jtype.getURLtokenPrefix());
+ } catch (Throwable x)
+ {
+ System.err
+ .println("Unexpected exception when instantiating rest input type.");
+ x.printStackTrace();
+ }
+ }
+ typeList.setListData(types.toArray());
+
+ }
+
+ @Override
+ protected void type_SelectionChangedActionPerformed(ListSelectionEvent e)
+ {
+ options.removeAll();
+ String typen = (String) typeList.getSelectedValue();
+ if (typeopts.get(typen) != null)
+ {
+ for (JPanel opt : typeopts.get(typen))
+ {
+ opt.setOpaque(true);
+ options.add(opt,"wrap");
+ }
+ options.invalidate();
+ optionsPanel.setVisible(true);
+ }
+ else
+ {
+ optionsPanel.setVisible(false);
+ }
+ dpane.revalidate();
+ updateCurrentType();
+ }
+
+ boolean updated=false;
+ public boolean wasUpdated()
+ {
+ return updated;
+ }
+
+ @Override
+ public void refreshParamLayout()
+ {
+ options.invalidate();
+ dpane.revalidate();
+ }
+
+ @Override
+ protected void tokChanged_actionPerformed()
+ {
+ if (tok.getText().trim().length()>0)
+ {
+ if (current!=null)
+ {
+ current.token = tok.getText().trim();
+ updated = true;
+ }
+ }
+ }
+ @Override
+ public void argSetModified(Object modifiedElement, boolean b)
+ {
+ updated = updated | b;
+ if (updated)
+ {
+ updateCurrentType();
+ }
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.packed.DataProvider.JvDataType;
+import jalview.jbgui.GRestServiceEditorPane;
+import jalview.ws.rest.InputType;
+import jalview.ws.rest.RestServiceDescription;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ComponentEvent;
+import java.awt.event.ComponentListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+import java.awt.event.MouseEvent;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.JFrame;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+public class RestServiceEditorPane extends GRestServiceEditorPane
+{
+ /**
+ * the latest version of the service definition.
+ */
+ jalview.ws.rest.RestServiceDescription currentservice = null;
+
+ /**
+ * original service passed to editor if we are modifying an existing service
+ * definition
+ */
+ jalview.ws.rest.RestServiceDescription oldservice = null;
+
+ public RestServiceEditorPane()
+ {
+ super();
+ // begin with initial text description box enabled.
+ urldesc.addKeyListener(new KeyListener()
+ {
+ @Override
+ public void keyTyped(KeyEvent e)
+ {
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e)
+ {
+ refreshCutnPaste(true);
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e)
+ {
+
+ }
+ });
+ panels.addChangeListener(new ChangeListener()
+ {
+
+ /**
+ * last panel selected - used to decide whether the service or the GUI has the latest info
+ */
+ Object lastComp;
+ @Override
+ public void stateChanged(ChangeEvent e)
+ {
+ if (lastComp!=paste) {
+ updateServiceFromGui();
+ refreshCutnPaste(false);
+ } else {
+ refreshCutnPaste(true);
+ }
+ lastComp = panels.getSelectedComponent();
+
+ }
+ });
+ currentservice = new RestServiceDescription("Analysis", "service description", "service name", "http://localhost/", "", null, false, false, '-');
+ initGuiWith(currentservice);
+ refreshCutnPaste(false);
+ updateButtons();
+ }
+
+ public RestServiceEditorPane(RestServiceDescription toedit)
+ {
+ this();
+ oldservice = toedit;
+ if (oldservice!=null)
+ { currentservice = new RestServiceDescription(toedit);
+ } else {
+ currentservice = new RestServiceDescription("Analysis", "service description", "service name", "http://localhost/", "", null, false, false, '-');
+ }
+ initGuiWith(currentservice);
+ refreshCutnPaste(false);
+ updateButtons();
+ }
+
+ /**
+ * refresh the buttons based on model state
+ */
+ public void updateButtons()
+ {
+ cancelButton.setEnabled(true);
+ okButton.setEnabled(currentservice != null && currentservice.isValid());
+
+ }
+
+ Vector<String> _iparam = new Vector<String>();
+
+ Vector<String> _rparam = new Vector<String>();
+
+ /**
+ * generate an editable URL service string and parameter list using the
+ * service
+ *
+ * @param currentservice2
+ */
+ private void initGuiWith(RestServiceDescription currentservice)
+ {
+ _iparam.clear();
+ _rparam.clear();
+ action.removeAllItems();
+ action.addItem("Alignment");
+ action.addItem("Analysis");
+ gapChar.removeAllItems();
+ gapChar.addItem(".");
+ gapChar.addItem(" ");
+ gapChar.addItem("-");
+ if (currentservice==null)
+ {
+ name.setText("");
+ descr.setText("");
+ url.setText("");
+ urlsuff.setText("");
+ action.setSelectedItem("Analysis");
+ gapChar.setSelectedItem("-");
+ } else {
+ name.setText(currentservice.getName());
+ descr.setText(currentservice.getDescription());
+ url.setText(currentservice.getPostUrl());
+ urlsuff.setText(currentservice.getUrlSuffix());
+ for (Map.Entry<String, InputType> inparam : currentservice
+ .getInputParams().entrySet())
+ {
+ _iparam.add(inparam.getKey() + " "
+ + inparam.getValue().getURLtokenPrefix() + ":"
+ + inparam.getValue().getURLEncodedParameter().toString());
+ }
+
+ for (JvDataType oparam : currentservice.getResultDataTypes())
+ {
+ _rparam.add(oparam.name());
+ }
+ iprms.setListData(_iparam);
+ rdata.setListData(_rparam);
+
+ action.setSelectedItem(currentservice.getAction());
+
+ gapChar.setSelectedItem(""+currentservice.getGapCharacter());
+ }
+ revalidate();
+ }
+ private String getSelectedInputToken()
+ {
+ if (iprms.getSelectedIndex()>-1)
+ {
+ String toktoedit = (String) iprms.getSelectedValue();
+ toktoedit=toktoedit.substring(0, toktoedit.indexOf(" "));
+ return toktoedit;
+ }
+ return null;
+ }
+ @Override
+ protected void iprmListSelection_doubleClicked()
+ {
+ String toktoedit = getSelectedInputToken();
+ if (toktoedit!=null)
+ {
+ InputType toedit = currentservice.getInputParams().get(toktoedit);
+ String oldParam=toktoedit;
+ RestInputParamEditDialog dialog=new RestInputParamEditDialog(this, currentservice, toedit);
+ if (dialog.wasUpdated()) {
+ currentservice.getInputParams().remove(oldParam);
+ currentservice.getInputParams().put(dialog.current.token, dialog.current);
+ initGuiWith(currentservice);
+ }
+
+ }
+ }
+ @Override
+ protected void iprmsAdd_actionPerformed(ActionEvent e)
+ {
+ RestInputParamEditDialog dialog=new RestInputParamEditDialog(this, currentservice, "param"+(1+currentservice.getInputParams().size()));
+ if (dialog.wasUpdated()) {
+ currentservice.getInputParams().put(dialog.current.token, dialog.current);
+ initGuiWith(currentservice);
+ }
+
+ }
+ @Override
+ protected void iprmsRem_actionPerformed(ActionEvent e)
+ {
+ String toktoedit = getSelectedInputToken();
+ if (toktoedit!=null)
+ {
+ currentservice.getInputParams().remove(toktoedit);
+ initGuiWith(currentservice);
+
+ }
+ }
+ @Override
+ protected void rdata_rightClicked(MouseEvent mouse)
+ {
+ final int rdatasel = rdata.getSelectedIndex();
+ if (rdatasel>-1)
+ {
+ JPopupMenu popup = new JPopupMenu("Select return type");
+ for (final JvDataType type:JvDataType.values()) {
+ popup.add(new JMenuItem(type.name())).addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ currentservice.getResultDataTypes().set(rdatasel, type);
+ initGuiWith(currentservice);
+ rdata.setSelectedIndex(rdatasel);
+ }
+ });
+ }
+ popup.show(rdata, mouse.getX(), mouse.getY());
+ }
+ }
+ @Override
+ protected void rdataAdd_actionPerformed(ActionEvent e)
+ {
+ int p;
+ if ((p=rdata.getSelectedIndex())>-1)
+ {
+ currentservice.getResultDataTypes().add(p+1, JvDataType.ANNOTATION);
+ } else {
+ currentservice.addResultDatatype(JvDataType.ANNOTATION);
+ }
+ initGuiWith(currentservice);
+ rdata.setSelectedIndex(p==-1 ? currentservice.getResultDataTypes().size()-1 : p+1);
+ }
+ @Override
+ protected void rdataNdown_actionPerformed(ActionEvent e)
+ {
+ int p;
+ if ((p=rdata.getSelectedIndex())>-1 && p<_rparam.size()-1)
+ {
+ List<JvDataType> rtypes = currentservice.getResultDataTypes();
+ JvDataType below = rtypes.get(p+1);
+ rtypes.set(p+1, rtypes.get(p));
+ rtypes.set(p, below);
+ initGuiWith(currentservice);
+ rdata.setSelectedIndex(p+1);
+ }
+ }
+ @Override
+ protected void rdataNup_actionPerformed(ActionEvent e)
+ {
+ int p;
+ if ((p=rdata.getSelectedIndex())>0)
+ {
+ List<JvDataType> rtypes = currentservice.getResultDataTypes();
+ JvDataType above = rtypes.get(p-1);
+ rtypes.set(p-1, rtypes.get(p));
+ rtypes.set(p, above);
+ initGuiWith(currentservice);
+ rdata.setSelectedIndex(p-1);
+ }
+ }
+ @Override
+ protected void rdataRem_actionPerformed(ActionEvent e)
+ {
+ if (rdata.getSelectedIndex()>-1)
+ {
+ currentservice.getResultDataTypes().remove(rdata.getSelectedIndex());
+ initGuiWith(currentservice);
+ }
+ }
+
+ private boolean updateServiceFromGui() {
+ Map<String,InputType>inputTypes = new HashMap<String, InputType>();
+ StringBuffer warnings=new StringBuffer();
+ for (String its:_iparam)
+ {
+ Matcher mtch = Pattern.compile("(\\S+)\\s(\\S+):\\[(.+)]").matcher(its);
+ if (mtch.find()) {
+ if (!RestServiceDescription.parseTypeString(mtch.group(2)+":"+mtch.group(3), mtch.group(1), mtch.group(2),mtch.group(3), inputTypes, warnings))
+ {
+ System.err.println("IMPLEMENTATION PROBLEM: Cannot parse RestService input parameter string '"+its+"'"+"\n"+warnings);
+ }
+ }
+ }
+ char gc = gapChar.getSelectedItem()==null ? ' ' : ((String)gapChar.getSelectedItem()).charAt(0);
+ RestServiceDescription newService = new RestServiceDescription((String) action.getSelectedItem(),
+ descr.getText().trim(), name.getText().trim(), url.getText().trim(), urlsuff.getText().trim(), inputTypes, hSeparable.isSelected(), vSeparable.isSelected(), gc);
+
+ if (newService.isValid())
+ {
+ for (String its:_rparam)
+ {
+ JvDataType dtype;
+ try {
+ dtype = JvDataType.valueOf(its);
+ newService.addResultDatatype(dtype);
+ }
+ catch (Throwable x)
+ {
+
+ System.err.println("IMPLEMENTATION PROBLEM: Cannot parse RestService output parameter string '"+its+"'"+"\n"+warnings);
+ }
+ }
+ currentservice = newService;
+ return true;
+ } else {
+ System.err.println("IMPLEMENTATION PROBLEM: Restservice generated from GUI is invalid\n"+warnings);
+
+ }
+ return false;
+ }
+ protected void refreshCutnPaste(boolean reparse)
+ {
+ if (!reparse && currentservice.isValid())
+ {
+ urldesc.setText(currentservice.toString());
+ parseWarnings.setVisible(false);
+ }
+ else
+ {
+ if (reparse)
+ {
+ String txt = urldesc.getText().trim();
+ if (txt.length() > 0)
+ {
+ RestServiceDescription rsd = null;
+ try
+ {
+ rsd = new RestServiceDescription(txt);
+ if (rsd.isValid())
+ {
+ parseWarnings.setVisible(false);
+ parseRes.setText("");
+ initGuiWith(currentservice=rsd);
+ }
+ else
+ {
+ parseRes.setText("Parsing failed. Syntax errors shown below\n"
+ + rsd.getInvalidMessage());
+ parseWarnings.setVisible(true);
+ }
+ } catch (Throwable e)
+ {
+ e.printStackTrace();
+ parseRes.setText("\nParsing failed. An unrecoverable exception was thrown:\n"
+ + e.toString());
+ parseWarnings.setVisible(true);
+ }
+ }
+ paste.revalidate();
+ }
+ }
+
+ }
+
+ public static void main(String[] args)
+ {
+ if (args.length == 0)
+ {
+ new Thread(new Runnable()
+ {
+ boolean visible = true;
+
+ public void run()
+ {
+ boolean nulserv=true;
+ while (visible)
+ {
+ final Thread runner = Thread.currentThread();
+ JFrame df = new JFrame();
+ df.getContentPane().setLayout(new BorderLayout());
+ df.getContentPane().add(
+ (nulserv=!nulserv) ? new RestServiceEditorPane(jalview.ws.rest.RestClient
+ .makeShmmrRestClient().getRestDescription()) : new RestServiceEditorPane(),
+ BorderLayout.CENTER);
+ df.setBounds(100, 100, 600, 400);
+ df.addComponentListener(new ComponentListener()
+ {
+
+ @Override
+ public void componentShown(ComponentEvent e)
+ {
+
+ }
+
+ @Override
+ public void componentResized(ComponentEvent e)
+ {
+
+ }
+
+ @Override
+ public void componentMoved(ComponentEvent e)
+ {
+
+ }
+
+ @Override
+ public void componentHidden(ComponentEvent e)
+ {
+ visible = false;
+ runner.interrupt();
+
+ }
+ });
+ df.setVisible(true);
+ while (visible)
+ {
+ try
+ {
+ Thread.sleep(10000);
+ } catch (Exception x)
+ {
+ }
+ ;
+ }
+ visible = true;
+ }
+ }
+ }).start();
+
+ }
+ }
+ String finalService=null;
+ public void showDialog(String title)
+ {
+ if (oldservice!=null)
+ {
+ finalService = oldservice.toString();
+ }
+ JalviewDialog jvd = new JalviewDialog()
+ {
+
+ @Override
+ protected void raiseClosed()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ protected void okPressed()
+ {
+ updateServiceFromGui();
+ finalService = currentservice.toString();
+ }
+
+ @Override
+ protected void cancelPressed()
+ {
+
+ }
+ };
+ JPanel pane = new JPanel(new BorderLayout()),okcancel=new JPanel(new FlowLayout());
+ pane.add(this,BorderLayout.CENTER);
+ okcancel.add(jvd.ok);
+ okcancel.add(jvd.cancel);
+ pane.add(okcancel, BorderLayout.SOUTH);
+ jvd.initDialogFrame(pane, true, true, title, 600,350);
+ jvd.waitForInput();
+ }
+
+ public String getEditedRestService()
+ {
+ return finalService;
+ }
+}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
.getType()))
{
tmpString = features[i].getDescription();
- int startTag = tmpString.toUpperCase().indexOf("<HTML>");
+ String tmp2up=tmpString.toUpperCase();
+ int startTag = tmp2up.indexOf("<HTML>");
if (startTag > -1)
{
tmpString = tmpString.substring(startTag + 6);
+ tmp2up = tmp2up.substring(startTag+6);
}
- int endTag = tmpString.toUpperCase().indexOf("</BODY>");
+ int endTag = tmp2up.indexOf("</BODY>");
if (endTag > -1)
{
tmpString = tmpString.substring(0, endTag);
+ tmp2up = tmp2up.substring(0, endTag);
}
- endTag = tmpString.toUpperCase().indexOf("</HTML>");
+ endTag = tmp2up.indexOf("</HTML>");
if (endTag > -1)
{
tmpString = tmpString.substring(0, endTag);
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
if (guiWindow != null)
{
guiWindow.setProgressBar("Initialising Sequence Database Fetchers",
- initingThread.hashCode());
+ Thread.currentThread().hashCode());
}
sfetch = sf;
_initingFetcher = false;
{
this.setLayout(borderLayout2);
- database.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ database.setFont(JvSwingUtils.getLabelFont());
dbeg.setFont(new java.awt.Font("Verdana", Font.BOLD, 11));
jLabel1.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));
jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
close_actionPerformed(e);
}
});
- textArea.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ textArea.setFont(JvSwingUtils.getLabelFont());
textArea.setLineWrap(true);
textArea.addKeyListener(new KeyAdapter()
{
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
"!! Jalview version "
+ jalview.bin.Cache.getDefault("LATEST_VERSION",
"..Checking..")
- + " is available for download from http://www.jalview.org !!",
+ + " is available for download from "+jalview.bin.Cache.getDefault("www.jalview.org","http://www.jalview.org")+" !!",
50, y += fontSize + 10);
y += 5;
g.setColor(Color.black);
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import org.jibble.epsgraphics.*;
import jalview.analysis.*;
+import jalview.commands.CommandI;
import jalview.commands.OrderCommand;
import jalview.datamodel.*;
import jalview.io.*;
*/
public void sortByTree_actionPerformed(ActionEvent e)
{
- AlignmentPanel ap = av.getAlignPanel();
- SequenceI[] oldOrder = av.getAlignment().getSequencesArray();
- AlignmentSorter.sortByTree(av.getAlignment(), tree);
-
- ap.alignFrame.addHistoryItem(new OrderCommand("Tree Sort", oldOrder,
- av.alignment));
+
+ if (treeCanvas.applyToAllViews)
+ {
+ final ArrayList<CommandI> commands = new ArrayList<CommandI>();
+ for (AlignmentPanel ap: PaintRefresher.getAssociatedPanels(av
+ .getSequenceSetId()))
+ {
+ commands.add(sortAlignmentIn(ap.av.getAlignPanel()));
+ }
+ av.getAlignPanel().alignFrame.addHistoryItem(new CommandI()
+ {
+
+ @Override
+ public void undoCommand(AlignmentI[] views)
+ {
+ for (CommandI tsort:commands)
+ {
+ tsort.undoCommand(views);
+ }
+ }
+
+ @Override
+ public int getSize()
+ {
+ return commands.size();
+ }
+
+ @Override
+ public String getDescription()
+ {
+ return "Tree Sort (many views)";
+ }
+
+ @Override
+ public void doCommand(AlignmentI[] views)
+ {
- ap.paintAlignment(true);
+ for (CommandI tsort:commands)
+ {
+ tsort.doCommand(views);
+ }
+ }
+ });
+ for (AlignmentPanel ap: PaintRefresher.getAssociatedPanels(av
+ .getSequenceSetId()))
+ {
+ // ensure all the alignFrames refresh their GI after adding an undo item
+ ap.alignFrame.updateEditMenuBar();
+ }
+ } else {
+ treeCanvas.ap.alignFrame.addHistoryItem(sortAlignmentIn(treeCanvas.ap));
+ }
}
+ public CommandI sortAlignmentIn(AlignmentPanel ap)
+ {
+ AlignViewport av = ap.av;
+ SequenceI[] oldOrder = av.getAlignment().getSequencesArray();
+ AlignmentSorter.sortByTree(av.getAlignment(), tree);
+ CommandI undo;
+ undo=new OrderCommand("Tree Sort", oldOrder,
+ av.alignment);
+ ap.paintAlignment(true);
+ return undo;
+ }
/**
* DOCUMENT ME!
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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 java.awt.Component;
}
if (allviews.length >= 2)
{
-
+ // ensure we update menu state to reflect external selection list state
+ append = append || _selectedviews.size()>1;
toggleview = new JCheckBoxMenuItem("Select many views",append);
toggleview.setToolTipText("When enabled, allows many views to be selected.");
toggleview.addItemListener(new ItemListener() {
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*/
package jalview.gui;
+import jalview.gui.OptsAndParamsPage.OptionBox;
+import jalview.gui.OptsAndParamsPage.ParamBox;
+import jalview.ws.jws2.JabaParamStore;
+import jalview.ws.jws2.JabaPreset;
+import jalview.ws.jws2.Jws2Discoverer;
+import jalview.ws.jws2.Jws2Discoverer.Jws2Instance;
+import jalview.ws.params.ArgumentI;
+import jalview.ws.params.OptionI;
+import jalview.ws.params.ParamDatastoreI;
+import jalview.ws.params.ParameterI;
+import jalview.ws.params.ValueConstrainI;
+import jalview.ws.params.WsParamSetI;
+
import java.awt.BorderLayout;
-import java.awt.Color;
import java.awt.Component;
+import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import java.awt.event.ComponentEvent;
-import java.awt.event.ComponentListener;
-import java.awt.event.ContainerEvent;
-import java.awt.event.ContainerListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
-import java.awt.event.WindowStateListener;
import java.net.URL;
import java.util.ArrayList;
-import java.util.EventObject;
-import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Vector;
-import javax.swing.InputVerifier;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
-import javax.swing.JList;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSlider;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
-import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JTextField;
-import javax.swing.ListSelectionModel;
-import javax.swing.SwingConstants;
-import javax.swing.SwingUtilities;
import javax.swing.border.TitledBorder;
-import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
-import javax.swing.table.*;
import compbio.metadata.Argument;
import compbio.metadata.Option;
import compbio.metadata.Preset;
import compbio.metadata.PresetManager;
import compbio.metadata.RunnerConfig;
-import compbio.metadata.ValueConstrain;
-import compbio.metadata.WrongParameterException;
import compbio.metadata.ValueConstrain.Type;
-import jalview.util.jarInputStreamProvider;
-import jalview.ws.jws2.JabaParamStore;
-import jalview.ws.jws2.JabaPreset;
-import jalview.ws.jws2.Jws2Discoverer;
-import jalview.ws.jws2.ParameterUtils;
-import jalview.ws.jws2.Jws2Discoverer.Jws2Instance;
-import jalview.ws.jws2.dm.JabaOption;
-import jalview.ws.jws2.dm.JabaParameter;
-import jalview.ws.params.ArgumentI;
-import jalview.ws.params.OptionI;
-import jalview.ws.params.ParamDatastoreI;
-import jalview.ws.params.ParameterI;
-import jalview.ws.params.ValueConstrainI;
-import jalview.ws.params.WsParamSetI;
-
/**
* job parameter editing/browsing dialog box. User can browse existing settings
* (user + presets + Defaults), and any changes to parameters creates a modified
*
*/
public class WsJobParameters extends JPanel implements ItemListener,
- ActionListener, DocumentListener
+ ActionListener, DocumentListener, OptsParametersContainerI
{
URL linkImageURL = getClass().getResource("/images/link.gif");
// parameter set as shown to
// user
- private static final int PARAM_WIDTH = 340, PARAM_HEIGHT = 150,
- PARAM_CLOSEDHEIGHT = 80;
+ /**
+ * manager for options and parameters.
+ */
+ OptsAndParamsPage opanp = new OptsAndParamsPage(this);
+
+ /**
+ * panel containing job options
+ */
+ JPanel jobOptions = new JPanel();
- private static final int OPTSET_HEIGHT = 30;
+ /**
+ * panel containing job parameters
+ */
+ JPanel paramList = new JPanel();
+
+
JPanel SetNamePanel = new JPanel();
JPanel setDetails = new JPanel();
JSplitPane jobPanel = new JSplitPane();
- boolean split = true;
-
- JTabbedPane tabpanels = new JTabbedPane();
-
- JPanel jobOptions = new JPanel();
JScrollPane jobOptionsPane = new JScrollPane();
JScrollPane paramPane = new JScrollPane();
- JPanel paramList = new JPanel();
+
+ JPanel optsAndparams = new JPanel();
RunnerConfig serviceOptions;
ParamDatastoreI paramStore;
+ private int MAX_OPTWIDTH = 200;
+
WsJobParameters(Jws2Instance service)
{
this(service, null);
frame.setTitle("Edit parameters for " + service.getActionText());
Rectangle deskr = Desktop.instance.getBounds();
- frame.setBounds(new Rectangle((int) (deskr.getCenterX() - 240),
- (int) (deskr.getCenterY() - 250), 480, 500));
+ Dimension pref = this.getPreferredSize();
+ frame.setBounds(new Rectangle((int) (deskr.getCenterX() - pref.width/2),
+ (int) (deskr.getCenterY() - pref.height/2), pref.width, pref.height));
frame.setContentPane(this);
- // should recover defaults from user prefs.
- // settingsPanel.setDividerLocation(0.4);
- // jobPanel.setDividerLocation(0.5);
+
+ // should perhaps recover defaults from user prefs.
+
frame.validate();
- if (split)
+ javax.swing.SwingUtilities.invokeLater(new Runnable()
{
- javax.swing.SwingUtilities.invokeLater(new Runnable()
- {
public void run()
{
- settingsPanel.setDividerLocation(0.5);
- jobPanel.setDividerLocation(setDescr.getLineCount() > 3 ? 0.35
- : 0.16);
+ jobPanel.setDividerLocation(0.25);
+
}
});
- }
- else
- {
- tabpanels.setSelectedComponent(jobOptionsPane);
- }
- frame.setVisible(true);
+ frame.setVisible(true);
if (response > 0)
{
JPanel setNameInfo = new JPanel(new FlowLayout(FlowLayout.LEFT));
GridBagLayout gbl = new GridBagLayout();
SetNamePanel.setLayout(gbl);
- SetNamePanel.setMinimumSize(new Dimension(300, 60));
+
JLabel setNameLabel = new JLabel("Current parameter set name :");
setNameLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
- // setNameLabel.setHorizontalAlignment(FlowLayout.LEFT);
+
setNameInfo.add(setNameLabel);
setNameInfo.add(setName);
+
// initial button visibility
updatepref.setVisible(false);
deletepref.setVisible(false);
setsavebuts.setLayout(new FlowLayout(FlowLayout.LEFT)); // GridLayout(1,2));
((FlowLayout) setsavebuts.getLayout()).setHgap(10);
((FlowLayout) setsavebuts.getLayout()).setVgap(0);
+ JPanel spacer = new JPanel();
+ spacer.setPreferredSize(new Dimension(2,30));
+ setsavebuts.add(spacer);
setsavebuts.add(deletepref);
setsavebuts.add(revertpref);
setsavebuts.add(createpref);
setsavebuts.add(updatepref);
- setsavebuts.setSize(new Dimension(150, 20));
+// setsavebuts.setSize(new Dimension(150, 30));
JPanel buttonArea = new JPanel(new GridLayout(1, 1));
buttonArea.add(setsavebuts);
SetNamePanel.add(setNameInfo);
gbl.setConstraints(setNameInfo, gbc);
SetNamePanel.add(buttonArea);
gbc = new GridBagConstraints();
- gbc.gridx=0;
- gbc.gridy=2;
+ gbc.gridx = 0;
+ gbc.gridy = 2;
gbc.gridheight = 1;
gbl.setConstraints(buttonArea, gbc);
setDetails.add(setDescrView, BorderLayout.CENTER);
- // setDetails.setPreferredSize(new Dimension(360, 100));
- jobParameters.setBorder(new TitledBorder("Parameters"));
- jobParameters.setLayout(new BorderLayout());
- paramPane.setPreferredSize(new Dimension(360, 300));
- paramPane.getVerticalScrollBar().setUnitIncrement(20);
- // paramPanel.setPreferredSize(new Dimension(360, 300));
- // TODO: relayout buttons nicely
- paramPane.getViewport().setView(paramList);
- jobParameters.add(paramPane, BorderLayout.CENTER);
- JPanel jobOptionsPanel = new JPanel();
- jobOptionsPanel.setLayout(new BorderLayout());
- jobOptionsPanel.setBorder(new TitledBorder("Options"));
- jobOptionsPane.getViewport().setView(jobOptions);
- jobOptionsPanel.add(jobOptionsPane, BorderLayout.CENTER);
+ jobParameters.setBorder(new TitledBorder("Parameters"));
+ paramPane.setPreferredSize(new Dimension(360, 400));
+ jobOptions.setBorder(new TitledBorder("Options"));
+
+ paramList.setBorder(new TitledBorder("Parameters"));
+
+ JPanel bjo=new JPanel(new BorderLayout()),bjp=new JPanel(new BorderLayout());
+ bjo.add(jobOptions, BorderLayout.CENTER);
+ bjp.add(paramList, BorderLayout.CENTER);
+ optsAndparams.setLayout(new BorderLayout());
+
+ optsAndparams.add(bjo, BorderLayout.CENTER);
+ optsAndparams.add(bjp, BorderLayout.SOUTH);
+ paramPane.setViewportView(optsAndparams);
+
setLayout(new BorderLayout());
jobPanel.setLeftComponent(setDetails);
- if (split)
- {
- settingsPanel.setLeftComponent(jobOptionsPanel);
- settingsPanel.setRightComponent(jobParameters);
- settingsPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
- jobPanel.setRightComponent(settingsPanel);
- }
- else
- {
- jobPanel.setRightComponent(tabpanels);
- jobOptionsPane.setName("Options");
- tabpanels.add(jobOptionsPane);
- paramPane.setName("Parameters");
- tabpanels.add(paramPane);
- }
+ jobPanel.setRightComponent(paramPane);
jobPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
+
add(SetNamePanel, BorderLayout.NORTH);
add(jobPanel, BorderLayout.CENTER);
+
JPanel dialogpanel = new JPanel();
dialogpanel.add(startjob);
dialogpanel.add(canceljob);
p = jabap; // (jabap != null) ? paramStore.getPreset(jabap.getName()) :
// null;
}
- // TODO: Recover window geometry prefs for this service
- // jobPanel.setDividerLocation(proportionalLocation)
- // settingsPanel.setDividerLocation(proportionalLocation)
+
Hashtable exnames = new Hashtable();
for (int i = 0, iSize = setName.getItemCount(); i < iSize; i++)
{
if (myarg instanceof ParameterI)
{
ParameterI parm = (ParameterI) myarg;
- addParameter(parm);
+ paramList.add(opanp.addParameter(parm));
}
else
{
if (myarg instanceof OptionI)
{
OptionI opt = (OptionI) myarg;
- addOption(opt).resetToDefault();
+ OptionBox ob = opanp.addOption(opt);
+ jobOptions.add(ob, FlowLayout.LEFT);
+ ob.resetToDefault();
+ if (MAX_OPTWIDTH < ob.getPreferredSize().width)
+ {
+ MAX_OPTWIDTH = ob.getPreferredSize().width;
+ }
+
}
else
{
{
if (arg instanceof ParameterI)
{
- setParameter((ParameterI) arg);
+ opanp.setParameter((ParameterI) arg);
}
else
{
// System.out.println("Setting option "
// + System.identityHashCode(arg) + ":" + arg.getName()
// + " with " + arg.getDefaultValue());
- selectOption((OptionI) arg, arg.getDefaultValue());
+ opanp.selectOption((OptionI) arg, arg.getValue());
}
}
}
}
- jobOptions.setPreferredSize(new Dimension(PARAM_WIDTH, optSet.size()
- * OPTSET_HEIGHT));
- FlowLayout fl;
- jobOptions.setLayout(fl=new FlowLayout(FlowLayout.LEFT));
-
refreshParamLayout();
- paramPane.validate();
revalidate();
}
validate();
}
- private void argSetModified(Object modifiedElement, boolean b)
+ public void argSetModified(Object modifiedElement, boolean b)
{
if (settingDialog)
{
settingDialog = stn;
}
- private void addParameter(ParameterI arg)
- {
- ParamBox pb = paramSet.get(arg.getName());
- if (pb == null)
- {
- pb = new ParamBox(this, arg);
- paramSet.put(arg.getName(), pb);
- paramList.add(pb);
- }
- pb.init();
- // take the defaults from the parameter
- pb.updateControls(arg);
- }
-
- private void setParameter(ParameterI arg)
- {
- ParamBox pb = paramSet.get(arg.getName());
- if (pb == null)
- {
- addParameter(arg);
- }
- else
- {
- pb.updateControls(arg);
- }
-
- }
-
- private void selectOption(OptionI option, String string)
- {
- OptionBox cb = optSet.get(option.getName());
- if (cb == null)
- {
- cb = addOption(option);
- }
- cb.enabled.setSelected(string != null); // initial state for an option.
- if (string != null)
- {
- if (option.getPossibleValues().contains(string))
- {
- cb.val.setSelectedItem(string);
- }
- else
- {
- throw new Error("Invalid value " + string + " for option " + option);
- }
-
- }
- if (option.isRequired() && !cb.enabled.isSelected())
- {
- // TODO: indicate paramset is not valid.. option needs to be selected!
- }
- cb.setInitialValue();
- }
-
- Map<String, ParamBox> paramSet = new Hashtable<String, ParamBox>();
- public class ParamBox extends JPanel implements ChangeListener,
- ActionListener, MouseListener
+ public void refreshParamLayout()
{
- JButton showDesc = new JButton();
-
- JTextArea string = new JTextArea();
-
- JScrollPane descPanel = new JScrollPane();
-
- JSlider slider = null;
-
- JTextField valueField = null;
-
- ValueConstrainI validator = null;
-
- JPanel settingPanel = new JPanel();
-
- JPanel controlPanel = new JPanel();
-
- boolean integ = false;
-
- boolean choice = false;
-
- boolean descisvisible = false;
-
- final WsJobParameters pmdialogbox;
-
- final URL finfo;
-
- public ParamBox(final WsJobParameters pmlayout, ParameterI parm)
- {
- pmdialogbox = pmlayout;
- setPreferredSize(new Dimension(PARAM_WIDTH, PARAM_CLOSEDHEIGHT));
- setBorder(new TitledBorder(parm.getName()));
- setLayout(null);
- showDesc.setFont(new Font("Verdana", Font.PLAIN, 6));
- showDesc.setText("+");
- string.setFont(new Font("Verdana", Font.PLAIN, 11));
- string.setBackground(getBackground());
- // string.setSize(new Dimension(PARAM_WIDTH, 80));
- string.setEditable(false);
- descPanel.getViewport().setView(string);
- // descPanel.setLocation(2,17);
- descPanel.setVisible(false);
- // string.setMinimumSize(new Dimension(140,80));
- // string.setMaximumSize(new Dimension(280,80));
- final ParamBox me = this;
- finfo = parm.getFurtherDetails();
- if (finfo != null)
- {
- showDesc.setToolTipText("<html>"
- + JvSwingUtils
- .wrapTooltip("Click to show brief description<br><img src=\""
- + linkImageURL
- + "\"/> Right click for further information.")
- + "</html>");
- showDesc.addMouseListener(this);
- }
- else
- {
- showDesc.setToolTipText("<html>"
- + JvSwingUtils
- .wrapTooltip("Click to show brief description.")
- + "</html>");
- }
- showDesc.addActionListener(new ActionListener()
+ FlowLayout fl = new FlowLayout(FlowLayout.LEFT);
+ int sep=fl.getVgap();
+ int os=0,s = jobOptions.getBorder().getBorderInsets(jobOptions).bottom+jobOptions.getBorder().getBorderInsets(jobOptions).top+2 * sep;
+ int w = 2 * fl.getHgap() + (MAX_OPTWIDTH > OptsAndParamsPage.PARAM_WIDTH ? MAX_OPTWIDTH : OptsAndParamsPage.PARAM_WIDTH);
+ jobOptions.setLayout(fl);
+ if (opanp.getOptSet().size() > 0)
+ {
+
+ for (OptionBox pbox : opanp.getOptSet().values())
{
-
- public void actionPerformed(ActionEvent e)
- {
- descisvisible = !descisvisible;
- descPanel.setVisible(descisvisible);
- me.setPreferredSize(new Dimension(PARAM_WIDTH,
- (descisvisible) ? PARAM_HEIGHT : PARAM_CLOSEDHEIGHT));
- me.validate();
- pmlayout.refreshParamLayout();
- }
- });
- string.setWrapStyleWord(true);
- string.setLineWrap(true);
- string.setColumns(32);
- string.setText(parm.getDescription());
- JPanel firstrow = new JPanel();
- firstrow.setLayout(null);
- controlPanel.setLayout(new BorderLayout());
- controlPanel.setBounds(new Rectangle(39, 10, PARAM_WIDTH - 70,
- PARAM_CLOSEDHEIGHT - 50));
- showDesc.setBounds(new Rectangle(10, 10, 16, 16));
- firstrow.add(showDesc);
- firstrow.add(controlPanel);
- firstrow.setBounds(new Rectangle(10, 20, PARAM_WIDTH - 30,
- PARAM_CLOSEDHEIGHT - 30));
- add(firstrow);
- validator = parm.getValidValue();
- parameter = parm;
- if (validator != null)
- {
- integ = validator.getType() == Type.Integer;
- }
- else
- {
- if (parameter.getPossibleValues() != null)
- {
- choice = true;
- }
+ pbox.revalidate();
+ s += sep + pbox.getPreferredSize().height;
}
- updateControls(parm);
- descPanel.setBounds(new Rectangle(10, PARAM_CLOSEDHEIGHT,
- PARAM_WIDTH - 20, PARAM_HEIGHT - PARAM_CLOSEDHEIGHT - 5));
- add(descPanel);
- validate();
+ jobOptions.setPreferredSize(new Dimension(w, s));
+ jobOptions.setLayout(new GridLayout(opanp.getOptSet().size(),1));
+ os=s;
}
-
- public void init()
- {
- // reset the widget's initial value.
- lastVal = null;
- }
-
- boolean adjusting = false;
-
- ParameterI parameter;
-
- JComboBox choicebox;
-
- public int getBoxHeight()
- {
- return (descisvisible ? PARAM_HEIGHT : PARAM_CLOSEDHEIGHT);
- }
-
- public void updateControls(ParameterI parm)
- {
- adjusting = true;
- boolean init = (choicebox == null && valueField == null);
- float fVal = 0f;
- int iVal = 0;
- if (init)
- {
- if (choice)
- {
- choicebox = new JComboBox();
- choicebox.addActionListener(this);
- controlPanel.add(choicebox, BorderLayout.CENTER);
- }
- else
- {
- slider = new JSlider();
- slider.addChangeListener(this);
- valueField = new JTextField();
- valueField.addActionListener(this);
- valueField.setPreferredSize(new Dimension(60, 25));
- controlPanel.add(slider, BorderLayout.WEST);
- controlPanel.add(valueField, BorderLayout.EAST);
-
- }
- }
-
- if (parm != null)
- {
- if (choice)
- {
- if (init)
- {
- List vals = parm.getPossibleValues();
- for (Object val : vals)
- {
- choicebox.addItem(val);
- }
- }
-
- if (parm.getDefaultValue() != null)
- {
- choicebox.setSelectedItem(parm.getDefaultValue());
- }
- }
- else
- {
- valueField.setText(parm.getDefaultValue());
- }
- }
- lastVal = updateSliderFromValueField();
- adjusting = false;
- }
-
- Object lastVal;
-
- public ParameterI getParameter()
- {
- ParameterI prm = parameter.copy();
- if (choice)
- {
- prm.setDefaultValue((String) choicebox.getSelectedItem());
- }
- else
- {
- prm.setDefaultValue(valueField.getText());
- }
- return prm;
- }
-
- public Object updateSliderFromValueField()
- {
- int iVal;
- float fVal;
- if (validator != null)
- {
- if (integ)
- {
- iVal = 0;
- try
- {
- valueField.setText(valueField.getText().trim());
- iVal = Integer.valueOf(valueField.getText());
- if (validator.getMin() != null
- && validator.getMin().intValue() > iVal)
- {
- iVal = validator.getMin().intValue();
- // TODO: provide visual indication that hard limit was reached for
- // this parameter
- }
- if (validator.getMax() != null
- && validator.getMax().intValue() < iVal)
- {
- iVal = validator.getMax().intValue();
- // TODO: provide visual indication that hard limit was reached for
- // this parameter
- }
- } catch (Exception e)
- {
- }
- ;
- if (validator.getMin() != null && validator.getMax() != null)
- {
- slider.getModel().setRangeProperties(iVal, 1,
- validator.getMin().intValue(),
- validator.getMax().intValue(), true);
- }
- else
- {
- slider.setVisible(false);
- }
- return new int[]
- { iVal };
- }
- else
- {
- fVal = 0f;
- try
- {
- fVal = Float.valueOf(valueField.getText());
- if (validator.getMin() != null
- && validator.getMin().floatValue() > fVal)
- {
- fVal = validator.getMin().floatValue();
- // TODO: provide visual indication that hard limit was reached for
- // this parameter
- }
- if (validator.getMax() != null
- && validator.getMax().floatValue() < fVal)
- {
- fVal = validator.getMax().floatValue();
- // TODO: provide visual indication that hard limit was reached for
- // this parameter
- }
- } catch (Exception e)
- {
- }
- ;
- if (validator.getMin() != null && validator.getMax() != null)
- {
- slider.getModel().setRangeProperties((int) fVal * 1000, 1,
- (int) validator.getMin().floatValue() * 1000,
- (int) validator.getMax().floatValue() * 1000, true);
- }
- else
- {
- slider.setVisible(false);
- }
- return new float[]
- { fVal };
- }
- }
- else
- {
- if (!choice)
- {
- slider.setVisible(false);
- return new String[]
- { valueField.getText().trim() };
- }
- else
- {
- return new String[]
- { (String) choicebox.getSelectedItem() };
- }
- }
-
- }
-
- public void stateChanged(ChangeEvent e)
- {
- if (!adjusting)
- {
- valueField.setText(""
- + ((integ) ? ("" + (int) slider.getValue())
- : ("" + (float) (slider.getValue() / 1000f))));
- checkIfModified();
- }
-
- }
-
- public void actionPerformed(ActionEvent e)
- {
- if (adjusting)
- {
- return;
- }
- if (!choice)
- {
- updateSliderFromValueField();
- }
- checkIfModified();
- }
-
- private void checkIfModified()
- {
- Object cstate = updateSliderFromValueField();
- boolean notmod = false;
- if (cstate.getClass() == lastVal.getClass())
- {
- if (cstate instanceof int[])
- {
- notmod = (((int[]) cstate)[0] == ((int[]) lastVal)[0]);
- }
- else if (cstate instanceof float[])
- {
- notmod = (((float[]) cstate)[0] == ((float[]) lastVal)[0]);
- }
- else if (cstate instanceof String[])
- {
- notmod = (((String[]) cstate)[0].equals(((String[]) lastVal)[0]));
- }
- }
- pmdialogbox.argSetModified(this, !notmod);
- }
-
- public void mouseClicked(MouseEvent e)
- {
- if (javax.swing.SwingUtilities.isRightMouseButton(e))
- {
- showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
- }
- }
-
- public void mousePressed(MouseEvent e)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseReleased(MouseEvent e)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseEntered(MouseEvent e)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseExited(MouseEvent e)
- {
- // TODO Auto-generated method stub
-
- }
-
- }
-
- Map<String, OptionBox> optSet = new Hashtable<String, OptionBox>();
-
- public class OptionBox extends JPanel implements MouseListener,
- ActionListener
- {
- JComboBox val = new JComboBox();
-
- JCheckBox enabled = new JCheckBox();
-
- JLabel optlabel = new JLabel();
-
- final URL finfo;
-
- boolean hasLink = false;
-
- OptionI option;
-
- public OptionBox(OptionI opt)
- {
- option = opt;
- setLayout(new BorderLayout());
- enabled.setSelected(opt.isRequired()); // TODO: lock required options
- enabled.setFont(new Font("Verdana", Font.PLAIN, 11));
- enabled.setText("");
- enabled.setText(opt.getName());
- enabled.addActionListener(this);
- finfo = option.getFurtherDetails();
- if (finfo != null)
- {
- hasLink = true;
- // optlabel.setToolTipText("<html><p>"+opt.getDescription()+"</p><img src=\""+linkImageURL+"\"/></html>");
- enabled.setToolTipText("<html>"
- + JvSwingUtils.wrapTooltip(opt.getDescription()
- + "<br><img src=\"" + linkImageURL + "\"/>")
- + "</html>");
- // optlabel.addMouseListener(this);
- enabled.addMouseListener(this);
- }
- else
- {
- // optlabel.setToolTipText(opt.getDescription());
- enabled.setToolTipText("<html>"
- + JvSwingUtils.wrapTooltip(opt.getDescription())
- + "</html>");
- }
- add(enabled, BorderLayout.NORTH);
- if (opt.getPossibleValues().size() > 1)
- {
- setLayout(new GridLayout(1, 2));
- for (Object str : opt.getPossibleValues())
- {
- val.addItem((String) str);
- }
- val.setSelectedItem((String) opt.getDefaultValue());
- val.addActionListener(this);
- add(val, BorderLayout.SOUTH);
- }
- // TODO: add actionListeners for popup (to open further info),
- // and to update list of parameters if an option is enabled
- // that takes a value.
- setInitialValue();
- }
-
- public void resetToDefault()
- {
- enabled.setSelected(false);
- if (option.isRequired())
- {
- // Apply default value
- selectOption(option, option.getDefaultValue());
- }
- }
-
- boolean initEnabled = false;
-
- String initVal = null;
-
- public void setInitialValue()
- {
- initEnabled = enabled.isSelected();
- if (option.getPossibleValues() != null
- && option.getPossibleValues().size() > 1)
- {
- initVal = (String) val.getSelectedItem();
- }
- else
- {
- initVal = (initEnabled) ? option.getDefaultValue() : null;
- }
- }
-
- public OptionI getOptionIfEnabled()
- {
- if (!enabled.isSelected())
- {
- return null;
- }
- OptionI opt = option.copy();
-
- if (val.getSelectedItem() != null)
- {
- opt.setDefaultValue((String) val.getSelectedItem());
- }
- return opt;
- }
-
- public void actionPerformed(ActionEvent e)
+ else
{
- if (e.getSource() != enabled)
- {
- enabled.setSelected(true);
- }
- checkIfModified();
+ jobOptions.setVisible(false);
}
- private void checkIfModified()
+ // Now layout the parameters assuming they occupy one column - to calculate total height of options+parameters
+ fl = new FlowLayout(FlowLayout.CENTER);
+ // helpful hint from http://stackoverflow.com/questions/2743177/top-alignment-for-flowlayout
+ fl.setAlignOnBaseline(true);
+ if (opanp.getParamSet().size() > 0)
{
- boolean notmod = (initEnabled == enabled.isSelected());
- if (enabled.isSelected())
- {
- if (initVal != null)
- {
- notmod &= initVal.equals(val.getSelectedItem());
- }
- else
- {
- // compare against default service setting
- notmod &= option.getDefaultValue() == null
- || option.getDefaultValue().equals(val.getSelectedItem());
- }
- }
- else
- {
- notmod &= initVal == null;
- }
- argSetModified(this, !notmod);
- }
+ paramList.setLayout(fl);
- public void mouseClicked(MouseEvent e)
- {
- if (javax.swing.SwingUtilities.isRightMouseButton(e))
+ s = 2 * sep;
+ for (ParamBox pbox : opanp.getParamSet().values())
{
- showUrlPopUp(this, finfo.toString(), e.getX(), e.getY());
+ pbox.validate();
+ s += sep + pbox.getPreferredSize().height+pbox.getBorder().getBorderInsets(pbox).bottom;
}
+
+ paramList.setPreferredSize(new Dimension(w, s));
+ os+=s+2*sep+paramList.getBorder().getBorderInsets(paramList).bottom+paramList.getBorder().getBorderInsets(paramList).top;
}
-
- public void mousePressed(MouseEvent e)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseReleased(MouseEvent e)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseEntered(MouseEvent e)
- {
- // TODO Auto-generated method stub
-
- }
-
- public void mouseExited(MouseEvent e)
- {
- // TODO Auto-generated method stub
-
- }
-
- }
-
- private OptionBox addOption(OptionI opt)
- {
- OptionBox cb = optSet.get(opt.getName());
- if (cb == null)
- {
- cb = new OptionBox(opt);
- optSet.put(opt.getName(), cb);
- jobOptions.add(cb);
- }
- return cb;
- }
-
- public static void showUrlPopUp(JComponent invoker, final String finfo,
- int x, int y)
- {
-
- JPopupMenu mnu = new JPopupMenu();
- JMenuItem mitem = new JMenuItem("View " + finfo);
- mitem.addActionListener(new ActionListener()
- {
-
- @Override
- public void actionPerformed(ActionEvent e)
- {
- Desktop.showUrl(finfo);
-
- }
- });
- mnu.add(mitem);
- mnu.show(invoker, x, y);
- }
-
- protected void refreshParamLayout()
- {
- FlowLayout fl = new FlowLayout();
- paramList.setLayout(fl);
- int s = 2 * fl.getVgap();
- for (ParamBox pbox : paramSet.values())
+ else
{
- s += fl.getVgap() + pbox.getBoxHeight(); // getBoxHeight();
+ paramList.setVisible(false);
}
- paramList.setPreferredSize(new Dimension(PARAM_WIDTH, s));
+ // TODO: waste some time trying to eliminate any unnecessary .validate calls here
+ paramList.validate();
+ jobOptions.validate();
+ // System.out.println("Size will be : "+w+","+os);
+ optsAndparams.validate();
+ paramPane.getViewport().validate();
+ paramPane.getVerticalScrollBar().setBlockIncrement(OptsAndParamsPage.PARAM_CLOSEDHEIGHT*2);
+ paramPane.validate();
validate();
}
jalview.ws.jws2.Jws2Discoverer disc = jalview.ws.jws2.Jws2Discoverer
.getDiscoverer();
int p = 0;
- if (args.length > 3)
+ if (args.length > 0)
{
Vector<String> services = new Vector<String>();
services.addElement(args[p++]);
new JabaPreset(lastserv, pr));
JFrame jf = new JFrame("Parameters for "
+ lastserv.getActionText());
- JPanel cont = new JPanel();
- // jf.setPreferredSize(new Dimension(600, 800));
- cont.add(pgui);
- jf.add(cont);
+ JPanel cont = new JPanel(new BorderLayout());
+ pgui.validate();
+ cont.setPreferredSize(pgui.getPreferredSize());
+ cont.add(pgui, BorderLayout.CENTER);
+ jf.setLayout(new BorderLayout());
+ jf.add(cont, BorderLayout.CENTER);
+ jf.validate();
final Thread thr = Thread.currentThread();
jf.addWindowListener(new WindowListener()
{
public List<ArgumentI> getJobParams()
{
- List<ArgumentI> argSet = new ArrayList<ArgumentI>();
- // recover options and parameters from GUI
- for (OptionBox opts : optSet.values())
- {
- OptionI opt = opts.getOptionIfEnabled();
- if (opt != null)
- {
- argSet.add(opt);
- }
- }
- for (ParamBox parambox : paramSet.values())
- {
- ParameterI parm = parambox.getParameter();
- if (parm != null)
- {
- argSet.add(parm);
- }
- }
-
- return argSet;
+ return opanp.getCurrentSettings();
}
String lastParmSet = null;
initArgSetModified();
syncSetNamesWithStore();
setName.setSelectedItem(lastParmSet);
+ SetNamePanel.validate();
validate();
settingDialog = false;
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import jalview.bin.Cache;
import jalview.jbgui.GWsPreferences;
+import jalview.ws.rest.RestServiceDescription;
public class WsPreferences extends GWsPreferences
{
initFromPreferences();
}
- Vector<String> wsUrls, oldUrls;
+ Vector<String> wsUrls, oldUrls,rsbsUrls,oldRsbsUrls;
private boolean needWsMenuUpdate;
wsUrls = new Vector<String>();
}
updateList();
+ rsbsUrls = jalview.ws.rest.RestClient.getRsbsDescriptions();
+ if (rsbsUrls != null)
+ {
+ oldRsbsUrls = new Vector<String>(rsbsUrls);
+ }
+ else
+ {
+ oldRsbsUrls = null;
+ rsbsUrls = new Vector<String>();
+ }
+ updateRsbsList();
enableEnfinServices.setSelected(oldEnfin = Cache.getDefault(
"SHOW_ENFIN_SERVICES", true));
enableEnfinServices.addActionListener(updateAction);
- enableJws1Services.setSelected(oldJws1 = Cache.getDefault(
- "SHOW_JWS1_SERVICES", true));
- enableJws1Services.addActionListener(updateAction);
enableJws2Services.setSelected(oldJws2 = Cache.getDefault(
"SHOW_JWS2_SERVICES", true));
enableJws2Services.addActionListener(updateAction);
indexByHost.setSelected(oldIndexByHost = Cache.getDefault(
- "WSMENU_BYHOST", true));
+ "WSMENU_BYHOST", false));
indexByHost.addActionListener(updateAction);
indexByType.setSelected(oldIndexByType = Cache.getDefault(
- "WSMENU_BYTYPE", true));
+ "WSMENU_BYTYPE", false));
indexByType.addActionListener(updateAction);
displayWsWarning.setSelected(oldWsWarning = Cache.getDefault(
"SHOW_WSDISCOVERY_ERRORS", true));
wsList.setListData(wsUrls);
}
+ private void updateRsbsList()
+ {
+ sbrsList.setListData(rsbsUrls);
+ }
+
private void updateServiceList()
{
jalview.ws.jws2.Jws2Discoverer.setServiceUrls(wsUrls);
}
+ private void updateRsbsServiceList()
+ {
+ jalview.ws.rest.RestClient.setRsbsServices(rsbsUrls);
+ }
+
/*
* (non-Javadoc)
*
int sel = wsList.getSelectedIndex();
if (sel > -1)
{
- String url = editUrl(wsUrls.elementAt(sel), "Edit JWS2 URL");
+ String url = editUrl(wsUrls.elementAt(sel), "Edit JABAWS URL");
if (url != null)
{
int present = wsUrls.indexOf(url);
}
}
}
-
+ @Override
+ protected void newSbrsUrl_actionPerformed(ActionEvent e)
+ {
+ RestServiceEditorPane rse = new RestServiceEditorPane();
+ rse.showDialog("Add a new Simple Bioinformatics Rest Service");
+ String rservice = rse.getEditedRestService();
+ if (rservice!=null && !rsbsUrls.contains(rservice))
+ {
+ rsbsUrls.add(rservice);
+ update++;
+ updateRsbsList();
+ }
+ }
+ @Override
+ protected void editSbrsUrl_actionPerformed(ActionEvent e)
+ {
+ int sel = sbrsList.getSelectedIndex();
+ if (sel > -1)
+ {
+ RestServiceEditorPane rse = new RestServiceEditorPane(new RestServiceDescription(rsbsUrls.elementAt(sel)));
+ rse.showDialog("Edit Simple Bioinformatics Rest Service entry");
+ String rservice = rse.getEditedRestService();
+ if (rservice!=null)
+ {
+ int present = rsbsUrls.indexOf(rservice);
+ if (present==-1) {
+ update++;
+ rsbsUrls.setElementAt(rservice,sel);
+ updateRsbsList();
+ } else {
+ if (present!=sel) {
+ rsbsUrls.removeElementAt(sel);
+ update++;
+ updateRsbsList();
+ }
+ }
+ }
+ }
+ }
+
void updateWsMenuConfig(boolean old)
{
if (old)
{
+ if (oldUrls!=wsUrls || (wsUrls!=null && oldUrls!=null && !wsUrls.equals(oldUrls)))
+ {
+ update++;
+ }
wsUrls = (oldUrls == null) ? null : new Vector(oldUrls);
+ if (oldRsbsUrls!=rsbsUrls || (rsbsUrls!=null && oldRsbsUrls!=null && !oldRsbsUrls.equals(rsbsUrls)))
+ {
+ update++;
+ }
+ oldRsbsUrls = (oldRsbsUrls == null) ? null : new Vector(oldRsbsUrls);
}
else
{
old ? oldEnfin : enableEnfinServices.isSelected())
.toString());
Cache.setProperty(
- "SHOW_JWS1_SERVICES",
- Boolean.valueOf(old ? oldJws1 : enableJws1Services.isSelected())
- .toString());
- Cache.setProperty(
"SHOW_JWS2_SERVICES",
Boolean.valueOf(old ? oldJws2 : enableJws2Services.isSelected())
.toString());
"WSMENU_BYTYPE",
Boolean.valueOf(old ? oldIndexByType : indexByType.isSelected())
.toString());
+
Cache.setProperty("SHOW_WSDISCOVERY_ERRORS",
Boolean.valueOf(old ? oldWsWarning : displayWsWarning.isSelected()).toString());
updateServiceList();
+ updateRsbsServiceList();
}
/*
wsUrls.setElementAt(t, p);
updateList();
wsList.setSelectedIndex(p + 1);
+ update++;
}
}
wsUrls.setElementAt(t, p);
updateList();
wsList.setSelectedIndex(p - 1);
+ update++;
}
}
{
// TODO: do a better job of checking that the url is a valid discovery
// URL for web services.
- foo = new URL(urltf.getText().trim());
+ String tx = urltf.getText().trim();
+ while (tx.length()>0 && tx.lastIndexOf('/')==tx.length()-1)
+ {
+ tx = tx.substring(0, tx.length()-1);
+ }
+ foo = new URL(tx);
valid = true;
+ urltf.setText(tx);
} catch (Exception e)
{
valid = false;
@Override
protected void newWsUrl_actionPerformed(ActionEvent e)
{
- String url = editUrl(null, "Add new JWS2 URL");
+ String url = editUrl(null, "Add new JABAWS URL");
if (url != null)
{
if (!wsUrls.contains(url))
protected void resetWs_actionPerformed(ActionEvent e)
{
jalview.ws.jws2.Jws2Discoverer.setServiceUrls(null);
- wsUrls = jalview.ws.jws2.Jws2Discoverer.getServiceUrls();
+ Vector nwsUrls = jalview.ws.jws2.Jws2Discoverer.getServiceUrls();
+ if (!wsUrls.equals(nwsUrls)) {
+ update++;
+ }
+ wsUrls=nwsUrls;
updateList();
+
+ updateAndRefreshWsMenuConfig(true);
}
protected void ok_ActionPerformed(ActionEvent e)
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
-/**
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.io;
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
{\r
return;\r
}\r
+ jalview.util.ParseHtmlBodyAndLinks parsed = new jalview.util.ParseHtmlBodyAndLinks(sf.getDescription(), removeHTML, newline);\r
\r
- if (removeHTML\r
- && sf.getDescription().toUpperCase().indexOf("<HTML>") == -1)\r
+ sf.description = (removeHTML) ? parsed.getNonHtmlContent() : sf.description;\r
+ for (String link:parsed.getLinks())\r
{\r
- removeHTML = false;\r
- }\r
-\r
- StringBuffer sb = new StringBuffer();\r
- StringTokenizer st = new StringTokenizer(sf.getDescription(), "<");\r
- String token, link;\r
- int startTag;\r
- String tag = null;\r
- while (st.hasMoreElements())\r
- {\r
- token = st.nextToken("&>");\r
- if (token.equalsIgnoreCase("html") || token.startsWith("/"))\r
- {\r
- continue;\r
- }\r
-\r
- tag = null;\r
- startTag = token.indexOf("<");\r
-\r
- if (startTag > -1)\r
- {\r
- tag = token.substring(startTag + 1);\r
- token = token.substring(0, startTag);\r
- }\r
-\r
- if (tag != null && tag.toUpperCase().startsWith("A HREF="))\r
- {\r
- if (token.length() > 0)\r
- {\r
- sb.append(token);\r
- }\r
- link = tag.substring(tag.indexOf("\"") + 1, tag.length() - 1);\r
- String label = st.nextToken("<>");\r
- sf.addLink(label + "|" + link);\r
- sb.append(label + "%LINK%");\r
- }\r
- else if (tag != null && tag.equalsIgnoreCase("br"))\r
- {\r
- sb.append(newline);\r
- }\r
- else if (token.startsWith("lt;"))\r
- {\r
- sb.append("<" + token.substring(3));\r
- }\r
- else if (token.startsWith("gt;"))\r
- {\r
- sb.append(">" + token.substring(3));\r
- }\r
- else if (token.startsWith("amp;"))\r
- {\r
- sb.append("&" + token.substring(4));\r
- }\r
- else\r
- {\r
- sb.append(token);\r
- }\r
- }\r
-\r
- if (removeHTML)\r
- {\r
- sf.description = sb.toString();\r
+ sf.addLink(link);\r
}\r
\r
}\r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.io.packed;
/**
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.io.packed;
import jalview.datamodel.AlignmentI;
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.io.packed;
import jalview.datamodel.AlignmentI;
import jalview.io.packed.DataProvider.JvDataType;
import java.io.BufferedReader;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
{
br = new BufferedReader(src.getReader());
}
- context.updateSetModified(new jalview.io.AnnotationFile()
- .parseAnnotationFrom(context.getLastAlignment(), br));
+ if (new jalview.io.AnnotationFile()
+ .parseAnnotationFrom(context.getLastAlignment(), br))
+ {
+ context.updateSetModified(true);
+ } else {
+ errmsg = "Annotation file contained no data.";
+ }
} catch (Exception e)
{
}
}
-
+ if (exerror!=null)
+ {
+ if (errmsg!=null && errmsg.length()>0)
+ {
+ throw new IOException(errmsg,exerror);
+ } else {
+ throw new IOException(errmsg,exerror);
+ }
+ } else {
+ if (errmsg!=null && errmsg.length()>0)
+ {
+ throw new IOException(errmsg);
+ }
+ }
}
if (deuniquify)
{
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.io.packed;
import jalview.io.FileParse;
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.javascript;\r
\r
import java.net.URL;\r
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.javascript;
import jalview.appletgui.AlignFrame;
String pdbEntryString, String pdbFile);
/**
- * adjust horizontal/vertical scroll to the make the given location the top left hand corner for given current view
+ * adjust horizontal/vertical scroll to make the given location the top left hand corner for the given view
*
* @param alf
* @param topRow
*/
public abstract void scrollViewToIn(AlignFrame alf, String topRow,
String leftHandColumn);
+ /**
+ * adjust vertical scroll to make the given row the top one for given view
+ *
+ * @param alf
+ * @param topRow
+ */
+ public abstract void scrollViewToRowIn(AlignFrame alf, String topRow);
+ /**
+ * adjust horizontal scroll to make the given column the left one in the given view
+ *
+ * @param alf
+ * @param leftHandColumn
+ */
+ public abstract void scrollViewToColumnIn(AlignFrame alf, String leftHandColumn);
/**
*
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.javascript;
public interface JsCallBack
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.javascript;
import java.net.URL;
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.javascript;
import java.util.Vector;
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.javascript;\r
\r
import java.awt.Color;\r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem sortByTree = new JCheckBoxMenuItem();
+
+ protected JCheckBoxMenuItem listenToViewSelections = new JCheckBoxMenuItem();
+
JMenu addSequenceMenu = new JMenu();
JMenuItem addFromFile = new JMenuItem();
autoCalculate_actionPerformed(e);
}
});
+ sortByTree.setText("Sort Alignment With New Tree");
+ sortByTree.setToolTipText("<html>Enable this to automatically sort<br>the alignment when you open<br> a new tree.");
+ sortByTree.setState(jalview.bin.Cache.getDefault(
+ "SORT_BY_TREE", false));
+ sortByTree.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ sortByTreeOption_actionPerformed(e);
+ }
+ });
+
+ listenToViewSelections.setText("Listen for selections");
+ listenToViewSelections.setToolTipText("<html>When selected, selections in this view will mirror<br>selections made on the same sequences in other views.");
+ listenToViewSelections.setState(false);
+ listenToViewSelections.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ listenToViewSelections_actionPerformed(e);
+ }
+ });
+
addSequenceMenu.setText("Add Sequences");
addFromFile.setText("From File");
addFromFile.addActionListener(new ActionListener()
calculateMenu.add(showTranslation);
calculateMenu.add(showProducts);
calculateMenu.add(autoCalculate);
+ calculateMenu.add(sortByTree);
calculateMenu.addSeparator();
calculateMenu.add(extractScores);
webServiceNoServices = new JMenuItem("<No Services>");
selectMenu.add(invertColSel);
selectMenu.add(deleteGroups);
selectMenu.add(grpsFromSelection);
+ // TODO - determine if the listenToViewSelections button is needed : see bug JAL-574
+ //selectMenu.addSeparator();
+ //selectMenu.add(listenToViewSelections);
+ }
+
+ protected void listenToViewSelections_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
}
protected void showAllhidden_actionPerformed(ActionEvent e)
}
+ public void sortByTreeOption_actionPerformed(ActionEvent e)
+ {
+
+ }
+
public void showAllSeqs_actionPerformed(ActionEvent e)
{
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*/
package jalview.jbgui;
+import jalview.gui.JvSwingUtils;
+
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
private void jbInit() throws Exception
{
scrollPane.setBorder(null);
- ok.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ ok.setFont(JvSwingUtils.getLabelFont());
ok.setText("New Window");
ok.addActionListener(new ActionListener()
{
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
protected JCheckBoxMenuItem showConsole = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem showNews = new JCheckBoxMenuItem();
+
/**
* Creates a new GDesktop object.
*/
showConsole_actionPerformed(e);
}
});
+ showNews.setText("Show Jalview News");
+ showNews.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ showNews_actionPerformed(e);
+ }
+ });
desktopMenubar.add(FileMenu);
desktopMenubar.add(toolsMenu);
VamsasMenu.setVisible(false);
toolsMenu.add(preferences);
toolsMenu.add(showMemusage);
toolsMenu.add(showConsole);
+ toolsMenu.add(showNews);
toolsMenu.add(garbageCollect);
inputMenu.add(inputLocalFileMenuItem);
inputMenu.add(inputURLMenuItem);
// TODO Auto-generated method stub
}
+ protected void showNews_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+ }
protected void showMemusage_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*/
package jalview.jbgui;
+import jalview.gui.JvSwingUtils;
+
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
jPanel3.setOpaque(false);
jPanel3.setBounds(new Rectangle(174, 38, 134, 21));
jPanel3.setLayout(borderLayout2);
- defaultButton.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ defaultButton.setFont(JvSwingUtils.getLabelFont());
defaultButton.setText("Set as Default");
defaultButton.addActionListener(new ActionListener()
{
defaultButton_actionPerformed(e);
}
});
- smoothFont.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ smoothFont.setFont(JvSwingUtils.getLabelFont());
smoothFont.setOpaque(false);
smoothFont.setText("Anti-alias Fonts (Slower to render)");
smoothFont.setBounds(new Rectangle(41, 65, 223, 23));
}
});
monospaced.setEnabled(false);
- monospaced.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ monospaced.setFont(JvSwingUtils.getLabelFont());
monospaced.setOpaque(false);
monospaced.setToolTipText("Monospaced fonts are faster to render");
monospaced.setText("Monospaced");
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*/
package jalview.jbgui;
+import jalview.gui.JvSwingUtils;
+
import java.awt.*;
import java.awt.event.*;
JPanel jPanel11 = new JPanel();
- Font verdana11 = new java.awt.Font("Verdana", Font.PLAIN, 11);
+ Font verdana11 = JvSwingUtils.getLabelFont();
protected JCheckBox seqLimit = new JCheckBox();
protected JCheckBox followHighlight = new JCheckBox();
- public void addtoLayout(JPanel panel, String tooltip, JComponent label, JComponent valBox)
- {
- JPanel laypanel = new JPanel(),labPanel=new JPanel(), valPanel=new JPanel();
- laypanel.setSize(panel.getWidth(),33);
- labPanel.setBounds(new Rectangle(7, 7, 158, 23));
- valPanel.setBounds(new Rectangle(172, 7, 270,23));
- labPanel.setLayout(new GridLayout());
- valPanel.setLayout(new GridLayout());
- labPanel.add(label);
- valPanel.add(valBox);
- laypanel.add(labPanel);
- laypanel.add(valPanel);
- panel.add(laypanel);
- valPanel.setToolTipText(tooltip);
- labPanel.setToolTipText(tooltip);
- }
+ protected JCheckBox sortByTree= new JCheckBox();
+
/**
* Creates a new GPreferences object.
*/
});
maxcolourLabel.setFont(verdana11);
maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
- maxcolourLabel.setText("Maximumum Colour ");
+ maxcolourLabel.setText("Maximum Colour ");
maxColour.setFont(verdana11);
maxColour.setBorder(BorderFactory.createEtchedBorder());
maxColour.setPreferredSize(new Dimension(40, 20));
maxColour_actionPerformed();
}
});
+
startupCheckbox.setText("Open file");
startupCheckbox.setFont(verdana11);
startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
smoothFont.setText("Smooth Font");
calcTab.setLayout(null);
- autoCalculateConsCheck.setFont(new java.awt.Font("Verdana", Font.PLAIN,
- 11));
+ autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
autoCalculateConsCheck.setText("AutoCalculate Consensus");
autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
- padGaps.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
- padGaps.setText("Pad gaps when editing");
+ padGaps.setFont(JvSwingUtils.getLabelFont());
+ padGaps.setText("Pad Gaps When Editing");
padGaps.setBounds(new Rectangle(22, 94, 168, 23));
- modellerOutput.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ sortByTree.setFont(JvSwingUtils.getLabelFont());
+ sortByTree.setText("Sort With New Tree");
+ sortByTree.setToolTipText("When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment.");
+ sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
+ modellerOutput.setFont(JvSwingUtils.getLabelFont());
modellerOutput.setText("Use Modeller Output");
modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
dasPanel.setLayout(borderLayout4);
wsPanel.setLayout(borderLayout5);
- wrap.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ wrap.setFont(JvSwingUtils.getLabelFont());
wrap.setHorizontalAlignment(SwingConstants.TRAILING);
wrap.setHorizontalTextPosition(SwingConstants.LEADING);
wrap.setText("Wrap Alignment");
- rightAlign.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ rightAlign.setFont(JvSwingUtils.getLabelFont());
rightAlign.setForeground(Color.black);
rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
rightAlign.setText("Right Align Ids");
- idItalics.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ idItalics.setFont(JvSwingUtils.getLabelFont());
idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
idItalics.setText("Sequence Name Italics");
- openoverv.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ openoverv.setFont(JvSwingUtils.getLabelFont());
openoverv.setActionCommand("Open Overview");
openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
tooltipSettings.add(showNpTooltip);
visualTab.add(tooltipSettings);
visualTab.add(jPanel2);
- addtoLayout(visual2Tab, "Default Colourscheme for alignment", colourLabel, colour);
- addtoLayout(visual2Tab, "Default Minimum Colour for annotation shading", mincolourLabel,minColour);
- addtoLayout(visual2Tab,"Default Maximum Colour for annotation shading", maxcolourLabel, maxColour);
+ JvSwingUtils.addtoLayout(visual2Tab, "Default Colourscheme for alignment", colourLabel, colour);
+ JPanel annotationShding=new JPanel();
+ annotationShding.setBorder(new TitledBorder("Annotation Shading Default"));
+ annotationShding.setLayout(new GridLayout(1,2));
+ JvSwingUtils.addtoLayout(annotationShding, "Default Minimum Colour for annotation shading", mincolourLabel,minColour);
+ JvSwingUtils.addtoLayout(annotationShding,"Default Maximum Colour for annotation shading", maxcolourLabel, maxColour);
+ visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
// visual2panel.add(minColour);
// visual2panel.add(maxColour);
tabbedPane.add(calcTab, "Editing");
calcTab.add(autoCalculateConsCheck);
calcTab.add(padGaps);
+ calcTab.add(sortByTree);
+
tabbedPane.add(dasPanel, "DAS Settings");
tabbedPane.add(wsPanel, "Web Services");
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.jbgui;
+
+import java.awt.Dimension;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+
+import jalview.gui.JvSwingUtils;
+import jalview.gui.OptsAndParamsPage;
+
+import javax.swing.*;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+
+import net.miginfocom.swing.MigLayout;
+
+
+public class GRestInputParamEditDialog
+{
+
+ protected JPanel dpane;
+ protected JPanel okcancel;
+ protected JList typeList;
+ protected JTextField tok;
+ protected JPanel options;
+ protected JPanel optionsPanel;
+ public GRestInputParamEditDialog()
+ {
+ jbInit();
+ }
+ protected void jbInit() {
+ dpane = new JPanel(new MigLayout("","[][][fill]","[][fill][]"));
+ dpane.setPreferredSize(new Dimension(110+100+OptsAndParamsPage.PARAM_WIDTH,400));
+ typeList = new JList();
+ typeList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ typeList.getSelectionModel().addListSelectionListener(new ListSelectionListener()
+ {
+
+ @Override
+ public void valueChanged(ListSelectionEvent e)
+ {
+ type_SelectionChangedActionPerformed(e);
+ };
+ });
+
+ tok = new JTextField();
+ tok.addKeyListener(new KeyListener()
+ {
+
+ @Override
+ public void keyTyped(KeyEvent e)
+ {
+ }
+
+ @Override
+ public void keyReleased(KeyEvent e)
+ {
+ tokChanged_actionPerformed();
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e)
+ {
+
+ }
+ });
+ options = new JPanel(new MigLayout("","[grow 100,fill]",""));
+ optionsPanel = new JPanel(new MigLayout("","[fill]","[fill]"));
+ JScrollPane optionView = new JScrollPane();
+ optionView.setViewportView(options);
+ JvSwingUtils.mgAddtoLayout(dpane, "Input Parameter name", new JLabel("Name"), tok, "grow,spanx 3,wrap");
+ JPanel paramsType = new JPanel(new MigLayout("","[grow 100,fill]","[grow 100,fill]"));
+ paramsType.setBorder(new TitledBorder("Select input type"));
+ JScrollPane jlistScroller=new JScrollPane();
+ jlistScroller.setViewportView(typeList);
+ paramsType.add(jlistScroller,"spanx 2,spany 2");
+ dpane.add(paramsType);
+ optionsPanel.setBorder(new TitledBorder("Set options for type"));
+ optionsPanel.add(optionView);
+ dpane.add(optionsPanel,"wrap");
+ okcancel = new JPanel(new MigLayout("","[center][center]","[]"));
+ dpane.add(okcancel,"spanx 3,wrap");
+
+ }
+ protected void tokChanged_actionPerformed()
+ {
+
+ }
+ protected void type_SelectionChangedActionPerformed(ListSelectionEvent e)
+ {
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.jbgui;
+
+import jalview.gui.JvSwingUtils;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextArea;
+import javax.swing.JViewport;
+import javax.swing.ListSelectionModel;
+import javax.swing.UIManager;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.CaretEvent;
+import javax.swing.event.CaretListener;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.event.ListSelectionListener;
+
+import net.miginfocom.swing.MigLayout;
+
+public class GRestServiceEditorPane extends JPanel {
+
+ protected JTabbedPane panels;
+
+ protected JPanel details, inputs, paste;
+
+ protected JTextArea urldesc, url, urlsuff, name, descr, parseRes;
+
+ protected JComboBox action, gapChar;
+
+ JLabel acttype;
+
+ protected JButton okButton;
+
+ protected JButton cancelButton;
+
+ JPanel svcattribs;
+
+ JPanel status;
+
+ protected JList iprms;
+
+ protected JList rdata;
+
+ JScrollPane iprmVp, rdataVp, parseResVp, urlVp, descrVp, urldescVp;
+
+ JButton rdataAdd, rdataRem, rdataNdown, rdataNup;
+
+ JButton iprmsAdd, iprmsRem;
+
+ protected JCheckBox hSeparable;
+
+ protected JCheckBox vSeparable;
+
+ protected JPanel parseWarnings;
+
+ public GRestServiceEditorPane()
+ {
+ jbInit();
+ }
+
+ protected void jbInit()
+ {
+ details = new JPanel();
+ details.setName("Details");
+ details.setLayout(new MigLayout());
+ inputs = new JPanel();
+ inputs.setName("Input/Output");
+ inputs.setLayout(new MigLayout("","[grow 85,fill][]",""));
+ paste = new JPanel();
+ paste.setName("Cut'n'Paste");
+ paste.setLayout(new MigLayout("","[grow 100, fill]","[][grow 100,fill]"));
+
+ panels = new JTabbedPane();
+ panels.addTab(details.getName(), details);
+ panels.addTab(inputs.getName(), inputs);
+ panels.addTab(paste.getName(), paste);
+
+ JPanel cpanel;
+
+ // Name and URL Panel
+ cpanel = details;
+ name = new JTextArea(1, 12);
+
+ JvSwingUtils
+ .mgAddtoLayout(cpanel, "Short descriptive name for service",
+ new JLabel("Name:"), name,"wrap");
+ action = new JComboBox();
+ JvSwingUtils
+ .mgAddtoLayout(
+ cpanel,
+ "What kind of function the service performs (e.g. alignment, analysis, search, etc).",
+ new JLabel("Service Action:"), action,"wrap");
+ descr = new JTextArea(4, 60);
+ descrVp = new JScrollPane();
+ descrVp.setViewportView(descr);
+ JvSwingUtils.mgAddtoLayout(cpanel, "Brief description of service",
+ new JLabel("Description:"), descrVp,"wrap");
+
+ url = new JTextArea(2, 60);
+ urlVp = new JScrollPane();
+ urlVp.setViewportView(url);
+ JvSwingUtils
+ .mgAddtoLayout(
+ cpanel,
+ "URL to post data to service. Include any special parameters needed here",
+ new JLabel("POST URL:"), urlVp,"wrap");
+
+ urlsuff = new JTextArea();
+ urlsuff.setColumns(60);
+
+ JvSwingUtils
+ .mgAddtoLayout(
+ cpanel,
+ "Optional suffix added to URL when retrieving results from service",
+ new JLabel("URL Suffix:"), urlsuff,"wrap");
+
+ // input options
+ // details.add(cpanel = new JPanel(), BorderLayout.CENTER);
+ // cpanel.setLayout(new FlowLayout());
+ hSeparable = new JCheckBox("per Sequence");
+ hSeparable
+ .setToolTipText("<html>"
+ + JvSwingUtils
+ .wrapTooltip("When checked, a job is created for every sequence in the current selection.")
+ + "<html>");
+ hSeparable.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent arg0)
+ {
+ hSeparable_actionPerformed(arg0);
+
+ }
+ });
+ vSeparable = new JCheckBox("Results are vertically separable");
+ vSeparable
+ .setToolTipText("<html>"
+ + JvSwingUtils
+ .wrapTooltip("When checked, a single job is created for the visible region and results"
+ + " mapped back onto their location in the alignment. Otherwise, a job would be"
+ + " created for every contiguous region visible in the alignment or current"
+ + " selection (e.g. a multiple alignment).")
+ + "</html>");
+ vSeparable.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent arg0)
+ {
+ vSeparable_actionPerformed(arg0);
+
+ }
+ });
+ gapChar = new JComboBox();
+ JvSwingUtils
+ .mgAddtoLayout(
+ cpanel,
+ "Which gap character does this service prefer ?",
+ new JLabel("Gap Character:"), gapChar,"wrap");
+
+
+ cpanel.add(hSeparable);
+ cpanel.add(vSeparable);
+
+ // Input and Output lists
+ // Inputparams
+ JPanel iprmsList = new JPanel();
+ iprmsList.setBorder(new TitledBorder("Data input parameters"));
+ iprmsList.setLayout(new MigLayout("","[grow 90, fill][]"));
+ iprmVp = new JScrollPane();
+ iprmVp.getViewport().setView(iprms = new JList());
+ iprmsList.add(iprmVp);
+ iprms.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ iprms.addMouseListener(new MouseListener()
+ {
+
+ @Override
+ public void mouseReleased(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mousePressed(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseExited(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseEntered(MouseEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseClicked(MouseEvent e)
+ {
+ if (e.getClickCount()>1) {
+ iprmListSelection_doubleClicked();
+ }
+
+ }
+ });
+ JPanel iprmButs = new JPanel();
+ iprmButs.setLayout(new MigLayout());
+
+ iprmsAdd = JvSwingUtils.makeButton("+", "Add input parameter",
+ new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ iprmsAdd_actionPerformed(e);
+
+ }
+ });
+ iprmsRem = JvSwingUtils.makeButton("-",
+ "Remove selected input parameter", new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ iprmsRem_actionPerformed(e);
+
+ }
+ });
+
+ iprmButs.add(iprmsAdd,"wrap");
+ iprmButs.add(iprmsRem,"wrap");
+ iprmsList.add(iprmButs, "wrap");
+ inputs.add(iprmsList, "wrap");
+
+ // Return Parameters
+
+ rdataAdd = JvSwingUtils.makeButton("+", "Add return datatype",
+ new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ rdataAdd_actionPerformed(e);
+
+ }
+ });
+ rdataRem = JvSwingUtils.makeButton("-", "Remove return datatype",
+ new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ rdataRem_actionPerformed(e);
+
+ }
+ });
+ rdataNup = JvSwingUtils.makeButton("Move Up",
+ "Move return type up order", new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ rdataNup_actionPerformed(e);
+
+ }
+ });
+ rdataNdown = JvSwingUtils.makeButton("Move Down",
+ "Move return type down order", new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ rdataNdown_actionPerformed(e);
+
+ }
+ });
+
+ JPanel rparamList = new JPanel();
+ rparamList.setBorder(new TitledBorder("Data returned by service"));
+ rparamList.setLayout(new MigLayout("","[grow 90, fill][]"));
+ rdata = new JList();
+ rdata.setToolTipText("Right click to edit currently selected parameter.");
+ rdata.addMouseListener(new MouseListener()
+ {
+
+ @Override
+ public void mouseReleased(MouseEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mousePressed(MouseEvent arg0)
+ {
+
+ }
+
+ @Override
+ public void mouseExited(MouseEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseEntered(MouseEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseClicked(MouseEvent arg0)
+ {
+ if (arg0.getButton()==MouseEvent.BUTTON3)
+ {
+ rdata_rightClicked(arg0);
+ }
+
+ }
+ });
+ rdataVp = new JScrollPane();
+ rdataVp.getViewport().setView(rdata);
+ rparamList.add(rdataVp);
+ JPanel rparamButs = new JPanel();
+ rparamButs.setLayout(new MigLayout());
+ rparamButs.add(rdataAdd,"wrap");
+ rparamButs.add(rdataRem,"wrap");
+ rparamButs.add(rdataNup,"wrap");
+ rparamButs.add(rdataNdown,"wrap");
+ rparamList.add(rparamButs,"wrap");
+ inputs.add(rparamList,"wrap");
+
+ // Parse flat-text to a service
+
+
+ urldesc = new JTextArea(4,60);
+ urldesc.setEditable(true);
+ urldesc.setWrapStyleWord(true);
+ urldescVp = new JScrollPane();
+ urldescVp.setViewportView(urldesc);
+ JPanel urldescPane = new JPanel();
+ urldescPane.setLayout(new MigLayout("","[grow 100, fill]", "[grow 100, fill]"));
+ urldescPane.setBorder(new TitledBorder("RSBS Encoded Service"));
+ urldescPane.add(urldescVp, "span");
+ paste.add(urldescPane,"span");
+ urldescPane.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("Flat file representation of this rest service using the Really Simple Bioinformatics Service formalism"));
+
+ parseRes = new JTextArea();
+ parseResVp = new JScrollPane();
+ parseResVp.setViewportView(parseRes);
+ parseRes.setWrapStyleWord(true);
+ parseRes.setColumns(60);
+ parseWarnings = new JPanel(new MigLayout("","[grow 100, fill]", "[grow 100, fill]"));
+ parseWarnings.setBorder(new TitledBorder("Parsing errors"));
+ parseWarnings.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("Results of parsing the RSBS representation")+"</html>");
+ parseWarnings.add(parseResVp, "center");
+ parseRes.setEditable(false);
+ paste.add(parseWarnings, "span");
+ setLayout(new BorderLayout());
+ add(panels, BorderLayout.CENTER);
+ okButton = JvSwingUtils.makeButton("OK", "", new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ ok_actionPerformed();
+ }
+ });
+ cancelButton = JvSwingUtils.makeButton("Cancel", "",
+ new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ cancel_actionPerformed();
+ }
+ });
+
+ }
+
+ protected void rdata_rightClicked(MouseEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void iprmListSelection_doubleClicked()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void hSeparable_actionPerformed(ActionEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void vSeparable_actionPerformed(ActionEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void cancel_actionPerformed()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void ok_actionPerformed()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void iprmsAdd_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void iprmsRem_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void rdataAdd_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void rdataRem_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void rdataNup_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void rdataNdown_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void ok_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void cancel_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*/
package jalview.jbgui;
+import jalview.gui.JvSwingUtils;
import jalview.util.UrlLink;
import java.awt.*;
private void jbInit() throws Exception
{
this.setLayout(gridBagLayout1);
- nameTB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ nameTB.setFont(JvSwingUtils.getLabelFont());
nameTB.setBounds(new Rectangle(77, 10, 310, 23));
nameTB.addKeyListener(new KeyAdapter()
{
nameTB_keyTyped(e);
}
});
- urlTB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ urlTB.setFont(JvSwingUtils.getLabelFont());
urlTB.setText("http://www.");
urlTB.setBounds(new Rectangle(78, 40, 309, 23));
urlTB.addKeyListener(new KeyAdapter()
urlTB_keyTyped(e);
}
});
- jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ jLabel1.setFont(JvSwingUtils.getLabelFont());
jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
jLabel1.setText("Link Name");
jLabel1.setBounds(new Rectangle(4, 10, 71, 24));
- jLabel2.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ jLabel2.setFont(JvSwingUtils.getLabelFont());
jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
jLabel2.setText("URL");
jLabel2.setBounds(new Rectangle(17, 37, 54, 27));
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
public JMenuItem font = new JMenuItem();
+ public JMenuItem sortAssocViews = new JMenuItem();
+
public JCheckBoxMenuItem bootstrapMenu = new JCheckBoxMenuItem();
public JCheckBoxMenuItem distanceMenu = new JCheckBoxMenuItem();
{
}
});
+ sortAssocViews.setText("Sort Alignment By Tree");
+ sortAssocViews.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ sortByTree_actionPerformed(e);
+ }
+ });
font.setText("Font...");
font.addActionListener(new java.awt.event.ActionListener()
{
viewMenu.add(distanceMenu);
viewMenu.add(bootstrapMenu);
viewMenu.add(placeholdersMenu);
+ viewMenu.add(sortAssocViews);
viewMenu.add(associateLeavesMenu);
saveAsMenu.add(saveAsNewick);
saveAsMenu.add(epsTree);
public void viewMenu_menuSelected()
{
}
+ public void sortByTree_actionPerformed(ActionEvent e)
+ {
+
+ }
+
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*/
package jalview.jbgui;
+import jalview.gui.JvSwingUtils;
+
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
savebutton_actionPerformed(e);
}
});
- cancelButton.setFont(new java.awt.Font("Verdana", 0, 11));
+ cancelButton.setFont(JvSwingUtils.getLabelFont());
cancelButton.setText("Cancel");
cancelButton.addActionListener(new java.awt.event.ActionListener()
{
lowerPanel.setOpaque(false);
lowerPanel.setLayout(borderLayout3);
colorChooser.setOpaque(false);
- jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ jLabel1.setFont(JvSwingUtils.getLabelFont());
jLabel1.setText("Name");
namePanel.setMinimumSize(new Dimension(300, 31));
namePanel.setOpaque(false);
namePanel.setPreferredSize(new Dimension(240, 25));
namePanel.setLayout(borderLayout1);
- schemeName.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+ schemeName.setFont(JvSwingUtils.getLabelFont());
schemeName.setPreferredSize(new Dimension(105, 21));
schemeName.setText("");
schemeName.setHorizontalAlignment(SwingConstants.CENTER);
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.border.TitledBorder;
*/
public class GWsPreferences extends JPanel
{
+ protected JList sbrsList = new JList();
+
+ protected TitledBorder sbrsListTitleBorder = new TitledBorder(
+ "Simple Bioinformatics Rest Services");
+
+ protected JButton newSbrsUrl = new JButton();
+
+ protected JButton editSbrsUrl = new JButton();
+
+ protected JButton deleteSbrsUrl = new JButton();
+
protected JList wsList = new JList();
protected TitledBorder wsListTitleBorder = new TitledBorder(
protected JCheckBox indexByType = new JCheckBox();
- protected JCheckBox enableJws1Services = new JCheckBox();
-
protected JCheckBox enableJws2Services = new JCheckBox();
protected JCheckBox enableEnfinServices = new JCheckBox();
JPanel wsListNavButs = new JPanel();
+ JScrollPane srbsListPane = new JScrollPane();
+
+ JPanel srbsListUrlPanel = new JPanel();
+
+ JPanel srbsListPanel = new JPanel();
+
+ JPanel srbsListButtons = new JPanel();
+
+ JPanel srbsListNavButs = new JPanel();
+
BorderLayout myBorderlayout = new BorderLayout();
BorderLayout wsListBorderlayout = new BorderLayout();
+
+ BorderLayout srbsListBorderlayout = new BorderLayout();
GridBagLayout wsPrefLayout = new GridBagLayout();
GridBagLayout wsListLayout = new GridBagLayout();
+ GridBagLayout srbsListLayout = new GridBagLayout();
+
GridBagLayout wsMenuLayout = new GridBagLayout();
JPanel wsMenuButtons = new JPanel();
enableJws2Services_actionPerformed(e);
}
});
- enableJws1Services
- .setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
- enableJws1Services.setText("Enable Legacy Services");
- enableJws1Services.addActionListener(new ActionListener()
- {
- public void actionPerformed(ActionEvent e)
- {
- enableJws1Services_actionPerformed(e);
- }
- });
displayWsWarning.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
displayWsWarning.setText("Display warnings");
displayWsWarning
moveWsUrlDown_actionPerformed(e);
}
});
+ newSbrsUrl.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
+ newSbrsUrl.setText("Add a SBRS definition");
+ newSbrsUrl.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ newSbrsUrl_actionPerformed(e);
+ }
+ });
+ editSbrsUrl.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
+ editSbrsUrl.setText("Edit SBRS definition");
+ editSbrsUrl.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ editSbrsUrl_actionPerformed(e);
+ }
+ });
+
+ deleteSbrsUrl.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));
+ deleteSbrsUrl.setText("Delete SBRS definition");
+ deleteSbrsUrl.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ deleteSbrsUrl_actionPerformed(e);
+ }
+ });
setLayout(myBorderlayout);
setPreferredSize(new Dimension(500, 400));
// wsListUrlPanel.setPreferredSize(new Dimension(482,202));
wsListPane.setBorder(BorderFactory.createEtchedBorder());
wsListPane.getViewport().add(wsList);
- wsListPane.setPreferredSize(new Dimension(380, 200));
+ // wsListPane.setPreferredSize(new Dimension(380, 80));
wsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
wsList.addMouseListener(new MouseListener()
{
wsListNavButs.setLayout(new FlowLayout());
wsListNavButs.add(moveWsUrlUp);
wsListNavButs.add(moveWsUrlDown);
- wsListUrlPanel.add(wsListPane, BorderLayout.EAST);
+ wsListUrlPanel.add(wsListPane, BorderLayout.CENTER);
wsListUrlPanel.add(wsListNavButs, BorderLayout.WEST);
wsListPanel.setBorder(wsListTitleBorder);
wsListPanel.setLayout(new BorderLayout());
wsListPanel.add(wsListUrlPanel, BorderLayout.NORTH);
wsListPanel.add(wsListButtons, BorderLayout.SOUTH);
+
+ srbsListUrlPanel.setBorder(BorderFactory.createEtchedBorder());
+ srbsListUrlPanel.setLayout(new BorderLayout());
+ srbsListPane.setBorder(BorderFactory.createEtchedBorder());
+ srbsListPane.getViewport().add(sbrsList);
+ //srbsListPane.setMinimumSize(new Dimension(380, 80));
+ sbrsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ sbrsList.addMouseListener(new MouseListener()
+ {
+
+ public void mouseClicked(MouseEvent e)
+ {
+ if (e.getClickCount() > 1)
+ {
+ editSbrsUrl_actionPerformed(null);
+ }
+
+ }
+
+ public void mouseEntered(MouseEvent e)
+ {
+
+ }
+
+ public void mouseExited(MouseEvent e)
+ {
+ }
+
+ public void mousePressed(MouseEvent e)
+ {
+
+ }
+
+ public void mouseReleased(MouseEvent e)
+ {
+
+ }
+
+ });
+ srbsListButtons.setLayout(new FlowLayout());
+ srbsListButtons.add(newSbrsUrl);
+ srbsListButtons.add(editSbrsUrl);
+ srbsListButtons.add(deleteSbrsUrl);
+ srbsListUrlPanel.add(srbsListPane, BorderLayout.CENTER);
+ srbsListPanel.setBorder(sbrsListTitleBorder);
+ srbsListPanel.setLayout(new BorderLayout());
+ srbsListPanel.add(srbsListUrlPanel, BorderLayout.NORTH);
+ srbsListPanel.add(srbsListButtons, BorderLayout.CENTER);
+
wsMenuButtons.setLayout(new GridLayout(2, 3));
wsMenuButtons.add(indexByHost);
wsMenuButtons.add(indexByType);
- wsMenuButtons.add(enableJws1Services);
wsMenuButtons.add(enableJws2Services);
wsMenuButtons.add(enableEnfinServices);
wsMenuButtons.add(displayWsWarning);
wsMenuRefreshButs.add(resetWs, null);
wsMenuRefreshButs.add(progressBar, null);
myBorderlayout.setHgap(3);
- add(wsListPanel, BorderLayout.NORTH);
+ if (jalview.bin.Cache.getDefault("ENABLE_RSBS_EDITOR",false)) {
+ JTabbedPane listPanels=new JTabbedPane();
+ listPanels.addTab("JABAWS Servers",wsListPanel);
+ listPanels.addTab("RSB Services", srbsListPanel);
+ add(listPanels, BorderLayout.NORTH);
+ } else {
+ add(wsListPanel, BorderLayout.NORTH);
+ }
add(wsMenuButtons, BorderLayout.CENTER);
add(wsMenuRefreshButs, BorderLayout.SOUTH);
}
+ protected void deleteSbrsUrl_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void editSbrsUrl_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void newSbrsUrl_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
protected void displayWsWarning_actionPerformed(ActionEvent e)
{
// TODO Auto-generated method stub
}
- protected void enableJws1Services_actionPerformed(ActionEvent e)
- {
-
- }
-
protected void refreshWs_actionPerformed(ActionEvent e)
{
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
-#Mon Apr 25 14:07:25 BST 2011
+#Wed Aug 03 09:15:24 BST 2011
jalview.schemabinding.version2.ThresholdLine=jalview.schemabinding.version2.descriptors.ThresholdLineDescriptor
jalview.schemabinding.version2.SequenceSetProperties=jalview.schemabinding.version2.descriptors.SequenceSetPropertiesDescriptor
jalview.schemabinding.version2.StructureState=jalview.schemabinding.version2.descriptors.StructureStateDescriptor
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
private boolean _has_visible;
/**
- * Field _xpos.
- */
- private int _xpos;
-
- /**
- * keeps track of state for field: _xpos
- */
- private boolean _has_xpos;
-
- /**
- * Field _ypos.
- */
- private int _ypos;
-
- /**
- * keeps track of state for field: _ypos
- */
- private boolean _has_ypos;
-
- /**
- * Field _width.
- */
- private int _width;
-
- /**
- * keeps track of state for field: _width
- */
- private boolean _has_width;
-
- /**
- * Field _height.
- */
- private int _height;
-
- /**
- * keeps track of state for field: _height
- */
- private boolean _has_height;
-
- /**
* additional identifier which properly disambiguates
* the structure view from any other view with the same
* attributes. This is not an ID,
*/
private boolean _has_colourByJmol;
+ /**
+ * Field _width.
+ */
+ private int _width;
+
+ /**
+ * keeps track of state for field: _width
+ */
+ private boolean _has_width;
+
+ /**
+ * Field _height.
+ */
+ private int _height;
+
+ /**
+ * keeps track of state for field: _height
+ */
+ private boolean _has_height;
+
+ /**
+ * Field _xpos.
+ */
+ private int _xpos;
+
+ /**
+ * keeps track of state for field: _xpos
+ */
+ private boolean _has_xpos;
+
+ /**
+ * Field _ypos.
+ */
+ private int _ypos;
+
+ /**
+ * keeps track of state for field: _ypos
+ */
+ private boolean _has_ypos;
+
//----------------/
//- Constructors -/
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
//--------------------------/
/**
- * Field _width.
- */
- private int _width;
-
- /**
- * keeps track of state for field: _width
- */
- private boolean _has_width;
-
- /**
- * Field _height.
- */
- private int _height;
-
- /**
- * keeps track of state for field: _height
- */
- private boolean _has_height;
-
- /**
- * Field _xpos.
- */
- private int _xpos;
-
- /**
- * keeps track of state for field: _xpos
- */
- private boolean _has_xpos;
-
- /**
- * Field _ypos.
- */
- private int _ypos;
-
- /**
- * keeps track of state for field: _ypos
- */
- private boolean _has_ypos;
-
- /**
* Field _fontName.
*/
private java.lang.String _fontName;
private java.lang.String _id;
/**
+ * Field _width.
+ */
+ private int _width;
+
+ /**
+ * keeps track of state for field: _width
+ */
+ private boolean _has_width;
+
+ /**
+ * Field _height.
+ */
+ private int _height;
+
+ /**
+ * keeps track of state for field: _height
+ */
+ private boolean _has_height;
+
+ /**
+ * Field _xpos.
+ */
+ private int _xpos;
+
+ /**
+ * keeps track of state for field: _xpos
+ */
+ private boolean _has_xpos;
+
+ /**
+ * Field _ypos.
+ */
+ private int _ypos;
+
+ /**
+ * keeps track of state for field: _ypos
+ */
+ private boolean _has_ypos;
+
+ /**
* Field _title.
*/
private java.lang.String _title;
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
private boolean _has_ignoreGapsinConsensus;
/**
- * Field _xpos.
- */
- private int _xpos;
-
- /**
- * keeps track of state for field: _xpos
- */
- private boolean _has_xpos;
-
- /**
- * Field _ypos.
- */
- private int _ypos;
-
- /**
- * keeps track of state for field: _ypos
- */
- private boolean _has_ypos;
-
- /**
- * Field _width.
- */
- private int _width;
-
- /**
- * keeps track of state for field: _width
- */
- private boolean _has_width;
-
- /**
- * Field _height.
- */
- private int _height;
-
- /**
- * keeps track of state for field: _height
- */
- private boolean _has_height;
-
- /**
* Field _startRes.
*/
private int _startRes;
private java.lang.String _id;
/**
+ * Field _width.
+ */
+ private int _width;
+
+ /**
+ * keeps track of state for field: _width
+ */
+ private boolean _has_width;
+
+ /**
+ * Field _height.
+ */
+ private int _height;
+
+ /**
+ * keeps track of state for field: _height
+ */
+ private boolean _has_height;
+
+ /**
+ * Field _xpos.
+ */
+ private int _xpos;
+
+ /**
+ * keeps track of state for field: _xpos
+ */
+ private boolean _has_xpos;
+
+ /**
+ * Field _ypos.
+ */
+ private int _ypos;
+
+ /**
+ * keeps track of state for field: _ypos
+ */
+ private boolean _has_ypos;
+
+ /**
* Field _annotationColours.
*/
private jalview.schemabinding.version2.AnnotationColours _annotationColours;
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
- //-- _xpos
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _viewId
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewId", "viewId", org.exolab.castor.xml.NodeType.Attribute);
+ desc.setImmutable(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
StructureState target = (StructureState) object;
- if (!target.hasXpos()) { return null; }
- return new java.lang.Integer(target.getXpos());
+ return target.getViewId();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
StructureState target = (StructureState) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteXpos();
- return;
- }
- target.setXpos( ((java.lang.Integer) value).intValue());
+ target.setViewId( (java.lang.String) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _xpos
+ //-- validation code for: _viewId
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ org.exolab.castor.xml.validators.StringValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
+ typeValidator.setWhiteSpace("preserve");
}
desc.setValidator(fieldValidator);
- //-- _ypos
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _alignwithAlignPanel
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_alignwithAlignPanel", "alignwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
StructureState target = (StructureState) object;
- if (!target.hasYpos()) { return null; }
- return new java.lang.Integer(target.getYpos());
+ if (!target.hasAlignwithAlignPanel()) { return null; }
+ return (target.getAlignwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
StructureState target = (StructureState) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteYpos();
+ target.deleteAlignwithAlignPanel();
return;
}
- target.setYpos( ((java.lang.Integer) value).intValue());
+ target.setAlignwithAlignPanel( ((java.lang.Boolean) value).booleanValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _ypos
+ //-- validation code for: _alignwithAlignPanel
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _width
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _colourwithAlignPanel
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourwithAlignPanel", "colourwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
StructureState target = (StructureState) object;
- if (!target.hasWidth()) { return null; }
- return new java.lang.Integer(target.getWidth());
+ if (!target.hasColourwithAlignPanel()) { return null; }
+ return (target.getColourwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
StructureState target = (StructureState) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteWidth();
+ target.deleteColourwithAlignPanel();
return;
}
- target.setWidth( ((java.lang.Integer) value).intValue());
+ target.setColourwithAlignPanel( ((java.lang.Boolean) value).booleanValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _width
+ //-- validation code for: _colourwithAlignPanel
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _height
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _colourByJmol
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourByJmol", "colourByJmol", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
StructureState target = (StructureState) object;
- if (!target.hasHeight()) { return null; }
- return new java.lang.Integer(target.getHeight());
+ if (!target.hasColourByJmol()) { return null; }
+ return (target.getColourByJmol() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
StructureState target = (StructureState) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteHeight();
+ target.deleteColourByJmol();
return;
}
- target.setHeight( ((java.lang.Integer) value).intValue());
+ target.setColourByJmol( ((java.lang.Boolean) value).booleanValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _height
+ //-- validation code for: _colourByJmol
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _viewId
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewId", "viewId", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
+ //-- _width
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
StructureState target = (StructureState) object;
- return target.getViewId();
+ if (!target.hasWidth()) { return null; }
+ return new java.lang.Integer(target.getWidth());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
StructureState target = (StructureState) object;
- target.setViewId( (java.lang.String) value);
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteWidth();
+ return;
+ }
+ target.setWidth( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _viewId
+ //-- validation code for: _width
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.StringValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setWhiteSpace("preserve");
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _alignwithAlignPanel
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_alignwithAlignPanel", "alignwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _height
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
StructureState target = (StructureState) object;
- if (!target.hasAlignwithAlignPanel()) { return null; }
- return (target.getAlignwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ if (!target.hasHeight()) { return null; }
+ return new java.lang.Integer(target.getHeight());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
StructureState target = (StructureState) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteAlignwithAlignPanel();
+ target.deleteHeight();
return;
}
- target.setAlignwithAlignPanel( ((java.lang.Boolean) value).booleanValue());
+ target.setHeight( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _alignwithAlignPanel
+ //-- validation code for: _height
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.BooleanValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _colourwithAlignPanel
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourwithAlignPanel", "colourwithAlignPanel", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _xpos
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
StructureState target = (StructureState) object;
- if (!target.hasColourwithAlignPanel()) { return null; }
- return (target.getColourwithAlignPanel() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ if (!target.hasXpos()) { return null; }
+ return new java.lang.Integer(target.getXpos());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
StructureState target = (StructureState) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteColourwithAlignPanel();
+ target.deleteXpos();
return;
}
- target.setColourwithAlignPanel( ((java.lang.Boolean) value).booleanValue());
+ target.setXpos( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _colourwithAlignPanel
+ //-- validation code for: _xpos
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.BooleanValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _colourByJmol
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourByJmol", "colourByJmol", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _ypos
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
StructureState target = (StructureState) object;
- if (!target.hasColourByJmol()) { return null; }
- return (target.getColourByJmol() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ if (!target.hasYpos()) { return null; }
+ return new java.lang.Integer(target.getYpos());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
StructureState target = (StructureState) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteColourByJmol();
+ target.deleteYpos();
return;
}
- target.setColourByJmol( ((java.lang.Boolean) value).booleanValue());
+ target.setYpos( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _colourByJmol
+ //-- validation code for: _ypos
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.BooleanValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
//-- initialize element descriptors
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
org.exolab.castor.xml.FieldValidator fieldValidator = null;
//-- initialize attribute descriptors
- //-- _width
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _fontName
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute);
+ desc.setImmutable(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasWidth()) { return null; }
- return new java.lang.Integer(target.getWidth());
+ return target.getFontName();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Tree target = (Tree) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteWidth();
- return;
- }
- target.setWidth( ((java.lang.Integer) value).intValue());
+ target.setFontName( (java.lang.String) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _width
+ //-- validation code for: _fontName
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ org.exolab.castor.xml.validators.StringValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
+ typeValidator.setWhiteSpace("preserve");
}
desc.setValidator(fieldValidator);
- //-- _height
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _fontSize
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasHeight()) { return null; }
- return new java.lang.Integer(target.getHeight());
+ if (!target.hasFontSize()) { return null; }
+ return new java.lang.Integer(target.getFontSize());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Tree target = (Tree) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteHeight();
+ target.deleteFontSize();
return;
}
- target.setHeight( ((java.lang.Integer) value).intValue());
+ target.setFontSize( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _height
+ //-- validation code for: _fontSize
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.IntValidator typeValidator;
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _xpos
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _fontStyle
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasXpos()) { return null; }
- return new java.lang.Integer(target.getXpos());
+ if (!target.hasFontStyle()) { return null; }
+ return new java.lang.Integer(target.getFontStyle());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Tree target = (Tree) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteXpos();
+ target.deleteFontStyle();
return;
}
- target.setXpos( ((java.lang.Integer) value).intValue());
+ target.setFontStyle( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _xpos
+ //-- validation code for: _fontStyle
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.IntValidator typeValidator;
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _ypos
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _threshold
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasYpos()) { return null; }
- return new java.lang.Integer(target.getYpos());
+ if (!target.hasThreshold()) { return null; }
+ return new java.lang.Float(target.getThreshold());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Tree target = (Tree) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteYpos();
+ target.deleteThreshold();
return;
}
- target.setYpos( ((java.lang.Integer) value).intValue());
+ target.setThreshold( ((java.lang.Float) value).floatValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _ypos
+ //-- validation code for: _threshold
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ org.exolab.castor.xml.validators.FloatValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
+ typeValidator.setMinInclusive((float) -3.4028235E38);
+ typeValidator.setMaxInclusive((float) 3.4028235E38);
}
desc.setValidator(fieldValidator);
- //-- _fontName
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
+ //-- _showBootstrap
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showBootstrap", "showBootstrap", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- return target.getFontName();
+ if (!target.hasShowBootstrap()) { return null; }
+ return (target.getShowBootstrap() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Tree target = (Tree) object;
- target.setFontName( (java.lang.String) value);
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteShowBootstrap();
+ return;
+ }
+ target.setShowBootstrap( ((java.lang.Boolean) value).booleanValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _fontName
+ //-- validation code for: _showBootstrap
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.StringValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setWhiteSpace("preserve");
}
desc.setValidator(fieldValidator);
- //-- _fontSize
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _showDistances
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showDistances", "showDistances", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasFontSize()) { return null; }
- return new java.lang.Integer(target.getFontSize());
+ if (!target.hasShowDistances()) { return null; }
+ return (target.getShowDistances() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Tree target = (Tree) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteFontSize();
+ target.deleteShowDistances();
return;
}
- target.setFontSize( ((java.lang.Integer) value).intValue());
+ target.setShowDistances( ((java.lang.Boolean) value).booleanValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _fontSize
+ //-- validation code for: _showDistances
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _fontStyle
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _markUnlinked
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_markUnlinked", "markUnlinked", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasFontStyle()) { return null; }
- return new java.lang.Integer(target.getFontStyle());
+ if (!target.hasMarkUnlinked()) { return null; }
+ return (target.getMarkUnlinked() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Tree target = (Tree) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteFontStyle();
+ target.deleteMarkUnlinked();
return;
}
- target.setFontStyle( ((java.lang.Integer) value).intValue());
+ target.setMarkUnlinked( ((java.lang.Boolean) value).booleanValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _fontStyle
+ //-- validation code for: _markUnlinked
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _threshold
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Float.TYPE, "_threshold", "threshold", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _fitToWindow
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_fitToWindow", "fitToWindow", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasThreshold()) { return null; }
- return new java.lang.Float(target.getThreshold());
+ if (!target.hasFitToWindow()) { return null; }
+ return (target.getFitToWindow() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Tree target = (Tree) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteThreshold();
+ target.deleteFitToWindow();
return;
}
- target.setThreshold( ((java.lang.Float) value).floatValue());
+ target.setFitToWindow( ((java.lang.Boolean) value).booleanValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _threshold
+ //-- validation code for: _fitToWindow
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.FloatValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive((float) -3.4028235E38);
- typeValidator.setMaxInclusive((float) 3.4028235E38);
}
desc.setValidator(fieldValidator);
- //-- _showBootstrap
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showBootstrap", "showBootstrap", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _currentTree
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_currentTree", "currentTree", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasShowBootstrap()) { return null; }
- return (target.getShowBootstrap() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ if (!target.hasCurrentTree()) { return null; }
+ return (target.getCurrentTree() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Tree target = (Tree) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteShowBootstrap();
+ target.deleteCurrentTree();
return;
}
- target.setShowBootstrap( ((java.lang.Boolean) value).booleanValue());
+ target.setCurrentTree( ((java.lang.Boolean) value).booleanValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _showBootstrap
+ //-- validation code for: _currentTree
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.BooleanValidator typeValidator;
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
- //-- _showDistances
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showDistances", "showDistances", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _id
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
+ super.setIdentity(desc);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasShowDistances()) { return null; }
- return (target.getShowDistances() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ return target.getId();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Tree target = (Tree) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteShowDistances();
- return;
- }
- target.setShowDistances( ((java.lang.Boolean) value).booleanValue());
+ target.setId( (java.lang.String) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
+ return new java.lang.String();
}
};
desc.setHandler(handler);
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _showDistances
+ //-- validation code for: _id
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.BooleanValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+ org.exolab.castor.xml.validators.IdValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
- //-- _markUnlinked
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_markUnlinked", "markUnlinked", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _width
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasMarkUnlinked()) { return null; }
- return (target.getMarkUnlinked() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ if (!target.hasWidth()) { return null; }
+ return new java.lang.Integer(target.getWidth());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Tree target = (Tree) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteMarkUnlinked();
+ target.deleteWidth();
return;
}
- target.setMarkUnlinked( ((java.lang.Boolean) value).booleanValue());
+ target.setWidth( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _markUnlinked
+ //-- validation code for: _width
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.BooleanValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _fitToWindow
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_fitToWindow", "fitToWindow", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _height
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasFitToWindow()) { return null; }
- return (target.getFitToWindow() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ if (!target.hasHeight()) { return null; }
+ return new java.lang.Integer(target.getHeight());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Tree target = (Tree) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteFitToWindow();
+ target.deleteHeight();
return;
}
- target.setFitToWindow( ((java.lang.Boolean) value).booleanValue());
+ target.setHeight( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _fitToWindow
+ //-- validation code for: _height
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.BooleanValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _currentTree
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_currentTree", "currentTree", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _xpos
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if (!target.hasCurrentTree()) { return null; }
- return (target.getCurrentTree() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ if (!target.hasXpos()) { return null; }
+ return new java.lang.Integer(target.getXpos());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Tree target = (Tree) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteCurrentTree();
+ target.deleteXpos();
return;
}
- target.setCurrentTree( ((java.lang.Boolean) value).booleanValue());
+ target.setXpos( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _currentTree
+ //-- validation code for: _xpos
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.BooleanValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _id
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
- super.setIdentity(desc);
+ //-- _ypos
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- return target.getId();
+ if (!target.hasYpos()) { return null; }
+ return new java.lang.Integer(target.getYpos());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Tree target = (Tree) object;
- target.setId( (java.lang.String) value);
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteYpos();
+ return;
+ }
+ target.setYpos( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
- return new java.lang.String();
+ return null;
}
};
desc.setHandler(handler);
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _id
+ //-- validation code for: _ypos
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IdValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IdValidator();
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
//-- initialize element descriptors
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
- //-- _xpos
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _startRes
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startRes", "startRes", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasXpos()) { return null; }
- return new java.lang.Integer(target.getXpos());
+ if (!target.hasStartRes()) { return null; }
+ return new java.lang.Integer(target.getStartRes());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Viewport target = (Viewport) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteXpos();
+ target.deleteStartRes();
return;
}
- target.setXpos( ((java.lang.Integer) value).intValue());
+ target.setStartRes( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _xpos
+ //-- validation code for: _startRes
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.IntValidator typeValidator;
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _ypos
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _startSeq
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startSeq", "startSeq", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasYpos()) { return null; }
- return new java.lang.Integer(target.getYpos());
+ if (!target.hasStartSeq()) { return null; }
+ return new java.lang.Integer(target.getStartSeq());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Viewport target = (Viewport) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteYpos();
+ target.deleteStartSeq();
return;
}
- target.setYpos( ((java.lang.Integer) value).intValue());
+ target.setStartSeq( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _ypos
+ //-- validation code for: _startSeq
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.IntValidator typeValidator;
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _width
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _fontName
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute);
+ desc.setImmutable(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasWidth()) { return null; }
- return new java.lang.Integer(target.getWidth());
+ return target.getFontName();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Viewport target = (Viewport) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteWidth();
- return;
- }
- target.setWidth( ((java.lang.Integer) value).intValue());
+ target.setFontName( (java.lang.String) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _width
+ //-- validation code for: _fontName
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ org.exolab.castor.xml.validators.StringValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
+ typeValidator.setWhiteSpace("preserve");
}
desc.setValidator(fieldValidator);
- //-- _height
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _fontSize
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasHeight()) { return null; }
- return new java.lang.Integer(target.getHeight());
+ if (!target.hasFontSize()) { return null; }
+ return new java.lang.Integer(target.getFontSize());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Viewport target = (Viewport) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteHeight();
+ target.deleteFontSize();
return;
}
- target.setHeight( ((java.lang.Integer) value).intValue());
+ target.setFontSize( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _height
+ //-- validation code for: _fontSize
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.IntValidator typeValidator;
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _startRes
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startRes", "startRes", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _fontStyle
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasStartRes()) { return null; }
- return new java.lang.Integer(target.getStartRes());
+ if (!target.hasFontStyle()) { return null; }
+ return new java.lang.Integer(target.getFontStyle());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Viewport target = (Viewport) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteStartRes();
+ target.deleteFontStyle();
return;
}
- target.setStartRes( ((java.lang.Integer) value).intValue());
+ target.setFontStyle( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _startRes
+ //-- validation code for: _fontStyle
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.IntValidator typeValidator;
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _startSeq
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_startSeq", "startSeq", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _viewName
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewName", "viewName", org.exolab.castor.xml.NodeType.Attribute);
+ desc.setImmutable(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasStartSeq()) { return null; }
- return new java.lang.Integer(target.getStartSeq());
+ return target.getViewName();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Viewport target = (Viewport) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteStartSeq();
- return;
- }
- target.setStartSeq( ((java.lang.Integer) value).intValue());
+ target.setViewName( (java.lang.String) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _startSeq
+ //-- validation code for: _viewName
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ org.exolab.castor.xml.validators.StringValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.StringValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
+ typeValidator.setWhiteSpace("preserve");
}
desc.setValidator(fieldValidator);
- //-- _fontName
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_fontName", "fontName", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _sequenceSetId
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequenceSetId", "sequenceSetId", org.exolab.castor.xml.NodeType.Attribute);
desc.setImmutable(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- return target.getFontName();
+ return target.getSequenceSetId();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Viewport target = (Viewport) object;
- target.setFontName( (java.lang.String) value);
+ target.setSequenceSetId( (java.lang.String) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _fontName
+ //-- validation code for: _sequenceSetId
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.StringValidator typeValidator;
typeValidator.setWhiteSpace("preserve");
}
desc.setValidator(fieldValidator);
- //-- _fontSize
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontSize", "fontSize", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _gatheredViews
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_gatheredViews", "gatheredViews", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasFontSize()) { return null; }
- return new java.lang.Integer(target.getFontSize());
+ if (!target.hasGatheredViews()) { return null; }
+ return (target.getGatheredViews() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Viewport target = (Viewport) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteFontSize();
+ target.deleteGatheredViews();
return;
}
- target.setFontSize( ((java.lang.Integer) value).intValue());
+ target.setGatheredViews( ((java.lang.Boolean) value).booleanValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _fontSize
+ //-- validation code for: _gatheredViews
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IntValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IntValidator();
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setMinInclusive(-2147483648);
- typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _fontStyle
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_fontStyle", "fontStyle", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _textCol1
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasFontStyle()) { return null; }
- return new java.lang.Integer(target.getFontStyle());
+ if (!target.hasTextCol1()) { return null; }
+ return new java.lang.Integer(target.getTextCol1());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Viewport target = (Viewport) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteFontStyle();
+ target.deleteTextCol1();
return;
}
- target.setFontStyle( ((java.lang.Integer) value).intValue());
+ target.setTextCol1( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _fontStyle
+ //-- validation code for: _textCol1
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.IntValidator typeValidator;
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _viewName
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewName", "viewName", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
+ //-- _textCol2
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- return target.getViewName();
+ if (!target.hasTextCol2()) { return null; }
+ return new java.lang.Integer(target.getTextCol2());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Viewport target = (Viewport) object;
- target.setViewName( (java.lang.String) value);
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteTextCol2();
+ return;
+ }
+ target.setTextCol2( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _viewName
+ //-- validation code for: _textCol2
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.StringValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setWhiteSpace("preserve");
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _sequenceSetId
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_sequenceSetId", "sequenceSetId", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
+ //-- _textColThreshold
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- return target.getSequenceSetId();
+ if (!target.hasTextColThreshold()) { return null; }
+ return new java.lang.Integer(target.getTextColThreshold());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Viewport target = (Viewport) object;
- target.setSequenceSetId( (java.lang.String) value);
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteTextColThreshold();
+ return;
+ }
+ target.setTextColThreshold( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _sequenceSetId
+ //-- validation code for: _textColThreshold
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.StringValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.StringValidator();
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
fieldValidator.setValidator(typeValidator);
- typeValidator.setWhiteSpace("preserve");
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _gatheredViews
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_gatheredViews", "gatheredViews", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _id
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
+ super.setIdentity(desc);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasGatheredViews()) { return null; }
- return (target.getGatheredViews() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ return target.getId();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Viewport target = (Viewport) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteGatheredViews();
- return;
- }
- target.setGatheredViews( ((java.lang.Boolean) value).booleanValue());
+ target.setId( (java.lang.String) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
- return null;
+ return new java.lang.String();
}
};
desc.setHandler(handler);
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _gatheredViews
+ //-- validation code for: _id
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.BooleanValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+ org.exolab.castor.xml.validators.IdValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IdValidator();
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
- //-- _textCol1
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol1", "textCol1", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _width
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "width", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasTextCol1()) { return null; }
- return new java.lang.Integer(target.getTextCol1());
+ if (!target.hasWidth()) { return null; }
+ return new java.lang.Integer(target.getWidth());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Viewport target = (Viewport) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteTextCol1();
+ target.deleteWidth();
return;
}
- target.setTextCol1( ((java.lang.Integer) value).intValue());
+ target.setWidth( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _textCol1
+ //-- validation code for: _width
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.IntValidator typeValidator;
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _textCol2
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textCol2", "textCol2", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _height
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_height", "height", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasTextCol2()) { return null; }
- return new java.lang.Integer(target.getTextCol2());
+ if (!target.hasHeight()) { return null; }
+ return new java.lang.Integer(target.getHeight());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Viewport target = (Viewport) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteTextCol2();
+ target.deleteHeight();
return;
}
- target.setTextCol2( ((java.lang.Integer) value).intValue());
+ target.setHeight( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _textCol2
+ //-- validation code for: _height
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.IntValidator typeValidator;
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _textColThreshold
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_textColThreshold", "textColThreshold", org.exolab.castor.xml.NodeType.Attribute);
+ //-- _xpos
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_xpos", "xpos", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- if (!target.hasTextColThreshold()) { return null; }
- return new java.lang.Integer(target.getTextColThreshold());
+ if (!target.hasXpos()) { return null; }
+ return new java.lang.Integer(target.getXpos());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
Viewport target = (Viewport) object;
// if null, use delete method for optional primitives
if (value == null) {
- target.deleteTextColThreshold();
+ target.deleteXpos();
return;
}
- target.setTextColThreshold( ((java.lang.Integer) value).intValue());
+ target.setXpos( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _textColThreshold
+ //-- validation code for: _xpos
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.IntValidator typeValidator;
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
- //-- _id
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
- super.setIdentity(desc);
+ //-- _ypos
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ypos", "ypos", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Viewport target = (Viewport) object;
- return target.getId();
+ if (!target.hasYpos()) { return null; }
+ return new java.lang.Integer(target.getYpos());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Viewport target = (Viewport) object;
- target.setId( (java.lang.String) value);
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteYpos();
+ return;
+ }
+ target.setYpos( ((java.lang.Integer) value).intValue());
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
- return new java.lang.String();
+ return null;
}
};
desc.setHandler(handler);
desc.setMultivalued(false);
addFieldDescriptor(desc);
- //-- validation code for: _id
+ //-- validation code for: _ypos
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- org.exolab.castor.xml.validators.IdValidator typeValidator;
- typeValidator = new org.exolab.castor.xml.validators.IdValidator();
+ org.exolab.castor.xml.validators.IntValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.IntValidator();
fieldValidator.setValidator(typeValidator);
+ typeValidator.setMinInclusive(-2147483648);
+ typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
//-- initialize element descriptors
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.1</a>, using an XML
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.structure;
import jalview.api.AlignmentViewPanel;
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.structure;
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*/
public static void release(StructureSelectionManagerProvider jalviewLite)
{
- StructureSelectionManager mnger=(instances.get(jalviewLite));
- if (mnger!=null)
+// synchronized (instances)
{
- instances.remove(jalviewLite);
- try {
- mnger.finalize();
- } catch (Throwable x){};
+ if (instances == null)
+ {
+ return;
+ }
+ StructureSelectionManager mnger = (instances.get(jalviewLite));
+ if (mnger != null)
+ {
+ instances.remove(jalviewLite);
+ try
+ {
+ mnger.finalize();
+ } catch (Throwable x)
+ {
+ }
+ ;
+ }
}
}
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.structure;
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.util;
+
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+import java.util.regex.Pattern;
+
+
+/**
+ * utility class for dealing with HTML link extraction
+ * @author jprocter
+ *
+ */
+public class ParseHtmlBodyAndLinks
+ {
+ String orig=null;
+ public String getOrig()
+ {
+ return orig;
+ }
+ boolean htmlContent=true;
+ /**
+ * @return true if the content looked like HTML
+
+ */
+ public boolean isHtmlContent()
+ {
+ return htmlContent;
+ }
+
+ ArrayList<String> links=new ArrayList<String>();
+ StringBuffer sb = new StringBuffer();
+ /**
+ * result of parsing description - with or without HTML tags
+ * @return
+ */
+ public String getContent()
+ {
+
+ return sb.toString();
+ }
+ /**
+ * list of Label|Link encoded URL links extracted from HTML
+ * @return
+ */
+ public ArrayList<String> getLinks() {
+ return links;
+ }
+
+ /**
+ *
+ * @param description - html or text content to be parsed
+ * @param removeHTML flag to indicate if HTML tags should be removed if they are present.
+ * @param newline
+ */
+ public ParseHtmlBodyAndLinks(String description,
+ boolean removeHTML, String newline)
+ {
+ if (description==null || description.length()==0)
+ {
+ htmlContent=false;
+ return;
+ }
+ if (description.toUpperCase().indexOf("<HTML>") == -1)
+ {
+ htmlContent = false;
+ }
+ orig = description;
+ StringTokenizer st = new StringTokenizer(description, "<");
+ String token, link;
+ int startTag;
+ String tag = null;
+ while (st.hasMoreElements())
+ {
+ token = st.nextToken("&>");
+ if (token.equalsIgnoreCase("html") || token.startsWith("/"))
+ {
+ continue;
+ }
+
+ tag = null;
+ startTag = token.indexOf("<");
+
+ if (startTag > -1)
+ {
+ tag = token.substring(startTag + 1);
+ token = token.substring(0, startTag);
+ }
+
+ if (tag != null && tag.toUpperCase().startsWith("A HREF="))
+ {
+ if (token.length() > 0)
+ {
+ sb.append(token);
+ }
+ link = tag.substring(tag.indexOf("\"") + 1, tag.length() - 1);
+ String label = st.nextToken("<>");
+ links.add(label + "|" + link);
+ sb.append(label + "%LINK%");
+ }
+ else if (tag != null && tag.equalsIgnoreCase("br"))
+ {
+ sb.append(newline);
+ }
+ else if (token.startsWith("lt;"))
+ {
+ sb.append("<" + token.substring(3));
+ }
+ else if (token.startsWith("gt;"))
+ {
+ sb.append(">" + token.substring(3));
+ }
+ else if (token.startsWith("amp;"))
+ {
+ sb.append("&" + token.substring(4));
+ }
+ else
+ {
+ sb.append(token);
+ }
+ }
+ if (removeHTML && !htmlContent)
+ {
+ // instead of parsing the html into plaintext
+ // clean the description ready for embedding in html
+ sb = new StringBuffer(Pattern.compile("<").matcher(description).replaceAll("<"));
+
+ }
+
+ }
+ /**
+ * get either the parsed content or the original, depending on whether the original looked like html content or not.
+ * @return
+ */
+ public String getNonHtmlContent()
+ {
+ return isHtmlContent() ? sb.toString() : orig;
+ }
+
+}
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.io.mime;
import java.net.ContentHandler;
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.io.mime;
import jalview.io.packed.DataProvider;
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.io.mime;
import jalview.io.packed.DataProvider.JvDataType;
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*/
package jalview.ws.jws1;
-/**
- * <p>
- * Title:
- * </p>
- *
- * <p>
- * Description:
- * </p>
- *
- * <p>
- * Copyright: Copyright (c) 2004
- * </p>
- *
- * <p>
- * Company: Dundee University
- * </p>
- *
- * @author not attributable
- * @version 1.0
- */
-
import java.util.*;
import javax.swing.*;
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import jalview.ws.WSClientI;
import vamsas.objects.simple.MsaResult;
-/**
- * <p>
- * Title:
- * </p>
- *
- * <p>
- * Description:
- * </p>
- *
- * <p>
- * Copyright: Copyright (c) 2004
- * </p>
- *
- * <p>
- * Company: Dundee University
- * </p>
- *
- * @author not attributable
- * @version 1.0
- */
class MsaWSThread extends JWS1Thread implements WSClientI
{
boolean submitGaps = false; // pass sequences including gaps to alignment
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import vamsas.objects.simple.MsaResult;
import vamsas.objects.simple.SeqSearchResult;
-/**
- * <p>
- * Title:
- * </p>
- *
- * <p>
- * Description:
- * </p>
- *
- * <p>
- * Copyright: Copyright (c) 2004
- * </p>
- *
- * <p>
- * Company: Dundee University
- * </p>
- *
- * @author not attributable
- * @version 1.0
- */
class SeqSearchWSThread extends JWS1Thread implements WSClientI
{
String dbs = null;
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/**
*
*/
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
import jalview.gui.JalviewChangeSupport;
+import jalview.gui.JvSwingUtils;
import jalview.ws.WSMenuEntryProviderI;
+import jalview.ws.jws2.Jws2Discoverer.Jws2Instance;
import jalview.ws.params.ParamDatastoreI;
import compbio.data.msa.MsaWS;
import compbio.metadata.Option;
{
// this is only valid for Jaba 1.0 - this formula might have to change!
return hosturl
- + (hosturl.lastIndexOf("/") == (hosturl.length() - 1) ? "/"
- : "") + serviceType;
+ + (hosturl.lastIndexOf("/") == (hosturl.length() - 1) ? ""
+ : "/") + serviceType;
}
private boolean hasParams = false, lookedForParams = false;
*/
protected Vector<Jws2Instance> services;
- /**
- * find or add a submenu with the given title in the given menu
- *
- * @param menu
- * @param submenu
- * @return the new or existing submenu
- */
- private JMenu findOrCreateMenu(JMenu menu, String submenu)
- {
- JMenu submenuinstance = null;
- for (int i = 0, iSize = menu.getMenuComponentCount(); i < iSize; i++)
- {
- if (menu.getMenuComponent(i) instanceof JMenu
- && ((JMenu) menu.getMenuComponent(i)).getText().equals(
- submenu))
- {
- submenuinstance = (JMenu) menu.getMenuComponent(i);
- }
- }
- if (submenuinstance == null)
- {
- submenuinstance = new JMenu(submenu);
- menu.add(submenuinstance);
- }
- return submenuinstance;
-
- }
-
public void attachWSMenuEntry(JMenu wsmenu, final AlignFrame alignFrame)
{
// dynamically regenerate service list.
- final JMenu jws2al = new JMenu("JABAWS Alignment");
+ final JMenu jws2al = wsmenu; // new JMenu("JABAWS Alignment");
jws2al.addMenuListener(new MenuListener()
{
// TODO: future: add menu listener to parent menu - so submenus are
{
return;
}
- boolean byhost = Cache.getDefault("WSMENU_BYHOST", true), bytype = Cache
- .getDefault("WSMENU_BYTYPE", true);
+ boolean byhost = Cache.getDefault("WSMENU_BYHOST", false), bytype = Cache
+ .getDefault("WSMENU_BYTYPE", false);
/**
* eventually, JWS2 services will appear under the same align/etc submenus.
* for moment we keep them separate.
Vector hostLabels = new Vector();
jws2al.removeAll();
String lasthost = null;
- for (final Jws2Instance service : services)
+ Hashtable<String, ArrayList<Jws2Instance>> hosts = new Hashtable<String, ArrayList<Jws2Instance>>();
+ String[] sorton;
+ for (Jws2Instance service : services)
{
- atpoint = jws2al;
- String host = service.getHost();
- String type = service.serviceType;
- if (byhost)
+ ArrayList<Jws2Instance> hostservices = hosts.get(service.getHost());
+ if (hostservices == null)
{
- atpoint = findOrCreateMenu(atpoint, host);
- if (atpoint.getToolTipText() == null)
- {
- atpoint.setToolTipText("Services at " + host);
- }
+ hosts.put(service.getHost(),
+ hostservices = new ArrayList<Jws2Instance>());
}
- if (bytype)
+ hostservices.add(service);
+ }
+ sorton = hosts.keySet().toArray(new String[1]);
+ String hostlist[] = sorton.clone();
+ jalview.util.QuickSort.sort(sorton, hostlist);
+ for (String host : hostlist)
+ {
+ Jws2Instance orderedsvcs[] = hosts.get(host).toArray(
+ new Jws2Instance[1]);
+ String sortbytype[] = new String[orderedsvcs.length];
+ for (int i = 0; i < sortbytype.length; i++)
{
- atpoint = findOrCreateMenu(atpoint, type);
- if (atpoint.getToolTipText() == null)
- {
- atpoint.setToolTipText(service.getActionText());
- }
+ sortbytype[i] = orderedsvcs[i].serviceType;
}
- if (!byhost
- && !hostLabels.contains(host + service.serviceType
- + service.getActionText()))
- // !hostLabels.contains(host + (bytype ?
- // service.serviceType+service.getActionText() : "")))
+ jalview.util.QuickSort.sort(sortbytype, orderedsvcs);
+ for (final Jws2Instance service : orderedsvcs)
{
- // add a marker indicating where this service is hosted
- // relies on services from the same host being listed in a contiguous
- // group
- JMenuItem hitm;
- atpoint.addSeparator();
- if (lasthost == null || !lasthost.equals(host))
+ atpoint = jws2al;
+ String type = service.serviceType;
+ if (byhost)
{
- atpoint.add(hitm = new JMenuItem(host));
- hitm.setForeground(Color.blue);
- lasthost = host;
+ atpoint = JvSwingUtils.findOrCreateMenu(atpoint, host);
+ if (atpoint.getToolTipText() == null)
+ {
+ atpoint.setToolTipText("Services at " + host);
+ }
+ }
+ if (bytype)
+ {
+ atpoint = JvSwingUtils.findOrCreateMenu(atpoint, type);
+ if (atpoint.getToolTipText() == null)
+ {
+ atpoint.setToolTipText(service.getActionText());
+ }
+ }
+ if (!byhost
+ && !hostLabels.contains(host + service.serviceType
+ + service.getActionText()))
+ // !hostLabels.contains(host + (bytype ?
+ // service.serviceType+service.getActionText() : "")))
+ {
+ // add a marker indicating where this service is hosted
+ // relies on services from the same host being listed in a
+ // contiguous
+ // group
+ JMenuItem hitm;
+ atpoint.addSeparator();
+ if (lasthost == null || !lasthost.equals(host))
+ {
+ atpoint.add(hitm = new JMenuItem(host));
+ hitm.setForeground(Color.blue);
+ hitm.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ Desktop.showUrl(service.getHost());
+ }
+ });
+ hitm.setToolTipText(JvSwingUtils
+ .wrapTooltip("Opens the JABAWS server's homepage in web browser"));
+ lasthost = host;
+ }
+ hostLabels.addElement(host + service.serviceType
+ + service.getActionText());
+ // hostLabels.addElement(host + (bytype ?
+ // service.serviceType+service.getActionText() : ""));
}
- hostLabels.addElement(host + service.serviceType
- + service.getActionText());
- // hostLabels.addElement(host + (bytype ?
- // service.serviceType+service.getActionText() : ""));
+ msacl.attachWSMenuEntry(atpoint, service, alignFrame);
+ /*
+ * JMenuItem sitem = new JMenuItem(service.serviceType);
+ * sitem.setToolTipText("Hosted at " + service.hosturl);
+ * sitem.addActionListener(new ActionListener() {
+ *
+ * @Override public void actionPerformed(ActionEvent e) { AlignmentView
+ * msa = alignFrame.gatherSequencesForAlignment(); MsaWSClient client =
+ * new MsaWSClient(service, "JWS2 Alignment of " +
+ * alignFrame.getTitle(), msa, false, true,
+ * alignFrame.getViewport().getAlignment().getDataset(), alignFrame); }
+ * });
+ */
}
- msacl.attachWSMenuEntry(atpoint, service, alignFrame);
- /*
- * JMenuItem sitem = new JMenuItem(service.serviceType);
- * sitem.setToolTipText("Hosted at " + service.hosturl);
- * sitem.addActionListener(new ActionListener() {
- *
- * @Override public void actionPerformed(ActionEvent e) { AlignmentView
- * msa = alignFrame.gatherSequencesForAlignment(); MsaWSClient client =
- * new MsaWSClient(service, "JWS2 Alignment of " + alignFrame.getTitle(),
- * msa, false, true, alignFrame.getViewport().getAlignment().getDataset(),
- * alignFrame); } });
- */
}
+
}
public static void main(String[] args)
}
/**
- * add an 'empty' JABA server to the list. Only servers not already in the 'bad URL' list will be added to this list.
+ * add an 'empty' JABA server to the list. Only servers not already in the
+ * 'bad URL' list will be added to this list.
*
* @param jwsservers
*/
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
import jalview.ws.jws2.dm.JabaWsParamSet;
import jalview.ws.params.WsParamSetI;
-/**
- * <p>
- * Title:
- * </p>
- *
- * <p>
- * Description:
- * </p>
- *
- * <p>
- * Copyright: Copyright (c) 2004
- * </p>
- *
- * <p>
- * Company: Dundee University
- * </p>
- *
- * @author not attributable
- * @version 1.0
- */
class MsaWSThread extends AWS2Thread implements WSClientI
{
boolean submitGaps = false; // pass sequences including gaps to alignment
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
Option opt;
@Override
- public String getDefaultValue()
+ public String getValue()
{
return opt.getDefaultValue();
}
}
@Override
- public void setDefaultValue(String selectedItem)
+ public void setValue(String selectedItem)
{
try
{
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
}
@Override
- public Type getType()
+ public ValueType getType()
{
- // TODO: refactor to local Jalview parameter type system.
- return vc.getType();
+ if (vc.getType()==ValueConstrain.Type.Float) {
+ return ValueType.Float;
+ }
+ if (vc.getType()==ValueConstrain.Type.Integer) {
+ return ValueType.Integer;
+ }
+ throw new Error("IMPLEMENTATION ERROR: jalview.ws.params.ValueConstrainI.ValueType does not support the JABAWS type :"+vc.toString());
}
@Override
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
public interface ArgumentI
{
+ /**
+ *
+ * @return name for this argument
+ */
String getName();
- // TODO: rename setDefaultValue to setValue - to make it more semantically
- // obvious what it means!
- String getDefaultValue();
+ /**
+ *
+ * @return current value for the argument (may equal the name)
+ */
+ String getValue();
- void setDefaultValue(String selectedItem);
+ /**
+ * set the current value for the argument.
+ * @param selectedItem
+ */
+ void setValue(String selectedItem);
}
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.params;
+
+/**
+ * Raised if an object configured by an instance of jalview.ws.params.ArgumentI
+ * is given an instance which it does not support.
+ */
+public class InvalidArgumentException extends Exception
+{
+
+ public InvalidArgumentException()
+ {
+ super();
+ }
+
+ public InvalidArgumentException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public InvalidArgumentException(String message)
+ {
+ super(message);
+ }
+
+ public InvalidArgumentException(Throwable cause)
+ {
+ super(cause);
+ }
+
+}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
public interface ValueConstrainI
{
- // TODO: remove dependence on ValueConstraint.Type
- Type getType();
+ public enum ValueType {
+ Integer,
+ Float,
+ String
+ };
+ ValueType getType();
Number getMax();
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.params.simple;
+
+import java.net.URL;
+import java.util.Arrays;
+
+import jalview.ws.params.OptionI;
+
+public class BooleanOption extends Option implements OptionI
+{
+
+ public BooleanOption(String name, String descr, boolean required, boolean defVal,
+ boolean val, URL link)
+ {
+
+ super(name,descr,required,(defVal ? name:""),(val ? name:""),Arrays.asList(new String[] {name}),link);
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.params.simple;
+
+import jalview.ws.params.ParameterI;
+import jalview.ws.params.ValueConstrainI;
+
+import compbio.metadata.ValueConstrain.Type;
+
+/**
+ * @author jimp
+ *
+ */
+public class IntegerParameter extends Option implements ParameterI
+{
+ int defval;
+ int min,max;
+ public ValueConstrainI getValidValue() {
+ return new ValueConstrainI()
+ {
+
+ @Override
+ public ValueType getType()
+ {
+ return ValueType.Integer;
+ }
+
+ @Override
+ public Number getMin()
+ {
+ if (min<max)
+ {
+ return min;
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public Number getMax()
+ {
+ if (min<max)
+ {
+ return max;
+ } else {
+ return null;
+ }
+ }
+ };
+ }
+ public IntegerParameter(IntegerParameter parm)
+ {
+ super(parm);
+ max = parm.max;
+ min = parm.min;
+ }
+
+ public IntegerParameter(String name, String description, boolean required, int defValue,
+ int min, int max)
+ {
+ super(name, description, required, String.valueOf(defValue), null, null, null);
+ defval = defValue;
+ this.min = min;
+ this.max = max;
+ }
+
+ public IntegerParameter(String name, String description, boolean required, int defValue, int value,
+ int min, int max)
+ {
+ super(name, description, required, String.valueOf(defValue), String.valueOf(value), null, null);
+ defval = defValue;
+ this.min = min;
+ this.max = max;
+ }
+ @Override
+ public IntegerParameter copy()
+ {
+ return new IntegerParameter(this);
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.params.simple;
+
+import jalview.ws.params.OptionI;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class Option implements OptionI {
+
+
+ String name, value, defvalue,description;
+ ArrayList<String> possibleVals=new ArrayList<String>();
+ boolean required;
+ URL fdetails;
+ @Override
+ public String getName()
+ {
+ return name;
+ }
+
+ @Override
+ public String getValue()
+ {
+ return value==null ? defvalue : value;
+ }
+
+ @Override
+ public void setValue(String selectedItem)
+ {
+ value = selectedItem;
+ }
+
+ @Override
+ public URL getFurtherDetails()
+ {
+ return fdetails;
+ }
+
+ @Override
+ public boolean isRequired()
+ {
+ return required;
+ }
+
+ @Override
+ public String getDescription()
+ {
+ return description;
+ }
+
+ @Override
+ public List<String> getPossibleValues()
+ {
+ return possibleVals;
+ }
+ public Option(Option opt)
+ {
+ name = new String(opt.name);
+ if (opt.value!=null)
+ value = new String(opt.value);
+ if (opt.defvalue!=null)
+ defvalue=new String(opt.defvalue);
+ if (opt.description!=null)
+ description=new String(opt.description);
+ if (opt.possibleVals!=null) {
+ possibleVals = (ArrayList<String>)opt.possibleVals.clone();
+ }
+ required = opt.required;
+ // URLs are singletons - so we copy by reference. nasty but true.
+ fdetails = opt.fdetails;
+ }
+ public Option()
+ {
+ }
+
+ public Option(String name2, String description2, boolean isrequired,
+ String defValue, String value, Collection<String> possibleVals, URL fdetails)
+ {
+ name = name2;
+ description = description2;
+ this.value = value;
+ this.required = isrequired;
+ this.defvalue = defValue;
+ if (possibleVals!=null)
+ {
+ this.possibleVals = new ArrayList<String>();
+ this.possibleVals.addAll(possibleVals);
+ }
+ this.fdetails = fdetails;
+ }
+
+
+ @Override
+ public OptionI copy()
+ {
+ Option opt = new Option(this);
+ return opt;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.params.simple;
+
+import jalview.ws.params.OptionI;
+import jalview.ws.params.ParameterI;
+import jalview.ws.params.ValueConstrainI;
+
+public abstract class Parameter extends Option implements OptionI,ParameterI {
+ ValueConstrainI validator;
+ @Override
+ public ValueConstrainI getValidValue()
+ {
+ return validator;
+ }
+ public Parameter(Parameter parm)
+ {
+ super(parm);
+ }
+ public Parameter(ValueConstrainI validator)
+ {
+ super();
+ this.validator = validator;
+ }
+ @Override
+ public abstract Parameter copy();
+}
\ No newline at end of file
--- /dev/null
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.params.simple;
+
+public class StringChoiceParameter extends Option
+{
+
+}
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest;
import jalview.datamodel.AlignmentI;
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest;
import jalview.bin.Cache;
super.finalize();
}
+ /**
+ *
+ * @return the URL that this result set read data from.
+ */
+ public String getUrl()
+ {
+ try {
+ return cachedRequest.getURI().toURL().toString();
+ } catch (Exception x)
+ {
+ x.printStackTrace();
+ return null;
+ }
+ }
+
}
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest;
+import jalview.ws.params.ArgumentI;
+import jalview.ws.params.InvalidArgumentException;
+import jalview.ws.params.OptionI;
+import jalview.ws.params.ParameterI;
+import jalview.ws.params.simple.IntegerParameter;
+import jalview.ws.params.simple.Option;
+import jalview.ws.rest.params.SeqGroupIndexVector;
+
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.apache.http.entity.mime.content.ContentBody;
import org.apache.http.entity.mime.content.StringBody;
* not used yet
*/
boolean replaceids;
- public enum molType { NUC, PROT, MIX}
+ public enum molType { NUC, PROT, MIX;
+
+ public static Collection<String> toStringValues()
+ {
+ Collection<String> c = new ArrayList<String>();
+ for (molType type:values())
+ {
+ c.add(type.toString());
+ }
+ return c;
+ }}
public String token;
public int min=1;
public int max=0; // unbounded
{
return (inputData==null || inputData.size()==0);
}
+ /**
+ * return a url encoded version of this parameter's value, or an empty string if the parameter has no ='value' content.
+ * @return
+ */
+ public abstract List<String> getURLEncodedParameter();
+
+ /**
+ * set the property known as tok, possibly by assigning it with a given val
+ * @param tok
+ * @param val (may be empty or null)
+ * @param warnings place where parse warnings are reported
+ * @return true if property was set
+ */
+ public abstract boolean configureProperty(String tok, String val, StringBuffer warnings);
+
+ /**
+ * Get unique key for this type of parameter in a URL encoding.
+ * @return the string that prefixes an input parameter of InputType<T> type in the string returned from getURLEncodedParameter
+ */
+ public abstract String getURLtokenPrefix();
+ /**
+ * parse the given token String and set InputParameter properties appropriately
+ * @param tokenstring - urlencoded parameter string as returned from getURLEncodedParameter
+ * @param warnings - place where any warning messages about bad property values are written
+ * @return true if configuration succeeded, false otherwise.
+ */
+ public boolean configureFromURLtokenString(List<String> tokenstring, StringBuffer warnings) {
+ boolean valid=true;
+ for (String tok:tokenstring)
+ {
+ Matcher mtch = Pattern.compile("^([^=]+)=?'?([^']*)?'?").matcher(tok);
+ if (mtch.find()) {
+ try {
+ if (mtch.group(1).equals("min"))
+ {
+ min = Integer.parseInt(mtch.group(2));
+ continue;
+
+ } else
+ if (mtch.group(1).equals("max"))
+ {
+ max = Integer.parseInt(mtch.group(2));
+ continue;
+ }
+ }
+ catch (NumberFormatException x)
+ {
+ valid=false;
+ warnings.append("Invalid value for parameter "+mtch.group(1).toLowerCase()+" '"+mtch.group(2)+"' (expected an integer)\n");
+ }
+
+ if (!configureProperty(mtch.group(1), mtch.group(2), warnings)) {
+ if (warnings.length()==0)
+ {
+ warnings.append("Failed to configure InputType :"+getURLtokenPrefix()+" with property string: '"+mtch.group(0)+"'\n (token is '"+mtch.group(1)+"' and value is '"+mtch.group(2)+"')\n");
+ }
+ valid=false;
+ }
+ }
+ }
+ return valid;
+ }
+ public void addBaseParams(ArrayList<String> prms)
+ {
+ // todo : check if replaceids should be a global for the service, rather than for a specific parameter.
+ if (min!=1) {
+ prms.add("min='"+min+"'");
+ }
+ if (max!=0) {
+ prms.add("max='"+max+"'");
+ }
+ }
+
+ public abstract List<OptionI> getOptions();
+ public List<OptionI> getBaseOptions()
+ {
+ ArrayList<OptionI> opts = new ArrayList<OptionI>();
+ opts.add(new IntegerParameter("min","Minimum number of data of this type",true,1,min,0,-1));
+ opts.add(new IntegerParameter("max","Maximum number of data of this type",false,0,max,0,-1));
+ return opts;
+ }
+ /**
+ * make a copy of this InputType
+ * @return
+ * may not be needed
+ public abstract InputType copy();
+ */
+
+ /**
+ * parse a set of configuration options
+ * @param currentSettings - modified settings originally from getOptions
+ * @throws InvalidArgumentException thrown if currentSettings contains invalid options for this type.
+ */
+ public void configureFromArgumentI(List<ArgumentI> currentSettings) throws InvalidArgumentException
+ {
+ ArrayList<String> urltoks = new ArrayList<String>();
+ String rg;
+ for (ArgumentI arg: currentSettings)
+ {
+ if (arg instanceof ParameterI)
+ {
+ rg=arg.getName()+"='"+arg.getValue()+"'";
+ } else {
+ // TODO: revise architecture - this is counter intuitive - options with different values to their names are actually parameters
+ rg=(arg.getValue().length()>0) ? (arg.getValue().equals(arg.getName()) ? arg.getName():arg.getName()+"='"+arg.getValue()+"'")
+ : arg.getName();
+ }
+ if (rg.length()>0) {
+ urltoks.add(rg);
+ }
+ }
+ StringBuffer warnings;
+ if (!configureFromURLtokenString(urltoks, warnings=new StringBuffer()))
+ {
+ throw new InvalidArgumentException(warnings.toString());
+ }
+ }
+ protected OptionI createMolTypeOption(String name, String descr,
+ boolean req, molType curType, molType defType)
+ {
+ return new Option(name,descr, req, defType==null ? "" : defType.toString(), curType==null ? "" : curType.toString(),molType.toStringValues(),
+ null);
+ }
}
\ No newline at end of file
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest;
/**
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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/>.
+ *******************************************************************************/
/**
*
*/
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.util.Collection;
import java.util.Hashtable;
+import java.util.Vector;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
+import jalview.bin.Cache;
import jalview.datamodel.AlignmentView;
import jalview.gui.AlignFrame;
import jalview.gui.AlignViewport;
public static RestClient makeShmmrRestClient()
{
- String action = "Analysis", description = "Sequence Harmony and Multi-Relief (UNSTABLE!)", name = "Sequence Harmony";
+ String action = "Analysis", description = "Sequence Harmony and Multi-Relief (Brandt et al. 2010)", name = "Multi-Harmony";
Hashtable<String, InputType> iparams = new Hashtable<String, InputType>();
jalview.ws.rest.params.JobConstant toolp;
//toolp = new jalview.ws.rest.JobConstant("tool","jalview");
//iparams.put(toolp.token, toolp);
- toolp = new jalview.ws.rest.params.JobConstant("mbjob[method]","shmr");
- iparams.put(toolp.token, toolp);
- toolp = new jalview.ws.rest.params.JobConstant("mbjob[description]","step 1");
- iparams.put(toolp.token, toolp);
- toolp = new jalview.ws.rest.params.JobConstant("start_search","1");
- iparams.put(toolp.token, toolp);
- toolp = new jalview.ws.rest.params.JobConstant("blast","0");
- iparams.put(toolp.token, toolp);
+ //toolp = new jalview.ws.rest.params.JobConstant("mbjob[method]","shmr");
+ //iparams.put(toolp.token, toolp);
+ //toolp = new jalview.ws.rest.params.JobConstant("mbjob[description]","step 1");
+ //iparams.put(toolp.token, toolp);
+ //toolp = new jalview.ws.rest.params.JobConstant("start_search","1");
+ //iparams.put(toolp.token, toolp);
+ //toolp = new jalview.ws.rest.params.JobConstant("blast","0");
+ //iparams.put(toolp.token, toolp);
jalview.ws.rest.params.Alignment aliinput = new jalview.ws.rest.params.Alignment();
- aliinput.token = "ali";//_file";
- aliinput.writeAsFile=false;//true;
+ // SHMR server has a 65K limit for content pasted into the 'ali' parameter, so we always upload our files.
+ aliinput.token = "ali_file";//_file";
+ aliinput.writeAsFile=true;//true;
//aliinput.token = "ali_file";
//aliinput.writeAsFile=true;
iparams.put(aliinput.token, aliinput);
action,
description,
name,
- "http://www.ibi.vu.nl/programs/shmrwww/index.php?tool=jalview",// ?tool=jalview&mbjob[method]=shmr&mbjob[description]=step1",
+ "http://zeus.few.vu.nl/programs/shmrwww/index.php?tool=jalview",// ?tool=jalview&mbjob[method]=shmr&mbjob[description]=step1",
"?tool=jalview", iparams, true, false, '-');
// a priori knowledge of the data returned from the service
shmrService.addResultDatatype(JvDataType.ANNOTATION);
return true;
}
+ protected static Vector<String> services=null;
+ public static final String RSBS_SERVICES="RSBS_SERVICES";
+ public static RestClient[] getRestClients()
+ {
+ if (services==null)
+ {
+ services = new Vector<String>();
+ try {
+ for (RestServiceDescription descr: RestServiceDescription.parseDescriptions(jalview.bin.Cache.getDefault(RSBS_SERVICES,makeShmmrRestClient().service.toString())))
+ {
+ services.add(descr.toString());
+ }
+ }
+ catch (Exception ex) {
+ System.err.println("Serious - RSBS descriptions in user preferences are corrupt!");
+ ex.printStackTrace();
+ }
+
+ }
+ RestClient[] lst = new RestClient[services.size()];
+ int i=0;
+ for (String svc:services) {
+ lst[i++] = new RestClient(new RestServiceDescription(svc));
+ }
+ return lst;
+ }
+ public static void main(String args[])
+ {
+ try {
+ RestClient[] clients = getRestClients();
+ System.out.println("Got "+clients.length+" clients.");
+ int i=0;
+ Vector<String> urls=new Vector<String>();
+ for (RestClient cl:clients) {
+ System.out.println(""+(++i)+": "+cl.service.toString());
+ urls.add(cl.service.toString());
+ }
+ setRsbsServices(urls);
+ if (clients.length!=getRestClients().length)
+ {
+ System.err.println("Failed. Differing numbers of clients when stringified and parsed again.");
+ }
+
+ } catch (Throwable x)
+ {
+ System.err.println("Failed. Unexpected exception.");
+ x.printStackTrace();
+ }
+ }
+ public String getAction()
+ {
+ return service.details.Action;
+ }
+
+ public RestServiceDescription getRestDescription()
+ {
+ return service;
+ }
+
+ public static Vector<String> getRsbsDescriptions()
+ {
+ Vector<String> rsbsDescrs = new Vector<String>();
+ for (RestClient rsbs:getRestClients())
+ {
+ rsbsDescrs.add(rsbs.getRestDescription().toString());
+ }
+ return rsbsDescrs;
+ }
+
+ public static void setRsbsServices(Vector<String> rsbsUrls)
+ {
+ if (rsbsUrls!=null)
+ {
+ // TODO: consider validating services ?
+ services = new Vector<String>(rsbsUrls);
+ StringBuffer sprop = new StringBuffer();
+ for (String s:services)
+ {
+ sprop.append(s);
+ }
+ Cache.setProperty(RSBS_SERVICES, sprop.toString());
+ }
+ else
+ {
+ Cache.removeProperty(RSBS_SERVICES);
+ }
+ }
+
}
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest;
import java.io.IOException;
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest;
import jalview.bin.Cache;
response = httpclient.execute(request);
} catch (ClientProtocolException he)
{
- rj.statMessage = "Web Protocol Exception when attempting to "
- + getStage(stg) + "Job. See Console output for details.";
+ rj.statMessage = "Web Protocol Exception when " + getStage(stg)
+ + "Job. <br>Problematic url was <a href=\""
+ + request.getURI() + "\">" + request.getURI()
+ + "</a><br>See Console output for details.";
rj.setAllowedServerExceptions(0);// unrecoverable;
rj.error = true;
Cache.log.fatal("Unexpected REST Job " + getStage(stg)
throw (he);
} catch (IOException e)
{
- rj.statMessage = "IO Exception when attempting to "
- + getStage(stg) + "Job. See Console output for details.";
+ rj.statMessage = "IO Exception when " + getStage(stg)
+ + "Job. <br>Problematic url was <a href=\""
+ + request.getURI() + "\">" + request.getURI()
+ + "</a><br>See Console output for details.";
Cache.log.warn("IO Exception for REST Job " + getStage(stg)
+ "exception for URL " + rj.rsd.postUrl);
// TODO: deal with all other HTTP response codes from server.
Cache.log.warn("Unhandled response status when " + getStage(stg)
+ "for " + postUrl + ": " + response.getStatusLine());
+ rj.error = true;
+ rj.setAllowedServerExceptions(0);
+ rj.setSubjobComplete(true);
+ rj.setSubmitted(true);
try
{
- response.getEntity().consumeContent();
+ completeStatus(
+ rj,
+ response,
+ ""
+ + getStage(stg)
+ + " resulted in an unexpected server response.<br/>Url concerned was <a href=\""
+ + request.getURI()
+ + "\">"
+ + request.getURI()
+ + "</a><br/>Filtered response content below:<br/>");
} catch (IOException e)
{
Cache.log.debug("IOException when consuming unhandled response",
int body = f.indexOf("<body");
if (body > -1)
{
- content.delete(0, f.indexOf(">", body));
+ content.delete(0, f.indexOf(">", body) + 1);
}
if (body > -1 && sb.length() > 0)
{
{
System.err.println("Debug RestJob: Posting Job");
doPost((RestJob) job);
- }
- catch (NoValidInputDataException erex)
+ } catch (NoValidInputDataException erex)
{
job.setSubjobComplete(true);
job.setSubmitted(true);
- ((RestJob)job).statMessage="<br>It looks like there was a problem with the data sent to the service :<br>"+erex.getMessage()+"\n";
- ((RestJob)job).error=true;
-
- }
- catch (Exception ex)
+ ((RestJob) job).statMessage = "<br>It looks like there was a problem with the data sent to the service :<br>"
+ + erex.getMessage() + "\n";
+ ((RestJob) job).error = true;
+
+ } catch (Exception ex)
{
job.setSubjobComplete(true);
job.setAllowedServerExceptions(-1);
Cache.log.warn("Failed to finish parsing data for job "
+ rj.getJobId());
ex.printStackTrace();
+ } finally
+ {
+ rj.error = true;
+ rj.statMessage = "Error whilst parsing data for this job.<br>URL for job response is :<a href=\""
+ + rj.resSet.getUrl()
+ + "\">"
+ + rj.resSet.getUrl()
+ + "</a><br>";
}
}
}
visgrps.add(exsg);
exsg.setStartRes(sg.getStartRes() + contigs[ncnt]);
exsg.setEndRes(sg.getEndRes() + contigs[ncnt]);
- } else {
+ }
+ else
+ {
recovered = true;
}
// now replace any references from the result set with
visan.sequenceRef = sqass;
visAlAn.add(visan);
}
- if (contigs[ncnt]+alan[nrj][an].annotations.length>visan.annotations.length)
+ if (contigs[ncnt] + alan[nrj][an].annotations.length > visan.annotations.length)
{
// increase width of annotation row
- Annotation[] newannv = new Annotation[contigs[ncnt]+alan[nrj][an].annotations.length];
- System.arraycopy(visan.annotations, 0, newannv, 0, visan.annotations.length);
- visan.annotations=newannv;
+ Annotation[] newannv = new Annotation[contigs[ncnt]
+ + alan[nrj][an].annotations.length];
+ System.arraycopy(visan.annotations, 0, newannv, 0,
+ visan.annotations.length);
+ visan.annotations = newannv;
}
// now copy local annotation data into correct position
System.arraycopy(alan[nrj][an].annotations, 0,
AlignmentI destal;
ColumnSelection destcs;
String alTitle = restClient.service.details.Action + " using "
- + restClient.service.details.Name + " on "+restClient.viewTitle;
+ + restClient.service.details.Name + " on "
+ + restClient.viewTitle;
switch (action)
{
case newAlignment:
destcs = destColsel.get(als);
destaf = new AlignFrame(destal, destcs, AlignFrame.DEFAULT_WIDTH,
AlignFrame.DEFAULT_HEIGHT);
- PaintRefresher.Refresh(destaf, destaf.getViewport().getSequenceSetId());
+ PaintRefresher.Refresh(destaf, destaf.getViewport()
+ .getSequenceSetId());
// todo transfer any feature settings and colouring
/*
* destaf.getFeatureRenderer().transferSettings(this.featureSettings);
* i++) { af.addSortByOrderMenuItem( WebServiceName + ((String)
* names.get(i)) + " Ordering", (AlignmentOrder) alorders.get(i)); } } }
*/
- // TODO: modify this and previous alignment's title if many alignments have been returned.
+ // TODO: modify this and previous alignment's title if many alignments
+ // have been returned.
Desktop.addInternalFrame(destaf, alTitle, AlignFrame.DEFAULT_WIDTH,
AlignFrame.DEFAULT_HEIGHT);
*/
public boolean isValid()
{
- ArrayList<String> _warnings=new ArrayList<String>();
- boolean validt=true;
+ ArrayList<String> _warnings = new ArrayList<String>();
+ boolean validt = true;
if (jobs != null)
{
for (RestJob rj : (RestJob[]) jobs)
{
// invalid input for this job
System.err.println("Job " + rj.getJobnum()
- + " has invalid input. ( "+rj.getStatus()+")");
+ + " has invalid input. ( " + rj.getStatus() + ")");
if (rj.hasStatus() && !_warnings.contains(rj.getStatus()))
{
_warnings.add(rj.getStatus());
}
- validt=false;
+ validt = false;
}
}
}
if (!validt)
{
warnings = "";
- for (String st : _warnings) {
- if (warnings.length()>0) { warnings+="\n";
+ for (String st : _warnings)
+ {
+ if (warnings.length() > 0)
+ {
+ warnings += "\n";
}
warnings += st;
-
+
}
}
return validt;
}
protected String warnings;
+
public boolean hasWarnings()
{
// TODO Auto-generated method stub
- return warnings!=null && warnings.length()>0;
+ return warnings != null && warnings.length() > 0;
}
/**
* get any informative messages about why the job thread couldn't start.
+ *
* @return
*/
public String getWarnings()
{
- return isValid() ? "Job can be started. No warnings." : hasWarnings() ? warnings : "";
+ return isValid() ? "Job can be started. No warnings."
+ : hasWarnings() ? warnings : "";
}
}
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
*/
package jalview.ws.rest;
-
import jalview.datamodel.SequenceI;
import jalview.io.packed.DataProvider;
import jalview.io.packed.SimpleDataProvider;
import jalview.util.Platform;
import jalview.ws.rest.params.Alignment;
import jalview.ws.rest.params.AnnotationFile;
+import jalview.ws.rest.params.JobConstant;
import jalview.ws.rest.params.SeqGroupIndexVector;
+import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.JViewport;
+import com.stevesoft.pat.Regex;
+import com.sun.org.apache.xml.internal.serialize.OutputFormat.DTD;
+import com.sun.tools.doclets.internal.toolkit.util.DocFinder.Output;
public class RestServiceDescription
{
/**
+ * create a new rest service description ready to be configured
+ */
+ public RestServiceDescription()
+ {
+
+ }
+ /**
* @param details
* @param postUrl
* @param urlSuffix
* @param vseparable
* @param gapCharacter
*/
- public RestServiceDescription(String action,String description,String name, String postUrl,
- String urlSuffix, Map<String, InputType> inputParams,
- boolean hseparable, boolean vseparable, char gapCharacter)
+ public RestServiceDescription(String action, String description,
+ String name, String postUrl, String urlSuffix,
+ Map<String, InputType> inputParams, boolean hseparable,
+ boolean vseparable, char gapCharacter)
{
super();
this.details = new UIinfo();
- details.Action= action;
- details.description = description;
- details.Name = name;
- this.postUrl = postUrl;
- this.urlSuffix = urlSuffix;
- this.inputParams = inputParams;
+ details.Action = action == null ? "" : action;
+ details.description = description == null ? "" : description;
+ details.Name = name == null ? "" : name;
+ this.postUrl = postUrl == null ? "" : postUrl;
+ this.urlSuffix = urlSuffix == null ? "" : urlSuffix;
+ if (inputParams != null)
+ {
+ this.inputParams = inputParams;
+ }
this.hseparable = hseparable;
this.vseparable = vseparable;
this.gapCharacter = gapCharacter;
}
+
+ public boolean equals(Object o)
+ {
+ if (o == null || !(o instanceof RestServiceDescription))
+ {
+ return false;
+ }
+ RestServiceDescription other = (RestServiceDescription) o;
+ boolean diff = (gapCharacter != other.gapCharacter);
+ diff |= vseparable != other.vseparable;
+ diff |= hseparable != other.hseparable;
+ diff |= !(urlSuffix.equals(other.urlSuffix));
+ // TODO - robust diff that includes constants and reordering of URL
+ // diff |= !(postUrl.equals(other.postUrl));
+ // diff |= !inputParams.equals(other.inputParams);
+ diff |= !details.Name.equals(other.details.Name);
+ diff |= !details.Action.equals(other.details.Action);
+ diff |= !details.description.equals(other.details.description);
+ return !diff;
+ }
+
/**
* Service UI Info { Action, Specific Name of Service, Brief Description }
*/
-
- public class UIinfo {
+
+ public class UIinfo
+ {
+ public String getAction()
+ {
+ return Action;
+ }
+
+ public void setAction(String action)
+ {
+ Action = action;
+ }
+
+ public String getName()
+ {
+ return Name;
+ }
+
+ public void setName(String name)
+ {
+ Name = name;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
String Action;
+
String Name;
+
String description;
}
- UIinfo details = new UIinfo();
-
- /** Service base URL
+
+ public UIinfo details = new UIinfo();
+
+ public String getAction()
+ {
+ return details.getAction();
+ }
+
+ public void setAction(String action)
+ {
+ details.setAction(action);
+ }
+
+ public String getName()
+ {
+ return details.getName();
+ }
+
+ public void setName(String name)
+ {
+ details.setName(name);
+ }
+
+ public String getDescription()
+ {
+ return details.getDescription();
+ }
+
+ public void setDescription(String description)
+ {
+ details.setDescription(description);
+ }
+
+ /**
+ * Service base URL
*/
String postUrl;
+
+ public String getPostUrl()
+ {
+ return postUrl;
+ }
+
+ public void setPostUrl(String postUrl)
+ {
+ this.postUrl = postUrl;
+ }
+
+ public String getUrlSuffix()
+ {
+ return urlSuffix;
+ }
+
+ public void setUrlSuffix(String urlSuffix)
+ {
+ this.urlSuffix = urlSuffix;
+ }
+
+ public Map<String, InputType> getInputParams()
+ {
+ return inputParams;
+ }
+
+ public void setInputParams(Map<String, InputType> inputParams)
+ {
+ this.inputParams = inputParams;
+ }
+
+ public void setHseparable(boolean hseparable)
+ {
+ this.hseparable = hseparable;
+ }
+
+ public void setVseparable(boolean vseparable)
+ {
+ this.vseparable = vseparable;
+ }
+
+ public void setGapCharacter(char gapCharacter)
+ {
+ this.gapCharacter = gapCharacter;
+ }
+
/**
- * suffix that should be added to any url used if it does not already end in the suffix.
+ * suffix that should be added to any url used if it does not already end in
+ * the suffix.
*/
String urlSuffix;
-
- /** input info given as key/value pairs - mapped to post arguments
- */
- Map<String,InputType> inputParams=new HashMap();
+
/**
- * assigns the given inputType it to its corresponding input parameter token it.token
+ * input info given as key/value pairs - mapped to post arguments
+ */
+ Map<String, InputType> inputParams = new HashMap<String, InputType>();
+
+ /**
+ * assigns the given inputType it to its corresponding input parameter token
+ * it.token
+ *
* @param it
*/
public void setInputParam(InputType it)
{
inputParams.put(it.token, it);
}
+
/**
* remove the given input type it from the set of service input parameters.
+ *
* @param it
*/
public void removeInputParam(InputType it)
{
inputParams.remove(it.token);
}
+
/**
* service requests alignment data
*/
boolean aligndata;
+
/**
- * service requests alignment and/or seuqence annotationo data
+ * service requests alignment and/or seuqence annotationo data
*/
boolean annotdata;
+
/**
* service requests partitions defined over input (alignment) data
*/
boolean partitiondata;
-
+
/**
- * process ths input data and set the appropriate shorthand flags describing the input the service wants
+ * process ths input data and set the appropriate shorthand flags describing
+ * the input the service wants
*/
- public void setInvolvesFlags() {
+ public void setInvolvesFlags()
+ {
aligndata = inputInvolves(Alignment.class);
annotdata = inputInvolves(AnnotationFile.class);
partitiondata = inputInvolves(SeqGroupIndexVector.class);
}
- /** Service return info { alignment, annotation file (loaded back on to alignment), tree (loaded back on to alignment), sequence annotation - loaded back on to alignment), text report, pdb structures with sequence mapping )
- *
- */
-
- /** Start with bare minimum: input is alignment + groups on alignment
- *
- * @author JimP
- *
- */
-
/**
- * Helper class based on the UrlLink class which enables URLs to be
- * constructed from sequences or IDs associated with a group of sequences. URL
- * definitions consist of a pipe separated string containing a <label>|<url
- * construct>|<separator character>[|<sequence separator character>]. The url
- * construct includes regex qualified tokens which are replaced with seuqence
- * IDs ($SEQUENCE_IDS$) and/or seuqence regions ($SEQUENCES$) that are
- * extracted from the group. See <code>UrlLink</code> for more information
- * about the approach, and the original implementation. Documentation to come.
- * Note - groupUrls can be very big!
+ * Service return info { alignment, annotation file (loaded back on to
+ * alignment), tree (loaded back on to alignment), sequence annotation -
+ * loaded back on to alignment), text report, pdb structures with sequence
+ * mapping )
+ *
*/
- private String url_prefix, target, label;
/**
- * these are all filled in order of the occurence of each token in the url
- * string template
+ * Start with bare minimum: input is alignment + groups on alignment
+ *
+ * @author JimP
+ *
*/
- private String url_suffix[], separators[], regexReplace[];
private String invalidMessage = null;
/**
- * tokens that can be replaced in the URL.
- */
- private static String[] tokens;
-
- /**
- * position of each token (which can appear once only) in the url
- */
- private int[] segs;
-
- /**
- * contains tokens in the order they appear in the URL template.
+ * parse the given linkString of the form '<label>|<url>|separator
+ * char[|optional sequence separator char]' into parts. url may contain a
+ * string $SEQUENCEIDS<=optional regex=>$ where <=optional regex=> must be of
+ * the form =/<perl style regex>/=$ or $SEQUENCES<=optional regex=>$ or
+ * $SEQUENCES<=optional regex=>$.
+ *
+ * @param link
*/
- private String[] mtch;
- static
+ public RestServiceDescription(String link)
{
- if (tokens == null)
+ StringBuffer warnings = new StringBuffer();
+ if (!configureFromEncodedString(link, warnings))
{
- tokens = new String[]
- { "SEQUENCEIDS", "SEQUENCES", "DATASETID" };
+ if (warnings.length() > 0)
+ {
+ invalidMessage = warnings.toString();
+ }
}
}
- /**
- * test for GroupURLType bitfield (with default tokens)
- */
- public static final int SEQUENCEIDS = 1;
+ public RestServiceDescription(RestServiceDescription toedit)
+ {
+ // Rather then do the above, we cheat and use our human readable
+ // serialization code to clone everything
+ this(toedit.toString());
+ /**
+ * if (toedit == null) { return; } /** urlSuffix = toedit.urlSuffix; postUrl
+ * = toedit.postUrl; hseparable = toedit.hseparable; vseparable =
+ * toedit.vseparable; gapCharacter = toedit.gapCharacter; details = new
+ * RestServiceDescription.UIinfo(); details.Action = toedit.details.Action;
+ * details.description = toedit.details.description; details.Name =
+ * toedit.details.Name; for (InputType itype: toedit.inputParams.values()) {
+ * inputParams.put(itype.token, itype.clone());
+ *
+ * }
+ */
+ // TODO Implement copy constructor NOW*/
+ }
/**
- * test for GroupURLType bitfield (with default tokens)
+ * @return the invalidMessage
*/
- public static final int SEQUENCES = 2;
+ public String getInvalidMessage()
+ {
+ return invalidMessage;
+ }
/**
- * test for GroupURLType bitfield (with default tokens)
+ * Check if URL string was parsed properly.
+ *
+ * @return boolean - if false then <code>getInvalidMessage</code> returns an
+ * error message
*/
- public static final int DATASETID = 4;
+ public boolean isValid()
+ {
+ return invalidMessage == null;
+ }
- // private int idseg = -1, seqseg = -1;
+ private static boolean debug = false;
/**
- * parse the given linkString of the form '<label>|<url>|separator
- * char[|optional sequence separator char]' into parts. url may contain a
- * string $SEQUENCEIDS<=optional regex=>$ where <=optional regex=> must be of
- * the form =/<perl style regex>/=$ or $SEQUENCES<=optional regex=>$ or
- * $SEQUENCES<=optional regex=>$.
+ * parse the string into a list
*
- * @param link
+ * @param list
+ * @param separator
+ * @return elements separated by separator
*/
- public RestServiceDescription(String link)
+ public static String[] separatorListToArray(String list, String separator)
{
- int sep = link.indexOf("|");
- segs = new int[tokens.length];
- int ntoks = 0;
- for (int i = 0; i < segs.length; i++)
+ int seplen = separator.length();
+ if (list == null || list.equals("") || list.equals(separator))
+ return null;
+ java.util.ArrayList<String> jv = new ArrayList<String>();
+ int cp = 0, pos, escape;
+ boolean wasescaped = false,wasquoted=false;
+ String lstitem = null;
+ while ((pos = list.indexOf(separator, cp)) >= cp)
{
- if ((segs[i] = link.indexOf("$" + tokens[i])) > -1)
+
+ escape = (pos > 0 && list.charAt(pos - 1) == '\\') ? -1 : 0;
+ if (wasescaped || wasquoted)
{
- ntoks++;
+ // append to previous pos
+ jv.set(jv.size() - 1,
+ lstitem = lstitem + separator
+ + list.substring(cp, pos + escape));
+
+ }
+ else
+ {
+ jv.add(lstitem = list.substring(cp, pos + escape));
+ }
+ cp = pos + seplen;
+ wasescaped = escape == -1;
+ if (!wasescaped)
+ {
+ // last separator may be in an unmatched quote
+ if (java.util.regex.Pattern.matches("('[^']*')*[^']*'",lstitem))
+ {
+ wasquoted=true;
+ }
}
+
}
- // expect at least one token
- if (ntoks == 0)
+ if (cp < list.length())
{
- invalidMessage = "Group URL string must contain at least one of ";
- for (int i = 0; i < segs.length; i++)
+ String c = list.substring(cp);
+ if (wasescaped || wasquoted)
{
- invalidMessage += " '$" + tokens[i] + "[=/regex=/]$'";
+ // append final separator
+ jv.set(jv.size() - 1, lstitem + separator + c);
+ }
+ else
+ {
+ if (!c.equals(separator))
+ {
+ jv.add(c);
+ }
}
- return;
}
-
- int[] ptok = new int[ntoks + 1];
- String[] tmtch = new String[ntoks + 1];
- mtch = new String[ntoks];
- for (int i = 0, t = 0; i < segs.length; i++)
+ if (jv.size() > 0)
{
- if (segs[i] > -1)
+ String[] v = jv.toArray(new String[jv.size()]);
+ jv.clear();
+ if (debug)
{
- ptok[t] = segs[i];
- tmtch[t++] = tokens[i];
+ System.err.println("Array from '" + separator
+ + "' separated List:\n" + v.length);
+ for (int i = 0; i < v.length; i++)
+ {
+ System.err.println("item " + i + " '" + v[i] + "'");
+ }
}
+ return v;
}
- ptok[ntoks] = link.length();
- tmtch[ntoks] = "$$$$$$$$$";
- jalview.util.QuickSort.sort(ptok, tmtch);
- for (int i = 0; i < ntoks; i++)
+ if (debug)
{
- mtch[i] = tmtch[i]; // TODO: check order is ascending
+ System.err.println("Empty Array from '" + separator
+ + "' separated List");
}
- /*
- * replaces the specific code below {}; if (psqids > -1 && pseqs > -1) { if
- * (psqids > pseqs) { idseg = 1; seqseg = 0;
- *
- * ptok = new int[] { pseqs, psqids, link.length() }; mtch = new String[] {
- * "$SEQUENCES", "$SEQUENCEIDS" }; } else { idseg = 0; seqseg = 1; ptok =
- * new int[] { psqids, pseqs, link.length() }; mtch = new String[] {
- * "$SEQUENCEIDS", "$SEQUENCES" }; } } else { if (psqids != -1) { idseg = 0;
- * ptok = new int[] { psqids, link.length() }; mtch = new String[] {
- * "$SEQUENCEIDS" }; } else { seqseg = 0; ptok = new int[] { pseqs,
- * link.length() }; mtch = new String[] { "$SEQUENCES" }; } }
- */
+ return null;
+ }
- int p = sep;
- // first get the label and target part before the first |
- do
- {
- sep = p;
- p = link.indexOf("|", sep + 1);
- } while (p > sep && p < ptok[0]);
- // Assuming that the URL itself does not contain any '|' symbols
- // sep now contains last pipe symbol position prior to any regex symbols
- label = link.substring(0, sep);
- if (label.indexOf("|") > -1)
+ /**
+ * concatenate the list with separator
+ *
+ * @param list
+ * @param separator
+ * @return concatenated string
+ */
+ public static String arrayToSeparatorList(String[] list, String separator)
+ {
+ StringBuffer v = new StringBuffer();
+ if (list != null && list.length > 0)
{
- // | terminated database name / www target at start of Label
- target = label.substring(0, label.indexOf("|"));
+ for (int i = 0, iSize = list.length; i < iSize; i++)
+ {
+ if (list[i] != null)
+ {
+ if (v.length() > 0)
+ {
+ v.append(separator);
+ }
+ // TODO - escape any separator values in list[i]
+ v.append(list[i]);
+ }
+ }
+ if (debug)
+ {
+ System.err.println("Returning '" + separator
+ + "' separated List:\n");
+ System.err.println(v);
+ }
+ return v.toString();
}
- else if (label.indexOf(" ") > 2)
+ if (debug)
{
- // space separated Label - matches database name
- target = label.substring(0, label.indexOf(" "));
+ System.err.println("Returning empty '" + separator
+ + "' separated List\n");
}
- else
+ return "" + separator;
+ }
+
+ /**
+ * parse a string containing a list of service properties and configure the
+ * service description
+ *
+ * @param propList
+ * param warnings a StringBuffer that any warnings about invalid
+ * content will be appended to.
+ */
+ private boolean configureFromServiceInputProperties(String propList,
+ StringBuffer warnings)
+ {
+ String[] props = separatorListToArray(propList, ",");
+ if (props == null)
{
- target = label;
+ return true;
}
- // Now Parse URL : Whole URL string first
- url_prefix = link.substring(sep + 1, ptok[0]);
- url_suffix = new String[mtch.length];
- regexReplace = new String[mtch.length];
- // and loop through tokens
- for (int pass = 0; pass < mtch.length; pass++)
+ ;
+ boolean valid = true;
+ String val = null;
+ int l = warnings.length();
+ int i;
+ for (String prop : props)
{
- int mlength = 3 + mtch[pass].length();
- if (link.indexOf("$" + mtch[pass] + "=/") == ptok[pass]
- && (p = link.indexOf("/=$", ptok[pass] + mlength)) > ptok[pass]
- + mlength)
+ if ((i = prop.indexOf("=")) > -1)
{
- // Extract Regex and suffix
- if (ptok[pass + 1] < p + 3)
+ val = prop.substring(i + 1);
+ if (val.startsWith("\'") && val.endsWith("\'"))
{
- // tokens are not allowed inside other tokens - e.g. inserting a
- // $sequences$ into the regex match for the sequenceid
- invalidMessage = "Token regexes cannot contain other regexes (did you terminate the $"
- + mtch[pass] + " regex with a '/=$' ?";
- return;
- }
- url_suffix[pass] = link.substring(p + 3, ptok[pass + 1]);
- regexReplace[pass] = link.substring(ptok[pass] + mlength, p);
- try
- {
- com.stevesoft.pat.Regex rg = com.stevesoft.pat.Regex.perlCode("/"
- + regexReplace[pass] + "/");
- if (rg == null)
- {
- invalidMessage = "Invalid Regular Expression : '"
- + regexReplace[pass] + "'\n";
- }
- } catch (Exception e)
- {
- invalidMessage = "Invalid Regular Expression : '"
- + regexReplace[pass] + "'\n";
+ val = val.substring(1, val.length() - 1);
}
+ prop = prop.substring(0, i);
}
- else
+
+ if (prop.equals("hseparable"))
+ {
+ hseparable = true;
+ }
+ if (prop.equals("vseparable"))
{
- regexReplace[pass] = null;
- // verify format is really correct.
- if ((p = link.indexOf("$" + mtch[pass] + "$")) == ptok[pass])
+ vseparable = true;
+ }
+ if (prop.equals("gapCharacter"))
+ {
+ if (val == null || val.length() == 0 || val.length() > 1)
{
- url_suffix[pass] = link.substring(p + mtch[pass].length() + 2,
- ptok[pass + 1]);
+ valid = false;
+ warnings.append((warnings.length() > 0 ? "\n" : "")
+ + ("Invalid service property: gapCharacter=' ' (single character) - was given '"
+ + val + "'"));
}
else
{
- invalidMessage = "Warning: invalid regex structure (after '"
- + mtch[0] + "') for URL link : " + link;
+ gapCharacter = val.charAt(0);
}
}
- }
- int pass = 0;
- separators = new String[url_suffix.length];
- String suffices = url_suffix[url_suffix.length - 1], lastsep = ",";
- // have a look in the last suffix for any more separators.
- while ((p = suffices.indexOf('|')) > -1)
- {
- separators[pass] = suffices.substring(p + 1);
- if (pass == 0)
- {
- // trim the original suffix string
- url_suffix[url_suffix.length - 1] = suffices.substring(0, p);
- }
- else
+ if (prop.equals("returns"))
{
- lastsep = (separators[pass - 1] = separators[pass - 1].substring(0,
- p));
+ _configureOutputFormatFrom(val, warnings);
}
- suffices = separators[pass];
- pass++;
}
- if (pass > 0)
+ // return true if valid is true and warning buffer was not appended to.
+ return valid && (l == warnings.length());
+ }
+
+ private String _genOutputFormatString()
+ {
+ String buff = "";
+ if (resultData == null)
{
- lastsep = separators[pass - 1];
+ return "";
}
- // last separator is always used for all the remaining separators
- while (pass < separators.length)
+ for (JvDataType type : resultData)
{
- separators[pass++] = lastsep;
+ if (buff.length() > 0)
+ {
+ buff += ";";
+ }
+ buff += type.toString();
}
+ return buff;
}
- /**
- * @return the url_suffix
- */
- public String getUrl_suffix()
- {
- return url_suffix[url_suffix.length - 1];
- }
-
- /**
- * @return the url_prefix
- */
- public String getUrl_prefix()
- {
- return url_prefix;
- }
-
- /**
- * @return the target
- */
- public String getTarget()
- {
- return target;
- }
-
- /**
- * @return the label
- */
- public String getLabel()
- {
- return label;
- }
-
- /**
- * @return the sequence ID regexReplace
- */
- public String getIDRegexReplace()
- {
- return _replaceFor(tokens[0]);
- }
-
- private String _replaceFor(String token)
+ private void _configureOutputFormatFrom(String outstring,
+ StringBuffer warnings)
{
- for (int i = 0; i < mtch.length; i++)
- if (segs[i] > -1 && mtch[i].equals(token))
+ if (outstring.indexOf(";") == -1)
+ {
+ // we add a token, for simplicity
+ outstring = outstring + ";";
+ }
+ StringTokenizer st = new StringTokenizer(outstring, ";");
+ String tok = "";
+ resultData = new ArrayList<JvDataType>();
+ while (st.hasMoreTokens())
+ {
+ try
+ {
+ resultData.add(JvDataType.valueOf(tok = st.nextToken()));
+ } catch (NoSuchElementException x)
{
- return regexReplace[i];
+ warnings.append("Invalid result type: '" + tok
+ + "' (must be one of: ");
+ String sep = "";
+ for (JvDataType vl : JvDataType.values())
+ {
+ warnings.append(sep);
+ warnings.append(vl.toString());
+ sep = " ,";
+ }
+ warnings.append(" separated by semi-colons)\n");
}
- return null;
+ }
}
- /**
- * @return the sequence ID regexReplace
- */
- public String getSeqRegexReplace()
+ private String getServiceIOProperties()
{
- return _replaceFor(tokens[1]);
+ ArrayList<String> vls = new ArrayList<String>();
+ if (isHseparable()) { vls.add("hseparable");};
+ if (isVseparable()) { vls.add("vseparable");};
+ vls.add(new String("gapCharacter='" + gapCharacter + "'"));
+ vls.add(new String("returns='" + _genOutputFormatString() + "'"));
+ return arrayToSeparatorList(vls.toArray(new String[0]), ",");
}
- /**
- * @return the invalidMessage
- */
- public String getInvalidMessage()
+ public String toString()
{
- return invalidMessage;
+ StringBuffer result = new StringBuffer();
+ result.append("|");
+ result.append(details.Name);
+ result.append('|');
+ result.append(details.Action);
+ result.append('|');
+ if (details.description != null)
+ {
+ result.append(details.description);
+ }
+ ;
+ // list job input flags
+ result.append('|');
+ result.append(getServiceIOProperties());
+ // list any additional cgi parameters needed for result retrieval
+ if (urlSuffix != null && urlSuffix.length() > 0)
+ {
+ result.append('|');
+ result.append(urlSuffix);
+ }
+ result.append('|');
+ result.append(getInputParamEncodedUrl());
+ return result.toString();
}
/**
- * Check if URL string was parsed properly.
- *
- * @return boolean - if false then <code>getInvalidMessage</code> returns an
- * error message
+ * processes a service encoded as a string (as generated by RestServiceDescription.toString())
+ * Note - this will only use the first service definition encountered in the string to configure the service.
+ * @param encoding
+ * @param warnings - where warning messages are reported.
+ * @return true if configuration was parsed successfully.
*/
- public boolean isValid()
+ public boolean configureFromEncodedString(String encoding,
+ StringBuffer warnings)
{
- return invalidMessage == null;
+ String[] list = separatorListToArray(encoding, "|");
+
+ int nextpos=parseServiceList(list,warnings, 0);
+ if (nextpos>0)
+ {
+ return true;
+ }
+ return false;
}
-
-
/**
- * gathers input into a hashtable
- *
- * @param idstrings
- * @param seqstrings
- * @param dsstring
+ * processes the given list from position p, attempting to configure the service from it.
+ * Service lists are formed by concatenating individual stringified services. The first character of a stringified service is '|', enabling this, and the parser will ignore empty fields in a '|' separated list when they fall outside a service definition.
+ * @param list
+ * @param warnings
+ * @param p
* @return
*/
- private Hashtable replacementArgs(String[] idstrings,
- String[] seqstrings, String dsstring)
+ protected int parseServiceList(String[] list, StringBuffer warnings, int p)
{
- Hashtable rstrings = new Hashtable();
- rstrings.put(tokens[0], idstrings);
- rstrings.put(tokens[1], seqstrings);
- rstrings.put(tokens[2], new String[]
- { dsstring });
- if (idstrings.length != seqstrings.length)
+ boolean invalid = false;
+ // look for the first non-empty position - expect it to be service name
+ while (list[p]!=null && list[p].trim().length()==0)
{
- throw new Error(
- "idstrings and seqstrings contain one string each per sequence.");
+ p++;
}
- return rstrings;
- }
-
-
-
-
- /**
- * conditionally generate urls or stubs for a given input.
- *
- * @param createFullUrl
- * set to false if you only want to test if URLs would be generated.
- * @param repstrings
- * @param onlyIfMatches
- * @return null if no url is generated. Object[] { int[] { number of matches
- * seqs }, boolean[] { which matched }, (if createFullUrl also has
- * StringBuffer[] { segment generated from inputs that is used in URL
- * }, String[] { url })}
- * @throws Exception
- * @throws UrlStringTooLongException
- */
- protected Object[] makeUrlsIf(boolean createFullUrl,
- Hashtable repstrings, boolean onlyIfMatches) throws Exception
- {
- int pass = 0;
-
- // prepare string arrays in correct order to be assembled into URL input
- String[][] idseq = new String[mtch.length][]; // indexed by pass
- int mins = 0, maxs = 0; // allowed two values, 1 or n-sequences.
- for (int i = 0; i < mtch.length; i++)
+ details.Name = list[p];
+ details.Action = list[p+1];
+ details.description = list[p+2];
+ invalid |= !configureFromServiceInputProperties(list[p+3], warnings);
+ if (list.length-p > 5 && list[p+5]!=null && list[p+5].trim().length()>5)
{
- idseq[i] = (String[]) repstrings.get(mtch[i]);
- if (idseq[i].length >= 1)
- {
- if (mins == 0 && idseq[i].length == 1)
- {
- mins = 1;
- }
- if (maxs < 2)
- {
- maxs = idseq[i].length;
- }
- else
- {
- if (maxs != idseq[i].length)
- {
- throw new Error(
- "Cannot have mixed length replacement vectors. Replacement vector for "
- + (mtch[i]) + " is " + idseq[i].length
- + " strings long, and have already seen a "
- + maxs + " length vector.");
- }
- }
- }
- else
- {
- throw new Error(
- "Cannot have zero length vector of replacement strings - either 1 value or n values.");
- }
+ urlSuffix = list[p+4];
+ invalid |= !configureFromInputParamEncodedUrl(list[p+5], warnings);
+ p+=6;
}
- // iterate through input, collating segments to be inserted into url
- StringBuffer matched[] = new StringBuffer[idseq.length];
- // and precompile regexes
- com.stevesoft.pat.Regex[] rgxs = new com.stevesoft.pat.Regex[matched.length];
- for (pass = 0; pass < matched.length; pass++)
+ else
{
- matched[pass] = new StringBuffer();
- if (regexReplace[pass] != null)
- {
- rgxs[pass] = com.stevesoft.pat.Regex.perlCode("/"
- + regexReplace[pass] + "/");
- }
- else
+ if (list.length-p > 4 && list[p+4]!=null && list[p+4].trim().length()>5)
{
- rgxs[pass] = null;
+ urlSuffix = null;
+ invalid |= !configureFromInputParamEncodedUrl(list[p+4], warnings);
+ p+=5;
}
}
- // tot up the invariant lengths for this url
- int urllength = url_prefix.length();
- for (pass = 0; pass < matched.length; pass++)
+ return invalid ? -1 : p;
+ }
+
+ /**
+ * @return string representation of the input parameters, their type and
+ * constraints, appended to the service's base submission URL
+ */
+ private String getInputParamEncodedUrl()
+ {
+ StringBuffer url = new StringBuffer();
+ if (postUrl == null || postUrl.length() < 5)
{
- urllength += url_suffix[pass].length();
+ return "";
}
- // flags to record which of the input sequences were actually used to
- // generate the
- // url
- boolean[] thismatched = new boolean[maxs];
- int seqsmatched = 0;
- for (int sq = 0; sq < maxs; sq++)
+ url.append(postUrl);
+ char appendChar = (postUrl.indexOf("?") > -1) ? '&' : '?';
+ boolean consts = true;
+ do
{
- // initialise flag for match
- thismatched[sq] = false;
- StringBuffer[] thematches = new StringBuffer[rgxs.length];
- for (pass = 0; pass < rgxs.length; pass++)
+ for (Map.Entry<String, InputType> param : inputParams.entrySet())
{
- thematches[pass] = new StringBuffer(); // initialise - in case there are
- // no more
- // matches.
- // if a regex is provided, then it must match for all sequences in all
- // tokens for it to be considered.
- if (idseq[pass].length <= sq)
- {
- // no more replacement strings to try for this token
- continue;
- }
- if (rgxs[pass] != null)
+ List<String> vals = param.getValue().getURLEncodedParameter();
+ if (param.getValue().isConstant())
{
- com.stevesoft.pat.Regex rg = rgxs[pass];
- int rematchat = 0;
- // concatenate all matches of re in the given string!
- while (rg.searchFrom(idseq[pass][sq], rematchat))
+ if (consts)
{
- rematchat = rg.matchedTo();
- thismatched[sq] |= true;
- urllength += rg.charsMatched(); // count length
- if ((urllength + 32) > Platform.getMaxCommandLineLength())
- {
- throw new Exception("urllength");
- }
-
- if (!createFullUrl)
+ url.append(appendChar);
+ appendChar = '&';
+ url.append(param.getValue().token);
+ if (vals.size() == 1)
{
- continue; // don't bother making the URL replacement text.
- }
- // do we take the cartesian products of the substituents ?
- int ns = rg.numSubs();
- if (ns == 0)
- {
- thematches[pass].append(rg.stringMatched());// take whole regex
- }
- /*
- * else if (ns==1) { // take only subgroup match return new String[]
- * { rg.stringMatched(1), url_prefix+rg.stringMatched(1)+url_suffix
- * }; }
- */
- // deal with multiple submatch case - for moment we do the simplest
- // - concatenate the matched regions, instead of creating a complete
- // list for each alternate match over all sequences.
- // TODO: specify a 'replace pattern' - next refinement
- else
- {
- // debug
- /*
- * for (int s = 0; s <= rg.numSubs(); s++) {
- * System.err.println("Sub " + s + " : " + rg.matchedFrom(s) +
- * " : " + rg.matchedTo(s) + " : '" + rg.stringMatched(s) + "'");
- * }
- */
- // try to collate subgroup matches
- StringBuffer subs = new StringBuffer();
- // have to loop through submatches, collating them at top level
- // match
- int s = 0; // 1;
- while (s <= ns)
- {
- if (s + 1 <= ns && rg.matchedTo(s) > -1
- && rg.matchedTo(s + 1) > -1
- && rg.matchedTo(s + 1) < rg.matchedTo(s))
- {
- // s is top level submatch. search for submatches enclosed by
- // this one
- int r = s + 1;
- StringBuffer rmtch = new StringBuffer();
- while (r <= ns && rg.matchedTo(r) <= rg.matchedTo(s))
- {
- if (rg.matchedFrom(r) > -1)
- {
- rmtch.append(rg.stringMatched(r));
- }
- r++;
- }
- if (rmtch.length() > 0)
- {
- subs.append(rmtch); // simply concatenate
- }
- s = r;
- }
- else
- {
- if (rg.matchedFrom(s) > -1)
- {
- subs.append(rg.stringMatched(s)); // concatenate
- }
- s++;
- }
- }
- thematches[pass].append(subs);
+ url.append("=");
+ url.append(vals.get(0));
}
}
}
else
{
- // are we only supposed to take regex matches ?
- if (!onlyIfMatches)
+ if (!consts)
{
- thismatched[sq] |= true;
- urllength += idseq[pass][sq].length(); // tot up length
- if (createFullUrl)
- {
- thematches[pass] = new StringBuffer(idseq[pass][sq]); // take
- // whole
- // string -
- // regardless - probably not a
- // good idea!
- /*
- * TODO: do some boilerplate trimming of the fields to make them
- * sensible e.g. trim off any 'prefix' in the id string (see
- * UrlLink for the below) - pre 2.4 Jalview behaviour if
- * (idstring.indexOf("|") > -1) { idstring =
- * idstring.substring(idstring.lastIndexOf("|") + 1); }
- */
- }
-
+ url.append(appendChar);
+ appendChar = '&';
+ url.append(param.getValue().token);
+ url.append("=");
+ // write parameter set as $TOKENPREFIX:csv list of params$ for this
+ // input param
+ url.append("$");
+ url.append(param.getValue().getURLtokenPrefix());
+ url.append(":");
+ url.append(arrayToSeparatorList(vals.toArray(new String[0]),
+ ","));
+ url.append("$");
}
}
+
}
+ // toggle consts and repeat until !consts is false:
+ } while (!(consts = !consts));
+ return url.toString();
+ }
- // check if we are going to add this sequence's results ? all token
- // replacements must be valid for this to happen!
- // (including single value replacements - eg. dataset name)
- if (thismatched[sq])
+ /**
+ * parse the service URL and input parameters from the given encoded URL
+ * string and configure the RestServiceDescription from it.
+ *
+ * @param ipurl
+ * @param warnings
+ * where any warnings
+ * @return true if URL parsed correctly. false means the configuration failed.
+ */
+ private boolean configureFromInputParamEncodedUrl(String ipurl,
+ StringBuffer warnings)
+ {
+ boolean valid = true;
+ int lastp = 0;
+ String url = new String();
+ Matcher prms = Pattern.compile("([?&])([A-Za-z0-9_]+)=\\$([^$]+)\\$")
+ .matcher(ipurl);
+ Map<String, InputType> iparams = new Hashtable<String, InputType>();
+ InputType jinput;
+ while (prms.find())
+ {
+ if (lastp < prms.start(0))
{
- if (createFullUrl)
- {
- for (pass = 0; pass < matched.length; pass++)
- {
- if (idseq[pass].length > 1 && matched[pass].length() > 0)
- {
- matched[pass].append(separators[pass]);
- }
- matched[pass].append(thematches[pass]);
- }
- }
- seqsmatched++;
+ url += ipurl.substring(lastp, prms.start(0));
+ lastp = prms.end(0) + 1;
}
+ String sep = prms.group(1);
+ String tok = prms.group(2);
+ String iprm = prms.group(3);
+ int colon = iprm.indexOf(":");
+ String iprmparams = "";
+ if (colon > -1)
+ {
+ iprmparams = iprm.substring(colon + 1);
+ iprm = iprm.substring(0, colon);
+ }
+ valid = parseTypeString(prms.group(0), tok, iprm, iprmparams,
+ iparams, warnings);
}
- // finally, if any sequences matched, then form the URL and return
- if (seqsmatched == 0 || (createFullUrl && matched[0].length() == 0))
- {
- // no matches - no url generated
- return null;
- }
- // check if we are beyond the feasible command line string limit for this
- // platform
- if ((urllength + 32) > Platform.getMaxCommandLineLength())
- {
- throw new Exception("urllength");
- }
- if (!createFullUrl)
- {
- // just return the essential info about what the URL would be generated
- // from
- return new Object[]
- { new int[]
- { seqsmatched }, thismatched };
- }
- // otherwise, create the URL completely.
-
- StringBuffer submiturl = new StringBuffer();
- submiturl.append(url_prefix);
- for (pass = 0; pass < matched.length; pass++)
+ if (valid)
{
- submiturl.append(matched[pass]);
- if (url_suffix[pass] != null)
+ try
+ {
+ URL u = new URL(url);
+ postUrl = url;
+ inputParams = iparams;
+ } catch (Exception e)
{
- submiturl.append(url_suffix[pass]);
+ warnings.append("Failed to parse '" + url + "' as a URL.\n");
+ valid = false;
}
}
-
- return new Object[]
- { new int[]
- { seqsmatched }, thismatched, matched, new String[]
- { submiturl.toString() } };
+ return valid;
}
- /**
- *
- * @param urlstub
- * @return number of distinct sequence (id or seuqence) replacements predicted
- * for this stub
- */
- public int getNumberInvolved(Object[] urlstub)
+ public static Class[] getInputTypes()
{
- return ((int[]) urlstub[0])[0]; // returns seqsmatched from
- // makeUrlsIf(false,...)
+ // TODO - find a better way of maintaining this classlist
+ return new Class[]
+ { jalview.ws.rest.params.Alignment.class,
+ jalview.ws.rest.params.AnnotationFile.class,
+ SeqGroupIndexVector.class,
+ jalview.ws.rest.params.SeqIdVector.class,
+ jalview.ws.rest.params.SeqVector.class,
+ jalview.ws.rest.params.Tree.class };
}
- /**
- * get token types present in this url as a bitfield indicating presence of
- * each token from tokens (LSB->MSB).
- *
- * @return groupURL class as integer
- */
- public int getGroupURLType()
+ public static boolean parseTypeString(String fullstring, String tok,
+ String iprm, String iprmparams, Map<String, InputType> iparams,
+ StringBuffer warnings)
{
- int r = 0;
- for (int pass = 0; pass < tokens.length; pass++)
+ boolean valid = true;
+ InputType jinput;
+ for (Class type : getInputTypes())
{
- for (int i = 0; i < mtch.length; i++)
+ try
{
- if (mtch[i].equals(tokens[pass]))
+ jinput = (InputType) (type.getConstructor().newInstance(null));
+ if (iprm.equalsIgnoreCase(jinput.getURLtokenPrefix()))
{
- r += 1 << pass;
+ ArrayList<String> al = new ArrayList<String>();
+ for (String prprm : separatorListToArray(iprmparams, ","))
+ {
+ // hack to ensure that strings like "sep=','" containing unescaped commas as values are concatenated
+ al.add(prprm.trim());
+ }
+ if (!jinput.configureFromURLtokenString(al, warnings))
+ {
+ valid = false;
+ warnings.append("Failed to parse '" + fullstring + "' as a "
+ + jinput.getURLtokenPrefix() + " input tag.\n");
+ }
+ else
+ {
+ jinput.token = tok;
+ iparams.put(tok, jinput);
+ valid = true;
+ }
+ break;
}
+
+ } catch (Throwable thr)
+ {
}
+ ;
}
- return r;
+ return valid;
}
- public String toString()
+ public static void main(String argv[])
{
- StringBuffer result = new StringBuffer();
- result.append(label + "|" + url_prefix);
- int r;
- for (r = 0; r < url_suffix.length; r++)
+ // test separator list
+ try {
+ assert(separatorListToArray("foo=',',min='foo',max='1,2,3',fa=','", ",").length==4);
+ if (separatorListToArray("minsize='2', sep=','", ",").length==2)
+ {
+ assert(false);
+ }
+
+ } catch (AssertionError x)
+ {
+ System.err.println("separatorListToArray is faulty.");
+ }
+ if (argv.length == 0)
{
- result.append("$");
- result.append(mtch[r]);
- if (regexReplace[r] != null)
+ if (!testRsdExchange("Test using default Shmmr service",
+ RestClient.makeShmmrRestClient().service))
{
- result.append("=/");
- result.append(regexReplace[r]);
- result.append("/=");
+ System.err.println("default test failed.");
+ }
+ else
+ {
+ System.err.println("default test passed.");
}
- result.append("$");
- result.append(url_suffix[r]);
}
- for (r = 0; r < separators.length; r++)
+ else
{
- result.append("|");
- result.append(separators[r]);
+ int i = 0, p = 0;
+ for (String svc : argv)
+ {
+ p += testRsdExchange("Test " + (++i), svc) ? 1 : 0;
+ }
+ System.err.println("" + p + " out of " + i + " tests passed.");
+
}
- return result.toString();
}
- /**
- * report stats about the generated url string given an input set
- *
- * @param ul
- * @param idstring
- * @param url
- */
- private static void testUrls(RestServiceDescription
- ul, String[][] idstring,
- Object[] url)
+ private static boolean testRsdExchange(String desc, String servicestring)
{
-
- if (url == null)
+ try
{
- System.out.println("Created NO urls.");
+ RestServiceDescription newService = new RestServiceDescription(
+ servicestring);
+ if (!newService.isValid())
+ {
+ throw new Error("Failed to create service from '" + servicestring
+ + "'.\n" + newService.getInvalidMessage());
+ }
+ return testRsdExchange(desc, newService);
+ } catch (Throwable x)
+ {
+ System.err.println("Failed for service (" + desc + "): "
+ + servicestring);
+ x.printStackTrace();
+ return false;
}
- else
+ }
+
+ private static boolean testRsdExchange(String desc,
+ RestServiceDescription service)
+ {
+ try
{
- System.out.println("Created a url from " + ((int[]) url[0])[0]
- + "out of " + idstring[0].length + " sequences.");
- System.out.println("Sequences that did not match:");
- for (int sq = 0; sq < idstring[0].length; sq++)
+ String fromservicetostring = service.toString();
+ RestServiceDescription newService = new RestServiceDescription(
+ fromservicetostring);
+ if (!newService.isValid())
{
- if (!((boolean[]) url[1])[sq])
- {
- System.out.println("Seq " + sq + ": " + idstring[0][sq] + "\t: "
- + idstring[1][sq]);
- }
+ throw new Error("Failed to create service from '"
+ + fromservicetostring + "'.\n"
+ + newService.getInvalidMessage());
}
- System.out.println("Sequences that DID match:");
- for (int sq = 0; sq < idstring[0].length; sq++)
+
+ if (!service.equals(newService))
{
- if (((boolean[]) url[1])[sq])
- {
- System.out.println("Seq " + sq + ": " + idstring[0][sq] + "\t: "
- + idstring[1][sq]);
- }
+ System.err.println("Failed for service (" + desc + ").");
+ System.err.println("Original service and parsed service differ.");
+ System.err.println("Original: " + fromservicetostring);
+ System.err.println("Parsed : " + newService.toString());
+ return false;
}
- System.out.println("The generated URL:");
- System.out.println(((String[]) url[3])[0]);
+ } catch (Throwable x)
+ {
+ System.err.println("Failed for service (" + desc + "): "
+ + service.toString());
+ x.printStackTrace();
+ return false;
}
- }
-
- public static void main(String argv[])
- {
+ return true;
}
/**
return idset;
}
- public void setLabel(String newlabel)
- {
- this.label = newlabel;
- }
-
/**
- * can this service be run on the visible portion of an alignment regardless of hidden boundaries ?
+ * can this service be run on the visible portion of an alignment regardless
+ * of hidden boundaries ?
*/
- boolean hseparable=false;
- boolean vseparable=false;
-
+ boolean hseparable = false;
+
+ boolean vseparable = false;
+
public boolean isHseparable()
{
- // TODO Auto-generated method stub
return hseparable;
}
+
/**
*
* @return
*/
public boolean isVseparable()
{
- // TODO Auto-generated method stub
- return hseparable;
+ return vseparable;
}
/**
* search the input types for an instance of the given class
+ *
* @param <validInput.inputType> class1
* @return
*/
public boolean inputInvolves(Class<?> class1)
{
- assert(InputType.class.isAssignableFrom(class1));
- for (InputType val:inputParams.values())
+ assert (InputType.class.isAssignableFrom(class1));
+ for (InputType val : inputParams.values())
{
if (class1.isAssignableFrom(val.getClass()))
{
}
return false;
}
+
char gapCharacter = '-';
+
/**
*
- * @return the preferred gap character for alignments input/output by this service
+ * @return the preferred gap character for alignments input/output by this
+ * service
*/
public char getGapCharacter()
{
public String getDecoratedResultUrl(String jobId)
{
// TODO: correctly write ?/& appropriate to result URL format.
- return jobId+urlSuffix;
+ return jobId + urlSuffix;
}
- private List<JvDataType> resultData;
+
+ private List<JvDataType> resultData = new ArrayList<JvDataType>();
+
/**
*
*
- * TODO: Extend to optionally specify relative/absolute url where data of this type can be retrieved from
+ * TODO: Extend to optionally specify relative/absolute url where data of this
+ * type can be retrieved from
+ *
* @param dt
*/
public void addResultDatatype(JvDataType dt)
{
- if (resultData==null)
+ if (resultData == null)
{
resultData = new ArrayList<JvDataType>();
}
resultData.add(dt);
}
+
public boolean removeRsultDatatype(JvDataType dt)
{
- if (resultData!=null)
+ if (resultData != null)
{
return resultData.remove(dt);
}
return false;
}
+
public List<JvDataType> getResultDataTypes()
{
return resultData;
}
+
+ /**
+ * parse a concatenated list of rest service descriptions into an array
+ * @param services
+ * @return zero or more services.
+ * @throws exceptions if the services are improperly encoded.
+ */
+ public static List<RestServiceDescription> parseDescriptions(String services) throws Exception
+ {
+ String[] list = separatorListToArray(services, "|");
+ List<RestServiceDescription> svcparsed = new ArrayList<RestServiceDescription>();
+ int p=0,lastp=0;
+ StringBuffer warnings=new StringBuffer();
+ do {
+ RestServiceDescription rsd = new RestServiceDescription();
+ p=rsd.parseServiceList(list, warnings, lastp=p);
+ if (p>lastp && rsd.isValid())
+ {
+ svcparsed.add(rsd);
+ } else {
+ throw new Exception("Failed to parse user defined RSBS services from :"+services+"\nFirst error was encountered at token "+lastp+" starting "+list[lastp]+":\n"+rsd.getInvalidMessage());
+ }
+ } while (p<lastp && p<list.length-1);
+ return svcparsed;
+ }
+
}
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest.params;
import jalview.datamodel.AlignmentI;
+import jalview.ws.params.OptionI;
+import jalview.ws.params.simple.BooleanOption;
+import jalview.ws.params.simple.Option;
import jalview.ws.rest.InputType;
import jalview.ws.rest.NoValidInputDataException;
import jalview.ws.rest.RestJob;
import jalview.ws.rest.InputType.molType;
+import jalview.ws.rest.RestServiceDescription;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import org.apache.http.entity.mime.content.ContentBody;
import org.apache.http.entity.mime.content.FileBody;
/**
* format an alignment for input to rest service.
+ *
* @author JimP
- *
+ *
*/
-public class Alignment extends InputType {
+public class Alignment extends InputType
+{
public Alignment()
{
- super(new Class[] { AlignmentI.class} );
+ super(new Class[]
+ { AlignmentI.class });
}
- String format="FASTA";
+ String format = "FASTA";
+
molType type;
- boolean jvsuffix=false;
+
+ boolean jvsuffix = false;
+
/**
* input data as a file upload rather than inline content
*/
- public boolean writeAsFile;
+ public boolean writeAsFile=false;
+
@Override
- public ContentBody formatForInput(RestJob rj) throws UnsupportedEncodingException, NoValidInputDataException
+ public ContentBody formatForInput(RestJob rj)
+ throws UnsupportedEncodingException, NoValidInputDataException
{
- AlignmentI alignment = rj.getAlignmentForInput(token,type);
+ AlignmentI alignment = rj.getAlignmentForInput(token, type);
if (writeAsFile)
{
- try {
- File fa = File.createTempFile("jvmime", ".fa");
- PrintWriter pw = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(fa)), "UTF-8"));
- pw.append(new jalview.io.FormatAdapter().formatSequences(format, alignment, jvsuffix));
- pw.close();
- return new FileBody(fa, "text/plain");
- } catch (Exception ex)
- {
- throw new NoValidInputDataException("Couldn't write out alignment to file.",ex);
+ try
+ {
+ File fa = File.createTempFile("jvmime", ".fa");
+ PrintWriter pw = new PrintWriter(
+ new OutputStreamWriter(new BufferedOutputStream(
+ new FileOutputStream(fa)), "UTF-8"));
+ pw.append(new jalview.io.FormatAdapter().formatSequences(format,
+ alignment, jvsuffix));
+ pw.close();
+ return new FileBody(fa, "text/plain");
+ } catch (Exception ex)
+ {
+ throw new NoValidInputDataException(
+ "Couldn't write out alignment to file.", ex);
+ }
}
- } else {
+ else
+ {
jalview.io.FormatAdapter fa = new jalview.io.FormatAdapter();
fa.setNewlineString("\r\n");
- return new StringBody((fa.formatSequences(format, alignment, jvsuffix)));
- //,
- //"text/plain",Charset.forName("UTF-8"));
+ return new StringBody(
+ (fa.formatSequences(format, alignment, jvsuffix)));
+ // ,
+ // "text/plain",Charset.forName("UTF-8"));
// , "text/plain", Charset.forName("UTF-8"));
- // sb.getContentTypeParameters().put("filename", "alignment.fa");
+ // sb.getContentTypeParameters().put("filename", "alignment.fa");
+ }
+ }
+
+ @Override
+ public List<String> getURLEncodedParameter()
+ {
+ ArrayList<String> prms = new ArrayList<String>();
+ prms.add("format='" + format + "'");
+ if (type != null)
+ {
+ prms.add("type='" + type.toString() + "'");
+ }
+ if (jvsuffix)
+ {
+ prms.add("jvsuffix");
+ }
+ ;
+ if (writeAsFile)
+ {
+ prms.add("writeasfile");
}
+ ;
+ return prms;
}
+
+ @Override
+ public String getURLtokenPrefix()
+ {
+ return "ALIGNMENT";
+ }
+
+ @Override
+ public boolean configureProperty(String tok, String val,
+ StringBuffer warnings)
+ {
+ if (tok.startsWith("jvsuffix"))
+ {
+ jvsuffix = true;
+ return true;
+ }
+ if (tok.startsWith("writeasfile"))
+ {
+ writeAsFile = true;
+ return true;
+ }
+
+ if (tok.startsWith("format"))
+ {
+ for (String fmt : jalview.io.FormatAdapter.WRITEABLE_FORMATS)
+ {
+ if (val.equalsIgnoreCase(fmt))
+ {
+ format = fmt;
+ return true;
+ }
+ }
+ warnings.append("Invalid alignment format '" + val
+ + "'. Must be one of (");
+ for (String fmt : jalview.io.FormatAdapter.WRITEABLE_FORMATS)
+ {
+ warnings.append(" " + fmt);
+ }
+ warnings.append(")\n");
+ }
+ if (tok.startsWith("type"))
+ {
+ try
+ {
+ type = molType.valueOf(val);
+ return true;
+ } catch (Exception x)
+ {
+ warnings.append("Invalid molecule type '" + val
+ + "'. Must be one of (");
+ for (molType v : molType.values())
+ {
+ warnings.append(" " + v);
+ }
+ warnings.append(")\n");
+ }
+ }
+ return false;
+ }
+ @Override
+ public List<OptionI> getOptions()
+ {
+ List<OptionI> lst = getBaseOptions();
+ lst.add(new BooleanOption("jvsuffix","Append jalview style /start-end suffix to ID", false, false, jvsuffix, null));
+ lst.add(new BooleanOption("writeasfile","Append jalview style /start-end suffix to ID", false, false, writeAsFile, null));
+
+ lst.add(new Option("format",
+ "Alignment upload format", true, "FASTA",
+ format, Arrays.asList(jalview.io.FormatAdapter.WRITEABLE_FORMATS), null));
+ lst.add(createMolTypeOption("type", "Sequence type", false, type,
+ null));
+
+ return lst;
+ }
+
}
\ No newline at end of file
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest.params;
import jalview.datamodel.AlignmentI;
+import jalview.ws.params.OptionI;
+import jalview.ws.params.simple.Option;
import jalview.ws.rest.InputType;
import jalview.ws.rest.NoValidInputDataException;
import jalview.ws.rest.RestJob;
+import jalview.ws.rest.RestServiceDescription;
import jalview.ws.rest.InputType.molType;
import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import org.apache.http.entity.mime.content.ContentBody;
import org.apache.http.entity.mime.content.StringBody;
return new StringBody(new jalview.io.AnnotationFile().printCSVAnnotations(al.getAlignmentAnnotation()));
}
}
-}
\ No newline at end of file
+ @Override
+ public List<String> getURLEncodedParameter()
+ {
+ ArrayList<String> prms = new ArrayList<String>();
+ super.addBaseParams(prms);
+ prms.add("format='"+format+"'");
+ return prms;
+ }
+ @Override
+ public String getURLtokenPrefix()
+ {
+ return "ALANNOTATION";
+ }
+ @Override
+ public boolean configureProperty(String tok, String val,
+ StringBuffer warnings)
+ {
+
+ if (tok.startsWith("format"))
+ {
+ for (String fmt : new String[] { CSVANNOT, JVANNOT})
+ {
+ if (val.equalsIgnoreCase(fmt))
+ {
+ format = fmt;
+ return true;
+ }
+ }
+ warnings.append("Invalid annotation file format '" + val
+ + "'. Must be one of (");
+ for (String fmt : new String[] { CSVANNOT, JVANNOT})
+ {
+ warnings.append(" " + fmt);
+ }
+ warnings.append(")\n");
+ }
+ return false;
+ }
+ @Override
+ public List<OptionI> getOptions()
+ {
+ // TODO - consider disregarding base options here.
+ List<OptionI> lst = getBaseOptions();
+ lst.add(new Option("format",
+ "Alignment annotation upload format", true, JVANNOT,
+ format, Arrays.asList(new String[]
+ { JVANNOT, CSVANNOT}), null));
+ return lst;
+ }
+}
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest.params;
+import jalview.ws.params.OptionI;
import jalview.ws.rest.InputType;
import jalview.ws.rest.NoValidInputDataException;
import jalview.ws.rest.RestJob;
import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
import org.apache.http.entity.mime.content.ContentBody;
import org.apache.http.entity.mime.content.StringBody;
return new StringBody(value);
}
+ @Override
+ public List<String> getURLEncodedParameter()
+ {
+ ArrayList<String> prm = new ArrayList<String>();
+
+ if (value!=null && value.length()>0)
+ {
+ try {
+ prm.add(URLEncoder.encode(value,"UTF-8"));
+ } catch (UnsupportedEncodingException ex)
+ {
+ throw new Error("Couldn't encode '"+value+"' as UTF-8.",ex);
+
+ }
+ }
+ return prm;
+ }
+
+ @Override
+ public String getURLtokenPrefix()
+ {
+ return "";
+ }
+
+ @Override
+ public boolean configureFromURLtokenString(List<String> tokenstring,
+ StringBuffer warnings)
+ {
+ if (tokenstring.size()>1) {
+ warnings.append("IMPLEMENTATION ERROR: Constant POST parameters cannot have more than one value.");
+ return false;
+ }
+ if (tokenstring.size()==1) {
+ value = tokenstring.get(0);
+ }
+ return true;
+ }
+
+ @Override
+ public boolean configureProperty(String tok, String val,
+ StringBuffer warnings)
+ {
+ warnings.append("IMPLEMENTATION ERROR: No Properties to configure for a Constant parameter.");
+ return false;
+ }
+
+ @Override
+ public List<OptionI> getOptions()
+ {
+ // empty list - this parameter isn't configurable, so don't try.
+ return new ArrayList<OptionI>();
+ }
}
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest.params;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.ws.params.OptionI;
+import jalview.ws.params.simple.IntegerParameter;
+import jalview.ws.params.simple.Option;
import jalview.ws.rest.AlignmentProcessor;
import jalview.ws.rest.InputType;
import jalview.ws.rest.NoValidInputDataException;
import jalview.ws.rest.RestJob;
+import jalview.ws.rest.RestServiceDescription;
import jalview.ws.rest.InputType.molType;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import java.util.Vector;
import org.apache.http.entity.mime.content.ContentBody;
// assume that alignment is properly ordered so groups form consecutive
// blocks
ArrayList<int[]> gl = new ArrayList<int[]>();
- int p=0;
+ int p = 0;
for (SequenceGroup sg : (Vector<SequenceGroup>) al.getGroups())
{
- if (sg.getSize()<minsize)
+ if (sg.getSize() < minsize)
{
- throw new NoValidInputDataException("Group contains less than "+minsize+" sequences.");
+ throw new NoValidInputDataException("Group contains less than "
+ + minsize + " sequences.");
}
// TODO: refactor to sequenceGroup for efficiency -
// getAlignmentRowInterval(AlignmentI al)
gl.add(se);
}
}
- // are there any more sequences ungrouped that should be added as a single remaining group ? - these might be at the start or the end
- if (gl.size()>0)
+ // are there any more sequences ungrouped that should be added as a single
+ // remaining group ? - these might be at the start or the end
+ if (gl.size() > 0)
{
- int[] tail=gl.get(0);
- if (tail[0]>0) {
- if (1+tail[0]>minsize)
+ int[] tail = gl.get(0);
+ if (tail[0] > 0)
{
- gl.add(0,new int[] { 0,tail[0]-1});
- } else {
- // lets be intelligent here - if the remaining sequences aren't enough to make a final group, then don't make one.
- // throw new NoValidInputDataException("Group from remaining ungrouped sequences in input contains less than "+minsize+" sequences.");
+ if (1 + tail[0] > minsize)
+ {
+ gl.add(0, new int[]
+ { 0, tail[0] - 1 });
+ }
+ else
+ {
+ // lets be intelligent here - if the remaining sequences aren't enough
+ // to make a final group, then don't make one.
+ // throw new
+ // NoValidInputDataException("Group from remaining ungrouped sequences in input contains less than "+minsize+" sequences.");
+ }
}
- } else {
- tail=gl.get(gl.size()-1);
- if (1+tail[1]<al.getHeight())
+ else
+ {
+ tail = gl.get(gl.size() - 1);
+ if (1 + tail[1] < al.getHeight())
{
- if (al.getHeight()-(1+tail[1])>minsize) {
- gl.add(new int[] { tail[1]+1, al.getHeight()-1});
- } else {
- // lets be intelligent here - if the remaining sequences aren't enough to make a final group, then don't make one.
- // throw new NoValidInputDataException("Group from remaining ungrouped sequences in input contains less than "+minsize+" sequences.");
+ if (al.getHeight() - (1 + tail[1]) > minsize)
+ {
+ gl.add(new int[]
+ { tail[1] + 1, al.getHeight() - 1 });
+ }
+ else
+ {
+ // lets be intelligent here - if the remaining sequences aren't
+ // enough to make a final group, then don't make one.
+ // throw new
+ // NoValidInputDataException("Group from remaining ungrouped sequences in input contains less than "+minsize+" sequences.");
}
}
}
- } else {
- gl.add(new int[] { 0, al.getHeight()-1});
}
- if (min>=0 && gl.size()<min)
+ else
+ {
+ gl.add(new int[]
+ { 0, al.getHeight() - 1 });
+ }
+ if (min >= 0 && gl.size() < min)
{
- throw new NoValidInputDataException("Not enough sequence groups for input. Need at least "+min+" groups (including ungrouped regions).");
+ throw new NoValidInputDataException(
+ "Not enough sequence groups for input. Need at least " + min
+ + " groups (including ungrouped regions).");
}
- if (max>0 && gl.size()>max)
+ if (max > 0 && gl.size() > max)
{
- throw new NoValidInputDataException("Too many sequence groups for input. Need at most "+max+" groups (including ungrouped regions).");
+ throw new NoValidInputDataException(
+ "Too many sequence groups for input. Need at most " + max
+ + " groups (including ungrouped regions).");
}
int[][] vals = gl.toArray(new int[gl.size()][]);
int[] srt = new int[gl.size()];
}
/**
- * set minimum number of sequences allowed in a partition. Default is 1 sequence.
- * @param i (number greater than 1)
+ * set minimum number of sequences allowed in a partition. Default is 1
+ * sequence.
+ *
+ * @param i
+ * (number greater than 1)
*/
public void setMinsize(int i)
{
- if (minsize>=1)
+ if (minsize >= 1)
+ {
+ minsize = i;
+ }
+ else
+ {
+ minsize = 1;
+ }
+ }
+
+ @Override
+ public List<String> getURLEncodedParameter()
+ {
+ ArrayList<String> prms = new ArrayList<String>();
+ super.addBaseParams(prms);
+ prms.add("minsize='" + minsize + "'");
+ prms.add("sep='" + sep + "'");
+ if (type != null)
+ {
+ prms.add("type='" + type + "'");
+ }
+ return prms;
+ }
+
+ @Override
+ public String getURLtokenPrefix()
+ {
+ return "PARTITION";
+ }
+
+ @Override
+ public boolean configureProperty(String tok, String val,
+ StringBuffer warnings)
+ {
+
+ if (tok.startsWith("sep"))
+ {
+ sep = val;
+ return true;
+ }
+ if (tok.startsWith("minsize"))
+ {
+ try
+ {
+ minsize = Integer.valueOf(val);
+ if (minsize >= 0)
+ return true;
+ } catch (Exception x)
{
- minsize=i;
- } else {
- minsize=1;
+
}
+ warnings.append("Invalid minsize value '" + val
+ + "'. Must be a positive integer.\n");
+ }
+ if (tok.startsWith("type"))
+ {
+ try
+ {
+ type = molType.valueOf(val);
+ return true;
+ } catch (Exception x)
+ {
+ warnings.append("Invalid molecule type '" + val
+ + "'. Must be one of (");
+ for (molType v : molType.values())
+ {
+ warnings.append(" " + v);
+ }
+ warnings.append(")\n");
+ }
+ }
+ return false;
}
-}
\ No newline at end of file
+
+ @Override
+ public List<OptionI> getOptions()
+ {
+ List<OptionI> lst = getBaseOptions();
+ lst.add(new Option("sep",
+ "Separator character between elements of vector", true, ",",
+ sep, Arrays.asList(new String[]
+ { " ", ",", ";", "\t", "|" }), null));
+ lst.add(new IntegerParameter("minsize", "Minimum size of partition allowed by service", true, 1, minsize, 1,0));
+ lst.add(createMolTypeOption("type", "Sequence type", false, type, molType.MIX));
+ return lst;
+ }
+
+}
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest.params;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
+import jalview.ws.params.OptionI;
+import jalview.ws.params.simple.Option;
import jalview.ws.rest.InputType;
import jalview.ws.rest.NoValidInputDataException;
import jalview.ws.rest.RestJob;
+import jalview.ws.rest.RestServiceDescription;
import jalview.ws.rest.InputType.molType;
import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.apache.http.entity.mime.content.ContentBody;
import org.apache.http.entity.mime.content.StringBody;
/**
- * input a list of sequence IDs separated by some separator
+ * input a list of sequence IDs separated by some separator
+ *
* @author JimP
- *
+ *
*/
-class SeqIdVector extends InputType {
+public class SeqIdVector extends InputType
+{
public SeqIdVector()
{
- super(new Class[] { AlignmentI.class} );
+ super(new Class[]
+ { AlignmentI.class });
}
/**
* separator for list of sequence IDs - default is ','
*/
- String sep=",";
+ String sep = ",";
+
molType type;
+
@Override
- public ContentBody formatForInput(RestJob rj) throws UnsupportedEncodingException, NoValidInputDataException
+ public ContentBody formatForInput(RestJob rj)
+ throws UnsupportedEncodingException, NoValidInputDataException
{
StringBuffer idvector = new StringBuffer();
- boolean list=false;
- for (SequenceI seq:rj.getSequencesForInput(token, type))
+ boolean list = false;
+ for (SequenceI seq : rj.getSequencesForInput(token, type))
{
if (list)
{
}
return new StringBody(idvector.toString());
}
-}
\ No newline at end of file
+
+ @Override
+ public List<String> getURLEncodedParameter()
+ {
+ ArrayList<String> prms = new ArrayList<String>();
+ super.addBaseParams(prms);
+ prms.add("sep='" + sep + "'");
+ if (type!=null)
+ {
+ prms.add("type='"+type+"'");
+ }
+ return prms;
+ }
+
+ @Override
+ public String getURLtokenPrefix()
+ {
+ return "SEQIDS";
+ }
+
+ @Override
+ public boolean configureProperty(String tok, String val,
+ StringBuffer warnings)
+ {
+ if (tok.startsWith("sep"))
+ {
+ sep = val;
+ return true;
+ }
+ if (tok.startsWith("type"))
+ {
+ try
+ {
+ type = molType.valueOf(val);
+ return true;
+ } catch (Exception x)
+ {
+ warnings.append("Invalid molecule type '" + val
+ + "'. Must be one of (");
+ for (molType v : molType.values())
+ {
+ warnings.append(" " + v);
+ }
+ warnings.append(")\n");
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public List<OptionI> getOptions()
+ {
+ List<OptionI> lst = getBaseOptions();
+ lst.add(new Option("sep",
+ "Separator character between elements of vector", true, ",",
+ sep, Arrays.asList(new String[]
+ { " ", ",", ";", "\t", "|" }), null));
+ lst.add(createMolTypeOption("type", "Sequence type", false, type,
+ null));
+ return lst;
+ }
+}
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest.params;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
+import jalview.ws.params.OptionI;
+import jalview.ws.params.simple.Option;
import jalview.ws.rest.InputType;
import jalview.ws.rest.NoValidInputDataException;
import jalview.ws.rest.RestJob;
+import jalview.ws.rest.RestServiceDescription;
import jalview.ws.rest.InputType.molType;
import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import org.apache.http.entity.mime.content.ContentBody;
import org.apache.http.entity.mime.content.StringBody;
+import org.jmol.util.ArrayUtil;
/**
* input a list of sequences separated by some separator
* @author JimP
*
*/
-class SeqVector extends InputType {
+public class SeqVector extends InputType {
String sep;
molType type;
public SeqVector()
}
return new StringBody(idvector.toString());
}
+ @Override
+ public List<String> getURLEncodedParameter()
+ {
+ ArrayList<String> prms = new ArrayList<String>();
+ super.addBaseParams(prms);
+ prms.add("sep='"+ sep+"'");
+ if (type!=null)
+ {
+ prms.add("type='"+type+"'");
+ }
+ return prms;
+ }
+
+ @Override
+ public String getURLtokenPrefix()
+ {
+ return "SEQS";
+ }
+
+ @Override
+ public boolean configureProperty(String tok, String val,
+ StringBuffer warnings)
+ {
+
+ if (tok.startsWith("sep"))
+ {
+ sep=val;
+ return true;
+ }
+ if (tok.startsWith("type"))
+ {
+ try {
+ type=molType.valueOf(val);
+ return true;
+ } catch (Exception x)
+ {
+ warnings.append("Invalid molecule type '"+val+"'. Must be one of (");
+ for (molType v:molType.values())
+ {
+ warnings.append(" "+v);
+ }
+ warnings.append(")\n");
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public List<OptionI> getOptions()
+ {
+ List<OptionI> lst = getBaseOptions();
+ lst.add(new Option("sep",
+ "Separator character between elements of vector", true, ",",
+ sep, Arrays.asList(new String[]
+ { " ", ",", ";", "\t", "|" }), null));
+ lst.add(createMolTypeOption("type", "Sequence type", false, type,
+ molType.MIX));
+
+ return lst;
+ }
+
}
\ No newline at end of file
+/*******************************************************************************
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ *
+ * This file is part of Jalview.
+ *
+ * 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.
+ *
+ * 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.ws.rest.params;
import jalview.datamodel.AlignmentI;
+import jalview.ws.params.ArgumentI;
+import jalview.ws.params.OptionI;
import jalview.ws.rest.InputType;
import jalview.ws.rest.RestJob;
+import jalview.ws.rest.RestServiceDescription;
+import jalview.ws.rest.InputType.molType;
import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.List;
import org.apache.http.entity.mime.content.ContentBody;
* @author JimP
*
*/
-class Tree extends InputType {
+public class Tree extends InputType {
public Tree()
{
super(new Class[] { jalview.analysis.NJTree.class} );
throw new Error("Tree InputType not yet implemented");
//return null;
}
+ public String getURLtokenPrefix()
+ {
+ return "NEWICK";
+ }
+ @Override
+ public List<String> getURLEncodedParameter()
+ {
+ ArrayList<String> prms = new ArrayList<String>();
+ super.addBaseParams(prms);
+ return prms;
+ }
+
+ @Override
+ public boolean configureProperty(String tok, String val,
+ StringBuffer warnings)
+ {
+ return true;
+ }
+
+ @Override
+ public List<OptionI> getOptions()
+ {
+ return getBaseOptions();
+ }
+
}
\ No newline at end of file
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*\r
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)\r
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)\r
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle\r
* \r
* This file is part of Jalview.\r
* \r
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<?xml version="1.0" encoding="UTF-8"?>
<!-- This script was automatically generated using InstallAnywhere 2010 Standard, Build 3890
STATUS: Fully Functional LICENSED Edition
- DATE: Wed Jan 12 21:59:23 GMT 2011 -->
-<InstallAnywhere_Deployment_Project increments="3218">
+ DATE: Mon Sep 26 14:26:49 BST 2011 -->
+<InstallAnywhere_Deployment_Project increments="3314">
<!-- ** DO NOT EDIT ** Essential authorization and configuration data ** DO NOT EDIT ** -->
<essentialScriptInfo>
<versionID major="11" minor="0" revision="0"/>
<scriptID>12,42,11,86,49,53,48,71,70,89,74,70,72,45,83,68,75,45,84,51,74,84,53,57,80,75,76,71</scriptID>
<buildID>3,13,71,76,105,110,117,120,44,32,50,46,54,46,49,56,45,49,57,52,46,50,54,46,49,46,101,108,53,44,32,105,51,56,54,59,32,74,97,118,97,32,49,46,54,46,48,95,49,53,44,32,83,117,110,32,77,105,99,114,111,115,121,115,116,101,109,115,32,73,110,99,46,44,32,104,116,116,112,58,47,47,106,97,118,97,46,115,117,110,46,99,111,109,47,59,32,101,110,44,32,85,110,107,110,111,119,110,59,32,85,84,70,45,56</buildID>
<!-- The authorizationID may change between project saves and builds. This does not effect the integrity of the project, nor do changes in this value represent changes in the actual InstallAnywhere project. -->
- <authorizationID>1,0,0,32,115,59,-128,32,80,112,118,100,85,99,113,97,113,49,81,54,74,67,71,67,74,72,64,69,66,69,64,95,71,5,2,8,10,61,124,13,1,0,0</authorizationID>
+ <authorizationID>1,0,0,48,-93,-18,-112,-80,80,112,118,100,85,99,113,97,113,49,81,54,74,67,71,67,74,72,64,69,66,69,64,95,71,5,2,5,14,58,117,2,1,0,0</authorizationID>
</essentialScriptInfo>
- <installationObjects uniqueObjects="161">
+ <installationObjects uniqueObjects="164">
<object class="com.zerog.ia.installer.Installer" objectID="fe7d63eda660">
<property name="belongsToUninstallPhase">
<boolean>false</boolean>
</object>
</method>
<method name="addElement">
- <object class="com.zerog.ia.installer.util.LAXPropertyData" objectID="bbb5f73fa453">
+ <object class="com.zerog.ia.installer.util.LAXPropertyData" objectID="97f991ffa6f7">
<property name="propertyValue">
- <string><![CDATA[jalview.bin.Jalview]]></string>
+ <string><![CDATA[33554432]]></string>
</property>
<property name="propertyName">
- <string><![CDATA[lax.main.class]]></string>
+ <string><![CDATA[lax.nl.java.option.java.heap.size.initial]]></string>
</property>
<property name="propertyComment">
- <string><![CDATA[the class that contains the main method for the application]]></string>
+ <string><![CDATA[Initial heap size for Jalview]]></string>
</property>
</object>
</method>
<method name="addElement">
- <object class="com.zerog.ia.installer.util.LAXPropertyData" objectID="97f991ffa6f7">
+ <object class="com.zerog.ia.installer.util.LAXPropertyData" objectID="bbb5f73fa453">
<property name="propertyValue">
- <string><![CDATA[33554432]]></string>
+ <string><![CDATA[jalview.bin.Jalview]]></string>
</property>
<property name="propertyName">
- <string><![CDATA[lax.nl.java.option.java.heap.size.initial]]></string>
+ <string><![CDATA[lax.main.class]]></string>
</property>
<property name="propertyComment">
- <string><![CDATA[Initial heap size for Jalview]]></string>
+ <string><![CDATA[the class that contains the main method for the application]]></string>
</property>
</object>
</method>
<string><![CDATA[664]]></string>
</property>
<property name="sourceName">
- <string><![CDATA[commons-logging.jar]]></string>
+ <string><![CDATA[commons-logging-1.1.1.jar]]></string>
</property>
<property name="overrideUnixPermissions">
<boolean>false</boolean>
<boolean>true</boolean>
</property>
<property name="destinationName">
- <string><![CDATA[commons-logging.jar]]></string>
+ <string><![CDATA[commons-logging-1.1.1.jar]]></string>
</property>
<property name="fileSize">
- <long>31605</long>
+ <long>60686</long>
</property>
<property name="macBinary">
<boolean>false</boolean>
<string><![CDATA[JGoogleAnalytics_0.3.jar]]></string>
</property>
<property name="fileSize">
- <long>9878</long>
+ <long>8300</long>
</property>
<property name="macBinary">
<boolean>false</boolean>
</property>
</object>
</method>
+ <method name="addElement">
+ <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="aa3a521fb6bc">
+ <property name="belongsToUninstallPhase">
+ <boolean>false</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="unixPermissions">
+ <string><![CDATA[664]]></string>
+ </property>
+ <property name="sourceName">
+ <string><![CDATA[miglayout-4.0-swing.jar]]></string>
+ </property>
+ <property name="overrideUnixPermissions">
+ <boolean>false</boolean>
+ </property>
+ <property name="sourcePath">
+ <string><![CDATA[/homes/ws-dev1/jalview/lib/]]></string>
+ </property>
+ <property name="shouldUninstall">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="destinationName">
+ <string><![CDATA[miglayout-4.0-swing.jar]]></string>
+ </property>
+ <property name="fileSize">
+ <long>77291</long>
+ </property>
+ <property name="macBinary">
+ <boolean>false</boolean>
+ </property>
+ <property name="targetCheckKind">
+ <int>0</int>
+ </property>
+ </object>
+ </method>
+ <method name="addElement">
+ <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="aa3a5220b6bc1">
+ <property name="belongsToUninstallPhase">
+ <boolean>false</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="unixPermissions">
+ <string><![CDATA[664]]></string>
+ </property>
+ <property name="sourceName">
+ <string><![CDATA[commons-codec-1.3.jar]]></string>
+ </property>
+ <property name="overrideUnixPermissions">
+ <boolean>false</boolean>
+ </property>
+ <property name="sourcePath">
+ <string><![CDATA[/homes/ws-dev1/jalview/lib/]]></string>
+ </property>
+ <property name="shouldUninstall">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="destinationName">
+ <string><![CDATA[commons-codec-1.3.jar]]></string>
+ </property>
+ <property name="fileSize">
+ <long>46725</long>
+ </property>
+ <property name="macBinary">
+ <boolean>false</boolean>
+ </property>
+ <property name="targetCheckKind">
+ <int>0</int>
+ </property>
+ </object>
+ </method>
+ <method name="addElement">
+ <object class="com.zerog.ia.installer.actions.InstallZipfile" objectID="aa3a5220b6bc">
+ <property name="belongsToUninstallPhase">
+ <boolean>false</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="unixPermissions">
+ <string><![CDATA[664]]></string>
+ </property>
+ <property name="sourceName">
+ <string><![CDATA[jswingreader-0.3.jar]]></string>
+ </property>
+ <property name="overrideUnixPermissions">
+ <boolean>false</boolean>
+ </property>
+ <property name="sourcePath">
+ <string><![CDATA[/homes/ws-dev1/jalview/lib/]]></string>
+ </property>
+ <property name="shouldUninstall">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledCancel">
+ <boolean>true</boolean>
+ </property>
+ <property name="rollbackEnabledError">
+ <boolean>true</boolean>
+ </property>
+ <property name="destinationName">
+ <string><![CDATA[jswingreader-0.3.jar]]></string>
+ </property>
+ <property name="fileSize">
+ <long>88615</long>
+ </property>
+ <property name="macBinary">
+ <boolean>false</boolean>
+ </property>
+ <property name="targetCheckKind">
+ <int>0</int>
+ </property>
+ </object>
+ </method>
</object>
</property>
<property name="rulesFailedMessage">
<boolean>true</boolean>
</property>
<property name="buildOutputLocation">
- <string><![CDATA[/cluster/gjb_lab/NOBACK/fc/ws-dev1/live/cruisecontrol/NOBACK/checkout/jalview/utils/InstallAnywhere/Jalview_Build_Output]]></string>
+ <string><![CDATA[/homes/ws-dev1/jalview/utils/InstallAnywhere/Jalview_Build_Output]]></string>
</property>
<property name="relatedProjectSettings">
<object class="com.zerog.ia.installer.RelatedProjectSettings" objectID="97f2363da6ac">
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.project.build.last.date]]></string>
- <string><![CDATA[January 12, 2011 9:59:23 PM GMT]]></string>
+ <string><![CDATA[September 26, 2011 2:23:40 PM BST]]></string>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.build.platform.windows.vm]]></string>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.project.save.last.date]]></string>
- <string><![CDATA[January 12, 2011 9:59:23 PM GMT]]></string>
+ <string><![CDATA[September 26, 2011 2:26:49 PM BST]]></string>
</method>
<method name="put">
<string><![CDATA[com.zerog.ia.build.options.optimization.platform.cdrom]]></string>
<object refID="8fbb17529b9c"/>
<object refID="8fbb17539b9c"/>
<object refID="8fbb17529b9d"/>
+ <object refID="aa3a521fb6bc"/>
+ <object refID="aa3a5220b6bc"/>
+ <object refID="aa3a5220b6bc1"/>
<object class="com.zerog.ia.installer.actions.InstallDirectory" objectID="24485f85a670">
<property name="belongsToUninstallPhase">
<boolean>false</boolean>
<object refID="8fbb17529b9c"/>
<object refID="8fbb17539b9c"/>
<object refID="8fbb17529b9d"/>
+ <object refID="aa3a521fb6bc"/>
+ <object refID="aa3a5220b6bc"/>
+ <object refID="aa3a5220b6bc1"/>
</visualChildren>
</object>
</installChildren>
<?xml version="1.0"?>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+#*******************************************************************************
+# Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+# Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+#
+# This file is part of Jalview.
+#
+# 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.
+#
+# 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/>.
+#*******************************************************************************
#!/usr/bin/perl
+# Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+# Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+#
+# This file is part of Jalview.
+#
+# 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.
+#
+# 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/>.
+
use strict;
use warnings;
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
<html><head>
<!--
* Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
*
+#*******************************************************************************
+# Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+# Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+#
+# This file is part of Jalview.
+#
+# 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.
+#
+# 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/>.
+#*******************************************************************************
#!/usr/bin/perl
use strict;
+# Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+# Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+#
+# This file is part of Jalview.
+#
+# 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.
+#
+# 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/>.
+
+
# perverse script to get rid of unwanted jar signatures
use Cwd qw(abs_path);
use File::Temp qw(tempdir);
+#*******************************************************************************
+# Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+# Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+#
+# This file is part of Jalview.
+#
+# 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.
+#
+# 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/>.
+#*******************************************************************************
#!/bin/perl
use strict;
--- /dev/null
+#*******************************************************************************
+# Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+# Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+#
+# This file is part of Jalview.
+#
+# 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.
+#
+# 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/>.
+#*******************************************************************************
+#!/usr/bin/perl\r
+# Splits a concatenated set of Stockholm Files into several individual files.\r
+\r
+use strict;\r
+use FileHandle;\r
+my $ac;\r
+my $lns="";\r
+my $fh;\r
+while (<>) {\r
+ if ($_=~m!^//!) {\r
+ $fh->print("//\n");\r
+ $fh->close();\r
+ $ac = undef;\r
+ $lns = "";\r
+ } else {\r
+ if ($_=~/GF\s+AC\s+([0-9.RPF]+)/) { \r
+ $ac=$1; \r
+ ($fh=new FileHandle)->open(">$ac.stk") or die("Couldn't open file '$ac.stk'"); \r
+ $lns=~/^. STOCKHOLM 1.0/ or $fh->print("# STOCKHOLM 1.0\n");\r
+ };\r
+ if (defined($fh)) {\r
+ if (defined $lns) { \r
+ $fh->print($lns); $lns=undef; }\r
+ \r
+ $fh->print($_);\r
+ } else {\r
+ $lns .= $_;\r
+ }\r
+ }\r
+}\r