Clover icon

Coverage Report

  1. Project Clover database Mon Nov 18 2024 09:56:54 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,227
680
101
0.58
1.77
99
1.02

Classes

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