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