X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fviewmodel%2Fstyles%2FViewStyle.java;h=91f2f0cdbc4b1a4f40388d9aa4b90ac5283c47c8;hb=08f7a2be3977da8704dd4751de7245bcc6fc41c3;hp=a0ba63376901d81a65c8477904f719eebab35ea7;hpb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;p=jalview.git diff --git a/src/jalview/viewmodel/styles/ViewStyle.java b/src/jalview/viewmodel/styles/ViewStyle.java index a0ba633..91f2f0c 100644 --- a/src/jalview/viewmodel/styles/ViewStyle.java +++ b/src/jalview/viewmodel/styles/ViewStyle.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -168,6 +168,12 @@ public class ViewStyle implements ViewStyleI */ private boolean scaleProteinAsCdna = true; + /* + * if true, font changes to protein or cDNA are applied to both + * sides of a split screen + */ + private boolean proteinFontAsCdna = true; + /** * Copy constructor * @@ -195,6 +201,7 @@ public class ViewStyle implements ViewStyleI setScaleAboveWrapped(vs.getScaleAboveWrapped()); setScaleLeftWrapped(vs.getScaleLeftWrapped()); setScaleProteinAsCdna(vs.isScaleProteinAsCdna()); + setProteinFontAsCdna(vs.isProteinFontAsCdna()); setScaleRightWrapped(vs.getScaleRightWrapped()); setSeqNameItalics(vs.isSeqNameItalics()); setShowAnnotation(vs.isShowAnnotation()); @@ -206,6 +213,8 @@ public class ViewStyle implements ViewStyleI setShowNPFeats(vs.isShowNPFeats()); setShowSequenceFeaturesHeight(vs.isShowSequenceFeaturesHeight()); setShowSequenceFeatures(vs.isShowSequenceFeatures()); + setShowComplementFeatures(vs.isShowComplementFeatures()); + setShowComplementFeaturesOnTop(vs.isShowComplementFeaturesOnTop()); setShowText(vs.getShowText()); setShowUnconserved(vs.getShowUnconserved()); setTextColour(vs.getTextColour()); @@ -255,6 +264,7 @@ public class ViewStyle implements ViewStyleI && getScaleAboveWrapped() == vs.getScaleAboveWrapped() && getScaleLeftWrapped() == vs.getScaleLeftWrapped() && isScaleProteinAsCdna() == vs.isScaleProteinAsCdna() + && isProteinFontAsCdna() == vs.isProteinFontAsCdna() && getScaleRightWrapped() == vs.getScaleRightWrapped() && isSeqNameItalics() == vs.isSeqNameItalics() && isShowAnnotation() == vs.isShowAnnotation() @@ -267,26 +277,26 @@ public class ViewStyle implements ViewStyleI && isShowSequenceFeaturesHeight() == vs .isShowSequenceFeaturesHeight() && isShowSequenceFeatures() == vs.isShowSequenceFeatures() + && isShowComplementFeatures() == vs.isShowComplementFeatures() + && isShowComplementFeaturesOnTop() == vs + .isShowComplementFeaturesOnTop() && getShowText() == vs.getShowText() && getShowUnconserved() == vs.getShowUnconserved() && getThreshold() == vs.getThreshold() && getThresholdTextColour() == vs.getThresholdTextColour() && isUpperCasebold() == vs.isUpperCasebold() - && getWrapAlignment() == vs.getWrapAlignment() && getWrappedWidth() == vs - .getWrappedWidth()); + && getWrapAlignment() == vs.getWrapAlignment() + && getWrappedWidth() == vs.getWrappedWidth()); /* * and compare non-primitive types; syntax below will match null with null * values */ - match = match - && String.valueOf(getFontName()).equals( - String.valueOf(vs.getFontName())); - match = match - && String.valueOf(getTextColour()).equals( - String.valueOf(vs.getTextColour())); - match = match - && String.valueOf(getTextColour2()).equals( - String.valueOf(vs.getTextColour2())); + match = match && String.valueOf(getFontName()) + .equals(String.valueOf(vs.getFontName())); + match = match && String.valueOf(getTextColour()) + .equals(String.valueOf(vs.getTextColour())); + match = match && String.valueOf(getTextColour2()) + .equals(String.valueOf(vs.getTextColour2())); return match; // return equivalent(this, (ViewStyle) other); } @@ -360,6 +370,10 @@ public class ViewStyle implements ViewStyleI private int fontStyle; + private boolean showComplementFeatures; + + private boolean showComplementFeaturesOnTop; + /** * GUI state * @@ -1094,4 +1108,40 @@ public class ViewStyle implements ViewStyleI { this.scaleProteinAsCdna = b; } + + @Override + public boolean isProteinFontAsCdna() + { + return proteinFontAsCdna; + } + + @Override + public void setProteinFontAsCdna(boolean b) + { + proteinFontAsCdna = b; + } + + @Override + public void setShowComplementFeatures(boolean b) + { + showComplementFeatures = b; + } + + @Override + public boolean isShowComplementFeatures() + { + return showComplementFeatures; + } + + @Override + public void setShowComplementFeaturesOnTop(boolean b) + { + showComplementFeaturesOnTop = b; + } + + @Override + public boolean isShowComplementFeaturesOnTop() + { + return showComplementFeaturesOnTop; + } }