From 2c9763cd2221e919c42e5b38653fd383301986f9 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 11 Oct 2007 11:18:44 +0000 Subject: [PATCH] remove conflict on javascript api --- src/jalview/bin/JalviewLite.java | 58 +++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index c9977fd..c61c516 100755 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -48,9 +48,9 @@ public class JalviewLite */ public String getSelectedSequences() { - return getSelectedSequences(currentAlignFrame); + return getSelectedSequencesFrom(currentAlignFrame); } - public String getSelectedSequences(AlignFrame alf) + public String getSelectedSequencesFrom(AlignFrame alf) { StringBuffer result = new StringBuffer(""); @@ -71,17 +71,17 @@ public class JalviewLite public String getAlignment(String format) { - return getAlignment(currentAlignFrame, format, "true"); + return getAlignmentFrom(currentAlignFrame, format, "true"); } - public String getAlignment(AlignFrame alf, String format) + public String getAlignmentFrom(AlignFrame alf, String format) { - return getAlignment(alf, format, "true"); + return getAlignmentFrom(alf, format, "true"); } public String getAlignment(String format, String suffix) { - return getAlignment(currentAlignFrame, format, suffix); + return getAlignmentFrom(currentAlignFrame, format, suffix); } - public String getAlignment(AlignFrame alf, String format, String suffix) + public String getAlignmentFrom(AlignFrame alf, String format, String suffix) { try { @@ -100,9 +100,9 @@ public class JalviewLite public void loadAnnotation(String annotation) { - loadAnnotation(currentAlignFrame, annotation); + loadAnnotationFrom(currentAlignFrame, annotation); } - public void loadAnnotation(AlignFrame alf, String annotation) + public void loadAnnotationFrom(AlignFrame alf, String annotation) { if (new AnnotationFile().readAnnotationFile( alf.getAlignViewport().getAlignment(), annotation, @@ -119,34 +119,34 @@ public class JalviewLite public String getFeatures(String format) { - return getFeatures(currentAlignFrame, format); + return getFeaturesFrom(currentAlignFrame, format); } - public String getFeatures(AlignFrame alf, String format) + public String getFeaturesFrom(AlignFrame alf, String format) { return alf.outputFeatures(false, format); } public String getAnnotation() { - return getAnnotation(currentAlignFrame); + return getAnnotationFrom(currentAlignFrame); } - public String getAnnotation(AlignFrame alf) + public String getAnnotationFrom(AlignFrame alf) { return alf.outputAnnotations(false); } public AlignFrame newView() { - return newView(currentAlignFrame); + return newViewFrom(currentAlignFrame); } public AlignFrame newView(String name) { - return newView(currentAlignFrame, name); + return newViewFrom(currentAlignFrame, name); } - public AlignFrame newView(AlignFrame alf) + public AlignFrame newViewFrom(AlignFrame alf) { return alf.newView(null); } - public AlignFrame newView(AlignFrame alf, String name) + public AlignFrame newViewFrom(AlignFrame alf, String name) { return alf.newView(name); } @@ -797,7 +797,16 @@ public class JalviewLite String lst = ArraytotabbedList(currentAlignFrame.getFeatureGroups()); return lst; } - + /** + * @param alf alignframe to get feature groups on + * @return + * @see jalview.appletgui.AlignFrame#getFeatureGroups() + */ + public String getFeatureGroupsOn(AlignFrame alf) + { + String lst = ArraytotabbedList(alf.getFeatureGroups()); + return lst; + } /** * @param visible * @return @@ -808,17 +817,26 @@ public class JalviewLite return ArraytotabbedList(currentAlignFrame.getFeatureGroupsOfState(visible)); } /** + * @param alf align frame to get groups of state visible + * @param visible + * @return + * @see jalview.appletgui.AlignFrame#getFeatureGroupsOfState(boolean) + */ + public String getFeatureGroupsOfStateOn(AlignFrame alf, boolean visible) + { + return ArraytotabbedList(alf.getFeatureGroupsOfState(visible)); + } /** * @param groups tab separated list of group names * @param state true or false * @see jalview.appletgui.AlignFrame#setFeatureGroupState(java.lang.String[], boolean) */ - public void setFeatureGroupState(AlignFrame alf, String groups, boolean state) + public void setFeatureGroupStateOn(AlignFrame alf, String groups, boolean state) { boolean st = state;//!(state==null || state.equals("") || state.toLowerCase().equals("false")); alf.setFeatureGroupState(tabbedListToArray(groups), st); } public void setFeatureGroupState(String groups, boolean state) { - setFeatureGroupState(currentAlignFrame, groups, state); + setFeatureGroupStateOn(currentAlignFrame, groups, state); } } -- 1.7.10.2