db82dcf213af185adbea7f7b353811899382085d
[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
28   void setColourAppliesToAllGroups(boolean b);
29
30   boolean getColourAppliesToAllGroups();
31
32   boolean getAbovePIDThreshold();
33
34   void setIncrement(int inc);
35
36   int getIncrement();
37
38   boolean getConservationSelected();
39
40   void setConservationSelected(boolean b);
41
42   void setShowHiddenMarkers(boolean show);
43
44   boolean getShowHiddenMarkers();
45
46   void setScaleRightWrapped(boolean b);
47
48   void setScaleLeftWrapped(boolean b);
49
50   void setScaleAboveWrapped(boolean b);
51
52   boolean getScaleLeftWrapped();
53
54   boolean getScaleAboveWrapped();
55
56   boolean getScaleRightWrapped();
57
58   void setAbovePIDThreshold(boolean b);
59
60   void setThreshold(int thresh);
61
62   int getThreshold();
63
64   boolean getShowJVSuffix();
65
66   void setShowJVSuffix(boolean b);
67
68   void setWrapAlignment(boolean state);
69
70   void setShowText(boolean state);
71
72   void setRenderGaps(boolean state);
73
74   boolean getColourText();
75
76   void setColourText(boolean state);
77
78   void setShowBoxes(boolean state);
79
80   boolean getWrapAlignment();
81
82   boolean getShowText();
83
84   int getWrappedWidth();
85
86   void setWrappedWidth(int w);
87
88   int getCharHeight();
89
90   void setCharHeight(int h);
91
92   int getCharWidth();
93
94   void setCharWidth(int w);
95
96   boolean getShowBoxes();
97
98   boolean getShowUnconserved();
99
100   void setShowUnconserved(boolean showunconserved);
101
102   /**
103    * @return true if a reference sequence is set and should be displayed
104    */
105   boolean isDisplayReferenceSeq();
106
107   /**
108    * @return set the flag for displaying reference sequences when they are
109    *         available
110    */
111   void setDisplayReferenceSeq(boolean displayReferenceSeq);
112
113   /**
114    * @return true if colourschemes should render according to reference sequence
115    *         rather than consensus if available
116    */
117   boolean isColourByReferenceSeq();
118
119   void setSeqNameItalics(boolean default1);
120
121   void setShowSequenceFeatures(boolean b);
122
123   boolean isShowSequenceFeatures();
124
125   boolean isRightAlignIds();
126
127   void setRightAlignIds(boolean rightAlignIds);
128
129   /**
130    * Returns true if annotation panel should be shown below alignment
131    * 
132    * @return
133    */
134   boolean isShowAnnotation();
135
136   /**
137    * Set flag for whether annotation panel should be shown below alignment
138    * 
139    * @param b
140    */
141   void setShowAnnotation(boolean b);
142
143   void setShowSequenceFeaturesHeight(boolean selected);
144
145   /**
146    * @return true set flag for deciding if colourschemes should render according
147    *         to reference sequence rather than consensus if available
148    */
149   void setColourByReferenceSeq(boolean colourByReferenceSeq);
150
151   Color getTextColour();
152
153   Color getTextColour2();
154
155   int getThresholdTextColour();
156
157   boolean isConservationColourSelected();
158
159   boolean isRenderGaps();
160
161   boolean isShowColourText();
162
163   boolean isShowSequenceFeaturesHeight();
164
165   void setConservationColourSelected(boolean conservationColourSelected);
166
167   void setShowColourText(boolean showColourText);
168
169   void setTextColour(Color textColour);
170
171   void setThresholdTextColour(int thresholdTextColour);
172
173   void setTextColour2(Color textColour2);
174
175   boolean isSeqNameItalics();
176
177   void setUpperCasebold(boolean upperCasebold);
178
179   boolean isUpperCasebold();
180
181   boolean sameStyle(ViewStyleI them);
182
183   void setFontName(String name);
184
185   void setFontStyle(int style);
186
187   void setFontSize(int size);
188
189   int getFontStyle();
190
191   String getFontName();
192
193   int getFontSize();
194
195   /**
196    * @return width of Sequence and Annotation ID margin. If less than zero, then
197    *         width will be autocalculated
198    */
199   int getIdWidth();
200
201   /**
202    * Set width if
203    * 
204    * @param i
205    */
206
207   void setIdWidth(int i);
208
209   /**
210    * centre columnar annotation labels in displayed alignment annotation
211    */
212   boolean isCentreColumnLabels();
213
214   /**
215    * centre columnar annotation labels in displayed alignment annotation
216    */
217   void setCentreColumnLabels(boolean centreColumnLabels);
218
219   /**
220    * enable or disable the display of Database Cross References in the sequence
221    * ID tooltip
222    */
223   void setShowDBRefs(boolean showdbrefs);
224
225   /**
226    * 
227    * @return true if Database References are to be displayed on tooltips.
228    */
229   boolean isShowDBRefs();
230
231   /**
232    * 
233    * @return true if Non-positional features are to be displayed on tooltips.
234    */
235   boolean isShowNPFeats();
236
237   /**
238    * enable or disable the display of Non-Positional sequence features in the
239    * sequence ID tooltip
240    * 
241    * @param show
242    */
243   void setShowNPFeats(boolean shownpfeats);
244
245   /**
246    * Get flag to scale protein residues 3 times the width of cDNA bases (only
247    * applicable in SplitFrame views)
248    * 
249    * @return
250    */
251   boolean isScaleProteinAsCdna();
252
253   /**
254    * Set flag to scale protein residues 3 times the width of cDNA bases (only
255    * applicable in SplitFrame views)
256    * 
257    * @return
258    */
259   void setScaleProteinAsCdna(boolean b);
260 }