5569c24f9b7502d73311bb179cd8e54e6893ad64
[jalview.git] / src / jalview / jbgui / GPreferences.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
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     structureTab.add(structViewer);
786
787     ypos += lineSpacing;
788     JLabel pathLabel = new JLabel();
789     pathLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
790     pathLabel.setHorizontalAlignment(SwingConstants.LEFT);
791     pathLabel.setText(MessageManager.getString("label.chimera_path"));
792     final String tooltip = JvSwingUtils.wrapTooltip(true,
793             MessageManager.getString("label.chimera_path_tip"));
794     pathLabel.setToolTipText(tooltip);
795     pathLabel.setBounds(new Rectangle(10, ypos, 140, height));
796     structureTab.add(pathLabel);
797
798     chimeraPath.setFont(verdana11);
799     chimeraPath.setText("");
800     chimeraPath.setBounds(new Rectangle(160, ypos, 300, height));
801     chimeraPath.addMouseListener(new MouseAdapter()
802     {
803       @Override
804       public void mouseClicked(MouseEvent e)
805       {
806         if (e.getClickCount() == 2)
807         {
808           String chosen = openFileChooser();
809           if (chosen != null)
810           {
811             chimeraPath.setText(chosen);
812           }
813         }
814       }
815     });
816     structureTab.add(chimeraPath);
817
818     return structureTab;
819   }
820
821   /**
822    * Show a dialog for the user to choose a file. Returns the chosen path, or
823    * null on Cancel.
824    * 
825    * @return
826    */
827   protected String openFileChooser()
828   {
829     String choice = null;
830     JFileChooser chooser = new JFileChooser();
831
832     // chooser.setFileView(new JalviewFileView());
833     chooser.setDialogTitle(MessageManager
834             .getString("label.open_local_file"));
835     chooser.setToolTipText(MessageManager.getString("action.open"));
836
837     int value = chooser.showOpenDialog(this);
838
839     if (value == JFileChooser.APPROVE_OPTION)
840     {
841       choice = chooser.getSelectedFile().getPath();
842     }
843     return choice;
844   }
845
846   /**
847    * Validate the structure tab preferences; if invalid, set focus on this tab.
848    * 
849    * @param e
850    */
851   protected boolean validateStructure(FocusEvent e)
852   {
853     if (!validateStructure())
854     {
855       e.getComponent().requestFocusInWindow();
856       return false;
857     }
858     return true;
859   }
860
861   protected boolean validateStructure()
862   {
863     return false;
864   }
865
866   /**
867    * Initialises the Visual tabbed panel.
868    * 
869    * @return
870    */
871   private JPanel initVisualTab()
872   {
873     JPanel visualTab = new JPanel();
874     visualTab.setBorder(new TitledBorder(MessageManager
875             .getString("action.open_new_alignment")));
876     visualTab.setLayout(null);
877     fullScreen.setFont(verdana11);
878     fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
879     fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
880     fullScreen.setText(MessageManager.getString("label.maximize_window"));
881     quality.setEnabled(false);
882     quality.setFont(verdana11);
883     quality.setHorizontalAlignment(SwingConstants.RIGHT);
884     quality.setHorizontalTextPosition(SwingConstants.LEFT);
885     quality.setSelected(true);
886     quality.setText(MessageManager.getString("label.quality"));
887     conservation.setEnabled(false);
888     conservation.setFont(verdana11);
889     conservation.setHorizontalAlignment(SwingConstants.RIGHT);
890     conservation.setHorizontalTextPosition(SwingConstants.LEFT);
891     conservation.setSelected(true);
892     conservation.setText(MessageManager.getString("label.conservation"));
893     identity.setEnabled(false);
894     identity.setFont(verdana11);
895     identity.setHorizontalAlignment(SwingConstants.RIGHT);
896     identity.setHorizontalTextPosition(SwingConstants.LEFT);
897     identity.setSelected(true);
898     identity.setText(MessageManager.getString("label.consensus"));
899     JLabel showGroupbits = new JLabel();
900     showGroupbits.setFont(verdana11);
901     showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
902     showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
903     showGroupbits.setText(MessageManager.getString("action.show_group")
904             + ":");
905     JLabel showConsensbits = new JLabel();
906     showConsensbits.setFont(verdana11);
907     showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
908     showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
909     showConsensbits.setText(MessageManager.getString("label.consensus")
910             + ":");
911     showConsensHistogram.setEnabled(false);
912     showConsensHistogram.setFont(verdana11);
913     showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
914     showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
915     showConsensHistogram.setSelected(true);
916     showConsensHistogram.setText(MessageManager
917             .getString("label.histogram"));
918     showConsensLogo.setEnabled(false);
919     showConsensLogo.setFont(verdana11);
920     showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
921     showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
922     showConsensLogo.setSelected(true);
923     showConsensLogo.setText(MessageManager.getString("label.logo"));
924     showGroupConsensus.setEnabled(false);
925     showGroupConsensus.setFont(verdana11);
926     showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
927     showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
928     showGroupConsensus.setSelected(true);
929     showGroupConsensus.setText(MessageManager.getString("label.consensus"));
930     showGroupConservation.setEnabled(false);
931     showGroupConservation.setFont(verdana11);
932     showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
933     showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
934     showGroupConservation.setSelected(true);
935     showGroupConservation.setText(MessageManager
936             .getString("label.conservation"));
937     showNpTooltip.setEnabled(true);
938     showNpTooltip.setFont(verdana11);
939     showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
940     showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
941     showNpTooltip.setSelected(true);
942     showNpTooltip.setText(MessageManager
943             .getString("label.non_positional_features"));
944     showDbRefTooltip.setEnabled(true);
945     showDbRefTooltip.setFont(verdana11);
946     showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
947     showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
948     showDbRefTooltip.setSelected(true);
949     showDbRefTooltip.setText(MessageManager
950             .getString("label.database_references"));
951     annotations.setFont(verdana11);
952     annotations.setHorizontalAlignment(SwingConstants.RIGHT);
953     annotations.setHorizontalTextPosition(SwingConstants.LEADING);
954     annotations.setSelected(true);
955     annotations.setText(MessageManager.getString("label.show_annotations"));
956     annotations.setBounds(new Rectangle(169, 12, 200, 23));
957     annotations.addActionListener(new ActionListener()
958     {
959       public void actionPerformed(ActionEvent e)
960       {
961         annotations_actionPerformed(e);
962       }
963     });
964     identity.addActionListener(new ActionListener()
965     {
966       public void actionPerformed(ActionEvent e)
967       {
968         annotations_actionPerformed(e);
969       }
970     });
971     showGroupConsensus.addActionListener(new ActionListener()
972     {
973       public void actionPerformed(ActionEvent e)
974       {
975         annotations_actionPerformed(e);
976       }
977     });
978     showUnconserved.setFont(verdana11);
979     showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
980     showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
981     showUnconserved.setSelected(true);
982     showUnconserved.setText(MessageManager
983             .getString("action.show_unconserved"));
984     showUnconserved.addActionListener(new ActionListener()
985     {
986       public void actionPerformed(ActionEvent e)
987       {
988         showunconserved_actionPerformed(e);
989       }
990     });
991
992     // TODO these are not yet added to / action from Preferences
993     // JCheckBox shareSelections = new JCheckBox();
994     // shareSelections.setFont(verdana11);
995     // shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
996     // shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
997     // shareSelections.setSelected(true);
998     // shareSelections.setText(MessageManager
999     // .getString("label.share_selection_across_views"));
1000     // JCheckBox followHighlight = new JCheckBox();
1001     // followHighlight.setFont(verdana11);
1002     // followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
1003     // followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
1004     // // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
1005     // followHighlight.setSelected(true);
1006     // followHighlight.setText(MessageManager
1007     // .getString("label.scroll_highlighted_regions"));
1008
1009     seqLimit.setFont(verdana11);
1010     seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
1011     seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
1012     seqLimit.setText(MessageManager.getString("label.full_sequence_id"));
1013     smoothFont.setFont(verdana11);
1014     smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
1015     smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
1016     smoothFont.setText(MessageManager.getString("label.smooth_font"));
1017     JLabel gapLabel = new JLabel();
1018     gapLabel.setFont(verdana11);
1019     gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
1020     gapLabel.setText(MessageManager.getString("label.gap_symbol") + " ");
1021     JLabel fontLabel = new JLabel();
1022     fontLabel.setFont(verdana11);
1023     fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
1024     fontLabel.setText(MessageManager.getString("label.font"));
1025     fontSizeCB.setFont(verdana11);
1026     fontSizeCB.setBounds(new Rectangle(320, 104, 65, 23));
1027     fontStyleCB.setFont(verdana11);
1028     fontStyleCB.setBounds(new Rectangle(382, 104, 80, 23));
1029     fontNameCB.setFont(verdana11);
1030     fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
1031     gapSymbolCB.setFont(verdana11);
1032     gapSymbolCB.setBounds(new Rectangle(172, 196, 69, 23));
1033     DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
1034     dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
1035     gapSymbolCB.setRenderer(dlcr);
1036
1037     startupCheckbox.setText(MessageManager.getString("action.open_file"));
1038     startupCheckbox.setFont(verdana11);
1039     startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
1040     startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
1041     startupCheckbox.setSelected(true);
1042     startupFileTextfield.setFont(verdana11);
1043     startupFileTextfield.setBounds(new Rectangle(172, 290, 270, 20));
1044     startupFileTextfield.addMouseListener(new MouseAdapter()
1045     {
1046       public void mouseClicked(MouseEvent e)
1047       {
1048         if (e.getClickCount() > 1)
1049         {
1050           startupFileTextfield_mouseClicked();
1051         }
1052       }
1053     });
1054  
1055     sortby.setFont(verdana11);
1056     sortby.setBounds(new Rectangle(172, 240, 155, 21));
1057     JLabel sortLabel = new JLabel();
1058     sortLabel.setFont(verdana11);
1059     sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
1060     sortLabel.setText(MessageManager.getString("label.sort_by"));
1061     sortAnnBy.setFont(verdana11);
1062     sortAnnBy.setBounds(new Rectangle(172, 265, 110, 21));
1063     JLabel sortAnnLabel = new JLabel();
1064     sortAnnLabel.setFont(verdana11);
1065     sortAnnLabel.setHorizontalAlignment(SwingConstants.RIGHT);
1066     sortAnnLabel.setText(MessageManager.getString("label.sort_ann_by"));
1067     sortAutocalc.setFont(verdana11);
1068     sortAutocalc.setBounds(new Rectangle(290, 265, 165, 21));
1069     JPanel annsettingsPanel = new JPanel();
1070     annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
1071     annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
1072     JPanel autoAnnotSettings1 = new JPanel();
1073     autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
1074     annsettingsPanel.add(autoAnnotSettings1);
1075     JPanel autoAnnotSettings2 = new JPanel();
1076     autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
1077     annsettingsPanel.add(autoAnnotSettings2);
1078     JPanel autoAnnotSettings3 = new JPanel();
1079     autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
1080     annsettingsPanel.add(autoAnnotSettings3);
1081     visualTab.add(annsettingsPanel);
1082     Border jb = new EmptyBorder(1, 1, 4, 5);
1083     quality.setBorder(jb);
1084     conservation.setBorder(jb);
1085     identity.setBorder(jb);
1086     showConsensbits.setBorder(jb);
1087     showGroupbits.setBorder(jb);
1088     showGroupConsensus.setBorder(jb);
1089     showGroupConservation.setBorder(jb);
1090     showConsensHistogram.setBorder(jb);
1091     showConsensLogo.setBorder(jb);
1092
1093     autoAnnotSettings2.add(conservation);
1094     autoAnnotSettings1.add(quality);
1095     autoAnnotSettings3.add(identity);
1096     autoAnnotSettings1.add(showGroupbits);
1097     autoAnnotSettings3.add(showGroupConsensus);
1098     autoAnnotSettings2.add(showGroupConservation);
1099     autoAnnotSettings1.add(showConsensbits);
1100     autoAnnotSettings2.add(showConsensHistogram);
1101     autoAnnotSettings3.add(showConsensLogo);
1102
1103     JPanel tooltipSettings = new JPanel();
1104     tooltipSettings.setBorder(new TitledBorder(MessageManager
1105             .getString("label.sequence_id_tooltip")));
1106     tooltipSettings.setBounds(173, 130, 200, 62);
1107     tooltipSettings.setLayout(new GridLayout(2, 1));
1108     tooltipSettings.add(showDbRefTooltip);
1109     tooltipSettings.add(showNpTooltip);
1110     visualTab.add(tooltipSettings);
1111
1112     wrap.setFont(verdana11);
1113     wrap.setHorizontalAlignment(SwingConstants.TRAILING);
1114     wrap.setHorizontalTextPosition(SwingConstants.LEADING);
1115     wrap.setText(MessageManager.getString("label.wrap_alignment"));
1116     rightAlign.setFont(verdana11);
1117     rightAlign.setForeground(Color.black);
1118     rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
1119     rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
1120     rightAlign.setText(MessageManager.getString("label.right_align_ids"));
1121     idItalics.setFont(verdana11);
1122     idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
1123     idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
1124     idItalics.setText(MessageManager
1125             .getString("label.sequence_name_italics"));
1126     openoverv.setFont(verdana11);
1127     openoverv.setActionCommand(MessageManager
1128             .getString("label.open_overview"));
1129     openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
1130     openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
1131     openoverv.setText(MessageManager.getString(("label.open_overview")));
1132     JPanel jPanel2 = new JPanel();
1133     jPanel2.setBounds(new Rectangle(7, 17, 158, 297));
1134     GridLayout gridLayout2 = new GridLayout();
1135     jPanel2.setLayout(gridLayout2);
1136     gridLayout2.setRows(13);
1137     jPanel2.add(fullScreen);
1138     jPanel2.add(openoverv);
1139     jPanel2.add(seqLimit);
1140     jPanel2.add(rightAlign);
1141     jPanel2.add(fontLabel);
1142     jPanel2.add(showUnconserved);
1143     jPanel2.add(idItalics);
1144     jPanel2.add(smoothFont);
1145     jPanel2.add(gapLabel);
1146     jPanel2.add(wrap);
1147     jPanel2.add(sortLabel);
1148     jPanel2.add(sortAnnLabel);
1149     jPanel2.add(startupCheckbox);
1150     visualTab.add(jPanel2);
1151     visualTab.add(annotations);
1152     visualTab.add(startupFileTextfield);
1153     visualTab.add(sortby);
1154     visualTab.add(sortAnnBy);
1155     visualTab.add(sortAutocalc);
1156     visualTab.add(gapSymbolCB);
1157     visualTab.add(fontNameCB);
1158     visualTab.add(fontSizeCB);
1159     visualTab.add(fontStyleCB);
1160     return visualTab;
1161   }
1162
1163   protected void autoIdWidth_actionPerformed()
1164   {
1165     // TODO Auto-generated method stub
1166
1167   }
1168
1169   protected void userIdWidth_actionPerformed()
1170   {
1171     // TODO Auto-generated method stub
1172
1173   }
1174
1175   protected void maxColour_actionPerformed(JPanel panel)
1176   {
1177   }
1178
1179   protected void minColour_actionPerformed(JPanel panel)
1180   {
1181   }
1182
1183   protected void showunconserved_actionPerformed(ActionEvent e)
1184   {
1185     // TODO Auto-generated method stub
1186
1187   }
1188
1189   /**
1190    * DOCUMENT ME!
1191    * 
1192    * @param e
1193    *          DOCUMENT ME!
1194    */
1195   public void ok_actionPerformed(ActionEvent e)
1196   {
1197   }
1198
1199   /**
1200    * DOCUMENT ME!
1201    * 
1202    * @param e
1203    *          DOCUMENT ME!
1204    */
1205   public void cancel_actionPerformed(ActionEvent e)
1206   {
1207   }
1208
1209   /**
1210    * DOCUMENT ME!
1211    * 
1212    * @param e
1213    *          DOCUMENT ME!
1214    */
1215   public void annotations_actionPerformed(ActionEvent e)
1216   {
1217   }
1218
1219   /**
1220    * DOCUMENT ME!
1221    */
1222   public void startupFileTextfield_mouseClicked()
1223   {
1224   }
1225
1226   public void newLink_actionPerformed(ActionEvent e)
1227   {
1228
1229   }
1230
1231   public void editLink_actionPerformed(ActionEvent e)
1232   {
1233
1234   }
1235
1236   public void deleteLink_actionPerformed(ActionEvent e)
1237   {
1238
1239   }
1240
1241   public void defaultBrowser_mouseClicked(MouseEvent e)
1242   {
1243
1244   }
1245
1246   public void linkURLList_keyTyped(KeyEvent e)
1247   {
1248
1249   }
1250
1251   public void useProxy_actionPerformed()
1252   {
1253     proxyServerTB.setEnabled(useProxy.isSelected());
1254     proxyPortTB.setEnabled(useProxy.isSelected());
1255   }
1256
1257 }