X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjavascript%2FJalviewLiteJsApi.java;h=b5811aa52d91adc4a2c2e53fc3ea8278fe59491f;hb=a7169b1c72607f3c9357195b4999869650a2a891;hp=f849dc3782ffc5e7fdc475992c6d8a65052dee3d;hpb=697f55e4ef253fd00f8520e9f43df5e719b8f1b3;p=jalview.git
diff --git a/src/jalview/javascript/JalviewLiteJsApi.java b/src/jalview/javascript/JalviewLiteJsApi.java
index f849dc3..b5811aa 100644
--- a/src/jalview/javascript/JalviewLiteJsApi.java
+++ b/src/jalview/javascript/JalviewLiteJsApi.java
@@ -1,20 +1,23 @@
-/*******************************************************************************
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
- * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
- *
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
* 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.
- *
+ * 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 .
- *******************************************************************************/
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.javascript;
import jalview.appletgui.AlignFrame;
@@ -32,7 +35,7 @@ import jalview.appletgui.AlignFrame;
/**
* @author jimp
- *
+ *
*/
public interface JalviewLiteJsApi
{
@@ -70,7 +73,8 @@ public interface JalviewLiteJsApi
* @return String list of selected sequence IDs, each terminated by the given
* separator
*/
- public abstract String getSelectedSequencesFrom(AlignFrame alf, String sep);
+ public abstract String getSelectedSequencesFrom(AlignFrame alf,
+ String sep);
/**
*
@@ -117,7 +121,8 @@ public interface JalviewLiteJsApi
* @param sep
* separator between toselect fields
*/
- public abstract void select(String sequenceIds, String columns, String sep);
+ public abstract void select(String sequenceIds, String columns,
+ String sep);
/**
* select regions of the given alignment frame
@@ -172,35 +177,46 @@ public interface JalviewLiteJsApi
* @return selected sequences as flat file or empty string if there was no
* current selection
*/
- public abstract String getSelectedSequencesAsAlignmentFrom(
- AlignFrame alf, String format, String suffix);
+ public abstract String getSelectedSequencesAsAlignmentFrom(AlignFrame alf,
+ String format, String suffix);
/**
- * get a separator separated list of sequence IDs reflecting the order of the current alignment
+ * get a separator separated list of sequence IDs reflecting the order of the
+ * current alignment
+ *
* @return
*/
public abstract String getAlignmentOrder();
+
/**
- * get a separator separated list of sequence IDs reflecting the order of the alignment in alf
- *
+ * get a separator separated list of sequence IDs reflecting the order of the
+ * alignment in alf
+ *
* @param alf
* @return
*/
public abstract String getAlignmentOrderFrom(AlignFrame alf);
/**
- * get a sep separated list of sequence IDs reflecting the order of the alignment in alf
+ * get a sep separated list of sequence IDs reflecting the order of the
+ * alignment in alf
*
* @param alf
- * @param sep - separator to use
+ * @param sep
+ * - separator to use
* @return
*/
public abstract String getAlignmentOrderFrom(AlignFrame alf, String sep);
+
/**
* re-order the current alignment using the given list of sequence IDs
- * @param order - sep separated list
- * @param undoName - string to use when referring to ordering action in undo buffer
- * @return 'true' if alignment was actually reordered. empty string if alignment did not contain sequences.
+ *
+ * @param order
+ * - sep separated list
+ * @param undoName
+ * - string to use when referring to ordering action in undo buffer
+ * @return 'true' if alignment was actually reordered. empty string if
+ * alignment did not contain sequences.
*/
public abstract String orderBy(String order, String undoName);
@@ -213,13 +229,14 @@ public interface JalviewLiteJsApi
* @param undoName
* - string to use when referring to ordering action in undo buffer
* @param sep
- * @return 'true' if alignment was actually reordered. empty string if alignment did not contain sequences.
+ * @return 'true' if alignment was actually reordered. empty string if
+ * alignment did not contain sequences.
*/
public abstract String orderBy(String order, String undoName, String sep);
/**
- * re-order the given alignment using the given list of sequence IDs
- * separated by sep
+ * re-order the given alignment using the given list of sequence IDs separated
+ * by sep
*
* @param alf
* @param order
@@ -227,13 +244,16 @@ public interface JalviewLiteJsApi
* @param undoName
* - string to use when referring to ordering action in undo buffer
* @param sep
- * @return 'true' if alignment was actually reordered. empty string if alignment did not contain sequences.
+ * @return 'true' if alignment was actually reordered. empty string if
+ * alignment did not contain sequences.
*/
public abstract String orderAlignmentBy(AlignFrame alf, String order,
String undoName, String sep);
/**
- * get alignment as format (format names FASTA, BLC, CLUSTAL, MSF, PILEUP, PFAM - see jalview.io.AppletFormatAdapter for full list)
+ * get alignment as format (format names FASTA, BLC, CLUSTAL, MSF, PILEUP,
+ * PFAM - see jalview.io.AppletFormatAdapter for full list)
+ *
* @param format
* @return
*/
@@ -241,6 +261,7 @@ public interface JalviewLiteJsApi
/**
* get alignment displayed in alf as format
+ *
* @param alf
* @param format
* @return
@@ -249,6 +270,7 @@ public interface JalviewLiteJsApi
/**
* get alignment as format with jalview start-end sequence suffix appended
+ *
* @param format
* @param suffix
* @return
@@ -256,8 +278,9 @@ public interface JalviewLiteJsApi
public abstract String getAlignment(String format, String suffix);
/**
- * get alignment displayed in alf as format
- * with or without the jalview start-end sequence suffix appended
+ * get alignment displayed in alf as format with or without the jalview
+ * start-end sequence suffix appended
+ *
* @param alf
* @param format
* @param suffix
@@ -268,35 +291,51 @@ public interface JalviewLiteJsApi
/**
* add the given features or annotation to the current alignment
+ *
* @param annotation
*/
public abstract void loadAnnotation(String annotation);
/**
* add the given features or annotation to the given alignment view
+ *
* @param alf
* @param annotation
*/
- public abstract void loadAnnotationFrom(AlignFrame alf, String annotation);
+ public abstract void loadAnnotationFrom(AlignFrame alf,
+ String annotation);
/**
- * parse the given string as a jalview feature or GFF annotation file and optionally enable feature display on the current alignFrame
- * @param features - gff or features file
- * @param autoenabledisplay - when true, feature display will be enabled if any features can be parsed from the string.
+ * parse the given string as a jalview feature or GFF annotation file and
+ * optionally enable feature display on the current alignFrame
+ *
+ * @param features
+ * - gff or features file
+ * @param autoenabledisplay
+ * - when true, feature display will be enabled if any features can
+ * be parsed from the string.
*/
- public abstract void loadFeatures(String features, boolean autoenabledisplay);
+ public abstract void loadFeatures(String features,
+ boolean autoenabledisplay);
/**
- * parse the given string as a jalview feature or GFF annotation file and optionally enable feature display on the given alignFrame.
+ * parse the given string as a jalview feature or GFF annotation file and
+ * optionally enable feature display on the given alignFrame.
+ *
* @param alf
- * @param features - gff or features file
- * @param autoenabledisplay - when true, feature display will be enabled if any features can be parsed from the string.
+ * @param features
+ * - gff or features file
+ * @param autoenabledisplay
+ * - when true, feature display will be enabled if any features can
+ * be parsed from the string.
* @return true if data parsed as features
*/
- public abstract boolean loadFeaturesFrom(AlignFrame alf, String features, boolean autoenabledisplay);
+ public abstract boolean loadFeaturesFrom(AlignFrame alf, String features,
+ boolean autoenabledisplay);
/**
* get the sequence features in the given format (Jalview or GFF)
+ *
* @param format
* @return
*/
@@ -304,6 +343,7 @@ public interface JalviewLiteJsApi
/**
* get the sequence features in alf in the given format (Jalview or GFF)
+ *
* @param alf
* @param format
* @return
@@ -312,12 +352,14 @@ public interface JalviewLiteJsApi
/**
* get current alignment's annotation as an annotation file
+ *
* @return
*/
public abstract String getAnnotation();
/**
* get alignment view alf's annotation as an annotation file
+ *
* @param alf
* @return
*/
@@ -325,12 +367,14 @@ public interface JalviewLiteJsApi
/**
* create a new view and return the alignFrame instance
+ *
* @return
*/
public abstract AlignFrame newView();
/**
* create a new view named name and return the alignFrame instance
+ *
* @param name
* @return
*/
@@ -338,6 +382,7 @@ public interface JalviewLiteJsApi
/**
* create a new view on alf and return the alignFrame instance
+ *
* @param alf
* @return
*/
@@ -345,6 +390,7 @@ public interface JalviewLiteJsApi
/**
* create a new view named name on alf
+ *
* @param alf
* @param name
* @return
@@ -363,32 +409,56 @@ public interface JalviewLiteJsApi
/**
* register a javascript function to handle any alignment mouseover events
- * @param listener name of javascript function (called with arguments [jalview.appletgui.AlignFrame,String(sequence id),String(column in alignment), String(position in sequence)]
+ *
+ * @param listener
+ * name of javascript function (called with arguments
+ * [jalview.appletgui.AlignFrame,String(sequence id),String(column in
+ * alignment), String(position in sequence)]
*/
public abstract void setMouseoverListener(String listener);
/**
* register a javascript function to handle mouseover events
- * @param af (null or specific alignframe for which events are to be listened for)
- * @param listener name of javascript function
+ *
+ * @param af
+ * (null or specific alignframe for which events are to be listened
+ * for)
+ * @param listener
+ * name of javascript function
*/
public abstract void setMouseoverListener(AlignFrame af, String listener);
/**
- * register a javascript function to handle any alignment selection events. Events are generated when the user completes a selection event, or when the user deselects all selected regions.
- * @param listener name of javascript function (called with arguments [jalview.appletgui.AlignFrame, String(sequence set id), String(separator separated list of sequences which were selected), String(separator separated list of column ranges (i.e. single number or hyphenated range) that were selected)]
+ * register a javascript function to handle any alignment selection events.
+ * Events are generated when the user completes a selection event, or when the
+ * user deselects all selected regions.
+ *
+ * @param listener
+ * name of javascript function (called with arguments
+ * [jalview.appletgui.AlignFrame, String(sequence set id),
+ * String(separator separated list of sequences which were selected),
+ * String(separator separated list of column ranges (i.e. single
+ * number or hyphenated range) that were selected)]
*/
public abstract void setSelectionListener(String listener);
public abstract void setSelectionListener(AlignFrame af, String listener);
/**
- * register a javascript function to handle events normally routed to a Jmol structure viewer.
- * @param listener - javascript function (arguments are variable, see jalview.javascript.MouseOverStructureListener for full details)
- * @param modelSet - separator separated list of PDB file URIs that this viewer is handling. These files must be in the same order they appear in Jmol (e.g. first one is frame 1, second is frame 2, etc).
- @see jalview.javascript.MouseOverStructureListener
+ * register a javascript function to handle events normally routed to a Jmol
+ * structure viewer.
+ *
+ * @param listener
+ * - javascript function (arguments are variable, see
+ * jalview.javascript.MouseOverStructureListener for full details)
+ * @param modelSet
+ * - separator separated list of PDB file URIs that this viewer is
+ * handling. These files must be in the same order they appear in
+ * Jmol (e.g. first one is frame 1, second is frame 2, etc).
+ * @see jalview.javascript.MouseOverStructureListener
*/
- public abstract void setStructureListener(String listener, String modelSet);
+ public abstract void setStructureListener(String listener,
+ String modelSet);
/**
* remove any callback using the given listener function and associated with
@@ -433,7 +503,8 @@ public interface JalviewLiteJsApi
String pdbEntryString, String pdbFile);
/**
- * adjust horizontal/vertical scroll to make the given location the top left hand corner for the given view
+ * adjust horizontal/vertical scroll to make the given location the top left
+ * hand corner for the given view
*
* @param alf
* @param topRow
@@ -441,6 +512,7 @@ public interface JalviewLiteJsApi
*/
public abstract void scrollViewToIn(AlignFrame alf, String topRow,
String leftHandColumn);
+
/**
* adjust vertical scroll to make the given row the top one for given view
*
@@ -448,13 +520,16 @@ public interface JalviewLiteJsApi
* @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
+ * 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);
+ public abstract void scrollViewToColumnIn(AlignFrame alf,
+ String leftHandColumn);
/**
*
@@ -496,8 +571,8 @@ public interface JalviewLiteJsApi
* @see jalview.appletgui.AlignFrame#setFeatureGroupState(java.lang.String[],
* boolean)
*/
- public abstract void setFeatureGroupStateOn(AlignFrame alf,
- String groups, boolean state);
+ public abstract void setFeatureGroupStateOn(AlignFrame alf, String groups,
+ boolean state);
public abstract void setFeatureGroupState(String groups, boolean state);
@@ -518,10 +593,11 @@ public interface JalviewLiteJsApi
/**
* Retrieve fragments of a large packet of data made available by JalviewLite.
+ *
* @param messageclass
* @param viewId
* @return next chunk of message
*/
public abstract String getJsMessage(String messageclass, String viewId);
-}
\ No newline at end of file
+}