From 3c900dfc85fe55b1dcefd318acee9a34f701b8bd Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 2 Oct 2007 16:01:39 +0000 Subject: [PATCH] convenience constructor for duplicating an annotation and editing it for hidden columns --- src/jalview/datamodel/AlignmentAnnotation.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 87c113f..b59417a 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -656,6 +656,21 @@ Loading... this(label, description, null); setScore(score); } + /** + * copy constructor with edit based on the hidden columns marked in colSel + * @param alignmentAnnotation + * @param colSel + */ + public AlignmentAnnotation(AlignmentAnnotation alignmentAnnotation, + ColumnSelection colSel) + { + this(alignmentAnnotation); + if (annotations==null) + { + return; + } + colSel.makeVisibleAnnotation(this); + } public void setPadGaps(boolean padgaps, char gapchar) { -- 1.7.10.2