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