Clover icon

Coverage Report

  1. Project Clover database Thu Nov 28 2024 11:45:30 GMT
  2. Package jalview.viewmodel.styles

File ViewStyle.java

 

Coverage histogram

../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

2
163
91
1
1,147
621
93
0.57
1.79
91
1.02

Classes

Class Line # Actions
ViewStyle 36 163 93
1.0100%
 

Contributing tests

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