X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFontChooser.java;h=fc66965e48f5e5b23fa85f0dcd34bb047d519c2d;hb=a18c4df2d9f819b7b38006bcac3e23c14fcd95e5;hp=cda6c46bcec7e1bd972f450694c3475a0f57ff10;hpb=7ab5d6b0ba5fec1ea4a4239e79c476d841622485;p=jalview.git diff --git a/src/jalview/gui/FontChooser.java b/src/jalview/gui/FontChooser.java index cda6c46..fc66965 100755 --- a/src/jalview/gui/FontChooser.java +++ b/src/jalview/gui/FontChooser.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 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. * @@ -20,14 +20,18 @@ */ package jalview.gui; -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; - -import jalview.bin.*; -import jalview.jbgui.*; +import jalview.bin.Cache; +import jalview.jbgui.GFontChooser; import jalview.util.MessageManager; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.event.ActionEvent; + +import javax.swing.JInternalFrame; +import javax.swing.JLayeredPane; +import javax.swing.JOptionPane; + /** * DOCUMENT ME! * @@ -129,7 +133,7 @@ public class FontChooser extends GFontChooser public void smoothFont_actionPerformed(ActionEvent e) { ap.av.antiAlias = smoothFont.isSelected(); - ap.annotationPanel.image = null; + ap.getAnnotationPanel().image = null; ap.paintAlignment(true); } @@ -167,7 +171,7 @@ public class FontChooser extends GFontChooser { if (ap != null) { - ap.av.setFont(oldFont); + ap.av.setFont(oldFont, true); ap.paintAlignment(true); } else if (tp != null) @@ -226,8 +230,8 @@ public class FontChooser extends GFontChooser JOptionPane .showInternalMessageDialog( this, - "Font doesn't have letters defined\nso cannot be used\nwith alignment data.", - "Invalid Font", JOptionPane.WARNING_MESSAGE); + MessageManager.getString("label.font_doesnt_have_letters_defined"), + MessageManager.getString("label.invalid_font"), JOptionPane.WARNING_MESSAGE); return; } if (tp != null) @@ -236,7 +240,7 @@ public class FontChooser extends GFontChooser } else if (ap != null) { - ap.av.setFont(newFont); + ap.av.setFont(newFont, true); ap.fontChanged(); }