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