From: jprocter Date: Tue, 17 Mar 2009 16:57:34 +0000 (+0000) Subject: sortbytree view setting and action added - setting is not yet stored in the jalview xml X-Git-Tag: Release_2_5~330 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=40f08a931412edd1bc0e776033792fe3d4c0a5fa;p=jalview.git sortbytree view setting and action added - setting is not yet stored in the jalview xml --- diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index b90d89b..19ec9e0 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -184,6 +184,8 @@ public class AlignViewport implements SelectionSource Hashtable hiddenRepSequences; + boolean sortByTree; + /** * Creates a new AlignViewport object. * @@ -374,13 +376,14 @@ public class AlignViewport implements SelectionSource wrapAlignment = jalview.bin.Cache.getDefault("WRAP_ALIGNMENT", false); showUnconserved = jalview.bin.Cache.getDefault("SHOW_UNCONSERVED", false); + sortByTree = jalview.bin.Cache.getDefault("SORT_BY_TREE", false); } /** - * DOCUMENT ME! + * set the flag * * @param b - * DOCUMENT ME! + * features are displayed if true */ public void setShowSequenceFeatures(boolean b) { @@ -2207,4 +2210,30 @@ public class AlignViewport implements SelectionSource { showUnconserved=showunconserved; } + /** + * return the alignPanel containing the given viewport. Use this to get the + * components currently handling the given viewport. + * @param av + * @return null or an alignPanel guaranteed to have non-null alignFrame reference + */ + public AlignmentPanel getAlignPanel() + { + AlignmentPanel[] aps = PaintRefresher.getAssociatedPanels(this.getSequenceSetId()); + AlignmentPanel ap=null; + for (int p=0;aps!=null && p