2 * BioJava development code
4 * This code may be freely distributed and modified under the
5 * terms of the GNU Lesser General Public Licence. This should
6 * be distributed with the code. If you do not have a copy,
9 * http://www.gnu.org/copyleft/lesser.html
11 * Copyright for this code is held jointly by the individual
12 * authors. These should be listed in @author doc comments.
14 * For more information on the BioJava project and its aims,
15 * or to join the biojava-l mailing list, visit the home page
18 * http://www.biojava.org/
20 * Created on 22.09.2004
21 * @author Andreas Prlic
25 package org.biojava.dasobert.feature;
27 import java.awt.Color;
29 /** a class to keep track of location information for a feature */
30 public interface Segment
33 public Object clone();
35 public String toString();
37 public String getNote();
39 public void setNote(String note);
41 public void setStart(int strt);
43 public int getStart();
45 public void setEnd(int ed);
49 public void setName(String nam);
51 public String getName();
53 public void setColor(Color col);
55 public Color getColor();
57 public void setParent(FeatureTrack f);
59 public FeatureTrack getParent();
61 public void setTxtColor(String str);
63 public String getTxtColor();
66 * returns true if the specified sequence position is within the range of this
70 * the position to check
71 * @return true if seqPos >= start && seqPos <= end
73 public boolean overlaps(int seqPosition);
76 * tests if two segments are overlapping
80 * @return true if segments overlap
82 public boolean overlaps(Segment segment);