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