JAL-934 - refactor to use label font functions
authorjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 14 Sep 2011 12:55:36 +0000 (13:55 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 14 Sep 2011 12:55:36 +0000 (13:55 +0100)
src/jalview/gui/EPSOptions.java
src/jalview/gui/FeatureColourChooser.java
src/jalview/gui/FeatureRenderer.java
src/jalview/gui/FeatureSettings.java
src/jalview/gui/SequenceFetcher.java
src/jalview/jbgui/GCutAndPasteTransfer.java
src/jalview/jbgui/GFontChooser.java
src/jalview/jbgui/GPreferences.java
src/jalview/jbgui/GSequenceLink.java
src/jalview/jbgui/GUserDefinedColours.java
src/jalview/jbgui/GWsPreferences.java

index 9686f18..2edaf0b 100755 (executable)
@@ -54,12 +54,12 @@ public class EPSOptions extends JPanel
 
   private void jbInit() throws Exception
   {
-    lineart.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    lineart.setFont(JvSwingUtils.getLabelFont());
     lineart.setText("Lineart");
-    text.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    text.setFont(JvSwingUtils.getLabelFont());
     text.setText("Text");
     text.setSelected(true);
-    askAgain.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    askAgain.setFont(JvSwingUtils.getLabelFont());
     askAgain.setText("Don\'t ask me again");
     ok.setText("OK");
     ok.addActionListener(new ActionListener()
@@ -77,7 +77,7 @@ public class EPSOptions extends JPanel
         cancel_actionPerformed(e);
       }
     });
-    jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    jLabel1.setFont(JvSwingUtils.getLabelFont());
     jLabel1.setText("Select EPS character rendering style");
     this.setLayout(borderLayout1);
     jPanel3.setBorder(BorderFactory.createEtchedBorder());
index 9943df9..d6c63dc 100644 (file)
@@ -177,7 +177,7 @@ public class FeatureColourChooser extends JalviewDialog
   private void jbInit() throws Exception
   {
 
-    minColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    minColour.setFont(JvSwingUtils.getLabelFont());
     minColour.setBorder(BorderFactory.createLineBorder(Color.black));
     minColour.setPreferredSize(new Dimension(40, 20));
     minColour.setToolTipText("Minimum Colour");
@@ -191,7 +191,7 @@ public class FeatureColourChooser extends JalviewDialog
         }
       }
     });
-    maxColour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    maxColour.setFont(JvSwingUtils.getLabelFont());
     maxColour.setBorder(BorderFactory.createLineBorder(Color.black));
     maxColour.setPreferredSize(new Dimension(40, 20));
     maxColour.setToolTipText("Maximum Colour");
@@ -207,9 +207,9 @@ public class FeatureColourChooser extends JalviewDialog
     });
     maxColour.setBorder(new LineBorder(Color.black));
     minText.setText("Min:");
-    minText.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    minText.setFont(JvSwingUtils.getLabelFont());
     maxText.setText("Max:");
-    maxText.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    maxText.setFont(JvSwingUtils.getLabelFont());
     this.setLayout(borderLayout1);
     jPanel2.setLayout(flowLayout1);
     jPanel1.setBackground(Color.white);
index d613a30..81a4108 100755 (executable)
@@ -1122,7 +1122,7 @@ public class FeatureRenderer implements jalview.api.FeatureRenderer
 
     panel = new JPanel();
     panel.add(new JLabel("Description: ", JLabel.RIGHT));
-    description.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    description.setFont(JvSwingUtils.getTextAreaFont());
     description.setLineWrap(true);
     panel.add(new JScrollPane(description));
 
index 1997dc9..bd9443f 100755 (executable)
@@ -904,7 +904,7 @@ public class FeatureSettings extends JPanel
     settingsPane.setLayout(borderLayout2);
     dasSettingsPane.setLayout(borderLayout3);
     bigPanel.setLayout(borderLayout4);
-    invert.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    invert.setFont(JvSwingUtils.getLabelFont());
     invert.setText("Invert Selection");
     invert.addActionListener(new ActionListener()
     {
@@ -913,7 +913,7 @@ public class FeatureSettings extends JPanel
         invertSelection();
       }
     });
-    optimizeOrder.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    optimizeOrder.setFont(JvSwingUtils.getLabelFont());
     optimizeOrder.setText("Optimise Order");
     optimizeOrder.addActionListener(new ActionListener()
     {
@@ -922,7 +922,7 @@ public class FeatureSettings extends JPanel
         orderByAvWidth();
       }
     });
-    sortByScore.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    sortByScore.setFont(JvSwingUtils.getLabelFont());
     sortByScore.setText("Seq sort by Score");
     sortByScore.addActionListener(new ActionListener()
     {
@@ -931,7 +931,7 @@ public class FeatureSettings extends JPanel
         sortByScore(null);
       }
     });
-    sortByDens.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    sortByDens.setFont(JvSwingUtils.getLabelFont());
     sortByDens.setText("Seq Sort by density");
     sortByDens.addActionListener(new ActionListener()
     {
@@ -940,7 +940,7 @@ public class FeatureSettings extends JPanel
         sortByDens(null);
       }
     });
-    cancel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    cancel.setFont(JvSwingUtils.getLabelFont());
     cancel.setText("Cancel");
     cancel.addActionListener(new ActionListener()
     {
@@ -950,7 +950,7 @@ public class FeatureSettings extends JPanel
         close();
       }
     });
-    ok.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    ok.setFont(JvSwingUtils.getLabelFont());
     ok.setText("OK");
     ok.addActionListener(new ActionListener()
     {
@@ -959,7 +959,7 @@ public class FeatureSettings extends JPanel
         close();
       }
     });
-    loadColours.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    loadColours.setFont(JvSwingUtils.getLabelFont());
     loadColours.setText("Load Colours");
     loadColours.addActionListener(new ActionListener()
     {
@@ -968,7 +968,7 @@ public class FeatureSettings extends JPanel
         load();
       }
     });
-    saveColours.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    saveColours.setFont(JvSwingUtils.getLabelFont());
     saveColours.setText("Save Colours");
     saveColours.addActionListener(new ActionListener()
     {
index 3defa9c..2f90ba0 100755 (executable)
@@ -229,7 +229,7 @@ public class SequenceFetcher extends JPanel implements Runnable
   {
     this.setLayout(borderLayout2);
 
-    database.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    database.setFont(JvSwingUtils.getLabelFont());
     dbeg.setFont(new java.awt.Font("Verdana", Font.BOLD, 11));
     jLabel1.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));
     jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
@@ -272,7 +272,7 @@ public class SequenceFetcher extends JPanel implements Runnable
         close_actionPerformed(e);
       }
     });
-    textArea.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    textArea.setFont(JvSwingUtils.getLabelFont());
     textArea.setLineWrap(true);
     textArea.addKeyListener(new KeyAdapter()
     {
index d809098..101cb03 100755 (executable)
@@ -17,6 +17,8 @@
  */
 package jalview.jbgui;
 
+import jalview.gui.JvSwingUtils;
+
 import java.awt.*;
 import java.awt.event.*;
 import javax.swing.*;
@@ -81,7 +83,7 @@ public class GCutAndPasteTransfer extends JInternalFrame
   private void jbInit() throws Exception
   {
     scrollPane.setBorder(null);
-    ok.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    ok.setFont(JvSwingUtils.getLabelFont());
     ok.setText("New Window");
     ok.addActionListener(new ActionListener()
     {
index e0e71bb..b8fbc5f 100755 (executable)
@@ -17,6 +17,8 @@
  */
 package jalview.jbgui;
 
+import jalview.gui.JvSwingUtils;
+
 import java.awt.*;
 import java.awt.event.*;
 import javax.swing.*;
@@ -162,7 +164,7 @@ 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.setFont(JvSwingUtils.getLabelFont());
     defaultButton.setText("Set as Default");
     defaultButton.addActionListener(new ActionListener()
     {
@@ -171,7 +173,7 @@ 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.setBounds(new Rectangle(41, 65, 223, 23));
@@ -183,7 +185,7 @@ 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");
index 1a1f9d3..5edded5 100755 (executable)
@@ -181,7 +181,7 @@ public class GPreferences extends JPanel
 
   JPanel jPanel11 = new JPanel();
 
-  Font verdana11 = new java.awt.Font("Verdana", Font.PLAIN, 11);
+  Font verdana11 = JvSwingUtils.getLabelFont();
 
   protected JCheckBox seqLimit = new JCheckBox();
 
@@ -622,32 +622,31 @@ public class GPreferences extends JPanel
     smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
     smoothFont.setText("Smooth Font");
     calcTab.setLayout(null);
-    autoCalculateConsCheck.setFont(new java.awt.Font("Verdana", Font.PLAIN,
-            11));
+    autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
     autoCalculateConsCheck.setText("AutoCalculate Consensus");
     autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
-    padGaps.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    padGaps.setFont(JvSwingUtils.getLabelFont());
     padGaps.setText("Pad gaps when editing");
     padGaps.setBounds(new Rectangle(22, 94, 168, 23));
-    modellerOutput.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    modellerOutput.setFont(JvSwingUtils.getLabelFont());
     modellerOutput.setText("Use Modeller Output");
     modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
     dasPanel.setLayout(borderLayout4);
     wsPanel.setLayout(borderLayout5);
-    wrap.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    wrap.setFont(JvSwingUtils.getLabelFont());
     wrap.setHorizontalAlignment(SwingConstants.TRAILING);
     wrap.setHorizontalTextPosition(SwingConstants.LEADING);
     wrap.setText("Wrap Alignment");
-    rightAlign.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    rightAlign.setFont(JvSwingUtils.getLabelFont());
     rightAlign.setForeground(Color.black);
     rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
     rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
     rightAlign.setText("Right Align Ids");
-    idItalics.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    idItalics.setFont(JvSwingUtils.getLabelFont());
     idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
     idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
     idItalics.setText("Sequence Name Italics");
-    openoverv.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    openoverv.setFont(JvSwingUtils.getLabelFont());
     openoverv.setActionCommand("Open Overview");
     openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
     openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
index d9669c8..e9cfe4b 100755 (executable)
@@ -17,6 +17,7 @@
  */
 package jalview.jbgui;
 
+import jalview.gui.JvSwingUtils;
 import jalview.util.UrlLink;
 
 import java.awt.*;
@@ -39,7 +40,7 @@ public class GSequenceLink extends Panel
   private void jbInit() throws Exception
   {
     this.setLayout(gridBagLayout1);
-    nameTB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    nameTB.setFont(JvSwingUtils.getLabelFont());
     nameTB.setBounds(new Rectangle(77, 10, 310, 23));
     nameTB.addKeyListener(new KeyAdapter()
     {
@@ -48,7 +49,7 @@ public class GSequenceLink extends Panel
         nameTB_keyTyped(e);
       }
     });
-    urlTB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    urlTB.setFont(JvSwingUtils.getLabelFont());
     urlTB.setText("http://www.");
     urlTB.setBounds(new Rectangle(78, 40, 309, 23));
     urlTB.addKeyListener(new KeyAdapter()
@@ -58,11 +59,11 @@ public class GSequenceLink extends Panel
         urlTB_keyTyped(e);
       }
     });
-    jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    jLabel1.setFont(JvSwingUtils.getLabelFont());
     jLabel1.setHorizontalAlignment(SwingConstants.TRAILING);
     jLabel1.setText("Link Name");
     jLabel1.setBounds(new Rectangle(4, 10, 71, 24));
-    jLabel2.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    jLabel2.setFont(JvSwingUtils.getLabelFont());
     jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
     jLabel2.setText("URL");
     jLabel2.setBounds(new Rectangle(17, 37, 54, 27));
index 6085b64..e39e0f4 100755 (executable)
@@ -17,6 +17,8 @@
  */
 package jalview.jbgui;
 
+import jalview.gui.JvSwingUtils;
+
 import java.awt.*;
 import java.awt.event.*;
 import javax.swing.*;
@@ -146,7 +148,7 @@ public class GUserDefinedColours extends JPanel
         savebutton_actionPerformed(e);
       }
     });
-    cancelButton.setFont(new java.awt.Font("Verdana", 0, 11));
+    cancelButton.setFont(JvSwingUtils.getLabelFont());
     cancelButton.setText("Cancel");
     cancelButton.addActionListener(new java.awt.event.ActionListener()
     {
@@ -159,13 +161,13 @@ public class GUserDefinedColours extends JPanel
     lowerPanel.setOpaque(false);
     lowerPanel.setLayout(borderLayout3);
     colorChooser.setOpaque(false);
-    jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    jLabel1.setFont(JvSwingUtils.getLabelFont());
     jLabel1.setText("Name");
     namePanel.setMinimumSize(new Dimension(300, 31));
     namePanel.setOpaque(false);
     namePanel.setPreferredSize(new Dimension(240, 25));
     namePanel.setLayout(borderLayout1);
-    schemeName.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
+    schemeName.setFont(JvSwingUtils.getLabelFont());
     schemeName.setPreferredSize(new Dimension(105, 21));
     schemeName.setText("");
     schemeName.setHorizontalAlignment(SwingConstants.CENTER);
index 3ca169b..734ed8e 100644 (file)
@@ -418,7 +418,7 @@ public class GWsPreferences extends JPanel
     wsMenuRefreshButs.add(resetWs, null);
     wsMenuRefreshButs.add(progressBar, null);
     myBorderlayout.setHgap(3);
-    if (false) {
+    if (true) {
        JTabbedPane listPanels=new JTabbedPane();
        listPanels.addTab("JABAWS Servers",wsListPanel);
        listPanels.addTab("RSB Services", srbsListPanel);