2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
18 package jalview.datamodel;
21 import java.util.ArrayList;
23 import fr.orsay.lri.varna.models.rna.RNA;
31 public class Annotation
34 public String displayCharacter = "";
37 public String description = ""; // currently used as mouse over
40 public char secondaryStructure = ' '; // recognises H, E and S(?)
47 // add visual cues here
53 * Creates a new Annotation object.
64 public Annotation(String displayChar, String desc, char ss, float val)
66 displayCharacter = displayChar;
68 secondaryStructure = ss;
74 * Creates a new Annotation object.
87 public Annotation(String displayChar, String desc, char ss, float val,
90 this(displayChar, desc, ss, val);
95 * Copy constructor New annotation takes on the same (or duplicated)
96 * attributes as the given template
101 public Annotation(Annotation that)
103 if (that == null || this == that)
107 if (that.displayCharacter != null)
108 displayCharacter = new String(that.displayCharacter);
109 if (that.description != null)
110 description = new String(that.description);
111 secondaryStructure = that.secondaryStructure;
113 colour = that.colour;
118 * Value only annotation.
121 * value at this annotation position
123 public Annotation(float val)
125 this(null, null, ' ', val,null);