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