X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGFontChooser.java;h=2a2676cbe0815d6bc50ffc0357225663eee73a27;hb=ad15cff29620f960119f80176f1fd443da9f6763;hp=8b7c585d97ba1c170bd981134484e5cd31d72d5a;hpb=2de8acfae59aced665e4c37ad0f7dcc2ed68818e;p=jalview.git diff --git a/src/jalview/jbgui/GFontChooser.java b/src/jalview/jbgui/GFontChooser.java index 8b7c585..2a2676c 100755 --- a/src/jalview/jbgui/GFontChooser.java +++ b/src/jalview/jbgui/GFontChooser.java @@ -1,23 +1,28 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.jbgui; +import jalview.gui.JvSwingUtils; +import jalview.util.MessageManager; + import java.awt.*; import java.awt.event.*; import javax.swing.*; @@ -86,13 +91,13 @@ public class GFontChooser extends JPanel * DOCUMENT ME! * * @throws Exception - * DOCUMENT ME! + * DOCUMENT ME! */ private void jbInit() throws Exception { jLabel1.setFont(new java.awt.Font("Verdana", 0, 11)); jLabel1.setHorizontalAlignment(SwingConstants.RIGHT); - jLabel1.setText("Font: "); + jLabel1.setText(MessageManager.getString("label.font")); jLabel1.setVerticalTextPosition(javax.swing.SwingConstants.CENTER); this.setLayout(null); fontSize.setFont(new java.awt.Font("Verdana", 0, 11)); @@ -117,11 +122,11 @@ public class GFontChooser extends JPanel }); jLabel2.setFont(new java.awt.Font("Verdana", 0, 11)); jLabel2.setHorizontalAlignment(SwingConstants.RIGHT); - jLabel2.setText("Size: "); + jLabel2.setText(MessageManager.getString("label.size")); jLabel2.setVerticalTextPosition(javax.swing.SwingConstants.CENTER); jLabel3.setFont(new java.awt.Font("Verdana", 0, 11)); jLabel3.setHorizontalAlignment(SwingConstants.RIGHT); - jLabel3.setText("Style: "); + jLabel3.setText(MessageManager.getString("label.style")); jLabel3.setVerticalTextPosition(javax.swing.SwingConstants.CENTER); fontName.setFont(new java.awt.Font("Verdana", 0, 11)); fontName.setMaximumSize(new Dimension(32767, 32767)); @@ -136,7 +141,7 @@ public class GFontChooser extends JPanel } }); ok.setFont(new java.awt.Font("Verdana", 0, 11)); - ok.setText("OK"); + ok.setText(MessageManager.getString("action.ok")); ok.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -145,7 +150,7 @@ public class GFontChooser extends JPanel } }); cancel.setFont(new java.awt.Font("Verdana", 0, 11)); - cancel.setText("Cancel"); + cancel.setText(MessageManager.getString("action.cancel")); cancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -163,8 +168,8 @@ public class GFontChooser extends JPanel jPanel3.setOpaque(false); jPanel3.setBounds(new Rectangle(174, 38, 134, 21)); jPanel3.setLayout(borderLayout2); - defaultButton.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - defaultButton.setText("Set as Default"); + defaultButton.setFont(JvSwingUtils.getLabelFont()); + defaultButton.setText(MessageManager.getString("label.set_as_default")); defaultButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -172,9 +177,9 @@ public class GFontChooser extends JPanel defaultButton_actionPerformed(e); } }); - smoothFont.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + smoothFont.setFont(JvSwingUtils.getLabelFont()); smoothFont.setOpaque(false); - smoothFont.setText("Anti-alias Fonts (Slower to render)"); + smoothFont.setText(MessageManager.getString("label.anti_alias_fonts")); smoothFont.setBounds(new Rectangle(41, 65, 223, 23)); smoothFont.addActionListener(new ActionListener() { @@ -184,10 +189,11 @@ public class GFontChooser extends JPanel } }); monospaced.setEnabled(false); - monospaced.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + monospaced.setFont(JvSwingUtils.getLabelFont()); monospaced.setOpaque(false); - monospaced.setToolTipText("Monospaced fonts are faster to render"); - monospaced.setText("Monospaced"); + monospaced.setToolTipText(MessageManager + .getString("label.monospaced_fonts_faster_to_render")); + monospaced.setText(MessageManager.getString("label.monospaced_font")); jPanel4.setOpaque(false); jPanel4.setBounds(new Rectangle(24, 92, 259, 35)); jPanel1.add(jLabel1, BorderLayout.WEST); @@ -211,7 +217,7 @@ public class GFontChooser extends JPanel * DOCUMENT ME! * * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ protected void ok_actionPerformed(ActionEvent e) { @@ -221,7 +227,7 @@ public class GFontChooser extends JPanel * DOCUMENT ME! * * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ protected void cancel_actionPerformed(ActionEvent e) { @@ -231,7 +237,7 @@ public class GFontChooser extends JPanel * DOCUMENT ME! * * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ protected void fontName_actionPerformed(ActionEvent e) { @@ -241,7 +247,7 @@ public class GFontChooser extends JPanel * DOCUMENT ME! * * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ protected void fontSize_actionPerformed(ActionEvent e) { @@ -251,7 +257,7 @@ public class GFontChooser extends JPanel * DOCUMENT ME! * * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ protected void fontStyle_actionPerformed(ActionEvent e) { @@ -261,7 +267,7 @@ public class GFontChooser extends JPanel * DOCUMENT ME! * * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ public void defaultButton_actionPerformed(ActionEvent e) {