*/
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;
import javax.swing.JLayeredPane;
import javax.swing.JOptionPane;
-import jalview.bin.Cache;
-import jalview.jbgui.GFontChooser;
-import jalview.util.MessageManager;
-
/**
* DOCUMENT ME!
*
init = false;
}
+ @Override
public void smoothFont_actionPerformed(ActionEvent e)
{
ap.av.antiAlias = smoothFont.isSelected();
* @param e
* DOCUMENT ME!
*/
+ @Override
protected void ok_actionPerformed(ActionEvent e)
{
try
* @param e
* DOCUMENT ME!
*/
+ @Override
protected void cancel_actionPerformed(ActionEvent e)
{
if (ap != null)
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");
+ JOptionPane.showInternalMessageDialog(this, message,
+ MessageManager.getString("label.invalid_font"),
+ JOptionPane.WARNING_MESSAGE);
/*
* Restore the changed value - note this will reinvoke this method via the
* ActionListener, but now validation should pass
* @param e
* DOCUMENT ME!
*/
+ @Override
protected void fontName_actionPerformed(ActionEvent e)
{
if (init)
* @param e
* DOCUMENT ME!
*/
+ @Override
protected void fontSize_actionPerformed(ActionEvent e)
{
if (init)
* @param e
* DOCUMENT ME!
*/
+ @Override
protected void fontStyle_actionPerformed(ActionEvent e)
{
if (init)
*
* @param e
*/
+ @Override
public void defaultButton_actionPerformed(ActionEvent e)
{
Cache.setProperty("FONT_NAME", fontName.getSelectedItem().toString());