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;
30 /** a class to keep track of location information for a feature */
31 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();
65 /** returns true if the specified sequence position is within the range of this Segment
67 * @param seqPosition the position to check
68 * @return true if seqPos >= start && seqPos <= end
70 public boolean overlaps(int seqPosition);
72 /** tests if two segments are overlapping
74 * @param segment to compare with
75 * @return true if segments overlap
77 public boolean overlaps(Segment segment);