X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFontChooser.java;h=8220aea35ecd327d5991f41d78d3e1729ada828f;hb=abd0918cc633b946cfea588ef4b4d666edf9fc8b;hp=2ffb166a98ac1f6891b0195e1575d3875e461ee0;hpb=ec48924dda6dc02a967e413eea0a5fc6609c2ae3;p=jalview.git diff --git a/src/jalview/gui/FontChooser.java b/src/jalview/gui/FontChooser.java index 2ffb166..8220aea 100755 --- a/src/jalview/gui/FontChooser.java +++ b/src/jalview/gui/FontChooser.java @@ -20,6 +20,10 @@ */ package jalview.gui; +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; @@ -29,10 +33,6 @@ import javax.swing.JInternalFrame; import javax.swing.JLayeredPane; import javax.swing.JOptionPane; -import jalview.bin.Cache; -import jalview.jbgui.GFontChooser; -import jalview.util.MessageManager; - /** * DOCUMENT ME! * @@ -157,6 +157,7 @@ public class FontChooser extends GFontChooser init = false; } + @Override public void smoothFont_actionPerformed(ActionEvent e) { ap.av.antiAlias = smoothFont.isSelected(); @@ -170,6 +171,7 @@ public class FontChooser extends GFontChooser * @param e * DOCUMENT ME! */ + @Override protected void ok_actionPerformed(ActionEvent e) { try @@ -194,6 +196,7 @@ public class FontChooser extends GFontChooser * @param e * DOCUMENT ME! */ + @Override protected void cancel_actionPerformed(ActionEvent e) { if (ap != null) @@ -247,13 +250,12 @@ public class FontChooser extends GFontChooser double iw = iBounds.getWidth(); if (mw < 1 || iw < 1) { - final String messageKey = iBounds.getHeight() < 1 ? "label.font_doesnt_have_letters_defined" - : "label.font_too_small"; - JOptionPane - .showInternalMessageDialog( - this, - MessageManager.getString(messageKey), - MessageManager.getString("label.invalid_font"), JOptionPane.WARNING_MESSAGE); + 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"), + JvOptionPane.WARNING_MESSAGE); /* * Restore the changed value - note this will reinvoke this method via the * ActionListener, but now validation should pass @@ -302,6 +304,7 @@ public class FontChooser extends GFontChooser * @param e * DOCUMENT ME! */ + @Override protected void fontName_actionPerformed(ActionEvent e) { if (init) @@ -318,6 +321,7 @@ public class FontChooser extends GFontChooser * @param e * DOCUMENT ME! */ + @Override protected void fontSize_actionPerformed(ActionEvent e) { if (init) @@ -334,6 +338,7 @@ public class FontChooser extends GFontChooser * @param e * DOCUMENT ME! */ + @Override protected void fontStyle_actionPerformed(ActionEvent e) { if (init) @@ -350,6 +355,7 @@ public class FontChooser extends GFontChooser * * @param e */ + @Override public void defaultButton_actionPerformed(ActionEvent e) { Cache.setProperty("FONT_NAME", fontName.getSelectedItem().toString());