X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fviewmodel%2Fstyles%2FViewStyle.java;fp=src%2Fjalview%2Fviewmodel%2Fstyles%2FViewStyle.java;h=16aa58015d1e4b27e04a14795a210db1ce9e791c;hb=f063821ed0be9c1581af74643a1aa5798731af65;hp=14a1bdedf40f6f91f8847268448d9621c6b40fce;hpb=fd18e2c73cd015d4e38ad91da0e5d7532ff0ef42;p=jalview.git diff --git a/src/jalview/viewmodel/styles/ViewStyle.java b/src/jalview/viewmodel/styles/ViewStyle.java index 14a1bde..16aa580 100644 --- a/src/jalview/viewmodel/styles/ViewStyle.java +++ b/src/jalview/viewmodel/styles/ViewStyle.java @@ -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()); @@ -255,6 +262,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() @@ -272,21 +280,18 @@ public class ViewStyle implements ViewStyleI && 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); } @@ -1094,4 +1099,16 @@ public class ViewStyle implements ViewStyleI { this.scaleProteinAsCdna = b; } + + @Override + public boolean isProteinFontAsCdna() + { + return proteinFontAsCdna; + } + + @Override + public void setProteinFontAsCdna(boolean b) + { + proteinFontAsCdna = b; + } }