JAL-1620 version bump and release notes
[jalview.git] / src / jalview / jbgui / GPreferences.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.jbgui;
22
23 import jalview.gui.JvSwingUtils;
24 import jalview.gui.StructureViewer.Viewer;
25 import jalview.util.MessageManager;
26
27 import java.awt.BorderLayout;
28 import java.awt.Color;
29 import java.awt.Component;
30 import java.awt.Dimension;
31 import java.awt.FlowLayout;
32 import java.awt.Font;
33 import java.awt.GridBagConstraints;
34 import java.awt.GridBagLayout;
35 import java.awt.GridLayout;
36 import java.awt.Insets;
37 import java.awt.Rectangle;
38 import java.awt.event.ActionEvent;
39 import java.awt.event.ActionListener;
40 import java.awt.event.FocusEvent;
41 import java.awt.event.KeyEvent;
42 import java.awt.event.MouseAdapter;
43 import java.awt.event.MouseEvent;
44
45 import javax.swing.BorderFactory;
46 import javax.swing.DefaultListCellRenderer;
47 import javax.swing.JButton;
48 import javax.swing.JCheckBox;
49 import javax.swing.JComboBox;
50 import javax.swing.JFileChooser;
51 import javax.swing.JLabel;
52 import javax.swing.JList;
53 import javax.swing.JPanel;
54 import javax.swing.JScrollPane;
55 import javax.swing.JTabbedPane;
56 import javax.swing.JTextField;
57 import javax.swing.ListSelectionModel;
58 import javax.swing.SwingConstants;
59 import javax.swing.border.Border;
60 import javax.swing.border.EmptyBorder;
61 import javax.swing.border.TitledBorder;
62 import javax.swing.event.ChangeEvent;
63 import javax.swing.event.ChangeListener;
64 import javax.swing.event.ListSelectionEvent;
65 import javax.swing.event.ListSelectionListener;
66
67 /**
68  * Base class for the Preferences panel.
69  * 
70  * @author $author$
71  * @version $Revision$
72  */
73 public class GPreferences extends JPanel
74 {
75   private static final Font verdana11 = JvSwingUtils.getLabelFont();
76
77   /*
78    * Visual tab components
79    */
80   protected JCheckBox fullScreen = new JCheckBox();
81
82   protected JCheckBox openoverv = new JCheckBox();
83
84   protected JCheckBox seqLimit = new JCheckBox();
85
86   protected JCheckBox rightAlign = new JCheckBox();
87
88   protected JComboBox<String> fontSizeCB = new JComboBox<String>();
89
90   protected JComboBox<String> fontStyleCB = new JComboBox<String>();
91
92   protected JComboBox<String> fontNameCB = new JComboBox<String>();
93
94   protected JCheckBox showUnconserved = new JCheckBox();
95
96   protected JCheckBox idItalics = new JCheckBox();
97
98   protected JCheckBox smoothFont = new JCheckBox();
99
100   protected JComboBox<String> gapSymbolCB = new JComboBox<String>();
101
102   protected JCheckBox wrap = new JCheckBox();
103
104   protected JComboBox<String> sortby = new JComboBox<String>();
105
106   protected JComboBox<String> sortAnnBy = new JComboBox<String>();
107
108   protected JComboBox<String> sortAutocalc = new JComboBox<String>();
109
110   protected JCheckBox startupCheckbox = new JCheckBox();
111
112   protected JTextField startupFileTextfield = new JTextField();
113
114   // below are in the 'second column'
115   protected JCheckBox annotations = new JCheckBox();
116
117   protected JCheckBox quality = new JCheckBox();
118
119   protected JCheckBox conservation = new JCheckBox();
120
121   protected JCheckBox identity = new JCheckBox();
122
123   protected JCheckBox showGroupConsensus = new JCheckBox();
124
125   protected JCheckBox showGroupConservation = new JCheckBox();
126
127   protected JCheckBox showConsensHistogram = new JCheckBox();
128
129   protected JCheckBox showConsensLogo = new JCheckBox();
130
131   protected JCheckBox showDbRefTooltip = new JCheckBox();
132
133   protected JCheckBox showNpTooltip = new JCheckBox();
134
135   /*
136    * Structure tab and components
137    */
138   protected JPanel structureTab;
139
140   protected JCheckBox structFromPdb = new JCheckBox();
141
142   protected JCheckBox useRnaView = new JCheckBox();
143
144   protected JCheckBox addSecondaryStructure = new JCheckBox();
145
146   protected JCheckBox addTempFactor = new JCheckBox();
147
148   protected JComboBox<String> structViewer = new JComboBox<String>();
149
150   protected JTextField chimeraPath = new JTextField();
151
152   /*
153    * Colours tab components
154    */
155   protected JPanel minColour = new JPanel();
156
157   protected JPanel maxColour = new JPanel();
158
159   protected JComboBox<String> colour = new JComboBox<String>();
160
161   /*
162    * Connections tab components
163    */
164   protected JList linkURLList = new JList();
165
166   protected JTextField proxyServerTB = new JTextField();
167
168   protected JTextField proxyPortTB = new JTextField();
169
170   protected JTextField defaultBrowser = new JTextField();
171
172   protected JList linkNameList = new JList();
173
174   protected JCheckBox useProxy = new JCheckBox();
175
176   protected JCheckBox usagestats = new JCheckBox();
177
178   protected JCheckBox questionnaire = new JCheckBox();
179
180   protected JCheckBox versioncheck = new JCheckBox();
181
182   /*
183    * Output tab components
184    */
185   protected JComboBox<String> epsRendering = new JComboBox<String>();
186
187   protected JLabel userIdWidthlabel = new JLabel();
188
189   protected JCheckBox autoIdWidth = new JCheckBox();
190
191   protected JTextField userIdWidth = new JTextField();
192
193   protected JCheckBox blcjv = new JCheckBox();
194
195   protected JCheckBox pileupjv = new JCheckBox();
196
197   protected JCheckBox clustaljv = new JCheckBox();
198
199   protected JCheckBox msfjv = new JCheckBox();
200
201   protected JCheckBox fastajv = new JCheckBox();
202
203   protected JCheckBox pfamjv = new JCheckBox();
204
205   protected JCheckBox pirjv = new JCheckBox();
206
207   protected JCheckBox modellerOutput = new JCheckBox();
208
209   /*
210    * Editing tab components
211    */
212   protected JCheckBox autoCalculateConsCheck = new JCheckBox();
213
214   protected JCheckBox padGaps = new JCheckBox();
215
216   protected JCheckBox sortByTree = new JCheckBox();
217
218   /*
219    * DAS Settings tab
220    */
221   protected JPanel dasTab = new JPanel();
222
223   /*
224    * Web Services tab
225    */
226   protected JPanel wsTab = new JPanel();
227
228   /**
229    * Creates a new GPreferences object.
230    */
231   public GPreferences()
232   {
233     try
234     {
235       jbInit();
236     } catch (Exception ex)
237     {
238       ex.printStackTrace();
239     }
240   }
241
242   /**
243    * Construct the panel and its tabbed sub-panels.
244    * 
245    * @throws Exception
246    */
247   private void jbInit() throws Exception
248   {
249     final JTabbedPane tabbedPane = new JTabbedPane();
250     this.setLayout(new BorderLayout());
251     JPanel okCancelPanel = initOkCancelPanel();
252     this.add(tabbedPane, BorderLayout.CENTER);
253     this.add(okCancelPanel, BorderLayout.SOUTH);
254
255     tabbedPane.add(initVisualTab(),
256             MessageManager.getString("label.visual"));
257
258     tabbedPane.add(initColoursTab(),
259             MessageManager.getString("label.colours"));
260
261     tabbedPane.add(initStructureTab(),
262             MessageManager.getString("label.structure"));
263
264     tabbedPane.add(initConnectionsTab(),
265             MessageManager.getString("label.connections"));
266
267     tabbedPane.add(initOutputTab(), MessageManager.getString("label.output"));
268
269     tabbedPane.add(initEditingTab(), MessageManager.getString("label.editing"));
270
271     /*
272      * See DasSourceBrowser for the real work of configuring this tab.
273      */
274     dasTab.setLayout(new BorderLayout());
275     tabbedPane
276             .add(dasTab, MessageManager.getString("label.das_settings"));
277
278     /*
279      * See WsPreferences for the real work of configuring this tab.
280      */
281     wsTab.setLayout(new BorderLayout());
282     tabbedPane.add(wsTab, MessageManager.getString("label.web_services"));
283
284     /*
285      * Handler to validate a tab before leaving it - currently only for
286      * Structure.
287      */
288     tabbedPane.addChangeListener(new ChangeListener()
289     {
290       private Component lastTab;
291
292       @Override
293       public void stateChanged(ChangeEvent e)
294       {
295         if (lastTab == structureTab
296                 && tabbedPane.getSelectedComponent() != structureTab)
297         {
298           if (!validateStructure())
299           {
300             tabbedPane.setSelectedComponent(structureTab);
301             return;
302           }
303         }
304         lastTab = tabbedPane.getSelectedComponent();
305       }
306
307     });
308   }
309
310   /**
311    * Initialises the Editing tabbed panel.
312    * 
313    * @return
314    */
315   private JPanel initEditingTab()
316   {
317     JPanel editingTab = new JPanel();
318     editingTab.setLayout(null);
319     autoCalculateConsCheck.setFont(verdana11);
320     autoCalculateConsCheck.setText(MessageManager
321             .getString("label.autocalculate_consensus"));
322     autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
323     padGaps.setFont(verdana11);
324     padGaps.setText(MessageManager.getString("label.pad_gaps_when_editing"));
325     padGaps.setBounds(new Rectangle(22, 94, 168, 23));
326     sortByTree.setFont(verdana11);
327     sortByTree
328             .setText(MessageManager.getString("label.sort_with_new_tree"));
329     sortByTree
330             .setToolTipText(MessageManager
331                     .getString("label.any_trees_calculated_or_loaded_alignment_automatically_sort"));
332     sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
333     editingTab.add(autoCalculateConsCheck);
334     editingTab.add(padGaps);
335     editingTab.add(sortByTree);
336     return editingTab;
337   }
338
339   /**
340    * Initialises the Output tabbed panel.
341    * 
342    * @return
343    */
344   private JPanel initOutputTab()
345   {
346     JPanel outputTab = new JPanel();
347     outputTab.setLayout(null);
348     JLabel epsLabel = new JLabel();
349     epsLabel.setFont(verdana11);
350     epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
351     epsLabel.setText(MessageManager.getString("label.eps_rendering_style"));
352     epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
353     epsRendering.setFont(verdana11);
354     epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
355     JLabel jLabel1 = new JLabel();
356     jLabel1.setFont(verdana11);
357     jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
358     jLabel1.setText(MessageManager.getString("label.append_start_end"));
359     jLabel1.setFont(verdana11);
360     fastajv.setFont(verdana11);
361     fastajv.setHorizontalAlignment(SwingConstants.LEFT);
362     clustaljv.setText(MessageManager.getString("label.clustal") + "     ");
363     blcjv.setText(MessageManager.getString("label.blc") + "     ");
364     fastajv.setText(MessageManager.getString("label.fasta") + "     ");
365     msfjv.setText(MessageManager.getString("label.msf") + "     ");
366     pfamjv.setText(MessageManager.getString("label.pfam") + "     ");
367     pileupjv.setText(MessageManager.getString("label.pileup") + "     ");
368     msfjv.setFont(verdana11);
369     msfjv.setHorizontalAlignment(SwingConstants.LEFT);
370     pirjv.setText(MessageManager.getString("label.pir") + "     ");
371     JPanel jPanel11 = new JPanel();
372     jPanel11.setFont(verdana11);
373     TitledBorder titledBorder2 = new TitledBorder(
374             MessageManager.getString("label.file_output"));
375     jPanel11.setBorder(titledBorder2);
376     jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
377     GridLayout gridLayout3 = new GridLayout();
378     jPanel11.setLayout(gridLayout3);
379     gridLayout3.setRows(8);
380     blcjv.setFont(verdana11);
381     blcjv.setHorizontalAlignment(SwingConstants.LEFT);
382     clustaljv.setFont(verdana11);
383     clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
384     pfamjv.setFont(verdana11);
385     pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
386     pileupjv.setFont(verdana11);
387     pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
388     pirjv.setFont(verdana11);
389     pirjv.setHorizontalAlignment(SwingConstants.LEFT);
390     autoIdWidth.setFont(verdana11);
391     autoIdWidth.setText(MessageManager
392             .getString("label.automatically_set_id_width"));
393     autoIdWidth
394             .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.adjusts_width_generated_eps_png")));
395     autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
396     autoIdWidth.addActionListener(new ActionListener()
397     {
398
399       @Override
400       public void actionPerformed(ActionEvent e)
401       {
402         autoIdWidth_actionPerformed();
403       }
404     });
405     userIdWidthlabel.setFont(verdana11);
406     userIdWidthlabel.setText(MessageManager
407             .getString("label.figure_id_column_width"));
408     userIdWidth
409             .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.manually_specify_width_left_column")));
410     userIdWidthlabel
411             .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.manually_specify_width_left_column")));
412     userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
413     userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
414     userIdWidth.setText("");
415     userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
416     userIdWidth.addActionListener(new ActionListener()
417     {
418
419       @Override
420       public void actionPerformed(ActionEvent e)
421       {
422         userIdWidth_actionPerformed();
423       }
424     });
425     jPanel11.add(jLabel1);
426     jPanel11.add(blcjv);
427     jPanel11.add(clustaljv);
428     jPanel11.add(fastajv);
429     jPanel11.add(msfjv);
430     jPanel11.add(pfamjv);
431     jPanel11.add(pileupjv);
432     jPanel11.add(pirjv);
433     outputTab.add(autoIdWidth);
434     outputTab.add(userIdWidth);
435     outputTab.add(userIdWidthlabel);
436     outputTab.add(modellerOutput);
437     outputTab.add(epsLabel);
438     outputTab.add(epsRendering);
439     outputTab.add(jPanel11);
440     modellerOutput.setFont(verdana11);
441     modellerOutput.setText(MessageManager
442             .getString("label.use_modeller_output"));
443     modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
444     return outputTab;
445   }
446
447   /**
448    * Initialises the Connections tabbed panel.
449    * 
450    * @return
451    */
452   private JPanel initConnectionsTab()
453   {
454     JPanel connectTab = new JPanel();
455     connectTab.setLayout(new GridBagLayout());
456     JLabel serverLabel = new JLabel();
457     serverLabel.setText(MessageManager.getString("label.address"));
458     serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
459     serverLabel.setFont(verdana11);
460     proxyServerTB.setFont(verdana11);
461     proxyPortTB.setFont(verdana11);
462     JLabel portLabel = new JLabel();
463     portLabel.setFont(verdana11);
464     portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
465     portLabel.setText(MessageManager.getString("label.port"));
466     JLabel browserLabel = new JLabel();
467     browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
468     browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
469     browserLabel.setText(MessageManager
470             .getString("label.default_browser_unix"));
471     defaultBrowser.setFont(verdana11);
472     defaultBrowser.setText("");
473     usagestats.setText(MessageManager
474             .getString("label.send_usage_statistics"));
475     usagestats.setFont(verdana11);
476     usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
477     usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
478     questionnaire.setText(MessageManager
479             .getString("label.check_for_questionnaires"));
480     questionnaire.setFont(verdana11);
481     questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
482     questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
483     versioncheck.setText(MessageManager
484             .getString("label.check_for_latest_version"));
485     versioncheck.setFont(verdana11);
486     versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
487     versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
488     JButton newLink = new JButton();
489     newLink.setText(MessageManager.getString("action.new"));
490     newLink.addActionListener(new java.awt.event.ActionListener()
491     {
492       public void actionPerformed(ActionEvent e)
493       {
494         newLink_actionPerformed(e);
495       }
496     });
497     JButton editLink = new JButton();
498     editLink.setText(MessageManager.getString("action.edit"));
499     editLink.addActionListener(new java.awt.event.ActionListener()
500     {
501       public void actionPerformed(ActionEvent e)
502       {
503         editLink_actionPerformed(e);
504       }
505     });
506     JButton deleteLink = new JButton();
507     deleteLink.setText(MessageManager.getString("action.delete"));
508     deleteLink.addActionListener(new java.awt.event.ActionListener()
509     {
510       public void actionPerformed(ActionEvent e)
511       {
512         deleteLink_actionPerformed(e);
513       }
514     });
515
516     linkURLList.addListSelectionListener(new ListSelectionListener()
517     {
518       public void valueChanged(ListSelectionEvent e)
519       {
520         int index = linkURLList.getSelectedIndex();
521         linkNameList.setSelectedIndex(index);
522       }
523     });
524
525     linkNameList.addListSelectionListener(new ListSelectionListener()
526     {
527       public void valueChanged(ListSelectionEvent e)
528       {
529         int index = linkNameList.getSelectedIndex();
530         linkURLList.setSelectedIndex(index);
531       }
532     });
533
534     JScrollPane linkScrollPane = new JScrollPane();
535     linkScrollPane.setBorder(null);
536     JPanel linkPanel = new JPanel();
537     linkPanel.setBorder(new TitledBorder(MessageManager
538             .getString("label.url_linkfrom_sequence_id")));
539     linkPanel.setLayout(new BorderLayout());
540     GridLayout gridLayout1 = new GridLayout();
541     JPanel editLinkButtons = new JPanel();
542     editLinkButtons.setLayout(gridLayout1);
543     gridLayout1.setRows(3);
544     linkNameList.setFont(verdana11);
545     linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
546     BorderLayout borderLayout3 = new BorderLayout();
547     JPanel linkPanel2 = new JPanel();
548     linkPanel2.setLayout(borderLayout3);
549     linkURLList.setFont(verdana11);
550     linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
551
552     defaultBrowser.addMouseListener(new MouseAdapter()
553     {
554       public void mouseClicked(MouseEvent e)
555       {
556         if (e.getClickCount() > 1)
557         {
558           defaultBrowser_mouseClicked(e);
559         }
560       }
561     });
562     useProxy.setFont(verdana11);
563     useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
564     useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
565     useProxy.setText(MessageManager.getString("label.use_proxy_server"));
566     useProxy.addActionListener(new ActionListener()
567     {
568       public void actionPerformed(ActionEvent e)
569       {
570         useProxy_actionPerformed();
571       }
572     });
573     linkPanel.add(editLinkButtons, BorderLayout.EAST);
574     editLinkButtons.add(newLink, null);
575     editLinkButtons.add(editLink, null);
576     editLinkButtons.add(deleteLink, null);
577     linkPanel.add(linkScrollPane, BorderLayout.CENTER);
578     linkScrollPane.getViewport().add(linkPanel2, null);
579     linkPanel2.add(linkURLList, BorderLayout.CENTER);
580     linkPanel2.add(linkNameList, BorderLayout.WEST);
581     JPanel jPanel1 = new JPanel();
582     TitledBorder titledBorder1 = new TitledBorder(
583             MessageManager.getString("label.proxy_server"));
584     jPanel1.setBorder(titledBorder1);
585     jPanel1.setLayout(new GridBagLayout());
586     jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
587             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
588                     2, 4, 0), 5, 0));
589     jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
590             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
591                     0, 4, 0), 11, 6));
592     connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
593             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
594                     16, 0, 0, 12), 359, -17));
595     connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
596             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
597                     21, 0, 35, 12), 4, 6));
598     connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
599             0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
600             new Insets(16, 0, 0, 0), 5, 1));
601     jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
602             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
603                     2, 5, 185), 2, -4));
604     jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
605             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
606             new Insets(0, 2, 4, 2), 54, 1));
607     jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
608             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
609             new Insets(0, 2, 4, 0), 263, 1));
610     connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
611             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
612             new Insets(15, 0, 0, 15), 307, 1));
613     connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
614             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
615             new Insets(0, 2, 4, 2), 70, 1));
616     connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
617             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
618             new Insets(0, 2, 4, 2), 70, 1));
619     connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
620             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
621             new Insets(0, 2, 4, 2), 70, 1));
622     return connectTab;
623   }
624
625   /**
626    * Initialises the parent panel which contains the tabbed sections.
627    * 
628    * @return
629    */
630   private JPanel initOkCancelPanel()
631   {
632     JButton ok = new JButton();
633     ok.setText(MessageManager.getString("action.ok"));
634     ok.addActionListener(new ActionListener()
635     {
636       public void actionPerformed(ActionEvent e)
637       {
638         ok_actionPerformed(e);
639       }
640     });
641     JButton cancel = new JButton();
642     cancel.setText(MessageManager.getString("action.cancel"));
643     cancel.addActionListener(new ActionListener()
644     {
645       public void actionPerformed(ActionEvent e)
646       {
647         cancel_actionPerformed(e);
648       }
649     });
650     JPanel okCancelPanel = new JPanel();
651     okCancelPanel.add(ok);
652     okCancelPanel.add(cancel);
653     return okCancelPanel;
654   }
655
656   /**
657    * Initialises the Colours tabbed panel.
658    * 
659    * @return
660    */
661   private JPanel initColoursTab()
662   {
663     JPanel coloursTab = new JPanel();
664     coloursTab.setBorder(new TitledBorder(MessageManager
665             .getString("action.open_new_alignment")));
666     coloursTab.setLayout(new FlowLayout());
667     JLabel mincolourLabel = new JLabel();
668     mincolourLabel.setFont(verdana11);
669     mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
670     mincolourLabel.setText(MessageManager.getString("label.min_colour"));
671     minColour.setFont(verdana11);
672     minColour.setBorder(BorderFactory.createEtchedBorder());
673     minColour.setPreferredSize(new Dimension(40, 20));
674     minColour.addMouseListener(new MouseAdapter()
675     {
676       public void mousePressed(MouseEvent e)
677       {
678         minColour_actionPerformed(minColour);
679       }
680     });
681     JLabel maxcolourLabel = new JLabel();
682     maxcolourLabel.setFont(verdana11);
683     maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
684     maxcolourLabel.setText(MessageManager.getString("label.max_colour"));
685     maxColour.setFont(verdana11);
686     maxColour.setBorder(BorderFactory.createEtchedBorder());
687     maxColour.setPreferredSize(new Dimension(40, 20));
688     maxColour.addMouseListener(new MouseAdapter()
689     {
690       public void mousePressed(MouseEvent e)
691       {
692         maxColour_actionPerformed(maxColour);
693       }
694     });
695     colour.setFont(verdana11);
696     colour.setBounds(new Rectangle(172, 225, 155, 21));
697     JLabel colourLabel = new JLabel();
698     colourLabel.setFont(verdana11);
699     colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
700     colourLabel.setText(MessageManager.getString("label.alignment_colour")
701             + " ");
702     JvSwingUtils.addtoLayout(coloursTab, MessageManager
703             .getString("label.default_colour_scheme_for_alignment"),
704             colourLabel, colour);
705     JPanel annotationShding = new JPanel();
706     annotationShding.setBorder(new TitledBorder(MessageManager
707             .getString("label.annotation_shading_default")));
708     annotationShding.setLayout(new GridLayout(1, 2));
709     JvSwingUtils.addtoLayout(annotationShding, MessageManager
710             .getString("label.default_minimum_colour_annotation_shading"),
711             mincolourLabel, minColour);
712     JvSwingUtils.addtoLayout(annotationShding, MessageManager
713             .getString("label.default_maximum_colour_annotation_shading"),
714             maxcolourLabel, maxColour);
715     coloursTab.add(annotationShding); // , FlowLayout.LEFT);
716     return coloursTab;
717   }
718
719   /**
720    * Initialises the Structure tabbed panel.
721    * 
722    * @return
723    */
724   private JPanel initStructureTab()
725   {
726     structureTab = new JPanel();
727
728     structureTab.setBorder(new TitledBorder(MessageManager
729             .getString("label.structure_options")));
730     structureTab.setLayout(null);
731     final int width = 400;
732     final int height = 23;
733     final int lineSpacing = 30;
734     int ypos = 30;
735
736     structFromPdb.setFont(verdana11);
737     structFromPdb.setText(MessageManager.getString("label.struct_from_pdb"));
738     structFromPdb.setBounds(new Rectangle(5, ypos, width, height));
739     structFromPdb.addActionListener(new ActionListener()
740     {
741       @Override
742       public void actionPerformed(ActionEvent e)
743       {
744         boolean selected = structFromPdb.isSelected();
745         // enable other options only when the first is checked
746         useRnaView.setEnabled(selected);
747         addSecondaryStructure.setEnabled(selected);
748         addTempFactor.setEnabled(selected);
749       }
750     });
751     structureTab.add(structFromPdb);
752
753     // indent checkboxes that are conditional on the first one
754     ypos += lineSpacing;
755     useRnaView.setFont(verdana11);
756     useRnaView.setText(MessageManager.getString("label.use_rnaview"));
757     useRnaView.setBounds(new Rectangle(25, ypos, width, height));
758     structureTab.add(useRnaView);
759
760     ypos += lineSpacing;
761     addSecondaryStructure.setFont(verdana11);
762     addSecondaryStructure.setText(MessageManager
763             .getString("label.autoadd_secstr"));
764     addSecondaryStructure.setBounds(new Rectangle(25, ypos, width, height));
765     structureTab.add(addSecondaryStructure);
766
767     ypos += lineSpacing;
768     addTempFactor.setFont(verdana11);
769     addTempFactor.setText(MessageManager.getString("label.autoadd_temp"));
770     addTempFactor.setBounds(new Rectangle(25, ypos, width, height));
771     structureTab.add(addTempFactor);
772
773     ypos += lineSpacing;
774     JLabel viewerLabel = new JLabel();
775     viewerLabel.setFont(verdana11);
776     viewerLabel.setHorizontalAlignment(SwingConstants.LEFT);
777     viewerLabel.setText(MessageManager.getString("label.structure_viewer"));
778     viewerLabel.setBounds(new Rectangle(10, ypos, 200, height));
779     structureTab.add(viewerLabel);
780
781     structViewer.setFont(verdana11);
782     structViewer.setBounds(new Rectangle(160, ypos, 120, height));
783     structViewer.addItem(Viewer.JMOL.name());
784     structViewer.addItem(Viewer.CHIMERA.name());
785     structViewer.addActionListener(new ActionListener()
786     {
787       @Override
788       public void actionPerformed(ActionEvent e)
789       {
790         structureViewer_actionPerformed((String) structViewer
791                 .getSelectedItem());
792       }
793     });
794     structureTab.add(structViewer);
795
796     ypos += lineSpacing;
797     JLabel pathLabel = new JLabel();
798     pathLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
799     pathLabel.setHorizontalAlignment(SwingConstants.LEFT);
800     pathLabel.setText(MessageManager.getString("label.chimera_path"));
801     final String tooltip = JvSwingUtils.wrapTooltip(true,
802             MessageManager.getString("label.chimera_path_tip"));
803     pathLabel.setToolTipText(tooltip);
804     pathLabel.setBounds(new Rectangle(10, ypos, 140, height));
805     structureTab.add(pathLabel);
806
807     chimeraPath.setFont(verdana11);
808     chimeraPath.setText("");
809     chimeraPath.setBounds(new Rectangle(160, ypos, 300, height));
810     chimeraPath.addMouseListener(new MouseAdapter()
811     {
812       @Override
813       public void mouseClicked(MouseEvent e)
814       {
815         if (e.getClickCount() == 2)
816         {
817           String chosen = openFileChooser();
818           if (chosen != null)
819           {
820             chimeraPath.setText(chosen);
821           }
822         }
823       }
824     });
825     structureTab.add(chimeraPath);
826
827     return structureTab;
828   }
829
830   /**
831    * Action on choosing a structure viewer from combobox options.
832    * 
833    * @param selectedItem
834    */
835   protected void structureViewer_actionPerformed(String selectedItem)
836   {
837   }
838
839   /**
840    * Show a dialog for the user to choose a file. Returns the chosen path, or
841    * null on Cancel.
842    * 
843    * @return
844    */
845   protected String openFileChooser()
846   {
847     String choice = null;
848     JFileChooser chooser = new JFileChooser();
849
850     // chooser.setFileView(new JalviewFileView());
851     chooser.setDialogTitle(MessageManager
852             .getString("label.open_local_file"));
853     chooser.setToolTipText(MessageManager.getString("action.open"));
854
855     int value = chooser.showOpenDialog(this);
856
857     if (value == JFileChooser.APPROVE_OPTION)
858     {
859       choice = chooser.getSelectedFile().getPath();
860     }
861     return choice;
862   }
863
864   /**
865    * Validate the structure tab preferences; if invalid, set focus on this tab.
866    * 
867    * @param e
868    */
869   protected boolean validateStructure(FocusEvent e)
870   {
871     if (!validateStructure())
872     {
873       e.getComponent().requestFocusInWindow();
874       return false;
875     }
876     return true;
877   }
878
879   protected boolean validateStructure()
880   {
881     return false;
882   }
883
884   /**
885    * Initialises the Visual tabbed panel.
886    * 
887    * @return
888    */
889   private JPanel initVisualTab()
890   {
891     JPanel visualTab = new JPanel();
892     visualTab.setBorder(new TitledBorder(MessageManager
893             .getString("action.open_new_alignment")));
894     visualTab.setLayout(null);
895     fullScreen.setFont(verdana11);
896     fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
897     fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
898     fullScreen.setText(MessageManager.getString("label.maximize_window"));
899     quality.setEnabled(false);
900     quality.setFont(verdana11);
901     quality.setHorizontalAlignment(SwingConstants.RIGHT);
902     quality.setHorizontalTextPosition(SwingConstants.LEFT);
903     quality.setSelected(true);
904     quality.setText(MessageManager.getString("label.quality"));
905     conservation.setEnabled(false);
906     conservation.setFont(verdana11);
907     conservation.setHorizontalAlignment(SwingConstants.RIGHT);
908     conservation.setHorizontalTextPosition(SwingConstants.LEFT);
909     conservation.setSelected(true);
910     conservation.setText(MessageManager.getString("label.conservation"));
911     identity.setEnabled(false);
912     identity.setFont(verdana11);
913     identity.setHorizontalAlignment(SwingConstants.RIGHT);
914     identity.setHorizontalTextPosition(SwingConstants.LEFT);
915     identity.setSelected(true);
916     identity.setText(MessageManager.getString("label.consensus"));
917     JLabel showGroupbits = new JLabel();
918     showGroupbits.setFont(verdana11);
919     showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
920     showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
921     showGroupbits.setText(MessageManager.getString("action.show_group")
922             + ":");
923     JLabel showConsensbits = new JLabel();
924     showConsensbits.setFont(verdana11);
925     showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
926     showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
927     showConsensbits.setText(MessageManager.getString("label.consensus")
928             + ":");
929     showConsensHistogram.setEnabled(false);
930     showConsensHistogram.setFont(verdana11);
931     showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
932     showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
933     showConsensHistogram.setSelected(true);
934     showConsensHistogram.setText(MessageManager
935             .getString("label.histogram"));
936     showConsensLogo.setEnabled(false);
937     showConsensLogo.setFont(verdana11);
938     showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
939     showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
940     showConsensLogo.setSelected(true);
941     showConsensLogo.setText(MessageManager.getString("label.logo"));
942     showGroupConsensus.setEnabled(false);
943     showGroupConsensus.setFont(verdana11);
944     showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
945     showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
946     showGroupConsensus.setSelected(true);
947     showGroupConsensus.setText(MessageManager.getString("label.consensus"));
948     showGroupConservation.setEnabled(false);
949     showGroupConservation.setFont(verdana11);
950     showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
951     showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
952     showGroupConservation.setSelected(true);
953     showGroupConservation.setText(MessageManager
954             .getString("label.conservation"));
955     showNpTooltip.setEnabled(true);
956     showNpTooltip.setFont(verdana11);
957     showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
958     showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
959     showNpTooltip.setSelected(true);
960     showNpTooltip.setText(MessageManager
961             .getString("label.non_positional_features"));
962     showDbRefTooltip.setEnabled(true);
963     showDbRefTooltip.setFont(verdana11);
964     showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
965     showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
966     showDbRefTooltip.setSelected(true);
967     showDbRefTooltip.setText(MessageManager
968             .getString("label.database_references"));
969     annotations.setFont(verdana11);
970     annotations.setHorizontalAlignment(SwingConstants.RIGHT);
971     annotations.setHorizontalTextPosition(SwingConstants.LEADING);
972     annotations.setSelected(true);
973     annotations.setText(MessageManager.getString("label.show_annotations"));
974     annotations.setBounds(new Rectangle(169, 12, 200, 23));
975     annotations.addActionListener(new ActionListener()
976     {
977       public void actionPerformed(ActionEvent e)
978       {
979         annotations_actionPerformed(e);
980       }
981     });
982     identity.addActionListener(new ActionListener()
983     {
984       public void actionPerformed(ActionEvent e)
985       {
986         annotations_actionPerformed(e);
987       }
988     });
989     showGroupConsensus.addActionListener(new ActionListener()
990     {
991       public void actionPerformed(ActionEvent e)
992       {
993         annotations_actionPerformed(e);
994       }
995     });
996     showUnconserved.setFont(verdana11);
997     showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
998     showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
999     showUnconserved.setSelected(true);
1000     showUnconserved.setText(MessageManager
1001             .getString("action.show_unconserved"));
1002     showUnconserved.addActionListener(new ActionListener()
1003     {
1004       public void actionPerformed(ActionEvent e)
1005       {
1006         showunconserved_actionPerformed(e);
1007       }
1008     });
1009
1010     // TODO these are not yet added to / action from Preferences
1011     // JCheckBox shareSelections = new JCheckBox();
1012     // shareSelections.setFont(verdana11);
1013     // shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
1014     // shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
1015     // shareSelections.setSelected(true);
1016     // shareSelections.setText(MessageManager
1017     // .getString("label.share_selection_across_views"));
1018     // JCheckBox followHighlight = new JCheckBox();
1019     // followHighlight.setFont(verdana11);
1020     // followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
1021     // followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
1022     // // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
1023     // followHighlight.setSelected(true);
1024     // followHighlight.setText(MessageManager
1025     // .getString("label.scroll_highlighted_regions"));
1026
1027     seqLimit.setFont(verdana11);
1028     seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
1029     seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
1030     seqLimit.setText(MessageManager.getString("label.full_sequence_id"));
1031     smoothFont.setFont(verdana11);
1032     smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
1033     smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
1034     smoothFont.setText(MessageManager.getString("label.smooth_font"));
1035     JLabel gapLabel = new JLabel();
1036     gapLabel.setFont(verdana11);
1037     gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
1038     gapLabel.setText(MessageManager.getString("label.gap_symbol") + " ");
1039     JLabel fontLabel = new JLabel();
1040     fontLabel.setFont(verdana11);
1041     fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
1042     fontLabel.setText(MessageManager.getString("label.font"));
1043     fontSizeCB.setFont(verdana11);
1044     fontSizeCB.setBounds(new Rectangle(320, 104, 65, 23));
1045     fontStyleCB.setFont(verdana11);
1046     fontStyleCB.setBounds(new Rectangle(382, 104, 80, 23));
1047     fontNameCB.setFont(verdana11);
1048     fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
1049     gapSymbolCB.setFont(verdana11);
1050     gapSymbolCB.setBounds(new Rectangle(172, 196, 69, 23));
1051     DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
1052     dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
1053     gapSymbolCB.setRenderer(dlcr);
1054
1055     startupCheckbox.setText(MessageManager.getString("action.open_file"));
1056     startupCheckbox.setFont(verdana11);
1057     startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
1058     startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
1059     startupCheckbox.setSelected(true);
1060     startupFileTextfield.setFont(verdana11);
1061     startupFileTextfield.setBounds(new Rectangle(172, 290, 270, 20));
1062     startupFileTextfield.addMouseListener(new MouseAdapter()
1063     {
1064       public void mouseClicked(MouseEvent e)
1065       {
1066         if (e.getClickCount() > 1)
1067         {
1068           startupFileTextfield_mouseClicked();
1069         }
1070       }
1071     });
1072  
1073     sortby.setFont(verdana11);
1074     sortby.setBounds(new Rectangle(172, 240, 155, 21));
1075     JLabel sortLabel = new JLabel();
1076     sortLabel.setFont(verdana11);
1077     sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
1078     sortLabel.setText(MessageManager.getString("label.sort_by"));
1079     sortAnnBy.setFont(verdana11);
1080     sortAnnBy.setBounds(new Rectangle(172, 265, 110, 21));
1081     JLabel sortAnnLabel = new JLabel();
1082     sortAnnLabel.setFont(verdana11);
1083     sortAnnLabel.setHorizontalAlignment(SwingConstants.RIGHT);
1084     sortAnnLabel.setText(MessageManager.getString("label.sort_ann_by"));
1085     sortAutocalc.setFont(verdana11);
1086     sortAutocalc.setBounds(new Rectangle(290, 265, 165, 21));
1087     JPanel annsettingsPanel = new JPanel();
1088     annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
1089     annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
1090     JPanel autoAnnotSettings1 = new JPanel();
1091     autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
1092     annsettingsPanel.add(autoAnnotSettings1);
1093     JPanel autoAnnotSettings2 = new JPanel();
1094     autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
1095     annsettingsPanel.add(autoAnnotSettings2);
1096     JPanel autoAnnotSettings3 = new JPanel();
1097     autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
1098     annsettingsPanel.add(autoAnnotSettings3);
1099     visualTab.add(annsettingsPanel);
1100     Border jb = new EmptyBorder(1, 1, 4, 5);
1101     quality.setBorder(jb);
1102     conservation.setBorder(jb);
1103     identity.setBorder(jb);
1104     showConsensbits.setBorder(jb);
1105     showGroupbits.setBorder(jb);
1106     showGroupConsensus.setBorder(jb);
1107     showGroupConservation.setBorder(jb);
1108     showConsensHistogram.setBorder(jb);
1109     showConsensLogo.setBorder(jb);
1110
1111     autoAnnotSettings2.add(conservation);
1112     autoAnnotSettings1.add(quality);
1113     autoAnnotSettings3.add(identity);
1114     autoAnnotSettings1.add(showGroupbits);
1115     autoAnnotSettings3.add(showGroupConsensus);
1116     autoAnnotSettings2.add(showGroupConservation);
1117     autoAnnotSettings1.add(showConsensbits);
1118     autoAnnotSettings2.add(showConsensHistogram);
1119     autoAnnotSettings3.add(showConsensLogo);
1120
1121     JPanel tooltipSettings = new JPanel();
1122     tooltipSettings.setBorder(new TitledBorder(MessageManager
1123             .getString("label.sequence_id_tooltip")));
1124     tooltipSettings.setBounds(173, 130, 200, 62);
1125     tooltipSettings.setLayout(new GridLayout(2, 1));
1126     tooltipSettings.add(showDbRefTooltip);
1127     tooltipSettings.add(showNpTooltip);
1128     visualTab.add(tooltipSettings);
1129
1130     wrap.setFont(verdana11);
1131     wrap.setHorizontalAlignment(SwingConstants.TRAILING);
1132     wrap.setHorizontalTextPosition(SwingConstants.LEADING);
1133     wrap.setText(MessageManager.getString("label.wrap_alignment"));
1134     rightAlign.setFont(verdana11);
1135     rightAlign.setForeground(Color.black);
1136     rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
1137     rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
1138     rightAlign.setText(MessageManager.getString("label.right_align_ids"));
1139     idItalics.setFont(verdana11);
1140     idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
1141     idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
1142     idItalics.setText(MessageManager
1143             .getString("label.sequence_name_italics"));
1144     openoverv.setFont(verdana11);
1145     openoverv.setActionCommand(MessageManager
1146             .getString("label.open_overview"));
1147     openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
1148     openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
1149     openoverv.setText(MessageManager.getString(("label.open_overview")));
1150     JPanel jPanel2 = new JPanel();
1151     jPanel2.setBounds(new Rectangle(7, 17, 158, 297));
1152     GridLayout gridLayout2 = new GridLayout();
1153     jPanel2.setLayout(gridLayout2);
1154     gridLayout2.setRows(13);
1155     jPanel2.add(fullScreen);
1156     jPanel2.add(openoverv);
1157     jPanel2.add(seqLimit);
1158     jPanel2.add(rightAlign);
1159     jPanel2.add(fontLabel);
1160     jPanel2.add(showUnconserved);
1161     jPanel2.add(idItalics);
1162     jPanel2.add(smoothFont);
1163     jPanel2.add(gapLabel);
1164     jPanel2.add(wrap);
1165     jPanel2.add(sortLabel);
1166     jPanel2.add(sortAnnLabel);
1167     jPanel2.add(startupCheckbox);
1168     visualTab.add(jPanel2);
1169     visualTab.add(annotations);
1170     visualTab.add(startupFileTextfield);
1171     visualTab.add(sortby);
1172     visualTab.add(sortAnnBy);
1173     visualTab.add(sortAutocalc);
1174     visualTab.add(gapSymbolCB);
1175     visualTab.add(fontNameCB);
1176     visualTab.add(fontSizeCB);
1177     visualTab.add(fontStyleCB);
1178     return visualTab;
1179   }
1180
1181   protected void autoIdWidth_actionPerformed()
1182   {
1183     // TODO Auto-generated method stub
1184
1185   }
1186
1187   protected void userIdWidth_actionPerformed()
1188   {
1189     // TODO Auto-generated method stub
1190
1191   }
1192
1193   protected void maxColour_actionPerformed(JPanel panel)
1194   {
1195   }
1196
1197   protected void minColour_actionPerformed(JPanel panel)
1198   {
1199   }
1200
1201   protected void showunconserved_actionPerformed(ActionEvent e)
1202   {
1203     // TODO Auto-generated method stub
1204
1205   }
1206
1207   /**
1208    * DOCUMENT ME!
1209    * 
1210    * @param e
1211    *          DOCUMENT ME!
1212    */
1213   public void ok_actionPerformed(ActionEvent e)
1214   {
1215   }
1216
1217   /**
1218    * DOCUMENT ME!
1219    * 
1220    * @param e
1221    *          DOCUMENT ME!
1222    */
1223   public void cancel_actionPerformed(ActionEvent e)
1224   {
1225   }
1226
1227   /**
1228    * DOCUMENT ME!
1229    * 
1230    * @param e
1231    *          DOCUMENT ME!
1232    */
1233   public void annotations_actionPerformed(ActionEvent e)
1234   {
1235   }
1236
1237   /**
1238    * DOCUMENT ME!
1239    */
1240   public void startupFileTextfield_mouseClicked()
1241   {
1242   }
1243
1244   public void newLink_actionPerformed(ActionEvent e)
1245   {
1246
1247   }
1248
1249   public void editLink_actionPerformed(ActionEvent e)
1250   {
1251
1252   }
1253
1254   public void deleteLink_actionPerformed(ActionEvent e)
1255   {
1256
1257   }
1258
1259   public void defaultBrowser_mouseClicked(MouseEvent e)
1260   {
1261
1262   }
1263
1264   public void linkURLList_keyTyped(KeyEvent e)
1265   {
1266
1267   }
1268
1269   public void useProxy_actionPerformed()
1270   {
1271     proxyServerTB.setEnabled(useProxy.isSelected());
1272     proxyPortTB.setEnabled(useProxy.isSelected());
1273   }
1274
1275 }