f2a0bb6eb1783d4ab0205e2f58107e1d54c7387a
[jalview.git] / src / org / biojava / dasobert / feature / Segment.java
1 /*
2  *                    BioJava development code
3  *
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,
7  * see:
8  *
9  *      http://www.gnu.org/copyleft/lesser.html
10  *
11  * Copyright for this code is held jointly by the individual
12  * authors.  These should be listed in @author doc comments.
13  *
14  * For more information on the BioJava project and its aims,
15  * or to join the biojava-l mailing list, visit the home page
16  * at:
17  *
18  *      http://www.biojava.org/
19  *
20  * Created on 22.09.2004
21  * @author Andreas Prlic
22  *
23  */
24
25 package org.biojava.dasobert.feature ;
26
27 import java.awt.Color;
28
29
30 /** a class to keep track of location information for a feature */
31 public interface Segment  {
32   
33         public Object clone();
34         
35         public  String toString();
36
37         public  String getNote();
38
39         public  void setNote(String note);
40
41         public  void setStart(int strt);
42
43         public  int getStart();
44
45         public  void setEnd(int ed);
46
47         public  int getEnd();
48
49         public  void setName(String nam);
50
51         public  String getName();
52
53         public  void setColor(Color col);
54
55         public  Color getColor();
56
57         public  void setParent(FeatureTrack f);
58
59         public  FeatureTrack getParent();
60
61         public  void setTxtColor(String str);
62
63         public  String getTxtColor();
64
65         /** returns true if the specified sequence position is within the range of this Segment
66          * 
67          * @param seqPosition the position to check
68          * @return true if seqPos >= start && seqPos <= end
69          */
70         public  boolean overlaps(int seqPosition);
71
72         /** tests if two segments are overlapping
73          * 
74          * @param segment to compare with
75          * @return true if segments overlap
76          */
77         public  boolean overlaps(Segment segment);
78
79     
80 }