Clover icon

Coverage Report

  1. Project Clover database Thu Aug 13 2020 12:04:21 BST
  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

No tests hitting this source file were found.

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
7    * Jalview is free software: you can redistribute it and/or
8    * modify it under the terms of the GNU General Public License
9    * as published by the Free Software Foundation, either version 3
10    * of the License, or (at your option) any later version.
11    *
12    * Jalview is distributed in the hope that it will be useful, but
13    * WITHOUT ANY WARRANTY; without even the implied warranty
14    * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15    * PURPOSE. See the GNU General Public License for more details.
16    *
17    * You should have received a copy of the GNU General Public License
18    * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19    * The Jalview Authors are detailed in the 'AUTHORS' file.
20    */
21    package jalview.viewmodel.styles;
22   
23    import jalview.api.ViewStyleI;
24   
25    import java.awt.Color;
26   
27    /**
28    * A container for holding alignment view properties. View properties are
29    * data-independent, which means they can be safely copied between views
30    * involving different alignment data without causing exceptions in the
31    * rendering system.
32    *
33    * @author jprocter
34    *
35    */
 
36    public class ViewStyle implements ViewStyleI
37    {
38    private boolean abovePIDThreshold = false;
39   
40    int charHeight;
41   
42    int charWidth;
43   
44    int idWidth = -1;
45   
46    /**
47    * gui state - changes to colour scheme propagated to all groups
48    */
49    private boolean colourAppliesToAllGroups;
50   
51    /**
52    * centre columnar annotation labels in displayed alignment annotation
53    */
54    boolean centreColumnLabels = false;
55   
56    private boolean showdbrefs;
57   
58    private boolean shownpfeats;
59   
60    // --------END Structure Conservation
61   
62    /**
63    * colour according to the reference sequence defined on the alignment
64    */
65    private boolean colourByReferenceSeq = false;
66   
67    boolean conservationColourSelected = false;
68   
69    /**
70    * show the reference sequence in the alignment view
71    */
72    private boolean displayReferenceSeq = false;
73   
74    private int increment;
75   
76    /**
77    * display gap characters
78    */
79    boolean renderGaps = true;
80   
81    private boolean rightAlignIds = false;
82   
83    boolean scaleAboveWrapped = false;
84   
85    boolean scaleLeftWrapped = true;
86   
87    boolean scaleRightWrapped = true;
88   
89    boolean seqNameItalics;
90   
91    /**
92    * show annotation tracks on the alignment
93    */
94    private boolean showAnnotation = true;
95   
96    /**
97    * render each residue in a coloured box
98    */
99    boolean showBoxes = true;
100   
101    /**
102    * Colour sequence text
103    */
104    boolean showColourText = false;
105   
106    /**
107    * show blue triangles
108    */
109    boolean showHiddenMarkers = true;
110   
111    /**
112    * show /start-end in ID panel
113    */
114    boolean showJVSuffix = true;
115   
116    /**
117    * scale features height according to score
118    */
119    boolean showSeqFeaturesHeight;
120   
121    /**
122    * display setting for showing/hiding sequence features on alignment view
123    */
124    boolean showSequenceFeatures = false;
125   
126    /**
127    * display sequence symbols
128    */
129    boolean showText = true;
130   
131    /**
132    * show non-conserved residues only
133    */
134    protected boolean showUnconserved = false;
135   
136    Color textColour = Color.black;
137   
138    Color textColour2 = Color.white;
139   
140    /**
141    * PID or consensus threshold
142    */
143    int threshold;
144   
145    /**
146    * threshold for switching between textColour & textColour2
147    */
148    int thresholdTextColour = 0;
149   
150    /**
151    * upper case characters in sequence are shown in bold
152    */
153    boolean upperCasebold = false;
154   
155    /**
156    * name of base font for view
157    */
158    private String fontName;
159   
160    /**
161    * size for base font
162    */
163    private int fontSize;
164   
165    /*
166    * If true, scale protein residues to 3 times width of cDNA bases (in
167    * SplitFrame views only)
168    */
169    private boolean scaleProteinAsCdna = true;
170   
171    /*
172    * if true, font changes to protein or cDNA are applied to both
173    * sides of a split screen
174    */
175    private boolean proteinFontAsCdna = true;
176   
177    /**
178    * Copy constructor
179    *
180    * @param vs
181    */
 
182  185 toggle public ViewStyle(ViewStyleI vs)
183    {
184  185 setAbovePIDThreshold(vs.getAbovePIDThreshold());
185  185 setCentreColumnLabels(vs.isCentreColumnLabels());
186  185 setCharHeight(vs.getCharHeight());
187  185 setCharWidth(vs.getCharWidth());
188  185 setColourAppliesToAllGroups(vs.getColourAppliesToAllGroups());
189  185 setColourByReferenceSeq(vs.isColourByReferenceSeq());
190  185 setColourText(vs.getColourText());
191  185 setConservationColourSelected(vs.isConservationColourSelected());
192  185 setConservationSelected(vs.getConservationSelected());
193  185 setDisplayReferenceSeq(vs.isDisplayReferenceSeq());
194  185 setFontName(vs.getFontName());
195  185 setFontSize(vs.getFontSize());
196  185 setFontStyle(vs.getFontStyle());
197  185 setIdWidth(vs.getIdWidth());
198  185 setIncrement(vs.getIncrement());
199  185 setRenderGaps(vs.isRenderGaps());
200  185 setRightAlignIds(vs.isRightAlignIds());
201  185 setScaleAboveWrapped(vs.getScaleAboveWrapped());
202  185 setScaleLeftWrapped(vs.getScaleLeftWrapped());
203  185 setScaleProteinAsCdna(vs.isScaleProteinAsCdna());
204  185 setProteinFontAsCdna(vs.isProteinFontAsCdna());
205  185 setScaleRightWrapped(vs.getScaleRightWrapped());
206  185 setSeqNameItalics(vs.isSeqNameItalics());
207  185 setShowAnnotation(vs.isShowAnnotation());
208  185 setShowBoxes(vs.getShowBoxes());
209  185 setShowColourText(vs.isShowColourText());
210  185 setShowDBRefs(vs.isShowDBRefs());
211  185 setShowHiddenMarkers(vs.getShowHiddenMarkers());
212  185 setShowJVSuffix(vs.getShowJVSuffix());
213  185 setShowNPFeats(vs.isShowNPFeats());
214  185 setShowSequenceFeaturesHeight(vs.isShowSequenceFeaturesHeight());
215  185 setShowSequenceFeatures(vs.isShowSequenceFeatures());
216  185 setShowComplementFeatures(vs.isShowComplementFeatures());
217  185 setShowComplementFeaturesOnTop(vs.isShowComplementFeaturesOnTop());
218  185 setShowText(vs.getShowText());
219  185 setShowUnconserved(vs.getShowUnconserved());
220  185 setTextColour(vs.getTextColour());
221  185 setTextColour2(vs.getTextColour2());
222  185 setThreshold(vs.getThreshold());
223  185 setThresholdTextColour(vs.getThresholdTextColour());
224  185 setUpperCasebold(vs.isUpperCasebold());
225  185 setWrapAlignment(vs.getWrapAlignment());
226  185 setWrappedWidth(vs.getWrappedWidth());
227    // ViewStyle.configureFrom(this, viewStyle);
228    }
229   
 
230  296 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  203 toggle @Override
346    public boolean isUpperCasebold()
347    {
348  203 return upperCasebold;
349    }
350   
351    /**
352    * @param upperCasebold
353    * the upperCasebold to set
354    */
 
355  185 toggle @Override
356    public void setUpperCasebold(boolean upperCasebold)
357    {
358  185 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  867 toggle @Override
383    public boolean getAbovePIDThreshold()
384    {
385  867 return abovePIDThreshold;
386    }
387   
388    /**
389    * DOCUMENT ME!
390    *
391    * @return DOCUMENT ME!
392    */
 
393  69468 toggle @Override
394    public int getCharHeight()
395    {
396  69468 return charHeight;
397    }
398   
399    /**
400    * DOCUMENT ME!
401    *
402    * @return DOCUMENT ME!
403    */
 
404  924998 toggle @Override
405    public int getCharWidth()
406    {
407  924998 return charWidth;
408    }
409   
410    /**
411    *
412    *
413    * @return flag indicating if colourchanges propagated to all groups
414    */
 
415  879 toggle @Override
416    public boolean getColourAppliesToAllGroups()
417    {
418  879 return colourAppliesToAllGroups;
419    }
420   
421    /**
422    * DOCUMENT ME!
423    *
424    * @return DOCUMENT ME!
425    */
 
426  264636 toggle @Override
427    public boolean getColourText()
428    {
429  264636 return showColourText;
430    }
431   
432    /**
433    * GUI state
434    *
435    * @return true if conservation based shading is enabled
436    */
 
437  959 toggle @Override
438    public boolean getConservationSelected()
439    {
440  959 return conservationColourSelected;
441    }
442   
443    /**
444    * GUI State
445    *
446    * @return get scalar for bleaching colourschemes by conservation
447    */
 
448  249 toggle @Override
449    public int getIncrement()
450    {
451  249 return increment;
452    }
453   
454    /**
455    * DOCUMENT ME!
456    *
457    * @return DOCUMENT ME!
458    */
 
459  809 toggle @Override
460    public boolean getScaleAboveWrapped()
461    {
462  809 return scaleAboveWrapped;
463    }
464   
465    /**
466    * DOCUMENT ME!
467    *
468    * @return DOCUMENT ME!
469    */
 
470  949 toggle @Override
471    public boolean getScaleLeftWrapped()
472    {
473  949 return scaleLeftWrapped;
474    }
475   
476    /**
477    * DOCUMENT ME!
478    *
479    * @return DOCUMENT ME!
480    */
 
481  1199 toggle @Override
482    public boolean getScaleRightWrapped()
483    {
484  1199 return scaleRightWrapped;
485    }
486   
487    /**
488    * DOCUMENT ME!
489    *
490    * @return DOCUMENT ME!
491    */
 
492  268044 toggle @Override
493    public boolean getShowBoxes()
494    {
495  268044 return showBoxes;
496    }
497   
 
498  6027 toggle @Override
499    public boolean getShowHiddenMarkers()
500    {
501  6027 return showHiddenMarkers;
502    }
503   
504    /**
505    * DOCUMENT ME!
506    *
507    * @return DOCUMENT ME!
508    */
 
509  11231 toggle @Override
510    public boolean getShowJVSuffix()
511    {
512  11231 return showJVSuffix;
513    }
514   
515    /**
516    * DOCUMENT ME!
517    *
518    * @return DOCUMENT ME!
519    */
 
520  265007 toggle @Override
521    public boolean getShowText()
522    {
523  265007 return showText;
524    }
525   
 
526  263017 toggle @Override
527    public boolean getShowUnconserved()
528    {
529  263017 return showUnconserved;
530    }
531   
532    /**
533    * @return the textColour
534    */
 
535  447891 toggle @Override
536    public Color getTextColour()
537    {
538  447891 return textColour;
539    }
540   
541    /**
542    * @return the textColour2
543    */
 
544  222 toggle @Override
545    public Color getTextColour2()
546    {
547  222 return textColour2;
548    }
549   
550    /**
551    * DOCUMENT ME!
552    *
553    * @return DOCUMENT ME!
554    */
 
555  207 toggle @Override
556    public int getThreshold()
557    {
558  207 return threshold;
559    }
560   
561    /**
562    * @return the thresholdTextColour
563    */
 
564  264580 toggle @Override
565    public int getThresholdTextColour()
566    {
567  264580 return thresholdTextColour;
568    }
569   
570    /**
571    * DOCUMENT ME!
572    *
573    * @return DOCUMENT ME!
574    */
 
575  8703 toggle @Override
576    public boolean getWrapAlignment()
577    {
578  8703 return wrapAlignment;
579    }
580   
581    /**
582    * DOCUMENT ME!
583    *
584    * @return DOCUMENT ME!
585    */
 
586  199 toggle @Override
587    public int getWrappedWidth()
588    {
589  199 return wrappedWidth;
590    }
591   
 
592  268 toggle @Override
593    public boolean isColourByReferenceSeq()
594    {
595  268 return colourByReferenceSeq;
596    }
597   
598    /**
599    * @return the conservationColourSelected
600    */
 
601  330 toggle @Override
602    public boolean isConservationColourSelected()
603    {
604  330 return conservationColourSelected;
605    }
606   
 
607  1339 toggle @Override
608    public boolean isDisplayReferenceSeq()
609    {
610  1339 return displayReferenceSeq;
611    }
612   
613    /**
614    * @return the renderGaps
615    */
 
616  1675 toggle @Override
617    public boolean isRenderGaps()
618    {
619  1675 return renderGaps;
620    }
621   
 
622  8823 toggle @Override
623    public boolean isRightAlignIds()
624    {
625  8823 return rightAlignIds;
626    }
627   
628    /**
629    * @return the seqNameItalics
630    */
 
631  1137 toggle @Override
632    public boolean isSeqNameItalics()
633    {
634  1137 return seqNameItalics;
635    }
636   
 
637  2594 toggle @Override
638    public boolean isShowAnnotation()
639    {
640  2594 return showAnnotation;
641    }
642   
643    /**
644    * @return the showColourText
645    */
 
646  648 toggle @Override
647    public boolean isShowColourText()
648    {
649  648 return showColourText;
650    }
651   
652    /**
653    * @return the showSeqFeaturesHeight
654    */
 
655  219 toggle @Override
656    public boolean isShowSequenceFeaturesHeight()
657    {
658  219 return showSeqFeaturesHeight;
659    }
660   
 
661  11589 toggle @Override
662    public boolean isShowSequenceFeatures()
663    {
664  11589 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  264 toggle @Override
675    public void setAbovePIDThreshold(boolean b)
676    {
677  264 abovePIDThreshold = b;
678    }
679   
680    /**
681    * DOCUMENT ME!
682    *
683    * @param h
684    * DOCUMENT ME!
685    */
 
686  553 toggle @Override
687    public void setCharHeight(int h)
688    {
689  553 this.charHeight = h;
690    }
691   
692    /**
693    * DOCUMENT ME!
694    *
695    * @param w
696    * DOCUMENT ME!
697    */
 
698  556 toggle @Override
699    public void setCharWidth(int w)
700    {
701  556 this.charWidth = w;
702    }
703   
704    /**
705    * @param value
706    * indicating if subsequent colourscheme changes will be propagated
707    * to all groups
708    */
 
709  630 toggle @Override
710    public void setColourAppliesToAllGroups(boolean b)
711    {
712  630 colourAppliesToAllGroups = b;
713    }
714   
 
715  195 toggle @Override
716    public void setColourByReferenceSeq(boolean colourByReferenceSeq)
717    {
718  195 this.colourByReferenceSeq = colourByReferenceSeq;
719    }
720   
721    /**
722    * DOCUMENT ME!
723    *
724    * @param state
725    * DOCUMENT ME!
726    */
 
727  255 toggle @Override
728    public void setColourText(boolean state)
729    {
730  255 showColourText = state;
731    }
732   
733    /**
734    * @param conservationColourSelected
735    * the conservationColourSelected to set
736    */
 
737  185 toggle @Override
738    public void setConservationColourSelected(
739    boolean conservationColourSelected)
740    {
741  185 this.conservationColourSelected = conservationColourSelected;
742    }
743   
744    /**
745    * GUI state
746    *
747    * @param b
748    * enable conservation based shading
749    */
 
750  263 toggle @Override
751    public void setConservationSelected(boolean b)
752    {
753  263 conservationColourSelected = b;
754    }
755   
 
756  195 toggle @Override
757    public void setDisplayReferenceSeq(boolean displayReferenceSeq)
758    {
759  195 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  255 toggle @Override
769    public void setIncrement(int inc)
770    {
771  255 increment = inc;
772    }
773   
774    /**
775    * DOCUMENT ME!
776    *
777    * @param state
778    * DOCUMENT ME!
779    */
 
780  255 toggle @Override
781    public void setRenderGaps(boolean state)
782    {
783  255 renderGaps = state;
784    }
785   
 
786  549 toggle @Override
787    public void setRightAlignIds(boolean rightAlignIds)
788    {
789  549 this.rightAlignIds = rightAlignIds;
790    }
791   
792    /**
793    * DOCUMENT ME!
794    *
795    * @param b
796    * DOCUMENT ME!
797    */
 
798  193 toggle @Override
799    public void setScaleAboveWrapped(boolean b)
800    {
801  193 scaleAboveWrapped = b;
802    }
803   
804    /**
805    * DOCUMENT ME!
806    *
807    * @param b
808    * DOCUMENT ME!
809    */
 
810  195 toggle @Override
811    public void setScaleLeftWrapped(boolean b)
812    {
813  195 scaleLeftWrapped = b;
814    }
815   
816    /**
817    *
818    *
819    * @param scaleRightWrapped
820    * - true or false
821    */
822   
 
823  193 toggle @Override
824    public void setScaleRightWrapped(boolean b)
825    {
826  193 scaleRightWrapped = b;
827    }
828   
 
829  479 toggle @Override
830    public void setSeqNameItalics(boolean italics)
831    {
832  479 seqNameItalics = italics;
833    }
834   
 
835  622 toggle @Override
836    public void setShowAnnotation(boolean b)
837    {
838  622 showAnnotation = b;
839    }
840   
841    /**
842    * DOCUMENT ME!
843    *
844    * @param state
845    * DOCUMENT ME!
846    */
 
847  255 toggle @Override
848    public void setShowBoxes(boolean state)
849    {
850  255 showBoxes = state;
851    }
852   
853    /**
854    * @param showColourText
855    * the showColourText to set
856    */
 
857  185 toggle @Override
858    public void setShowColourText(boolean showColourText)
859    {
860  185 this.showColourText = showColourText;
861    }
862   
 
863  185 toggle @Override
864    public void setShowHiddenMarkers(boolean show)
865    {
866  185 showHiddenMarkers = show;
867    }
868   
869    /**
870    * DOCUMENT ME!
871    *
872    * @param b
873    * DOCUMENT ME!
874    */
 
875  551 toggle @Override
876    public void setShowJVSuffix(boolean b)
877    {
878  551 showJVSuffix = b;
879    }
880   
 
881  185 toggle @Override
882    public void setShowSequenceFeaturesHeight(boolean selected)
883    {
884  185 showSeqFeaturesHeight = selected;
885   
886    }
887   
888    /**
889    * set the flag
890    *
891    * @param b
892    * features are displayed if true
893    */
 
894  302 toggle @Override
895    public void setShowSequenceFeatures(boolean b)
896    {
897  302 showSequenceFeatures = b;
898    }
899   
900    /**
901    * DOCUMENT ME!
902    *
903    * @param state
904    * DOCUMENT ME!
905    */
 
906  255 toggle @Override
907    public void setShowText(boolean state)
908    {
909  255 showText = state;
910    }
911   
 
912  549 toggle @Override
913    public void setShowUnconserved(boolean showunconserved)
914    {
915  549 showUnconserved = showunconserved;
916    }
917   
918    /**
919    * @param textColour
920    * the textColour to set
921    */
 
922  255 toggle @Override
923    public void setTextColour(Color textColour)
924    {
925  255 this.textColour = textColour;
926    }
927   
928    /**
929    * @param textColour2
930    * the textColour2 to set
931    */
 
932  255 toggle @Override
933    public void setTextColour2(Color textColour2)
934    {
935  255 this.textColour2 = textColour2;
936    }
937   
938    /**
939    * DOCUMENT ME!
940    *
941    * @param thresh
942    * DOCUMENT ME!
943    */
 
944  276 toggle @Override
945    public void setThreshold(int thresh)
946    {
947  276 threshold = thresh;
948    }
949   
950    /**
951    * @param thresholdTextColour
952    * the thresholdTextColour to set
953    */
 
954  255 toggle @Override
955    public void setThresholdTextColour(int thresholdTextColour)
956    {
957  255 this.thresholdTextColour = thresholdTextColour;
958    }
959   
960    /**
961    * DOCUMENT ME!
962    *
963    * @param state
964    * DOCUMENT ME!
965    */
 
966  560 toggle @Override
967    public void setWrapAlignment(boolean state)
968    {
969  560 wrapAlignment = state;
970    }
971   
972    /**
973    * DOCUMENT ME!
974    *
975    * @param w
976    * DOCUMENT ME!
977    */
 
978  296 toggle @Override
979    public void setWrappedWidth(int w)
980    {
981  296 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  268 toggle @Override
991    public String getFontName()
992    {
993  268 return fontName;
994    }
995   
 
996  326 toggle @Override
997    public int getFontSize()
998    {
999  326 return fontSize;
1000    }
1001   
 
1002  324 toggle @Override
1003    public int getFontStyle()
1004    {
1005  324 return fontStyle;
1006    }
1007   
 
1008  624 toggle @Override
1009    public void setFontName(String name)
1010    {
1011  624 fontName = name;
1012    }
1013   
 
1014  624 toggle @Override
1015    public void setFontSize(int size)
1016    {
1017  624 fontSize = size;
1018   
1019    }
1020   
 
1021  624 toggle @Override
1022    public void setFontStyle(int style)
1023    {
1024  624 fontStyle = style;
1025    }
1026   
 
1027  1904 toggle @Override
1028    public int getIdWidth()
1029    {
1030  1904 return idWidth;
1031    }
1032   
1033    /**
1034    * @param idWidth
1035    * the idWidth to set
1036    */
 
1037  432 toggle @Override
1038    public void setIdWidth(int idWidth)
1039    {
1040  432 this.idWidth = idWidth;
1041    }
1042   
1043    /**
1044    * @return the centreColumnLabels
1045    */
 
1046  696 toggle @Override
1047    public boolean isCentreColumnLabels()
1048    {
1049  696 return centreColumnLabels;
1050    }
1051   
1052    /**
1053    * @param centreColumnLabels
1054    * the centreColumnLabels to set
1055    */
 
1056  549 toggle @Override
1057    public void setCentreColumnLabels(boolean centreColumnLabels)
1058    {
1059  549 this.centreColumnLabels = centreColumnLabels;
1060    }
1061   
1062    /**
1063    * @return the showdbrefs
1064    */
 
1065  677 toggle @Override
1066    public boolean isShowDBRefs()
1067    {
1068  677 return showdbrefs;
1069    }
1070   
1071    /**
1072    * @param showdbrefs
1073    * the showdbrefs to set
1074    */
 
1075  549 toggle @Override
1076    public void setShowDBRefs(boolean showdbrefs)
1077    {
1078  549 this.showdbrefs = showdbrefs;
1079    }
1080   
1081    /**
1082    * @return the shownpfeats
1083    */
 
1084  671 toggle @Override
1085    public boolean isShowNPFeats()
1086    {
1087  671 return shownpfeats;
1088    }
1089   
1090    /**
1091    * @param shownpfeats
1092    * the shownpfeats to set
1093    */
 
1094  549 toggle @Override
1095    public void setShowNPFeats(boolean shownpfeats)
1096    {
1097  549 this.shownpfeats = shownpfeats;
1098    }
1099   
 
1100  271 toggle @Override
1101    public boolean isScaleProteinAsCdna()
1102    {
1103  271 return this.scaleProteinAsCdna;
1104    }
1105   
 
1106  549 toggle @Override
1107    public void setScaleProteinAsCdna(boolean b)
1108    {
1109  549 this.scaleProteinAsCdna = b;
1110    }
1111   
 
1112  237 toggle @Override
1113    public boolean isProteinFontAsCdna()
1114    {
1115  237 return proteinFontAsCdna;
1116    }
1117   
 
1118  185 toggle @Override
1119    public void setProteinFontAsCdna(boolean b)
1120    {
1121  185 proteinFontAsCdna = b;
1122    }
1123   
 
1124  255 toggle @Override
1125    public void setShowComplementFeatures(boolean b)
1126    {
1127  255 showComplementFeatures = b;
1128    }
1129   
 
1130  5380 toggle @Override
1131    public boolean isShowComplementFeatures()
1132    {
1133  5380 return showComplementFeatures;
1134    }
1135   
 
1136  255 toggle @Override
1137    public void setShowComplementFeaturesOnTop(boolean b)
1138    {
1139  255 showComplementFeaturesOnTop = b;
1140    }
1141   
 
1142  243 toggle @Override
1143    public boolean isShowComplementFeaturesOnTop()
1144    {
1145  243 return showComplementFeaturesOnTop;
1146    }
1147    }