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