JAL-4071 boring GUI bits - add togglable menu item for show/hide sequence feature...
[jalview.git] / src / jalview / viewmodel / styles / ViewStyle.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.viewmodel.styles;
22
23 import java.awt.Color;
24
25 import jalview.api.ViewStyleI;
26
27 /**
28  * A container for holding alignment view properties. View properties are
29  * data-independent, which means they can be safely copied between views
30  * involving different alignment data without causing exceptions in the
31  * rendering system.
32  * 
33  * @author jprocter
34  *
35  */
36 public class ViewStyle implements ViewStyleI
37 {
38   private boolean abovePIDThreshold = false;
39
40   int charHeight;
41
42   int charWidth;
43
44   int idWidth = -1;
45
46   /**
47    * gui state - changes to colour scheme propagated to all groups
48    */
49   private boolean colourAppliesToAllGroups;
50
51   /**
52    * centre columnar annotation labels in displayed alignment annotation
53    */
54   boolean centreColumnLabels = false;
55
56   private boolean showdbrefs;
57
58   private boolean shownpfeats;
59
60   // --------END Structure Conservation
61
62   /**
63    * colour according to the reference sequence defined on the alignment
64    */
65   private boolean colourByReferenceSeq = false;
66
67   boolean conservationColourSelected = false;
68
69   /**
70    * show the reference sequence in the alignment view
71    */
72   private boolean displayReferenceSeq = false;
73
74   private int increment;
75
76   /**
77    * display gap characters
78    */
79   boolean renderGaps = true;
80
81   private boolean rightAlignIds = false;
82
83   boolean scaleAboveWrapped = false;
84
85   boolean scaleLeftWrapped = true;
86
87   boolean scaleRightWrapped = true;
88
89   boolean seqNameItalics;
90
91   /**
92    * show annotation tracks on the alignment
93    */
94   private boolean showAnnotation = true;
95
96   /**
97    * render each residue in a coloured box
98    */
99   boolean showBoxes = true;
100
101   /**
102    * Colour sequence text
103    */
104   boolean showColourText = false;
105
106   /**
107    * show blue triangles
108    */
109   boolean showHiddenMarkers = true;
110
111   /**
112    * show /start-end in ID panel
113    */
114   boolean showJVSuffix = true;
115
116   /**
117    * scale features height according to score
118    */
119   boolean showSeqFeaturesHeight;
120
121   /**
122    * display setting for showing/hiding sequence features on alignment view
123    */
124   boolean showSequenceFeatures = false;
125
126   /**
127    * display setting for showing/hiding annotation tracks reporting sequence
128    * feature counts in columns of alignment view
129    */
130   boolean showSequenceFeatureCounts = false;
131
132   /**
133    * display sequence symbols
134    */
135   boolean showText = true;
136
137   /**
138    * show non-conserved residues only
139    */
140   protected boolean showUnconserved = false;
141
142   Color textColour = Color.black;
143
144   Color textColour2 = Color.white;
145
146   /**
147    * PID or consensus threshold
148    */
149   int threshold;
150
151   /**
152    * threshold for switching between textColour & textColour2
153    */
154   int thresholdTextColour = 0;
155
156   /**
157    * upper case characters in sequence are shown in bold
158    */
159   boolean upperCasebold = false;
160
161   /**
162    * name of base font for view
163    */
164   private String fontName;
165
166   /**
167    * size for base font
168    */
169   private int fontSize;
170
171   /*
172    * If true, scale protein residues to 3 times width of cDNA bases (in
173    * SplitFrame views only)
174    */
175   private boolean scaleProteinAsCdna = true;
176
177   /*
178    * if true, font changes to protein or cDNA are applied to both
179    * sides of a split screen
180    */
181   private boolean proteinFontAsCdna = true;
182
183   /**
184    * Copy constructor
185    * 
186    * @param vs
187    */
188   public ViewStyle(ViewStyleI vs)
189   {
190     setAbovePIDThreshold(vs.getAbovePIDThreshold());
191     setCentreColumnLabels(vs.isCentreColumnLabels());
192     setCharHeight(vs.getCharHeight());
193     setCharWidth(vs.getCharWidth());
194     setColourAppliesToAllGroups(vs.getColourAppliesToAllGroups());
195     setColourByReferenceSeq(vs.isColourByReferenceSeq());
196     setColourText(vs.getColourText());
197     setConservationColourSelected(vs.isConservationColourSelected());
198     setConservationSelected(vs.getConservationSelected());
199     setDisplayReferenceSeq(vs.isDisplayReferenceSeq());
200     setFontName(vs.getFontName());
201     setFontSize(vs.getFontSize());
202     setFontStyle(vs.getFontStyle());
203     setIdWidth(vs.getIdWidth());
204     setIncrement(vs.getIncrement());
205     setRenderGaps(vs.isRenderGaps());
206     setRightAlignIds(vs.isRightAlignIds());
207     setScaleAboveWrapped(vs.getScaleAboveWrapped());
208     setScaleLeftWrapped(vs.getScaleLeftWrapped());
209     setScaleProteinAsCdna(vs.isScaleProteinAsCdna());
210     setProteinFontAsCdna(vs.isProteinFontAsCdna());
211     setScaleRightWrapped(vs.getScaleRightWrapped());
212     setSeqNameItalics(vs.isSeqNameItalics());
213     setShowAnnotation(vs.isShowAnnotation());
214     setShowBoxes(vs.getShowBoxes());
215     setShowColourText(vs.isShowColourText());
216     setShowDBRefs(vs.isShowDBRefs());
217     setShowHiddenMarkers(vs.getShowHiddenMarkers());
218     setShowJVSuffix(vs.getShowJVSuffix());
219     setShowNPFeats(vs.isShowNPFeats());
220     setShowSequenceFeaturesHeight(vs.isShowSequenceFeaturesHeight());
221     setShowSequenceFeatures(vs.isShowSequenceFeatures());
222     setShowComplementFeatures(vs.isShowComplementFeatures());
223     setShowComplementFeaturesOnTop(vs.isShowComplementFeaturesOnTop());
224     setShowText(vs.getShowText());
225     setShowUnconserved(vs.getShowUnconserved());
226     setTextColour(vs.getTextColour());
227     setTextColour2(vs.getTextColour2());
228     setThreshold(vs.getThreshold());
229     setThresholdTextColour(vs.getThresholdTextColour());
230     setUpperCasebold(vs.isUpperCasebold());
231     setWrapAlignment(vs.getWrapAlignment());
232     setWrappedWidth(vs.getWrappedWidth());
233     // ViewStyle.configureFrom(this, viewStyle);
234   }
235
236   public ViewStyle()
237   {
238   }
239
240   /**
241    * Returns true if all attributes of the ViewStyles have the same value
242    */
243   @Override
244   public boolean equals(Object other)
245   {
246     if (other == null || !(other instanceof ViewStyle))
247     {
248       return false;
249     }
250     ViewStyle vs = (ViewStyle) other;
251
252     boolean match = (getAbovePIDThreshold() == vs.getAbovePIDThreshold()
253             && isCentreColumnLabels() == vs.isCentreColumnLabels()
254             && getCharHeight() == vs.getCharHeight()
255             && getCharWidth() == vs.getCharWidth()
256             && getColourAppliesToAllGroups() == vs
257                     .getColourAppliesToAllGroups()
258             && isColourByReferenceSeq() == vs.isColourByReferenceSeq()
259             && getColourText() == vs.getColourText()
260             && isConservationColourSelected() == vs
261                     .isConservationColourSelected()
262             && getConservationSelected() == vs.getConservationSelected()
263             && isDisplayReferenceSeq() == vs.isDisplayReferenceSeq()
264             && getFontSize() == vs.getFontSize()
265             && getFontStyle() == vs.getFontStyle()
266             && getIdWidth() == vs.getIdWidth()
267             && getIncrement() == vs.getIncrement()
268             && isRenderGaps() == vs.isRenderGaps()
269             && isRightAlignIds() == vs.isRightAlignIds()
270             && getScaleAboveWrapped() == vs.getScaleAboveWrapped()
271             && getScaleLeftWrapped() == vs.getScaleLeftWrapped()
272             && isScaleProteinAsCdna() == vs.isScaleProteinAsCdna()
273             && isProteinFontAsCdna() == vs.isProteinFontAsCdna()
274             && getScaleRightWrapped() == vs.getScaleRightWrapped()
275             && isSeqNameItalics() == vs.isSeqNameItalics()
276             && isShowAnnotation() == vs.isShowAnnotation()
277             && getShowBoxes() == vs.getShowBoxes()
278             && isShowColourText() == vs.isShowColourText()
279             && isShowDBRefs() == vs.isShowDBRefs()
280             && getShowHiddenMarkers() == vs.getShowHiddenMarkers()
281             && getShowJVSuffix() == vs.getShowJVSuffix()
282             && isShowNPFeats() == vs.isShowNPFeats()
283             && isShowSequenceFeaturesHeight() == vs
284                     .isShowSequenceFeaturesHeight()
285             && isShowSequenceFeatures() == vs.isShowSequenceFeatures()
286             && isShowComplementFeatures() == vs.isShowComplementFeatures()
287             && isShowComplementFeaturesOnTop() == vs
288                     .isShowComplementFeaturesOnTop()
289             && getShowText() == vs.getShowText()
290             && getShowUnconserved() == vs.getShowUnconserved()
291             && getThreshold() == vs.getThreshold()
292             && getThresholdTextColour() == vs.getThresholdTextColour()
293             && isUpperCasebold() == vs.isUpperCasebold()
294             && getWrapAlignment() == vs.getWrapAlignment()
295             && getWrappedWidth() == vs.getWrappedWidth());
296     /*
297      * and compare non-primitive types; syntax below will match null with null
298      * values
299      */
300     match = match && String.valueOf(getFontName())
301             .equals(String.valueOf(vs.getFontName()));
302     match = match && String.valueOf(getTextColour())
303             .equals(String.valueOf(vs.getTextColour()));
304     match = match && String.valueOf(getTextColour2())
305             .equals(String.valueOf(vs.getTextColour2()));
306     return match;
307     // return equivalent(this, (ViewStyle) other);
308   }
309
310   /**
311    * Overridden to ensure that whenever vs1.equals(vs2) then vs1.hashCode() ==
312    * vs2.hashCode()
313    */
314   @Override
315   public int hashCode()
316   {
317     /*
318      * No need to include all properties, just a selection...
319      */
320     int hash = 0;
321     int m = 1;
322     // Boolean.hashCode returns 1231 or 1237
323     hash += m++ * Boolean.valueOf(this.abovePIDThreshold).hashCode();
324     hash += m++ * Boolean.valueOf(this.centreColumnLabels).hashCode();
325     hash += m++ * Boolean.valueOf(this.colourAppliesToAllGroups).hashCode();
326     hash += m++ * Boolean.valueOf(this.displayReferenceSeq).hashCode();
327     hash += m++ * Boolean.valueOf(this.renderGaps).hashCode();
328     hash += m++ * Boolean.valueOf(this.rightAlignIds).hashCode();
329     hash += m++ * Boolean.valueOf(this.scaleProteinAsCdna).hashCode();
330     hash += m++ * Boolean.valueOf(this.scaleRightWrapped).hashCode();
331     hash += m++ * Boolean.valueOf(this.seqNameItalics).hashCode();
332     hash += m++ * Boolean.valueOf(this.showAnnotation).hashCode();
333     hash += m++ * Boolean.valueOf(this.showBoxes).hashCode();
334     hash += m++ * Boolean.valueOf(this.showdbrefs).hashCode();
335     hash += m++ * Boolean.valueOf(this.showJVSuffix).hashCode();
336     hash += m++ * Boolean.valueOf(this.showSequenceFeatures).hashCode();
337     hash += m++ * Boolean.valueOf(this.showUnconserved).hashCode();
338     hash += m++ * Boolean.valueOf(this.wrapAlignment).hashCode();
339     hash += m++ * this.charHeight;
340     hash += m++ * this.charWidth;
341     hash += m++ * fontSize;
342     hash += m++ * fontStyle;
343     hash += m++ * idWidth;
344     hash += String.valueOf(this.fontName).hashCode();
345     return hash;
346   }
347
348   /**
349    * @return the upperCasebold
350    */
351   @Override
352   public boolean isUpperCasebold()
353   {
354     return upperCasebold;
355   }
356
357   /**
358    * @param upperCasebold
359    *          the upperCasebold to set
360    */
361   @Override
362   public void setUpperCasebold(boolean upperCasebold)
363   {
364     this.upperCasebold = upperCasebold;
365   }
366
367   /**
368    * flag for wrapping
369    */
370   boolean wrapAlignment = false;
371
372   /**
373    * number columns in wrapped alignment
374    */
375   int wrappedWidth;
376
377   private int fontStyle;
378
379   private boolean showComplementFeatures;
380
381   private boolean showComplementFeaturesOnTop;
382
383   /**
384    * GUI state
385    * 
386    * @return true if percent identity threshold is applied to shading
387    */
388   @Override
389   public boolean getAbovePIDThreshold()
390   {
391     return abovePIDThreshold;
392   }
393
394   /**
395    * DOCUMENT ME!
396    * 
397    * @return DOCUMENT ME!
398    */
399   @Override
400   public int getCharHeight()
401   {
402     return charHeight;
403   }
404
405   /**
406    * DOCUMENT ME!
407    * 
408    * @return DOCUMENT ME!
409    */
410   @Override
411   public int getCharWidth()
412   {
413     return charWidth;
414   }
415
416   /**
417    * 
418    * 
419    * @return flag indicating if colourchanges propagated to all groups
420    */
421   @Override
422   public boolean getColourAppliesToAllGroups()
423   {
424     return colourAppliesToAllGroups;
425   }
426
427   /**
428    * DOCUMENT ME!
429    * 
430    * @return DOCUMENT ME!
431    */
432   @Override
433   public boolean getColourText()
434   {
435     return showColourText;
436   }
437
438   /**
439    * GUI state
440    * 
441    * @return true if conservation based shading is enabled
442    */
443   @Override
444   public boolean getConservationSelected()
445   {
446     return conservationColourSelected;
447   }
448
449   /**
450    * GUI State
451    * 
452    * @return get scalar for bleaching colourschemes by conservation
453    */
454   @Override
455   public int getIncrement()
456   {
457     return increment;
458   }
459
460   /**
461    * DOCUMENT ME!
462    * 
463    * @return DOCUMENT ME!
464    */
465   @Override
466   public boolean getScaleAboveWrapped()
467   {
468     return scaleAboveWrapped;
469   }
470
471   /**
472    * DOCUMENT ME!
473    * 
474    * @return DOCUMENT ME!
475    */
476   @Override
477   public boolean getScaleLeftWrapped()
478   {
479     return scaleLeftWrapped;
480   }
481
482   /**
483    * DOCUMENT ME!
484    * 
485    * @return DOCUMENT ME!
486    */
487   @Override
488   public boolean getScaleRightWrapped()
489   {
490     return scaleRightWrapped;
491   }
492
493   /**
494    * DOCUMENT ME!
495    * 
496    * @return DOCUMENT ME!
497    */
498   @Override
499   public boolean getShowBoxes()
500   {
501     return showBoxes;
502   }
503
504   @Override
505   public boolean getShowHiddenMarkers()
506   {
507     return showHiddenMarkers;
508   }
509
510   /**
511    * DOCUMENT ME!
512    * 
513    * @return DOCUMENT ME!
514    */
515   @Override
516   public boolean getShowJVSuffix()
517   {
518     return showJVSuffix;
519   }
520
521   /**
522    * DOCUMENT ME!
523    * 
524    * @return DOCUMENT ME!
525    */
526   @Override
527   public boolean getShowText()
528   {
529     return showText;
530   }
531
532   @Override
533   public boolean getShowUnconserved()
534   {
535     return showUnconserved;
536   }
537
538   /**
539    * @return the textColour
540    */
541   @Override
542   public Color getTextColour()
543   {
544     return textColour;
545   }
546
547   /**
548    * @return the textColour2
549    */
550   @Override
551   public Color getTextColour2()
552   {
553     return textColour2;
554   }
555
556   /**
557    * DOCUMENT ME!
558    * 
559    * @return DOCUMENT ME!
560    */
561   @Override
562   public int getThreshold()
563   {
564     return threshold;
565   }
566
567   /**
568    * @return the thresholdTextColour
569    */
570   @Override
571   public int getThresholdTextColour()
572   {
573     return thresholdTextColour;
574   }
575
576   /**
577    * DOCUMENT ME!
578    * 
579    * @return DOCUMENT ME!
580    */
581   @Override
582   public boolean getWrapAlignment()
583   {
584     return wrapAlignment;
585   }
586
587   /**
588    * DOCUMENT ME!
589    * 
590    * @return DOCUMENT ME!
591    */
592   @Override
593   public int getWrappedWidth()
594   {
595     return wrappedWidth;
596   }
597
598   @Override
599   public boolean isColourByReferenceSeq()
600   {
601     return colourByReferenceSeq;
602   }
603
604   /**
605    * @return the conservationColourSelected
606    */
607   @Override
608   public boolean isConservationColourSelected()
609   {
610     return conservationColourSelected;
611   }
612
613   @Override
614   public boolean isDisplayReferenceSeq()
615   {
616     return displayReferenceSeq;
617   }
618
619   /**
620    * @return the renderGaps
621    */
622   @Override
623   public boolean isRenderGaps()
624   {
625     return renderGaps;
626   }
627
628   @Override
629   public boolean isRightAlignIds()
630   {
631     return rightAlignIds;
632   }
633
634   /**
635    * @return the seqNameItalics
636    */
637   @Override
638   public boolean isSeqNameItalics()
639   {
640     return seqNameItalics;
641   }
642
643   @Override
644   public boolean isShowAnnotation()
645   {
646     return showAnnotation;
647   }
648
649   /**
650    * @return the showColourText
651    */
652   @Override
653   public boolean isShowColourText()
654   {
655     return showColourText;
656   }
657
658   /**
659    * @return the showSeqFeaturesHeight
660    */
661   @Override
662   public boolean isShowSequenceFeaturesHeight()
663   {
664     return showSeqFeaturesHeight;
665   }
666
667   @Override
668   public boolean isShowSequenceFeatures()
669   {
670     return showSequenceFeatures;
671   }
672
673   /**
674    * GUI state
675    * 
676    * 
677    * @param b
678    *          indicate if percent identity threshold is applied to shading
679    */
680   @Override
681   public void setAbovePIDThreshold(boolean b)
682   {
683     abovePIDThreshold = b;
684   }
685
686   /**
687    * DOCUMENT ME!
688    * 
689    * @param h
690    *          DOCUMENT ME!
691    */
692   @Override
693   public void setCharHeight(int h)
694   {
695     this.charHeight = h;
696   }
697
698   /**
699    * DOCUMENT ME!
700    * 
701    * @param w
702    *          DOCUMENT ME!
703    */
704   @Override
705   public void setCharWidth(int w)
706   {
707     this.charWidth = w;
708   }
709
710   /**
711    * @param value
712    *          indicating if subsequent colourscheme changes will be propagated
713    *          to all groups
714    */
715   @Override
716   public void setColourAppliesToAllGroups(boolean b)
717   {
718     colourAppliesToAllGroups = b;
719   }
720
721   @Override
722   public void setColourByReferenceSeq(boolean colourByReferenceSeq)
723   {
724     this.colourByReferenceSeq = colourByReferenceSeq;
725   }
726
727   /**
728    * DOCUMENT ME!
729    * 
730    * @param state
731    *          DOCUMENT ME!
732    */
733   @Override
734   public void setColourText(boolean state)
735   {
736     showColourText = state;
737   }
738
739   /**
740    * @param conservationColourSelected
741    *          the conservationColourSelected to set
742    */
743   @Override
744   public void setConservationColourSelected(
745           boolean conservationColourSelected)
746   {
747     this.conservationColourSelected = conservationColourSelected;
748   }
749
750   /**
751    * GUI state
752    * 
753    * @param b
754    *          enable conservation based shading
755    */
756   @Override
757   public void setConservationSelected(boolean b)
758   {
759     conservationColourSelected = b;
760   }
761
762   @Override
763   public void setDisplayReferenceSeq(boolean displayReferenceSeq)
764   {
765     this.displayReferenceSeq = displayReferenceSeq;
766   }
767
768   /**
769    * 
770    * @param inc
771    *          set the scalar for bleaching colourschemes according to degree of
772    *          conservation
773    */
774   @Override
775   public void setIncrement(int inc)
776   {
777     increment = inc;
778   }
779
780   /**
781    * DOCUMENT ME!
782    * 
783    * @param state
784    *          DOCUMENT ME!
785    */
786   @Override
787   public void setRenderGaps(boolean state)
788   {
789     renderGaps = state;
790   }
791
792   @Override
793   public void setRightAlignIds(boolean rightAlignIds)
794   {
795     this.rightAlignIds = rightAlignIds;
796   }
797
798   /**
799    * DOCUMENT ME!
800    * 
801    * @param b
802    *          DOCUMENT ME!
803    */
804   @Override
805   public void setScaleAboveWrapped(boolean b)
806   {
807     scaleAboveWrapped = b;
808   }
809
810   /**
811    * DOCUMENT ME!
812    * 
813    * @param b
814    *          DOCUMENT ME!
815    */
816   @Override
817   public void setScaleLeftWrapped(boolean b)
818   {
819     scaleLeftWrapped = b;
820   }
821
822   /**
823    * 
824    * 
825    * @param scaleRightWrapped
826    *          - true or false
827    */
828
829   @Override
830   public void setScaleRightWrapped(boolean b)
831   {
832     scaleRightWrapped = b;
833   }
834
835   @Override
836   public void setSeqNameItalics(boolean italics)
837   {
838     seqNameItalics = italics;
839   }
840
841   @Override
842   public void setShowAnnotation(boolean b)
843   {
844     showAnnotation = b;
845   }
846
847   /**
848    * DOCUMENT ME!
849    * 
850    * @param state
851    *          DOCUMENT ME!
852    */
853   @Override
854   public void setShowBoxes(boolean state)
855   {
856     showBoxes = state;
857   }
858
859   /**
860    * @param showColourText
861    *          the showColourText to set
862    */
863   @Override
864   public void setShowColourText(boolean showColourText)
865   {
866     this.showColourText = showColourText;
867   }
868
869   @Override
870   public void setShowHiddenMarkers(boolean show)
871   {
872     showHiddenMarkers = show;
873   }
874
875   /**
876    * DOCUMENT ME!
877    * 
878    * @param b
879    *          DOCUMENT ME!
880    */
881   @Override
882   public void setShowJVSuffix(boolean b)
883   {
884     showJVSuffix = b;
885   }
886
887   @Override
888   public void setShowSequenceFeaturesHeight(boolean selected)
889   {
890     showSeqFeaturesHeight = selected;
891
892   }
893
894   /**
895    * set the flag
896    * 
897    * @param b
898    *          features are displayed if true
899    */
900   @Override
901   public void setShowSequenceFeatures(boolean b)
902   {
903     showSequenceFeatures = b;
904   }
905
906   /**
907    * DOCUMENT ME!
908    * 
909    * @param state
910    *          DOCUMENT ME!
911    */
912   @Override
913   public void setShowText(boolean state)
914   {
915     showText = state;
916   }
917
918   @Override
919   public void setShowUnconserved(boolean showunconserved)
920   {
921     showUnconserved = showunconserved;
922   }
923
924   /**
925    * @param textColour
926    *          the textColour to set
927    */
928   @Override
929   public void setTextColour(Color textColour)
930   {
931     this.textColour = textColour;
932   }
933
934   /**
935    * @param textColour2
936    *          the textColour2 to set
937    */
938   @Override
939   public void setTextColour2(Color textColour2)
940   {
941     this.textColour2 = textColour2;
942   }
943
944   /**
945    * DOCUMENT ME!
946    * 
947    * @param thresh
948    *          DOCUMENT ME!
949    */
950   @Override
951   public void setThreshold(int thresh)
952   {
953     threshold = thresh;
954   }
955
956   /**
957    * @param thresholdTextColour
958    *          the thresholdTextColour to set
959    */
960   @Override
961   public void setThresholdTextColour(int thresholdTextColour)
962   {
963     this.thresholdTextColour = thresholdTextColour;
964   }
965
966   /**
967    * DOCUMENT ME!
968    * 
969    * @param state
970    *          DOCUMENT ME!
971    */
972   @Override
973   public void setWrapAlignment(boolean state)
974   {
975     wrapAlignment = state;
976   }
977
978   /**
979    * DOCUMENT ME!
980    * 
981    * @param w
982    *          DOCUMENT ME!
983    */
984   @Override
985   public void setWrappedWidth(int w)
986   {
987     this.wrappedWidth = w;
988   }
989
990   @Override
991   public boolean sameStyle(ViewStyleI that)
992   {
993     return this.equals(that);
994   }
995
996   @Override
997   public String getFontName()
998   {
999     return fontName;
1000   }
1001
1002   @Override
1003   public int getFontSize()
1004   {
1005     return fontSize;
1006   }
1007
1008   @Override
1009   public int getFontStyle()
1010   {
1011     return fontStyle;
1012   }
1013
1014   @Override
1015   public void setFontName(String name)
1016   {
1017     fontName = name;
1018   }
1019
1020   @Override
1021   public void setFontSize(int size)
1022   {
1023     fontSize = size;
1024
1025   }
1026
1027   @Override
1028   public void setFontStyle(int style)
1029   {
1030     fontStyle = style;
1031   }
1032
1033   @Override
1034   public int getIdWidth()
1035   {
1036     return idWidth;
1037   }
1038
1039   /**
1040    * @param idWidth
1041    *          the idWidth to set
1042    */
1043   @Override
1044   public void setIdWidth(int idWidth)
1045   {
1046     this.idWidth = idWidth;
1047   }
1048
1049   /**
1050    * @return the centreColumnLabels
1051    */
1052   @Override
1053   public boolean isCentreColumnLabels()
1054   {
1055     return centreColumnLabels;
1056   }
1057
1058   /**
1059    * @param centreColumnLabels
1060    *          the centreColumnLabels to set
1061    */
1062   @Override
1063   public void setCentreColumnLabels(boolean centreColumnLabels)
1064   {
1065     this.centreColumnLabels = centreColumnLabels;
1066   }
1067
1068   /**
1069    * @return the showdbrefs
1070    */
1071   @Override
1072   public boolean isShowDBRefs()
1073   {
1074     return showdbrefs;
1075   }
1076
1077   /**
1078    * @param showdbrefs
1079    *          the showdbrefs to set
1080    */
1081   @Override
1082   public void setShowDBRefs(boolean showdbrefs)
1083   {
1084     this.showdbrefs = showdbrefs;
1085   }
1086
1087   /**
1088    * @return the shownpfeats
1089    */
1090   @Override
1091   public boolean isShowNPFeats()
1092   {
1093     return shownpfeats;
1094   }
1095
1096   /**
1097    * @param shownpfeats
1098    *          the shownpfeats to set
1099    */
1100   @Override
1101   public void setShowNPFeats(boolean shownpfeats)
1102   {
1103     this.shownpfeats = shownpfeats;
1104   }
1105
1106   @Override
1107   public boolean isScaleProteinAsCdna()
1108   {
1109     return this.scaleProteinAsCdna;
1110   }
1111
1112   @Override
1113   public void setScaleProteinAsCdna(boolean b)
1114   {
1115     this.scaleProteinAsCdna = b;
1116   }
1117
1118   @Override
1119   public boolean isProteinFontAsCdna()
1120   {
1121     return proteinFontAsCdna;
1122   }
1123
1124   @Override
1125   public void setProteinFontAsCdna(boolean b)
1126   {
1127     proteinFontAsCdna = b;
1128   }
1129
1130   @Override
1131   public void setShowComplementFeatures(boolean b)
1132   {
1133     showComplementFeatures = b;
1134   }
1135
1136   @Override
1137   public boolean isShowComplementFeatures()
1138   {
1139     return showComplementFeatures;
1140   }
1141
1142   @Override
1143   public void setShowComplementFeaturesOnTop(boolean b)
1144   {
1145     showComplementFeaturesOnTop = b;
1146   }
1147
1148   @Override
1149   public boolean isShowComplementFeaturesOnTop()
1150   {
1151     return showComplementFeaturesOnTop;
1152   }
1153
1154   @Override
1155   public void setShowSequenceFeatureCounts(boolean show)
1156   {
1157     showSequenceFeatureCounts = show;
1158   }
1159
1160   @Override
1161   public boolean isShowSequenceFeatureCounts()
1162   {
1163     return showSequenceFeatureCounts;
1164   }
1165 }