Clover icon

Coverage Report

  1. Project Clover database Wed Nov 5 2025 13:15:40 GMT
  2. Package jalview.viewmodel.styles

File ViewStyle.java

 

Coverage histogram

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

Code metrics

2
175
99
1
1,228
681
101
0.58
1.77
99
1.02

Classes

Class Line # Actions
ViewStyle 38 175 101
1.0100%
 

Contributing tests

This file is covered by 2 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    import java.util.Arrays;
25    import java.util.List;
26   
27    import jalview.api.ViewStyleI;
28   
29    /**
30    * A container for holding alignment view properties. View properties are
31    * data-independent, which means they can be safely copied between views
32    * involving different alignment data without causing exceptions in the
33    * rendering system.
34    *
35    * @author jprocter
36    *
37    */
 
38    public class ViewStyle implements ViewStyleI
39    {
40    private boolean abovePIDThreshold = false;
41   
42    int charHeight;
43   
44    int charWidth;
45   
46    int idWidth = -1;
47   
48    /**
49    * gui state - changes to colour scheme propagated to all groups
50    */
51    private boolean colourAppliesToAllGroups;
52   
53    /**
54    * centre columnar annotation labels in displayed alignment annotation
55    */
56    boolean centreColumnLabels = false;
57   
58    private boolean showdbrefs;
59   
60    private boolean shownpfeats;
61   
62    // --------END Structure Conservation
63   
64    /**
65    * colour according to the reference sequence defined on the alignment
66    */
67    private boolean colourByReferenceSeq = false;
68   
69    boolean conservationColourSelected = false;
70   
71    boolean byConsensusSecondaryStructureSelected = false;
72   
73    /**
74    * show the reference sequence in the alignment view
75    */
76    private boolean displayReferenceSeq = false;
77   
78    private int increment;
79   
80    private int consensusSecondaryStructureThreshold;
81   
82    /**
83    * display gap characters
84    */
85    boolean renderGaps = true;
86   
87    private boolean rightAlignIds = false;
88   
89    boolean scaleAboveWrapped = false;
90   
91    boolean scaleLeftWrapped = true;
92   
93    boolean scaleRightWrapped = true;
94   
95    boolean seqNameItalics;
96   
97    /**
98    * show annotation tracks on the alignment
99    */
100    private boolean showAnnotation = true;
101   
102    /**
103    * render each residue in a coloured box
104    */
105    boolean showBoxes = true;
106   
107    /**
108    * Colour sequence text
109    */
110    boolean showColourText = false;
111   
112    /**
113    * show blue triangles
114    */
115    boolean showHiddenMarkers = true;
116   
117    /**
118    * show /start-end in ID panel
119    */
120    boolean showJVSuffix = true;
121   
122    /**
123    * scale features height according to score
124    */
125    boolean showSeqFeaturesHeight;
126   
127    /**
128    * display setting for showing/hiding sequence features on alignment view
129    */
130    boolean showSequenceFeatures = false;
131   
132    /**
133    * display sequence symbols
134    */
135    boolean showText = true;
136   
137    /**
138    * show non-conserved residues only
139    */
140    protected boolean showUnconserved = false;
141   
142    Color textColour = Color.black;
143   
144    Color textColour2 = Color.white;
145   
146    /**
147    * PID or consensus threshold
148    */
149    int threshold;
150   
151    /**
152    * threshold for switching between textColour & textColour2
153    */
154    int thresholdTextColour = 0;
155   
156    /**
157    * upper case characters in sequence are shown in bold
158    */
159    boolean upperCasebold = false;
160   
161    /**
162    * name of base font for view
163    */
164    private String fontName;
165   
166    /**
167    * size for base font
168    */
169    private int fontSize;
170   
171    /*
172    * If true, scale protein residues to 3 times width of cDNA bases (in
173    * SplitFrame views only)
174    */
175    private boolean scaleProteinAsCdna = true;
176   
177    /*
178    * if true, font changes to protein or cDNA are applied to both
179    * sides of a split screen
180    */
181    private boolean proteinFontAsCdna = true;
182   
183    /**
184    * Copy constructor
185    *
186    * @param vs
187    */
 
188  242 toggle public ViewStyle(ViewStyleI vs)
189    {
190  242 setAbovePIDThreshold(vs.getAbovePIDThreshold());
191  242 setCentreColumnLabels(vs.isCentreColumnLabels());
192  242 setCharHeight(vs.getCharHeight());
193  242 setCharWidth(vs.getCharWidth());
194  242 setColourAppliesToAllGroups(vs.getColourAppliesToAllGroups());
195  242 setColourByReferenceSeq(vs.isColourByReferenceSeq());
196  242 setColourText(vs.getColourText());
197  242 setByConsensusSecondaryStructureSelected(
198    vs.getByConsensusSecondaryStructureSelected());
199  242 setConsensusSecondaryStructureThreshold(
200    vs.getConsensusSecondaryStructureThreshold());
201  242 setConservationColourSelected(vs.isConservationColourSelected());
202  242 setConservationSelected(vs.getConservationSelected());
203  242 setDisplayReferenceSeq(vs.isDisplayReferenceSeq());
204  242 setFontName(vs.getFontName());
205  242 setFontSize(vs.getFontSize());
206  242 setFontStyle(vs.getFontStyle());
207  242 setIdWidth(vs.getIdWidth());
208  242 setIncrement(vs.getIncrement());
209  242 setRenderGaps(vs.isRenderGaps());
210  242 setRightAlignIds(vs.isRightAlignIds());
211  242 setScaleAboveWrapped(vs.getScaleAboveWrapped());
212  242 setScaleLeftWrapped(vs.getScaleLeftWrapped());
213  242 setScaleProteinAsCdna(vs.isScaleProteinAsCdna());
214  242 setProteinFontAsCdna(vs.isProteinFontAsCdna());
215  242 setScaleRightWrapped(vs.getScaleRightWrapped());
216  242 setSeqNameItalics(vs.isSeqNameItalics());
217  242 setShowAnnotation(vs.isShowAnnotation());
218  242 setShowBoxes(vs.getShowBoxes());
219  242 setShowColourText(vs.isShowColourText());
220  242 setShowDBRefs(vs.isShowDBRefs());
221  242 setShowHiddenMarkers(vs.getShowHiddenMarkers());
222  242 setShowJVSuffix(vs.getShowJVSuffix());
223  242 setShowNPFeats(vs.isShowNPFeats());
224  242 setShowSequenceFeaturesHeight(vs.isShowSequenceFeaturesHeight());
225  242 setShowSequenceFeatures(vs.isShowSequenceFeatures());
226  242 setShowComplementFeatures(vs.isShowComplementFeatures());
227  242 setShowComplementFeaturesOnTop(vs.isShowComplementFeaturesOnTop());
228  242 setShowText(vs.getShowText());
229  242 setShowUnconserved(vs.getShowUnconserved());
230  242 setTextColour(vs.getTextColour());
231  242 setTextColour2(vs.getTextColour2());
232  242 setThreshold(vs.getThreshold());
233  242 setThresholdTextColour(vs.getThresholdTextColour());
234  242 setUpperCasebold(vs.isUpperCasebold());
235  242 setWrapAlignment(vs.getWrapAlignment());
236  242 setWrappedWidth(vs.getWrappedWidth());
237  242 setSecondaryStructureSources(vs.getSecondaryStructureSources());
238  242 setShowStructureProvider(vs.isShowStructureProvider());
239    // ViewStyle.configureFrom(this, viewStyle);
240    }
241   
 
242  533 toggle public ViewStyle()
243    {
244    }
245   
246    /**
247    * Returns true if all attributes of the ViewStyles have the same value
248    */
 
249  52 toggle @Override
250    public boolean equals(Object other)
251    {
252  52 if (other == null || !(other instanceof ViewStyle))
253    {
254  2 return false;
255    }
256  50 ViewStyle vs = (ViewStyle) other;
257   
258  50 boolean match = (getAbovePIDThreshold() == vs.getAbovePIDThreshold()
259    && isCentreColumnLabels() == vs.isCentreColumnLabels()
260    && getCharHeight() == vs.getCharHeight()
261    && getCharWidth() == vs.getCharWidth()
262    && getColourAppliesToAllGroups() == vs
263    .getColourAppliesToAllGroups()
264    && isColourByReferenceSeq() == vs.isColourByReferenceSeq()
265    && getColourText() == vs.getColourText()
266    && isConservationColourSelected() == vs
267    .isConservationColourSelected()
268    && getByConsensusSecondaryStructureSelected() == vs
269    .getByConsensusSecondaryStructureSelected()
270    && getConservationSelected() == vs.getConservationSelected()
271    && isDisplayReferenceSeq() == vs.isDisplayReferenceSeq()
272    && getFontSize() == vs.getFontSize()
273    && getFontStyle() == vs.getFontStyle()
274    && getIdWidth() == vs.getIdWidth()
275    && getIncrement() == vs.getIncrement()
276    && getConsensusSecondaryStructureThreshold() == vs
277    .getConsensusSecondaryStructureThreshold()
278    && isRenderGaps() == vs.isRenderGaps()
279    && isRightAlignIds() == vs.isRightAlignIds()
280    && getScaleAboveWrapped() == vs.getScaleAboveWrapped()
281    && getScaleLeftWrapped() == vs.getScaleLeftWrapped()
282    && isScaleProteinAsCdna() == vs.isScaleProteinAsCdna()
283    && isProteinFontAsCdna() == vs.isProteinFontAsCdna()
284    && getScaleRightWrapped() == vs.getScaleRightWrapped()
285    && isSeqNameItalics() == vs.isSeqNameItalics()
286    && isShowAnnotation() == vs.isShowAnnotation()
287    && getShowBoxes() == vs.getShowBoxes()
288    && isShowColourText() == vs.isShowColourText()
289    && isShowDBRefs() == vs.isShowDBRefs()
290    && getShowHiddenMarkers() == vs.getShowHiddenMarkers()
291    && getShowJVSuffix() == vs.getShowJVSuffix()
292    && isShowNPFeats() == vs.isShowNPFeats()
293    && isShowSequenceFeaturesHeight() == vs
294    .isShowSequenceFeaturesHeight()
295    && isShowSequenceFeatures() == vs.isShowSequenceFeatures()
296    && isShowComplementFeatures() == vs.isShowComplementFeatures()
297    && isShowComplementFeaturesOnTop() == vs
298    .isShowComplementFeaturesOnTop()
299    && getShowText() == vs.getShowText()
300    && getShowUnconserved() == vs.getShowUnconserved()
301    && getThreshold() == vs.getThreshold()
302    && getThresholdTextColour() == vs.getThresholdTextColour()
303    && isUpperCasebold() == vs.isUpperCasebold()
304    && getWrapAlignment() == vs.getWrapAlignment()
305    && getWrappedWidth() == vs.getWrappedWidth()
306    && getSecondaryStructureSources() == vs
307    .getSecondaryStructureSources()
308    && isShowStructureProvider() == vs.isShowStructureProvider());
309    /*
310    * and compare non-primitive types; syntax below will match null with null
311    * values
312    */
313  50 match = match && String.valueOf(getFontName())
314    .equals(String.valueOf(vs.getFontName()));
315  50 match = match && String.valueOf(getTextColour())
316    .equals(String.valueOf(vs.getTextColour()));
317  50 match = match && String.valueOf(getTextColour2())
318    .equals(String.valueOf(vs.getTextColour2()));
319  50 return match;
320    // return equivalent(this, (ViewStyle) other);
321    }
322   
323    /**
324    * Overridden to ensure that whenever vs1.equals(vs2) then vs1.hashCode() ==
325    * vs2.hashCode()
326    */
 
327  92 toggle @Override
328    public int hashCode()
329    {
330    /*
331    * No need to include all properties, just a selection...
332    */
333  92 int hash = 0;
334  92 int m = 1;
335    // Boolean.hashCode returns 1231 or 1237
336  92 hash += m++ * Boolean.valueOf(this.abovePIDThreshold).hashCode();
337  92 hash += m++ * Boolean.valueOf(this.centreColumnLabels).hashCode();
338  92 hash += m++ * Boolean.valueOf(this.colourAppliesToAllGroups).hashCode();
339  92 hash += m++ * Boolean.valueOf(this.displayReferenceSeq).hashCode();
340  92 hash += m++ * Boolean.valueOf(this.renderGaps).hashCode();
341  92 hash += m++ * Boolean.valueOf(this.rightAlignIds).hashCode();
342  92 hash += m++ * Boolean.valueOf(this.scaleProteinAsCdna).hashCode();
343  92 hash += m++ * Boolean.valueOf(this.scaleRightWrapped).hashCode();
344  92 hash += m++ * Boolean.valueOf(this.seqNameItalics).hashCode();
345  92 hash += m++ * Boolean.valueOf(this.showAnnotation).hashCode();
346  92 hash += m++ * Boolean.valueOf(this.showBoxes).hashCode();
347  92 hash += m++ * Boolean.valueOf(this.showdbrefs).hashCode();
348  92 hash += m++ * Boolean.valueOf(this.showJVSuffix).hashCode();
349  92 hash += m++ * Boolean.valueOf(this.showSequenceFeatures).hashCode();
350  92 hash += m++ * Boolean.valueOf(this.showUnconserved).hashCode();
351  92 hash += m++ * Boolean.valueOf(this.wrapAlignment).hashCode();
352  92 hash += m++ * this.charHeight;
353  92 hash += m++ * this.charWidth;
354  92 hash += m++ * fontSize;
355  92 hash += m++ * fontStyle;
356  92 hash += m++ * idWidth;
357  92 hash += String.valueOf(this.fontName).hashCode();
358  92 return hash;
359    }
360   
361    /**
362    * @return the upperCasebold
363    */
 
364  264 toggle @Override
365    public boolean isUpperCasebold()
366    {
367  264 return upperCasebold;
368    }
369   
370    /**
371    * @param upperCasebold
372    * the upperCasebold to set
373    */
 
374  242 toggle @Override
375    public void setUpperCasebold(boolean upperCasebold)
376    {
377  242 this.upperCasebold = upperCasebold;
378    }
379   
380    /**
381    * flag for wrapping
382    */
383    boolean wrapAlignment = false;
384   
385    /**
386    * number columns in wrapped alignment
387    */
388    int wrappedWidth;
389   
390    private int fontStyle;
391   
392    private boolean showComplementFeatures;
393   
394    private boolean showComplementFeaturesOnTop;
395   
396    /**
397    * secondary structure annotation rows shown in the view
398    */
399    private List<String> secondaryStructureSources = Arrays.asList(new String[0]);
400   
401    private boolean showStructureProvider;
402   
403    /**
404    * GUI state
405    *
406    * @return true if percent identity threshold is applied to shading
407    */
 
408  1253 toggle @Override
409    public boolean getAbovePIDThreshold()
410    {
411  1253 return abovePIDThreshold;
412    }
413   
 
414  1233 toggle @Override
415    public boolean getByConsensusSecondaryStructureSelected()
416    {
417  1233 return byConsensusSecondaryStructureSelected;
418    }
419   
420    /**
421    * DOCUMENT ME!
422    *
423    * @return DOCUMENT ME!
424    */
 
425  106567 toggle @Override
426    public int getCharHeight()
427    {
428  106567 return charHeight;
429    }
430   
431    /**
432    * DOCUMENT ME!
433    *
434    * @return DOCUMENT ME!
435    */
 
436  1422656 toggle @Override
437    public int getCharWidth()
438    {
439  1422656 return charWidth;
440    }
441   
442    /**
443    *
444    *
445    * @return flag indicating if colourchanges propagated to all groups
446    */
 
447  1334 toggle @Override
448    public boolean getColourAppliesToAllGroups()
449    {
450  1334 return colourAppliesToAllGroups;
451    }
452   
453    /**
454    * DOCUMENT ME!
455    *
456    * @return DOCUMENT ME!
457    */
 
458  454559 toggle @Override
459    public boolean getColourText()
460    {
461  454559 return showColourText;
462    }
463   
464    /**
465    * GUI state
466    *
467    * @return true if conservation based shading is enabled
468    */
 
469  1407 toggle @Override
470    public boolean getConservationSelected()
471    {
472  1407 return conservationColourSelected;
473    }
474   
475    /**
476    * GUI State
477    *
478    * @return get scalar for bleaching colourschemes by conservation
479    */
 
480  312 toggle @Override
481    public int getIncrement()
482    {
483  312 return increment;
484    }
485   
486    /**
487    * DOCUMENT ME!
488    *
489    * @return DOCUMENT ME!
490    */
 
491  1190 toggle @Override
492    public boolean getScaleAboveWrapped()
493    {
494  1190 return scaleAboveWrapped;
495    }
496   
497    /**
498    * DOCUMENT ME!
499    *
500    * @return DOCUMENT ME!
501    */
 
502  1581 toggle @Override
503    public boolean getScaleLeftWrapped()
504    {
505  1581 return scaleLeftWrapped;
506    }
507   
508    /**
509    * DOCUMENT ME!
510    *
511    * @return DOCUMENT ME!
512    */
 
513  2371 toggle @Override
514    public boolean getScaleRightWrapped()
515    {
516  2371 return scaleRightWrapped;
517    }
518   
519    /**
520    * DOCUMENT ME!
521    *
522    * @return DOCUMENT ME!
523    */
 
524  527728 toggle @Override
525    public boolean getShowBoxes()
526    {
527  527726 return showBoxes;
528    }
529   
 
530  5851 toggle @Override
531    public boolean getShowHiddenMarkers()
532    {
533  5851 return showHiddenMarkers;
534    }
535   
536    /**
537    * DOCUMENT ME!
538    *
539    * @return DOCUMENT ME!
540    */
 
541  44544 toggle @Override
542    public boolean getShowJVSuffix()
543    {
544  44544 return showJVSuffix;
545    }
546   
547    /**
548    * DOCUMENT ME!
549    *
550    * @return DOCUMENT ME!
551    */
 
552  455208 toggle @Override
553    public boolean getShowText()
554    {
555  455208 return showText;
556    }
557   
 
558  453599 toggle @Override
559    public boolean getShowUnconserved()
560    {
561  453599 return showUnconserved;
562    }
563   
564    /**
565    * @return the textColour
566    */
 
567  687563 toggle @Override
568    public Color getTextColour()
569    {
570  687563 return textColour;
571    }
572   
573    /**
574    * @return the textColour2
575    */
 
576  298 toggle @Override
577    public Color getTextColour2()
578    {
579  298 return textColour2;
580    }
581   
582    /**
583    * DOCUMENT ME!
584    *
585    * @return DOCUMENT ME!
586    */
 
587  268 toggle @Override
588    public int getThreshold()
589    {
590  268 return threshold;
591    }
592   
 
593  310 toggle @Override
594    public int getConsensusSecondaryStructureThreshold()
595    {
596  310 return consensusSecondaryStructureThreshold;
597    }
598   
599    /**
600    * @return the thresholdTextColour
601    */
 
602  454499 toggle @Override
603    public int getThresholdTextColour()
604    {
605  454499 return thresholdTextColour;
606    }
607   
608    /**
609    * DOCUMENT ME!
610    *
611    * @return DOCUMENT ME!
612    */
 
613  31295 toggle @Override
614    public boolean getWrapAlignment()
615    {
616  31295 return wrapAlignment;
617    }
618   
619    /**
620    * DOCUMENT ME!
621    *
622    * @return DOCUMENT ME!
623    */
 
624  262 toggle @Override
625    public int getWrappedWidth()
626    {
627  262 return wrappedWidth;
628    }
629   
 
630  333 toggle @Override
631    public boolean isColourByReferenceSeq()
632    {
633  333 return colourByReferenceSeq;
634    }
635   
636    /**
637    * @return the conservationColourSelected
638    */
 
639  414 toggle @Override
640    public boolean isConservationColourSelected()
641    {
642  414 return conservationColourSelected;
643    }
644   
 
645  685 toggle @Override
646    public boolean isDisplayReferenceSeq()
647    {
648  685 return displayReferenceSeq;
649    }
650   
651    /**
652    * @return the renderGaps
653    */
 
654  3765 toggle @Override
655    public boolean isRenderGaps()
656    {
657  3765 return renderGaps;
658    }
659   
 
660  14283 toggle @Override
661    public boolean isRightAlignIds()
662    {
663  14283 return rightAlignIds;
664    }
665   
666    /**
667    * @return the seqNameItalics
668    */
 
669  3247 toggle @Override
670    public boolean isSeqNameItalics()
671    {
672  3247 return seqNameItalics;
673    }
674   
 
675  4609 toggle @Override
676    public boolean isShowAnnotation()
677    {
678  4609 return showAnnotation;
679    }
680   
681    /**
682    * @return the showColourText
683    */
 
684  991 toggle @Override
685    public boolean isShowColourText()
686    {
687  991 return showColourText;
688    }
689   
690    /**
691    * @return the showSeqFeaturesHeight
692    */
 
693  280 toggle @Override
694    public boolean isShowSequenceFeaturesHeight()
695    {
696  280 return showSeqFeaturesHeight;
697    }
698   
 
699  512214 toggle @Override
700    public boolean isShowSequenceFeatures()
701    {
702  512292 return showSequenceFeatures;
703    }
704   
705    /**
706    * GUI state
707    *
708    *
709    * @param b
710    * indicate if percent identity threshold is applied to shading
711    */
 
712  340 toggle @Override
713    public void setAbovePIDThreshold(boolean b)
714    {
715  340 abovePIDThreshold = b;
716    }
717   
 
718  331 toggle @Override
719    public void setByConsensusSecondaryStructureSelected(boolean b)
720    {
721  331 byConsensusSecondaryStructureSelected = b;
722    }
723   
724    /**
725    * DOCUMENT ME!
726    *
727    * @param h
728    * DOCUMENT ME!
729    */
 
730  865 toggle @Override
731    public void setCharHeight(int h)
732    {
733  865 this.charHeight = h;
734    }
735   
736    /**
737    * DOCUMENT ME!
738    *
739    * @param w
740    * DOCUMENT ME!
741    */
 
742  868 toggle @Override
743    public void setCharWidth(int w)
744    {
745  868 this.charWidth = w;
746    }
747   
748    /**
749    * @param value
750    * indicating if subsequent colourscheme changes will be propagated
751    * to all groups
752    */
 
753  966 toggle @Override
754    public void setColourAppliesToAllGroups(boolean b)
755    {
756  966 colourAppliesToAllGroups = b;
757    }
758   
 
759  252 toggle @Override
760    public void setColourByReferenceSeq(boolean colourByReferenceSeq)
761    {
762  252 this.colourByReferenceSeq = colourByReferenceSeq;
763    }
764   
765    /**
766    * DOCUMENT ME!
767    *
768    * @param state
769    * DOCUMENT ME!
770    */
 
771  331 toggle @Override
772    public void setColourText(boolean state)
773    {
774  331 showColourText = state;
775    }
776   
777    /**
778    * @param conservationColourSelected
779    * the conservationColourSelected to set
780    */
 
781  242 toggle @Override
782    public void setConservationColourSelected(
783    boolean conservationColourSelected)
784    {
785  242 this.conservationColourSelected = conservationColourSelected;
786    }
787   
788    /**
789    * GUI state
790    *
791    * @param b
792    * enable conservation based shading
793    */
 
794  339 toggle @Override
795    public void setConservationSelected(boolean b)
796    {
797  339 conservationColourSelected = b;
798    }
799   
 
800  252 toggle @Override
801    public void setDisplayReferenceSeq(boolean displayReferenceSeq)
802    {
803  252 this.displayReferenceSeq = displayReferenceSeq;
804    }
805   
806    /**
807    *
808    * @param inc
809    * set the scalar for bleaching colourschemes according to degree of
810    * conservation
811    */
 
812  331 toggle @Override
813    public void setIncrement(int inc)
814    {
815  331 increment = inc;
816    }
817   
818    /**
819    *
820    * @param val
821    * set the scalar for bleaching colourschemes according to degree of
822    * secondary structure conservation
823    */
 
824  331 toggle @Override
825    public void setConsensusSecondaryStructureThreshold(int val)
826    {
827  331 consensusSecondaryStructureThreshold = val;
828    }
829   
830    /**
831    * DOCUMENT ME!
832    *
833    * @param state
834    * DOCUMENT ME!
835    */
 
836  331 toggle @Override
837    public void setRenderGaps(boolean state)
838    {
839  331 renderGaps = state;
840    }
841   
 
842  862 toggle @Override
843    public void setRightAlignIds(boolean rightAlignIds)
844    {
845  862 this.rightAlignIds = rightAlignIds;
846    }
847   
848    /**
849    * DOCUMENT ME!
850    *
851    * @param b
852    * DOCUMENT ME!
853    */
 
854  251 toggle @Override
855    public void setScaleAboveWrapped(boolean b)
856    {
857  251 scaleAboveWrapped = b;
858    }
859   
860    /**
861    * DOCUMENT ME!
862    *
863    * @param b
864    * DOCUMENT ME!
865    */
 
866  253 toggle @Override
867    public void setScaleLeftWrapped(boolean b)
868    {
869  253 scaleLeftWrapped = b;
870    }
871   
872    /**
873    *
874    *
875    * @param scaleRightWrapped
876    * - true or false
877    */
878   
 
879  251 toggle @Override
880    public void setScaleRightWrapped(boolean b)
881    {
882  251 scaleRightWrapped = b;
883    }
884   
 
885  773 toggle @Override
886    public void setSeqNameItalics(boolean italics)
887    {
888  773 seqNameItalics = italics;
889    }
890   
 
891  953 toggle @Override
892    public void setShowAnnotation(boolean b)
893    {
894  953 showAnnotation = b;
895    }
896   
897    /**
898    * DOCUMENT ME!
899    *
900    * @param state
901    * DOCUMENT ME!
902    */
 
903  331 toggle @Override
904    public void setShowBoxes(boolean state)
905    {
906  331 showBoxes = state;
907    }
908   
909    /**
910    * @param showColourText
911    * the showColourText to set
912    */
 
913  242 toggle @Override
914    public void setShowColourText(boolean showColourText)
915    {
916  242 this.showColourText = showColourText;
917    }
918   
 
919  242 toggle @Override
920    public void setShowHiddenMarkers(boolean show)
921    {
922  242 showHiddenMarkers = show;
923    }
924   
925    /**
926    * DOCUMENT ME!
927    *
928    * @param b
929    * DOCUMENT ME!
930    */
 
931  863 toggle @Override
932    public void setShowJVSuffix(boolean b)
933    {
934  863 showJVSuffix = b;
935    }
936   
 
937  242 toggle @Override
938    public void setShowSequenceFeaturesHeight(boolean selected)
939    {
940  242 showSeqFeaturesHeight = selected;
941   
942    }
943   
944    /**
945    * set the flag
946    *
947    * @param b
948    * features are displayed if true
949    */
 
950  391 toggle @Override
951    public void setShowSequenceFeatures(boolean b)
952    {
953  391 showSequenceFeatures = b;
954    }
955   
956    /**
957    * DOCUMENT ME!
958    *
959    * @param state
960    * DOCUMENT ME!
961    */
 
962  331 toggle @Override
963    public void setShowText(boolean state)
964    {
965  331 showText = state;
966    }
967   
 
968  862 toggle @Override
969    public void setShowUnconserved(boolean showunconserved)
970    {
971  862 showUnconserved = showunconserved;
972    }
973   
974    /**
975    * @param textColour
976    * the textColour to set
977    */
 
978  331 toggle @Override
979    public void setTextColour(Color textColour)
980    {
981  331 this.textColour = textColour;
982    }
983   
984    /**
985    * @param textColour2
986    * the textColour2 to set
987    */
 
988  331 toggle @Override
989    public void setTextColour2(Color textColour2)
990    {
991  331 this.textColour2 = textColour2;
992    }
993   
994    /**
995    * DOCUMENT ME!
996    *
997    * @param thresh
998    * DOCUMENT ME!
999    */
 
1000  352 toggle @Override
1001    public void setThreshold(int thresh)
1002    {
1003  352 threshold = thresh;
1004    }
1005   
1006    /**
1007    * @param thresholdTextColour
1008    * the thresholdTextColour to set
1009    */
 
1010  331 toggle @Override
1011    public void setThresholdTextColour(int thresholdTextColour)
1012    {
1013  331 this.thresholdTextColour = thresholdTextColour;
1014    }
1015   
1016    /**
1017    * DOCUMENT ME!
1018    *
1019    * @param state
1020    * DOCUMENT ME!
1021    */
 
1022  874 toggle @Override
1023    public void setWrapAlignment(boolean state)
1024    {
1025  874 wrapAlignment = state;
1026    }
1027   
1028    /**
1029    * DOCUMENT ME!
1030    *
1031    * @param w
1032    * DOCUMENT ME!
1033    */
 
1034  1057 toggle @Override
1035    public void setWrappedWidth(int w)
1036    {
1037  1057 this.wrappedWidth = w;
1038    }
1039   
 
1040  3 toggle @Override
1041    public boolean sameStyle(ViewStyleI that)
1042    {
1043  3 return this.equals(that);
1044    }
1045   
 
1046  344 toggle @Override
1047    public String getFontName()
1048    {
1049  344 return fontName;
1050    }
1051   
 
1052  408 toggle @Override
1053    public int getFontSize()
1054    {
1055  408 return fontSize;
1056    }
1057   
 
1058  406 toggle @Override
1059    public int getFontStyle()
1060    {
1061  406 return fontStyle;
1062    }
1063   
 
1064  955 toggle @Override
1065    public void setFontName(String name)
1066    {
1067  955 fontName = name;
1068    }
1069   
 
1070  955 toggle @Override
1071    public void setFontSize(int size)
1072    {
1073  955 fontSize = size;
1074   
1075    }
1076   
 
1077  955 toggle @Override
1078    public void setFontStyle(int style)
1079    {
1080  955 fontStyle = style;
1081    }
1082   
 
1083  7064 toggle @Override
1084    public int getIdWidth()
1085    {
1086  7064 return idWidth;
1087    }
1088   
1089    /**
1090    * @param idWidth
1091    * the idWidth to set
1092    */
 
1093  940 toggle @Override
1094    public void setIdWidth(int idWidth)
1095    {
1096  940 this.idWidth = idWidth;
1097    }
1098   
1099    /**
1100    * @return the centreColumnLabels
1101    */
 
1102  1043 toggle @Override
1103    public boolean isCentreColumnLabels()
1104    {
1105  1043 return centreColumnLabels;
1106    }
1107   
1108    /**
1109    * @param centreColumnLabels
1110    * the centreColumnLabels to set
1111    */
 
1112  862 toggle @Override
1113    public void setCentreColumnLabels(boolean centreColumnLabels)
1114    {
1115  862 this.centreColumnLabels = centreColumnLabels;
1116    }
1117   
1118    /**
1119    * @return the showdbrefs
1120    */
 
1121  1039 toggle @Override
1122    public boolean isShowDBRefs()
1123    {
1124  1039 return showdbrefs;
1125    }
1126   
1127    /**
1128    * @param showdbrefs
1129    * the showdbrefs to set
1130    */
 
1131  862 toggle @Override
1132    public void setShowDBRefs(boolean showdbrefs)
1133    {
1134  862 this.showdbrefs = showdbrefs;
1135    }
1136   
1137    /**
1138    * @return the shownpfeats
1139    */
 
1140  1033 toggle @Override
1141    public boolean isShowNPFeats()
1142    {
1143  1033 return shownpfeats;
1144    }
1145   
1146    /**
1147    * @param shownpfeats
1148    * the shownpfeats to set
1149    */
 
1150  862 toggle @Override
1151    public void setShowNPFeats(boolean shownpfeats)
1152    {
1153  862 this.shownpfeats = shownpfeats;
1154    }
1155   
 
1156  351 toggle @Override
1157    public boolean isScaleProteinAsCdna()
1158    {
1159  351 return this.scaleProteinAsCdna;
1160    }
1161   
 
1162  862 toggle @Override
1163    public void setScaleProteinAsCdna(boolean b)
1164    {
1165  862 this.scaleProteinAsCdna = b;
1166    }
1167   
 
1168  298 toggle @Override
1169    public boolean isProteinFontAsCdna()
1170    {
1171  298 return proteinFontAsCdna;
1172    }
1173   
 
1174  242 toggle @Override
1175    public void setProteinFontAsCdna(boolean b)
1176    {
1177  242 proteinFontAsCdna = b;
1178    }
1179   
 
1180  331 toggle @Override
1181    public void setShowComplementFeatures(boolean b)
1182    {
1183  331 showComplementFeatures = b;
1184    }
1185   
 
1186  515079 toggle @Override
1187    public boolean isShowComplementFeatures()
1188    {
1189  515147 return showComplementFeatures;
1190    }
1191   
 
1192  331 toggle @Override
1193    public void setShowComplementFeaturesOnTop(boolean b)
1194    {
1195  331 showComplementFeaturesOnTop = b;
1196    }
1197   
 
1198  323 toggle @Override
1199    public boolean isShowComplementFeaturesOnTop()
1200    {
1201  323 return showComplementFeaturesOnTop;
1202    }
1203   
 
1204  3544 toggle @Override
1205    public List<String> getSecondaryStructureSources()
1206    {
1207  3544 return secondaryStructureSources;
1208    }
1209   
 
1210  2070 toggle @Override
1211    public void setSecondaryStructureSources(
1212    List<String> secondaryStructureSources)
1213    {
1214  2070 this.secondaryStructureSources = secondaryStructureSources;
1215    }
1216   
 
1217  862 toggle @Override
1218    public void setShowStructureProvider(boolean showStructureProvider)
1219    {
1220  862 this.showStructureProvider = showStructureProvider;
1221    }
1222   
 
1223  6515 toggle @Override
1224    public boolean isShowStructureProvider()
1225    {
1226  6515 return showStructureProvider;
1227    }
1228    }