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