X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFontChooser.java;fp=src%2Fjalview%2Fgui%2FFontChooser.java;h=5271e4f73667d6b8080078879f763481cf6f2f7d;hb=be762d8d9c71a7aa3121e845c45911c7192b7827;hp=06f29e9dd18f435dae628fb2b2ee7d042a12de33;hpb=d1bb7a31fc091606aedbc255a5766ac79e36fa91;p=jalview.git diff --git a/src/jalview/gui/FontChooser.java b/src/jalview/gui/FontChooser.java index 06f29e9..5271e4f 100755 --- a/src/jalview/gui/FontChooser.java +++ b/src/jalview/gui/FontChooser.java @@ -126,7 +126,8 @@ public class FontChooser extends GFontChooser { oldComplementFont = ((AlignViewport) ap.av.getCodingComplement()) .getFont(); - oldComplementSmooth = ((AlignViewport) ap.av.getCodingComplement()).antiAlias; + oldComplementSmooth = ((AlignViewport) ap.av + .getCodingComplement()).antiAlias; scaleAsCdna.setVisible(true); scaleAsCdna.setSelected(ap.av.isScaleProteinAsCdna()); fontAsCdna.setVisible(true); @@ -170,9 +171,9 @@ public class FontChooser extends GFontChooser fontStyle.setSelectedIndex(oldFont.getStyle()); FontMetrics fm = getGraphics().getFontMetrics(oldFont); - monospaced.setSelected(fm.getStringBounds("M", getGraphics()) - .getWidth() == fm.getStringBounds("|", getGraphics()) - .getWidth()); + monospaced.setSelected( + fm.getStringBounds("M", getGraphics()).getWidth() == fm + .getStringBounds("|", getGraphics()).getWidth()); init = false; } @@ -185,7 +186,8 @@ public class FontChooser extends GFontChooser ap.paintAlignment(true); if (ap.av.getCodingComplement() != null && ap.av.isProteinFontAsCdna()) { - ((AlignViewport) ap.av.getCodingComplement()).antiAlias = ap.av.antiAlias; + ((AlignViewport) ap.av + .getCodingComplement()).antiAlias = ap.av.antiAlias; SplitFrame sv = (SplitFrame) ap.alignFrame.getSplitViewContainer(); sv.adjustLayout(); sv.repaint(); @@ -239,7 +241,8 @@ public class FontChooser extends GFontChooser { ap.av.getCodingComplement().setScaleProteinAsCdna(oldProteinScale); ap.av.getCodingComplement().setProteinFontAsCdna(oldMirrorFont); - ((AlignViewport) ap.av.getCodingComplement()).antiAlias = oldComplementSmooth; + ((AlignViewport) ap.av + .getCodingComplement()).antiAlias = oldComplementSmooth; ap.av.getCodingComplement().setFont(oldComplementFont, true); SplitFrame splitFrame = (SplitFrame) ap.alignFrame .getSplitViewContainer(); @@ -284,8 +287,9 @@ public class FontChooser extends GFontChooser double iw = iBounds.getWidth(); if (mw < 1 || iw < 1) { - String message = iBounds.getHeight() < 1 ? MessageManager - .getString("label.font_doesnt_have_letters_defined") + String message = iBounds.getHeight() < 1 + ? MessageManager + .getString("label.font_doesnt_have_letters_defined") : MessageManager.getString("label.font_too_small"); JvOptionPane.showInternalMessageDialog(this, message, MessageManager.getString("label.invalid_font"), @@ -298,8 +302,8 @@ public class FontChooser extends GFontChooser { fontSize.setSelectedItem(lastSelected.getSize()); } - if (!lastSelected.getName().equals( - fontName.getSelectedItem().toString())) + if (!lastSelected.getName() + .equals(fontName.getSelectedItem().toString())) { fontName.setSelectedItem(lastSelected.getName()); } @@ -421,8 +425,8 @@ public class FontChooser extends GFontChooser protected void scaleAsCdna_actionPerformed() { ap.av.setScaleProteinAsCdna(scaleAsCdna.isSelected()); - ap.av.getCodingComplement().setScaleProteinAsCdna( - scaleAsCdna.isSelected()); + ap.av.getCodingComplement() + .setScaleProteinAsCdna(scaleAsCdna.isSelected()); final SplitFrame splitFrame = (SplitFrame) ap.alignFrame .getSplitViewContainer(); splitFrame.adjustLayout();