EPSOptions added
authoramwaterhouse <Andrew Waterhouse>
Tue, 13 Sep 2005 17:44:32 +0000 (17:44 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 13 Sep 2005 17:44:32 +0000 (17:44 +0000)
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/EPSOptions.java [new file with mode: 0755]
src/jalview/gui/Preferences.java
src/jalview/gui/TreeCanvas.java
src/jalview/gui/TreePanel.java
src/jalview/jbgui/GPreferences.java

index b3b2865..50c89f5 100755 (executable)
@@ -771,6 +771,33 @@ public class AlignmentPanel extends GAlignmentPanel
      */\r
     public void makeEPS(File epsFile)\r
     {\r
+      boolean accurateText = true;\r
+\r
+      String renderStyle = jalview.bin.Cache.getDefault("EPS_RENDERING",\r
+          "Prompt each time");\r
+\r
+      // If we need to prompt, and if the GUI is visible then\r
+      // Prompt for EPS rendering style\r
+      if (renderStyle.equalsIgnoreCase("Prompt each time")\r
+          && !\r
+          (System.getProperty("java.awt.headless") != null\r
+           && System.getProperty("java.awt.headless").equals("true")))\r
+      {\r
+        EPSOptions eps = new EPSOptions();\r
+        renderStyle = eps.getValue();\r
+\r
+        if(eps.cancelled || renderStyle==null)\r
+          return;\r
+\r
+        renderStyle = eps.getValue();\r
+      }\r
+\r
+      if (renderStyle.equalsIgnoreCase("text"))\r
+      {\r
+        accurateText = false;\r
+      }\r
+\r
+\r
         if(epsFile == null)\r
         {\r
           jalview.io.JalviewFileChooser chooser = new jalview.io.\r
@@ -816,12 +843,14 @@ public class AlignmentPanel extends GAlignmentPanel
 \r
         try\r
          {\r
-            FileOutputStream out = new FileOutputStream(epsFile);\r
-            EpsGraphics2D pg = new EpsGraphics2D("Example", out, 0, 0, width,\r
-                    height);\r
+           FileOutputStream out = new FileOutputStream(epsFile);\r
+           EpsGraphics2D pg = new EpsGraphics2D("Example", out, 0, 0, width,\r
+                                                height);\r
 \r
-            if (av.getWrapAlignment())\r
-            {\r
+           pg.setAccurateTextMode(accurateText);\r
+\r
+           if (av.getWrapAlignment())\r
+           {\r
                 printWrappedAlignment(pg, width, height, 0);\r
             }\r
             else\r
diff --git a/src/jalview/gui/EPSOptions.java b/src/jalview/gui/EPSOptions.java
new file mode 100755 (executable)
index 0000000..ee105d8
--- /dev/null
@@ -0,0 +1,120 @@
+package jalview.gui;\r
+\r
+import javax.swing.*;\r
+import java.awt.*;\r
+import java.awt.event.ActionListener;\r
+import java.awt.event.ActionEvent;\r
+\r
+public class EPSOptions\r
+    extends JPanel\r
+{\r
+  JDialog dialog;\r
+  boolean cancelled = false;\r
+  String value;\r
+\r
+  public EPSOptions()\r
+  {\r
+    try\r
+    {\r
+      jbInit();\r
+    }\r
+    catch (Exception ex)\r
+    {\r
+      ex.printStackTrace();\r
+    }\r
+\r
+    ButtonGroup bg = new ButtonGroup();\r
+    bg.add(lineart);\r
+    bg.add(text);\r
+\r
+    JOptionPane pane = new JOptionPane(null,\r
+        JOptionPane.DEFAULT_OPTION, JOptionPane.DEFAULT_OPTION,\r
+       null, new Object[]{this});\r
+\r
+    dialog = pane.createDialog(Desktop.desktop, "EPS Rendering options");\r
+    dialog.show();\r
+\r
+  }\r
+\r
+  private void jbInit()\r
+      throws Exception\r
+  {\r
+    lineart.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+    lineart.setSelected(true);\r
+    lineart.setText("Lineart");\r
+    text.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+    text.setText("Text");\r
+    askAgain.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+    askAgain.setText("Don\'t ask me again");\r
+    ok.setText("OK");\r
+    ok.addActionListener(new ActionListener()\r
+    {\r
+      public void actionPerformed(ActionEvent e)\r
+      {\r
+        ok_actionPerformed(e);\r
+      }\r
+    });\r
+    cancel.setText("Cancel");\r
+    cancel.addActionListener(new ActionListener()\r
+    {\r
+      public void actionPerformed(ActionEvent e)\r
+      {\r
+        cancel_actionPerformed(e);\r
+      }\r
+    });\r
+    jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+    jLabel1.setText("Select EPS Character rendering style");\r
+    this.setLayout(borderLayout1);\r
+    jPanel3.setBorder(BorderFactory.createEtchedBorder());\r
+    jPanel2.add(lineart);\r
+    jPanel2.add(text);\r
+    jPanel2.add(askAgain);\r
+    jPanel1.add(ok);\r
+    jPanel1.add(cancel);\r
+    jPanel3.add(jLabel1);\r
+    jPanel3.add(jPanel2);\r
+    this.add(jPanel3, java.awt.BorderLayout.CENTER);\r
+    this.add(jPanel1, java.awt.BorderLayout.SOUTH);\r
+  }\r
+\r
+  JRadioButton lineart = new JRadioButton();\r
+  JRadioButton text = new JRadioButton();\r
+  JCheckBox askAgain = new JCheckBox();\r
+  JButton ok = new JButton();\r
+  JButton cancel = new JButton();\r
+  JPanel jPanel1 = new JPanel();\r
+  JLabel jLabel1 = new JLabel();\r
+  JPanel jPanel2 = new JPanel();\r
+  JPanel jPanel3 = new JPanel();\r
+  BorderLayout borderLayout1 = new BorderLayout();\r
+\r
+  public void ok_actionPerformed(ActionEvent e)\r
+  {\r
+    if (lineart.isSelected())\r
+      value = "Lineart";\r
+    else\r
+      value = "Text";\r
+\r
+    if (!askAgain.isSelected())\r
+    {\r
+      jalview.bin.Cache.applicationProperties.remove("EPS_RENDERING");\r
+    }\r
+    else\r
+    {\r
+      jalview.bin.Cache.setProperty("EPS_RENDERING", value);\r
+    }\r
+\r
+    dialog.hide();\r
+  }\r
+\r
+  public void cancel_actionPerformed(ActionEvent e)\r
+  {\r
+    cancelled = true;\r
+    dialog.hide();\r
+  }\r
+\r
+  public String getValue()\r
+  {\r
+    return value;\r
+  }\r
+}\r
index ff44fe4..a6b1066 100755 (executable)
@@ -83,9 +83,9 @@ public class Preferences extends GPreferences
 \r
         fullID.setSelected(      Cache.getDefault("SHOW_FULL_ID", true));\r
         fullScreen.setSelected(  Cache.getDefault("SHOW_FULLSCREEN", false));\r
-        annotations.setSelected( Cache.getDefault("SHOW_FULL_ID", true));\r
-        conservation.setEnabled( Cache.getDefault("SHOW_ANNOTATIONS", true));\r
+        annotations.setSelected( Cache.getDefault("SHOW_ANNOTATIONS", true));\r
 \r
+        conservation.setEnabled( Cache.getDefault("SHOW_ANNOTATIONS", true));\r
         quality.setEnabled(Cache.getDefault("SHOW_ANNOTATIONS", true));\r
         identity.setEnabled(Cache.getDefault("SHOW_ANNOTATIONS", true));\r
 \r
@@ -137,6 +137,11 @@ public class Preferences extends GPreferences
         sortby.addItem("Pairwise Identity");\r
         sortby.setSelectedItem( Cache.getDefault("SORT_ALIGNMENT", "No sort") );\r
 \r
+        epsRendering.addItem("Prompt each time");\r
+        epsRendering.addItem("Lineart");\r
+        epsRendering.addItem("Text");\r
+        epsRendering.setSelectedItem( Cache.getDefault("EPS_RENDERING", "Prompt each time"));\r
+\r
   /****************************************************\r
    * Set up Connections\r
    */\r
@@ -198,6 +203,11 @@ public class Preferences extends GPreferences
 \r
       Cache.applicationProperties.setProperty("SORT_ALIGNMENT", sortby.getSelectedItem().toString() );\r
 \r
+      if(epsRendering.getSelectedItem().equals("Prompt each time"))\r
+        Cache.applicationProperties.remove("EPS_RENDERING");\r
+      else\r
+        Cache.applicationProperties.setProperty("EPS_RENDERING", epsRendering.getSelectedItem().toString());\r
+\r
       if(defaultBrowser.getText().trim().length()<1)\r
         Cache.applicationProperties.remove("DEFAULT_BROWSER");\r
       else\r
index 672d200..eea181f 100755 (executable)
@@ -50,7 +50,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
     JScrollPane scrollPane;\r
     AlignViewport av;\r
     Font font;\r
-    int fontSize = 12;\r
+    int fontSize;\r
     boolean fitToWindow = true;\r
     boolean showDistances = false;\r
     boolean showBootstrap = false;\r
@@ -77,6 +77,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
     public TreeCanvas(AlignViewport av, JScrollPane scroller)\r
     {\r
         this.av = av;\r
+        font = av.getFont();\r
         scrollPane = scroller;\r
         addMouseListener(this);\r
         PaintRefresher.Register(this, av.alignment);\r
@@ -523,17 +524,14 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
     public void paintComponent(Graphics g)\r
     {\r
         super.paintComponent(g);\r
+        g.setFont(font);\r
+\r
         if(tree==null)\r
         {\r
-          g.setFont(new Font("Verdana", Font.PLAIN, 18));\r
           g.drawString("Calculating tree....", 20, getHeight()/2);\r
         }\r
         else\r
         {\r
-\r
-          font = new Font("Verdana", Font.PLAIN, fontSize);\r
-          g.setFont(font);\r
-\r
           FontMetrics fm = g.getFontMetrics(font);\r
 \r
           if (nameHash.size() == 0)\r
@@ -578,6 +576,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
     public void setFontSize(int fontSize)\r
     {\r
         this.fontSize = fontSize;\r
+        font = new Font(font.getName(), font.getStyle(), fontSize);\r
         repaint();\r
     }\r
 \r
@@ -596,6 +595,8 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
         g2.setColor(Color.white);\r
         g2.fillRect(0, 0, width, height);\r
 \r
+        g2.setFont(font);\r
+\r
         labelLength = g2.getFontMetrics(font).stringWidth(longestName) + 20; //20 allows for scrollbar\r
 \r
         float wscale = (float) (width - labelLength - (offx * 2)) / tree.getMaxHeight();\r
index a05df64..e38e03a 100755 (executable)
@@ -370,6 +370,32 @@ public class TreePanel extends GTreePanel
      */\r
     public void epsTree_actionPerformed(ActionEvent e)\r
     {\r
+      boolean accurateText = true;\r
+\r
+      String renderStyle = jalview.bin.Cache.getDefault("EPS_RENDERING",\r
+          "Prompt each time");\r
+\r
+    // If we need to prompt, and if the GUI is visible then\r
+    // Prompt for EPS rendering style\r
+      if (renderStyle.equalsIgnoreCase("Prompt each time")\r
+          && !\r
+          (System.getProperty("java.awt.headless") != null\r
+           && System.getProperty("java.awt.headless").equals("true")))\r
+      {\r
+        EPSOptions eps = new EPSOptions();\r
+        renderStyle = eps.getValue();\r
+\r
+        if (renderStyle==null || eps.cancelled)\r
+          return;\r
+\r
+\r
+      }\r
+\r
+      if (renderStyle.equalsIgnoreCase("text"))\r
+      {\r
+        accurateText = false;\r
+      }\r
+\r
         int width = treeCanvas.getWidth();\r
         int height = treeCanvas.getHeight();\r
 \r
@@ -391,11 +417,13 @@ public class TreePanel extends GTreePanel
             }\r
 \r
             jalview.bin.Cache.setProperty("LAST_DIRECTORY",\r
-                chooser.getSelectedFile().getParent());\r
+                                          chooser.getSelectedFile().getParent());\r
 \r
             FileOutputStream out = new FileOutputStream(chooser.getSelectedFile());\r
             EpsGraphics2D pg = new EpsGraphics2D("Tree", out, 0, 0, width,\r
-                    height);\r
+                                                 height);\r
+\r
+            pg.setAccurateTextMode(accurateText);\r
 \r
             treeCanvas.draw(pg, width, height);\r
 \r
index ab1d4e7..320592e 100755 (executable)
@@ -84,6 +84,11 @@ public class GPreferences extends JPanel
   GridBagLayout gridBagLayout3 = new GridBagLayout();\r
   protected JComboBox sortby = new JComboBox();\r
   JLabel sortLabel = new JLabel();\r
+  JPanel jPanel2 = new JPanel();\r
+  GridLayout gridLayout2 = new GridLayout();\r
+  JLabel jLabel1 = new JLabel();\r
+  JPanel jPanel3 = new JPanel();\r
+  protected JComboBox epsRendering = new JComboBox();\r
   /**\r
      * Creates a new GPreferences object.\r
      */\r
@@ -129,41 +134,37 @@ public class GPreferences extends JPanel
         quality.setHorizontalTextPosition(SwingConstants.LEFT);\r
         quality.setSelected(true);\r
         quality.setText("Quality");\r
-        quality.setBounds(new Rectangle(248, 53, 81, 23));\r
-        visualTab.setBorder(new TitledBorder("Open new alignment"));\r
-        visualTab.setBounds(new Rectangle(9, 20, 442, 241));\r
-        visualTab.setLayout(null);\r
+    visualTab.setBorder(new TitledBorder("Open new alignment"));\r
+    visualTab.setLayout(null);\r
         fullID.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
         fullID.setHorizontalAlignment(SwingConstants.RIGHT);\r
         fullID.setHorizontalTextPosition(SwingConstants.LEFT);\r
-        fullID.setText("Full Sequence ID");\r
-        fullID.setBounds(new Rectangle(9, 78, 129, 23));\r
-        fullScreen.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+    fullID.setMargin(new Insets(4, 2, 2, 0));\r
+    fullID.setText("Full Sequence ID");\r
+    fullScreen.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
         fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);\r
         fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);\r
-        fullScreen.setText("Maximise Window");\r
-        fullScreen.setBounds(new Rectangle(5, 29, 132, 23));\r
-        conservation.setEnabled(false);\r
+    fullScreen.setMargin(new Insets(2, 2, 2, 0));\r
+    fullScreen.setText("Maximise Window");\r
+    conservation.setEnabled(false);\r
         conservation.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
         conservation.setHorizontalAlignment(SwingConstants.RIGHT);\r
         conservation.setHorizontalTextPosition(SwingConstants.LEFT);\r
         conservation.setSelected(true);\r
         conservation.setText("Conservation");\r
-        conservation.setBounds(new Rectangle(137, 53, 113, 23));\r
-        identity.setEnabled(false);\r
+    identity.setEnabled(false);\r
         identity.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
         identity.setHorizontalAlignment(SwingConstants.RIGHT);\r
         identity.setHorizontalTextPosition(SwingConstants.LEFT);\r
         identity.setSelected(true);\r
         identity.setText("Consensus");\r
-        identity.setBounds(new Rectangle(326, 53, 99, 23));\r
-        annotations.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+    annotations.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
         annotations.setHorizontalAlignment(SwingConstants.RIGHT);\r
         annotations.setHorizontalTextPosition(SwingConstants.LEFT);\r
-        annotations.setSelected(true);\r
+    annotations.setMargin(new Insets(2, 4, 2, 0));\r
+    annotations.setSelected(true);\r
         annotations.setText("Show Annotations");\r
-        annotations.setBounds(new Rectangle(10, 53, 128, 23));\r
-        annotations.addActionListener(new ActionListener()\r
+    annotations.addActionListener(new ActionListener()\r
             {\r
                 public void actionPerformed(ActionEvent e)\r
                 {\r
@@ -173,33 +174,29 @@ public class GPreferences extends JPanel
         gapLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
         gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);\r
         gapLabel.setText("Gap Symbol");\r
-        gapLabel.setBounds(new Rectangle(41, 142, 76, 15));\r
-        colour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
-        colour.setBounds(new Rectangle(121, 168, 154, 21));\r
+    colour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+        colour.setBounds(new Rectangle(154, 151, 154, 21));\r
         colourLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
         colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);\r
         colourLabel.setText("Colour");\r
-        colourLabel.setBounds(new Rectangle(60, 172, 58, 15));\r
-        fontLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+    fontLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
         fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);\r
         fontLabel.setText("Font");\r
-        fontLabel.setBounds(new Rectangle(83, 114, 34, 15));\r
-        fontSizeCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
-        fontSizeCB.setBounds(new Rectangle(304, 109, 49, 21));\r
+    fontSizeCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+        fontSizeCB.setBounds(new Rectangle(322, 98, 49, 21));\r
         fontStyleCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
-        fontStyleCB.setBounds(new Rectangle(353, 109, 80, 21));\r
+        fontStyleCB.setBounds(new Rectangle(370, 98, 70, 21));\r
         fontNameCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
-        fontNameCB.setBounds(new Rectangle(121, 109, 183, 21));\r
+        fontNameCB.setBounds(new Rectangle(153, 98, 169, 21));\r
         gapSymbolCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
-        gapSymbolCB.setBounds(new Rectangle(121, 140, 67, 21));\r
+        gapSymbolCB.setBounds(new Rectangle(154, 125, 67, 21));\r
         startupCheckbox.setText("Open file");\r
-        startupCheckbox.setBounds(new Rectangle(4, 200, 115, 23));\r
-        startupCheckbox.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+    startupCheckbox.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
         startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);\r
         startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);\r
         startupCheckbox.setSelected(true);\r
         startupFileTextfield.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
-        startupFileTextfield.setBounds(new Rectangle(121, 200, 309, 20));\r
+        startupFileTextfield.setBounds(new Rectangle(154, 204, 285, 20));\r
         startupFileTextfield.addMouseListener(new MouseAdapter()\r
             {\r
                 public void mouseClicked(MouseEvent e)\r
@@ -297,32 +294,41 @@ public class GPreferences extends JPanel
     jPanel1.setBorder(titledBorder1);\r
     jPanel1.setLayout(gridBagLayout1);\r
     sortby.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
-    sortby.setBounds(new Rectangle(122, 232, 308, 21));\r
+    sortby.setBounds(new Rectangle(154, 178, 286, 21));\r
     sortLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
     sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);\r
     sortLabel.setText("Sort by");\r
-    sortLabel.setBounds(new Rectangle(53, 235, 64, 15));\r
-    visualTab.add(annotations);\r
-        visualTab.add(conservation);\r
-        visualTab.add(quality);\r
-        visualTab.add(fullID);\r
-        visualTab.add(gapSymbolCB);\r
-        visualTab.add(fontLabel);\r
-        visualTab.add(fontNameCB);\r
-    visualTab.add(colourLabel);\r
-        visualTab.add(gapLabel);\r
+    jPanel2.setBounds(new Rectangle(7, 19, 141, 242));\r
+    jPanel2.setLayout(gridLayout2);\r
+    gridLayout2.setRows(9);\r
+    jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+    jLabel1.setHorizontalAlignment(SwingConstants.RIGHT);\r
+    jLabel1.setText("EPS Rendering Style");\r
+    jPanel3.setBounds(new Rectangle(149, 42, 278, 26));\r
+    epsRendering.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));\r
+    epsRendering.setBounds(new Rectangle(154, 228, 286, 21));\r
+    jPanel2.add(fullScreen);\r
+    jPanel2.add(annotations);\r
+    jPanel2.add(fullID);\r
+    jPanel2.add(fontLabel);\r
+    jPanel2.add(gapLabel);\r
+    jPanel2.add(colourLabel);\r
+    jPanel2.add(sortLabel);\r
+    jPanel2.add(startupCheckbox);\r
+    jPanel2.add(jLabel1);\r
+    visualTab.add(jPanel3);\r
+    jPanel3.add(conservation);\r
+    jPanel3.add(quality);\r
+    jPanel3.add(identity);\r
+    visualTab.add(fontNameCB);\r
+    visualTab.add(fontSizeCB);\r
+    visualTab.add(fontStyleCB);\r
+    visualTab.add(gapSymbolCB);\r
     visualTab.add(colour);\r
-        visualTab.add(fontSizeCB);\r
-        visualTab.add(fontStyleCB);\r
-        visualTab.add(identity);\r
-        visualTab.add(fullScreen);\r
-    visualTab.add(startupCheckbox);\r
-    visualTab.add(startupFileTextfield);\r
     visualTab.add(sortby);\r
-    visualTab.add(sortLabel);\r
-\r
-    tabbedPane.add(visualTab, "Visual");\r
-    tabbedPane.add(connectTab, "Connections");\r
+    visualTab.add(startupFileTextfield);\r
+    visualTab.add(epsRendering);\r
+    visualTab.add(jPanel2);\r
 \r
     linkPanel.add(editLinkButtons, BorderLayout.EAST);\r
     editLinkButtons.add(newLink, null);\r
@@ -362,6 +368,7 @@ public class GPreferences extends JPanel
     connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0\r
         , GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,\r
         new Insets(15, 0, 0, 15), 307, 1));\r
+\r
     jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0\r
                                                  , GridBagConstraints.WEST,\r
                                                  GridBagConstraints.NONE,\r
@@ -370,6 +377,9 @@ public class GPreferences extends JPanel
     DefaultListCellRenderer dlcr = new DefaultListCellRenderer();\r
         dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);\r
         gapSymbolCB.setRenderer(dlcr);\r
+\r
+    tabbedPane.add(visualTab, "Visual");\r
+    tabbedPane.add(connectTab, "Connections");\r
     }\r
 \r
     /**\r