Clover icon

jalviewX

  1. Project Clover database Wed Oct 31 2018 15:13:58 GMT
  2. Package jalview.viewmodel.styles

File ViewStyle.java

 

Coverage histogram

../../../img/srcFileCovDistChart9.png
12% of files have more coverage

Code metrics

2
157
87
1
1,114
594
89
0.57
1.8
87
1.02

Classes

Class Line # Actions
ViewStyle 36 157 89 28
0.8861788588.6%
 

Contributing tests

This file is covered by 5 tests. .

Source view

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