JAL-3187 basic first version for tooltips only (rendering yet to do)
[jalview.git] / src / jalview / api / ViewStyleI.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
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
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.api;
22
23 import java.awt.Color;
24
25 public interface ViewStyleI
26 {
27   void setShowComplementFeatures(boolean b);
28
29   boolean isShowComplementFeatures();
30
31   void setColourAppliesToAllGroups(boolean b);
32
33   boolean getColourAppliesToAllGroups();
34
35   boolean getAbovePIDThreshold();
36
37   void setIncrement(int inc);
38
39   int getIncrement();
40
41   boolean getConservationSelected();
42
43   void setConservationSelected(boolean b);
44
45   void setShowHiddenMarkers(boolean show);
46
47   boolean getShowHiddenMarkers();
48
49   void setScaleRightWrapped(boolean b);
50
51   void setScaleLeftWrapped(boolean b);
52
53   void setScaleAboveWrapped(boolean b);
54
55   boolean getScaleLeftWrapped();
56
57   boolean getScaleAboveWrapped();
58
59   boolean getScaleRightWrapped();
60
61   void setAbovePIDThreshold(boolean b);
62
63   void setThreshold(int thresh);
64
65   int getThreshold();
66
67   boolean getShowJVSuffix();
68
69   void setShowJVSuffix(boolean b);
70
71   void setWrapAlignment(boolean state);
72
73   void setShowText(boolean state);
74
75   void setRenderGaps(boolean state);
76
77   boolean getColourText();
78
79   void setColourText(boolean state);
80
81   void setShowBoxes(boolean state);
82
83   boolean getWrapAlignment();
84
85   boolean getShowText();
86
87   int getWrappedWidth();
88
89   void setWrappedWidth(int w);
90
91   int getCharHeight();
92
93   void setCharHeight(int h);
94
95   int getCharWidth();
96
97   void setCharWidth(int w);
98
99   boolean getShowBoxes();
100
101   boolean getShowUnconserved();
102
103   void setShowUnconserved(boolean showunconserved);
104
105   /**
106    * @return true if a reference sequence is set and should be displayed
107    */
108   boolean isDisplayReferenceSeq();
109
110   /**
111    * @return set the flag for displaying reference sequences when they are
112    *         available
113    */
114   void setDisplayReferenceSeq(boolean displayReferenceSeq);
115
116   /**
117    * @return true if colourschemes should render according to reference sequence
118    *         rather than consensus if available
119    */
120   boolean isColourByReferenceSeq();
121
122   void setSeqNameItalics(boolean default1);
123
124   void setShowSequenceFeatures(boolean b);
125
126   boolean isShowSequenceFeatures();
127
128   boolean isRightAlignIds();
129
130   void setRightAlignIds(boolean rightAlignIds);
131
132   /**
133    * Returns true if annotation panel should be shown below alignment
134    * 
135    * @return
136    */
137   boolean isShowAnnotation();
138
139   /**
140    * Set flag for whether annotation panel should be shown below alignment
141    * 
142    * @param b
143    */
144   void setShowAnnotation(boolean b);
145
146   void setShowSequenceFeaturesHeight(boolean selected);
147
148   /**
149    * @return true set flag for deciding if colourschemes should render according
150    *         to reference sequence rather than consensus if available
151    */
152   void setColourByReferenceSeq(boolean colourByReferenceSeq);
153
154   Color getTextColour();
155
156   Color getTextColour2();
157
158   int getThresholdTextColour();
159
160   boolean isConservationColourSelected();
161
162   boolean isRenderGaps();
163
164   boolean isShowColourText();
165
166   boolean isShowSequenceFeaturesHeight();
167
168   void setConservationColourSelected(boolean conservationColourSelected);
169
170   void setShowColourText(boolean showColourText);
171
172   void setTextColour(Color textColour);
173
174   void setThresholdTextColour(int thresholdTextColour);
175
176   void setTextColour2(Color textColour2);
177
178   boolean isSeqNameItalics();
179
180   void setUpperCasebold(boolean upperCasebold);
181
182   boolean isUpperCasebold();
183
184   boolean sameStyle(ViewStyleI them);
185
186   void setFontName(String name);
187
188   void setFontStyle(int style);
189
190   void setFontSize(int size);
191
192   int getFontStyle();
193
194   String getFontName();
195
196   int getFontSize();
197
198   /**
199    * @return width of Sequence and Annotation ID margin. If less than zero, then
200    *         width will be autocalculated
201    */
202   int getIdWidth();
203
204   /**
205    * Set width if
206    * 
207    * @param i
208    */
209
210   void setIdWidth(int i);
211
212   /**
213    * centre columnar annotation labels in displayed alignment annotation
214    */
215   boolean isCentreColumnLabels();
216
217   /**
218    * centre columnar annotation labels in displayed alignment annotation
219    */
220   void setCentreColumnLabels(boolean centreColumnLabels);
221
222   /**
223    * enable or disable the display of Database Cross References in the sequence
224    * ID tooltip
225    */
226   void setShowDBRefs(boolean showdbrefs);
227
228   /**
229    * 
230    * @return true if Database References are to be displayed on tooltips.
231    */
232   boolean isShowDBRefs();
233
234   /**
235    * 
236    * @return true if Non-positional features are to be displayed on tooltips.
237    */
238   boolean isShowNPFeats();
239
240   /**
241    * enable or disable the display of Non-Positional sequence features in the
242    * sequence ID tooltip
243    * 
244    * @param show
245    */
246   void setShowNPFeats(boolean shownpfeats);
247
248   /**
249    * Get flag to scale protein residues 3 times the width of cDNA bases (only
250    * applicable in SplitFrame views)
251    * 
252    * @return
253    */
254   boolean isScaleProteinAsCdna();
255
256   /**
257    * Set flag to scale protein residues 3 times the width of cDNA bases (only
258    * applicable in SplitFrame views)
259    * 
260    * @return
261    */
262   void setScaleProteinAsCdna(boolean b);
263
264   /**
265    * Answers true if split screen protein and cDNA use the same font
266    * 
267    * @return
268    */
269   boolean isProteinFontAsCdna();
270
271   /**
272    * Set the flag for whether split screen protein and cDNA use the same font
273    * 
274    * @return
275    */
276   void setProteinFontAsCdna(boolean b);
277 }