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