JAL-1499 patch from Mungo Carstairs
[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.util.MessageManager;
25
26 import java.awt.BorderLayout;
27 import java.awt.Color;
28 import java.awt.Dimension;
29 import java.awt.FlowLayout;
30 import java.awt.Font;
31 import java.awt.GridBagConstraints;
32 import java.awt.GridBagLayout;
33 import java.awt.GridLayout;
34 import java.awt.Insets;
35 import java.awt.Rectangle;
36 import java.awt.event.ActionEvent;
37 import java.awt.event.ActionListener;
38 import java.awt.event.KeyEvent;
39 import java.awt.event.MouseAdapter;
40 import java.awt.event.MouseEvent;
41
42 import javax.swing.BorderFactory;
43 import javax.swing.DefaultListCellRenderer;
44 import javax.swing.JButton;
45 import javax.swing.JCheckBox;
46 import javax.swing.JComboBox;
47 import javax.swing.JLabel;
48 import javax.swing.JList;
49 import javax.swing.JPanel;
50 import javax.swing.JScrollPane;
51 import javax.swing.JTabbedPane;
52 import javax.swing.JTextField;
53 import javax.swing.ListSelectionModel;
54 import javax.swing.SwingConstants;
55 import javax.swing.border.Border;
56 import javax.swing.border.EmptyBorder;
57 import javax.swing.border.TitledBorder;
58 import javax.swing.event.ListSelectionEvent;
59 import javax.swing.event.ListSelectionListener;
60
61 /**
62  * DOCUMENT ME!
63  * 
64  * @author $author$
65  * @version $Revision$
66  */
67 public class GPreferences extends JPanel
68 {
69   JTabbedPane tabbedPane = new JTabbedPane();
70
71   JButton ok = new JButton();
72
73   JButton cancel = new JButton();
74
75   JPanel okCancelPanel = new JPanel();
76
77   BorderLayout borderLayout1 = new BorderLayout();
78
79   protected JCheckBox quality = new JCheckBox();
80
81   JPanel visualTab = new JPanel();
82
83   JPanel visual2Tab = new JPanel();
84
85   protected JCheckBox fullScreen = new JCheckBox();
86
87   protected JCheckBox conservation = new JCheckBox();
88
89   protected JCheckBox identity = new JCheckBox();
90
91   protected JCheckBox annotations = new JCheckBox();
92
93   protected JPanel minColour = new JPanel();
94
95   JLabel mincolourLabel = new JLabel();
96
97   protected JPanel maxColour = new JPanel();
98
99   JLabel maxcolourLabel = new JLabel();
100
101   JLabel gapLabel = new JLabel();
102
103   protected JComboBox colour = new JComboBox();
104
105   JLabel colourLabel = new JLabel();
106
107   JLabel fontLabel = new JLabel();
108
109   protected JComboBox fontSizeCB = new JComboBox();
110
111   protected JComboBox fontStyleCB = new JComboBox();
112
113   protected JComboBox fontNameCB = new JComboBox();
114
115   protected JComboBox gapSymbolCB = new JComboBox();
116
117   protected JCheckBox startupCheckbox = new JCheckBox();
118
119   protected JTextField startupFileTextfield = new JTextField();
120
121   JPanel connectTab = new JPanel();
122
123   JLabel serverLabel = new JLabel();
124
125   protected JList linkURLList = new JList();
126
127   protected JTextField proxyServerTB = new JTextField();
128
129   protected JTextField proxyPortTB = new JTextField();
130
131   JLabel portLabel = new JLabel();
132
133   JLabel browserLabel = new JLabel();
134
135   protected JTextField defaultBrowser = new JTextField();
136
137   JButton newLink = new JButton();
138
139   JButton editLink = new JButton();
140
141   JButton deleteLink = new JButton();
142
143   JScrollPane linkScrollPane = new JScrollPane();
144
145   JPanel linkPanel = new JPanel();
146
147   BorderLayout borderLayout2 = new BorderLayout();
148
149   JPanel editLinkButtons = new JPanel();
150
151   GridLayout gridLayout1 = new GridLayout();
152
153   protected JList linkNameList = new JList();
154
155   JPanel linkPanel2 = new JPanel();
156
157   BorderLayout borderLayout3 = new BorderLayout();
158
159   protected JCheckBox useProxy = new JCheckBox();
160
161   JPanel jPanel1 = new JPanel();
162
163   TitledBorder titledBorder1 = new TitledBorder(
164           MessageManager.getString("label.proxy_server"));
165
166   TitledBorder titledBorder2 = new TitledBorder(
167           MessageManager.getString("label.file_output"));
168
169   GridBagLayout gridBagLayout2 = new GridBagLayout();
170
171   GridBagLayout gridBagLayout1 = new GridBagLayout();
172
173   GridBagLayout gridBagLayout3 = new GridBagLayout();
174
175   protected JComboBox sortby = new JComboBox();
176
177   JLabel sortLabel = new JLabel();
178
179   JPanel jPanel2 = new JPanel();
180
181   JPanel visual2panel = new JPanel();
182
183   GridLayout gridLayout2 = new GridLayout();
184
185   GridLayout gridLayout4 = new GridLayout();
186
187   JPanel annsettingsPanel = new JPanel();
188
189   JPanel autoAnnotSettings1 = new JPanel();
190
191   JPanel autoAnnotSettings2 = new JPanel();
192
193   JPanel autoAnnotSettings3 = new JPanel();
194
195   JPanel exportTab = new JPanel();
196
197   JLabel epsLabel = new JLabel();
198
199   protected JComboBox epsRendering = new JComboBox();
200
201   protected JLabel userIdWidthlabel = new JLabel();
202
203   protected JCheckBox autoIdWidth = new JCheckBox();
204
205   protected JTextField userIdWidth = new JTextField();
206
207   JLabel jLabel1 = new JLabel();
208
209   protected JCheckBox blcjv = new JCheckBox();
210
211   protected JCheckBox pileupjv = new JCheckBox();
212
213   protected JCheckBox clustaljv = new JCheckBox();
214
215   protected JCheckBox megajv = new JCheckBox();
216
217   protected JCheckBox msfjv = new JCheckBox();
218
219   protected JCheckBox fastajv = new JCheckBox();
220
221   protected JCheckBox pfamjv = new JCheckBox();
222
223   FlowLayout flowLayout1 = new FlowLayout();
224
225   protected JCheckBox pirjv = new JCheckBox();
226
227   JPanel jPanel11 = new JPanel();
228
229   Font verdana11 = JvSwingUtils.getLabelFont();
230
231   protected JCheckBox seqLimit = new JCheckBox();
232
233   GridLayout gridLayout3 = new GridLayout();
234
235   protected JCheckBox smoothFont = new JCheckBox();
236
237   JPanel calcTab = new JPanel();
238
239   protected JCheckBox autoCalculateConsCheck = new JCheckBox();
240
241   protected JCheckBox padGaps = new JCheckBox();
242
243   protected JCheckBox modellerOutput = new JCheckBox();
244
245   protected JPanel dasPanel = new JPanel();
246
247   BorderLayout borderLayout4 = new BorderLayout();
248
249   protected JPanel wsPanel = new JPanel();
250
251   BorderLayout borderLayout5 = new BorderLayout();
252
253   protected JCheckBox wrap = new JCheckBox();
254
255   protected JCheckBox rightAlign = new JCheckBox();
256
257   protected JCheckBox showUnconserved = new JCheckBox();
258
259   protected JCheckBox showDbRefTooltip = new JCheckBox();
260
261   protected JCheckBox showNpTooltip = new JCheckBox();
262
263   protected JCheckBox idItalics = new JCheckBox();
264
265   protected JCheckBox openoverv = new JCheckBox();
266
267   protected JCheckBox usagestats = new JCheckBox();
268
269   protected JCheckBox questionnaire = new JCheckBox();
270
271   protected JCheckBox versioncheck = new JCheckBox();
272
273   protected JLabel showGroupbits = new JLabel();
274
275   protected JLabel showConsensbits = new JLabel();
276
277   protected JCheckBox showConsensLogo = new JCheckBox();
278
279   protected JCheckBox showConsensHistogram = new JCheckBox();
280
281   protected JCheckBox showGroupConsensus = new JCheckBox();
282
283   protected JCheckBox showGroupConservation = new JCheckBox();
284
285   protected JCheckBox shareSelections = new JCheckBox();
286
287   protected JCheckBox followHighlight = new JCheckBox();
288
289   protected JCheckBox sortByTree = new JCheckBox();
290
291   /**
292    * Creates a new GPreferences object.
293    */
294   public GPreferences()
295   {
296     try
297     {
298       jbInit();
299     } catch (Exception ex)
300     {
301       ex.printStackTrace();
302     }
303   }
304
305   /**
306    * DOCUMENT ME!
307    * 
308    * @throws Exception
309    *           DOCUMENT ME!
310    */
311   private void jbInit() throws Exception
312   {
313     this.setLayout(borderLayout1);
314     ok.setText(MessageManager.getString("action.ok"));
315     ok.addActionListener(new ActionListener()
316     {
317       @Override
318       public void actionPerformed(ActionEvent e)
319       {
320         ok_actionPerformed(e);
321       }
322     });
323     cancel.setText(MessageManager.getString("action.cancel"));
324     cancel.addActionListener(new ActionListener()
325     {
326       @Override
327       public void actionPerformed(ActionEvent e)
328       {
329         cancel_actionPerformed(e);
330       }
331     });
332     quality.setEnabled(false);
333     quality.setFont(verdana11);
334     quality.setHorizontalAlignment(SwingConstants.RIGHT);
335     quality.setHorizontalTextPosition(SwingConstants.LEFT);
336     quality.setSelected(true);
337     quality.setText(MessageManager.getString("label.quality"));
338     visualTab.setBorder(new TitledBorder(MessageManager
339             .getString("action.open_new_aligmnent")));
340     visualTab.setLayout(null);
341     visual2Tab.setBorder(new TitledBorder(MessageManager
342             .getString("action.open_new_aligmnent")));
343     visual2Tab.setLayout(new FlowLayout());
344     fullScreen.setFont(verdana11);
345     fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
346     fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
347     fullScreen.setText(MessageManager.getString("label.maximize_window"));
348     conservation.setEnabled(false);
349     conservation.setFont(verdana11);
350     conservation.setHorizontalAlignment(SwingConstants.RIGHT);
351     conservation.setHorizontalTextPosition(SwingConstants.LEFT);
352     conservation.setSelected(true);
353     conservation.setText(MessageManager.getString("label.conservation"));
354     identity.setEnabled(false);
355     identity.setFont(verdana11);
356     identity.setHorizontalAlignment(SwingConstants.RIGHT);
357     identity.setHorizontalTextPosition(SwingConstants.LEFT);
358     identity.setSelected(true);
359     identity.setText(MessageManager.getString("label.consensus"));
360     showGroupbits.setFont(verdana11);
361     showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
362     showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
363     showGroupbits.setText(MessageManager.getString("action.show_group")
364             + ":");
365     showConsensbits.setFont(verdana11);
366     showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
367     showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
368     showConsensbits.setText(MessageManager.getString("label.consensus")
369             + ":");
370     showConsensHistogram.setEnabled(false);
371     showConsensHistogram.setFont(verdana11);
372     showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
373     showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
374     showConsensHistogram.setSelected(true);
375     showConsensHistogram.setText(MessageManager
376             .getString("label.histogram"));
377     showConsensLogo.setEnabled(false);
378     showConsensLogo.setFont(verdana11);
379     showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
380     showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
381     showConsensLogo.setSelected(true);
382     showConsensLogo.setText(MessageManager.getString("label.logo"));
383     showGroupConsensus.setEnabled(false);
384     showGroupConsensus.setFont(verdana11);
385     showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
386     showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
387     showGroupConsensus.setSelected(true);
388     showGroupConsensus.setText(MessageManager.getString("label.consensus"));
389     showGroupConservation.setEnabled(false);
390     showGroupConservation.setFont(verdana11);
391     showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
392     showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
393     showGroupConservation.setSelected(true);
394     showGroupConservation.setText(MessageManager
395             .getString("label.conservation"));
396     showNpTooltip.setEnabled(true);
397     showNpTooltip.setFont(verdana11);
398     showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
399     showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
400     showNpTooltip.setSelected(true);
401     showNpTooltip.setText(MessageManager
402             .getString("label.non_positional_features"));
403     showDbRefTooltip.setEnabled(true);
404     showDbRefTooltip.setFont(verdana11);
405     showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
406     showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
407     showDbRefTooltip.setSelected(true);
408     showDbRefTooltip.setText(MessageManager
409             .getString("label.database_references"));
410     annotations.setFont(verdana11);
411     annotations.setHorizontalAlignment(SwingConstants.RIGHT);
412     annotations.setHorizontalTextPosition(SwingConstants.LEADING);
413     annotations.setSelected(true);
414     annotations.setText(MessageManager.getString("label.show_annotations"));
415     annotations.setBounds(new Rectangle(169, 12, 200, 23));
416     annotations.addActionListener(new ActionListener()
417     {
418       @Override
419       public void actionPerformed(ActionEvent e)
420       {
421         annotations_actionPerformed(e);
422       }
423     });
424     identity.addActionListener(new ActionListener()
425     {
426       @Override
427       public void actionPerformed(ActionEvent e)
428       {
429         annotations_actionPerformed(e);
430       }
431     });
432     showGroupConsensus.addActionListener(new ActionListener()
433     {
434       @Override
435       public void actionPerformed(ActionEvent e)
436       {
437         annotations_actionPerformed(e);
438       }
439     });
440     showUnconserved.setFont(verdana11);
441     showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
442     showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
443     showUnconserved.setSelected(true);
444     showUnconserved.setText(MessageManager
445             .getString("action.show_unconserved"));
446     showUnconserved.addActionListener(new ActionListener()
447     {
448       @Override
449       public void actionPerformed(ActionEvent e)
450       {
451         showunconserved_actionPerformed(e);
452       }
453     });
454     // / TODO: fit these in to preferences panel!!!!!
455     shareSelections.setFont(verdana11);
456     shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
457     shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
458     shareSelections.setSelected(true);
459     shareSelections.setText(MessageManager
460             .getString("label.share_selection_across_views"));
461     followHighlight.setFont(verdana11);
462     followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
463     followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
464     // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
465     followHighlight.setSelected(true);
466     followHighlight.setText(MessageManager
467             .getString("label.scroll_highlighted_regions"));
468
469     gapLabel.setFont(verdana11);
470     gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
471     gapLabel.setText(MessageManager.getString("label.gap_symbol") + " ");
472     colour.setFont(verdana11);
473     colour.setBounds(new Rectangle(172, 225, 155, 21));
474     colourLabel.setFont(verdana11);
475     colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
476     colourLabel.setText(MessageManager.getString("label.alignment_colour")
477             + " ");
478     fontLabel.setFont(verdana11);
479     fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
480     fontLabel.setText(MessageManager.getString("label.font"));
481     fontSizeCB.setFont(verdana11);
482     fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
483     fontStyleCB.setFont(verdana11);
484     fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
485     fontNameCB.setFont(verdana11);
486     fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
487     gapSymbolCB.setFont(verdana11);
488     gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
489     mincolourLabel.setFont(verdana11);
490     mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
491     mincolourLabel.setText(MessageManager.getString("label.min_colour"));
492     minColour.setFont(verdana11);
493     minColour.setBorder(BorderFactory.createEtchedBorder());
494     minColour.setPreferredSize(new Dimension(40, 20));
495     minColour.addMouseListener(new MouseAdapter()
496     {
497       @Override
498       public void mousePressed(MouseEvent e)
499       {
500         minColour_actionPerformed();
501       }
502     });
503     maxcolourLabel.setFont(verdana11);
504     maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
505     maxcolourLabel.setText(MessageManager.getString("label.max_colour"));
506     maxColour.setFont(verdana11);
507     maxColour.setBorder(BorderFactory.createEtchedBorder());
508     maxColour.setPreferredSize(new Dimension(40, 20));
509     maxColour.addMouseListener(new MouseAdapter()
510     {
511       @Override
512       public void mousePressed(MouseEvent e)
513       {
514         maxColour_actionPerformed();
515       }
516     });
517
518     startupCheckbox.setText(MessageManager.getString("action.open_file"));
519     startupCheckbox.setFont(verdana11);
520     startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
521     startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
522     startupCheckbox.setSelected(true);
523     startupFileTextfield.setFont(verdana11);
524     startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
525     startupFileTextfield.addMouseListener(new MouseAdapter()
526     {
527       @Override
528       public void mouseClicked(MouseEvent e)
529       {
530         if (e.getClickCount() > 1)
531         {
532           startupFileTextfield_mouseClicked();
533         }
534       }
535     });
536
537     connectTab.setLayout(gridBagLayout3);
538     serverLabel.setText(MessageManager.getString("label.address"));
539     serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
540     serverLabel.setFont(verdana11);
541     proxyServerTB.setFont(verdana11);
542     proxyPortTB.setFont(verdana11);
543     portLabel.setFont(verdana11);
544     portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
545     portLabel.setText(MessageManager.getString("label.port"));
546     browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
547     browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
548     browserLabel.setText(MessageManager
549             .getString("label.default_browser_unix"));
550     defaultBrowser.setFont(verdana11);
551     defaultBrowser.setText("");
552     usagestats.setText(MessageManager
553             .getString("label.send_usage_statistics"));
554     usagestats.setFont(verdana11);
555     usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
556     usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
557     questionnaire.setText(MessageManager
558             .getString("label.check_for_questionnaires"));
559     questionnaire.setFont(verdana11);
560     questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
561     questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
562     versioncheck.setText(MessageManager
563             .getString("label.check_for_latest_version"));
564     versioncheck.setFont(verdana11);
565     versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
566     versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
567     newLink.setText(MessageManager.getString("action.new"));
568     newLink.addActionListener(new java.awt.event.ActionListener()
569     {
570       @Override
571       public void actionPerformed(ActionEvent e)
572       {
573         newLink_actionPerformed(e);
574       }
575     });
576     editLink.setText(MessageManager.getString("action.edit"));
577     editLink.addActionListener(new java.awt.event.ActionListener()
578     {
579       @Override
580       public void actionPerformed(ActionEvent e)
581       {
582         editLink_actionPerformed(e);
583       }
584     });
585     deleteLink.setText(MessageManager.getString("action.delete"));
586     deleteLink.addActionListener(new java.awt.event.ActionListener()
587     {
588       @Override
589       public void actionPerformed(ActionEvent e)
590       {
591         deleteLink_actionPerformed(e);
592       }
593     });
594
595     linkURLList.addListSelectionListener(new ListSelectionListener()
596     {
597       @Override
598       public void valueChanged(ListSelectionEvent e)
599       {
600         int index = linkURLList.getSelectedIndex();
601         linkNameList.setSelectedIndex(index);
602       }
603     });
604
605     linkNameList.addListSelectionListener(new ListSelectionListener()
606     {
607       @Override
608       public void valueChanged(ListSelectionEvent e)
609       {
610         int index = linkNameList.getSelectedIndex();
611         linkURLList.setSelectedIndex(index);
612       }
613     });
614
615     linkScrollPane.setBorder(null);
616     linkPanel.setBorder(new TitledBorder(MessageManager
617             .getString("label.url_linkfrom_sequence_id")));
618     linkPanel.setLayout(borderLayout2);
619     editLinkButtons.setLayout(gridLayout1);
620     gridLayout1.setRows(3);
621     linkNameList.setFont(verdana11);
622     linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
623     linkPanel2.setLayout(borderLayout3);
624     linkURLList.setFont(verdana11);
625     linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
626
627     defaultBrowser.addMouseListener(new MouseAdapter()
628     {
629       @Override
630       public void mouseClicked(MouseEvent e)
631       {
632         if (e.getClickCount() > 1)
633         {
634           defaultBrowser_mouseClicked(e);
635         }
636       }
637     });
638     useProxy.setFont(verdana11);
639     useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
640     useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
641     useProxy.setText(MessageManager.getString("label.use_proxy_server"));
642     useProxy.addActionListener(new ActionListener()
643     {
644       @Override
645       public void actionPerformed(ActionEvent e)
646       {
647         useProxy_actionPerformed();
648       }
649     });
650     jPanel1.setBorder(titledBorder1);
651     jPanel1.setLayout(gridBagLayout1);
652     sortby.setFont(verdana11);
653     sortby.setBounds(new Rectangle(172, 249, 155, 21));
654     sortLabel.setFont(verdana11);
655     sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
656     sortLabel.setText(MessageManager.getString("label.sort_by"));
657     jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
658     jPanel2.setLayout(gridLayout2);
659     gridLayout2.setRows(12);
660     exportTab.setLayout(null);
661     epsLabel.setFont(verdana11);
662     epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
663     epsLabel.setText(MessageManager.getString("label.eps_rendering_style"));
664     epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
665     epsRendering.setFont(verdana11);
666     epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
667     jLabel1.setFont(verdana11);
668     jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
669     jLabel1.setText(MessageManager.getString("label.append_start_end"));
670     jLabel1.setFont(verdana11);
671     fastajv.setFont(verdana11);
672     fastajv.setHorizontalAlignment(SwingConstants.LEFT);
673     clustaljv.setText(MessageManager.getString("label.clustal") + "     ");
674     blcjv.setText(MessageManager.getString("label.blc") + "     ");
675     fastajv.setText(MessageManager.getString("label.fasta") + "     ");
676     msfjv.setText(MessageManager.getString("label.msf") + "     ");
677     pfamjv.setText(MessageManager.getString("label.pfam") + "     ");
678     pileupjv.setText(MessageManager.getString("label.pileup") + "     ");
679     msfjv.setFont(verdana11);
680     msfjv.setHorizontalAlignment(SwingConstants.LEFT);
681     pirjv.setText(MessageManager.getString("label.pir") + "     ");
682     jPanel11.setFont(verdana11);
683     jPanel11.setBorder(titledBorder2);
684     jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
685     jPanel11.setLayout(gridLayout3);
686     blcjv.setFont(verdana11);
687     blcjv.setHorizontalAlignment(SwingConstants.LEFT);
688     clustaljv.setFont(verdana11);
689     clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
690     pfamjv.setFont(verdana11);
691     pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
692     pileupjv.setFont(verdana11);
693     pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
694     pirjv.setFont(verdana11);
695     pirjv.setHorizontalAlignment(SwingConstants.LEFT);
696     seqLimit.setFont(verdana11);
697     seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
698     seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
699     seqLimit.setText(MessageManager.getString("label.full_sequence_id"));
700     gridLayout3.setRows(8);
701     smoothFont.setFont(verdana11);
702     smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
703     smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
704     smoothFont.setText(MessageManager.getString("label.smooth_font"));
705     calcTab.setLayout(null);
706     autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
707     autoCalculateConsCheck.setText(MessageManager
708             .getString("label.autocalculate_consensus"));
709     autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
710     padGaps.setFont(JvSwingUtils.getLabelFont());
711     padGaps.setText(MessageManager.getString("label.pad_gaps_when_editing"));
712     padGaps.setBounds(new Rectangle(22, 94, 168, 23));
713     sortByTree.setFont(JvSwingUtils.getLabelFont());
714     sortByTree
715             .setText(MessageManager.getString("label.sort_with_new_tree"));
716     sortByTree
717             .setToolTipText(MessageManager
718                     .getString("label.any_trees_calculated_or_loaded_alignment_automatically_sort"));
719     sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
720
721     autoIdWidth.setFont(JvSwingUtils.getLabelFont());
722     autoIdWidth.setText(MessageManager
723             .getString("label.automatically_set_id_width"));
724     autoIdWidth
725             .setToolTipText("<html>"
726                     + JvSwingUtils
727                             .wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")
728                     + "</html>");
729     autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
730     autoIdWidth.addActionListener(new ActionListener()
731     {
732
733       @Override
734       public void actionPerformed(ActionEvent e)
735       {
736         autoIdWidth_actionPerformed();
737       }
738     });
739     userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
740     userIdWidthlabel.setText(MessageManager
741             .getString("label.figure_id_column_width"));
742     userIdWidth
743             .setToolTipText("<html>"
744                     + JvSwingUtils
745                             .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")
746                     + "</html>");
747     userIdWidthlabel
748             .setToolTipText("<html>"
749                     + JvSwingUtils
750                             .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")
751                     + "</html>");
752     userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
753     userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
754     userIdWidth.setText("");
755     userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
756     userIdWidth.addActionListener(new ActionListener()
757     {
758
759       @Override
760       public void actionPerformed(ActionEvent e)
761       {
762         userIdWidth_actionPerformed();
763       }
764     });
765     modellerOutput.setFont(JvSwingUtils.getLabelFont());
766     modellerOutput.setText(MessageManager
767             .getString("label.use_modeller_output"));
768     modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
769
770     dasPanel.setLayout(borderLayout4);
771     wsPanel.setLayout(borderLayout5);
772     wrap.setFont(JvSwingUtils.getLabelFont());
773     wrap.setHorizontalAlignment(SwingConstants.TRAILING);
774     wrap.setHorizontalTextPosition(SwingConstants.LEADING);
775     wrap.setText(MessageManager.getString("label.wrap_alignment"));
776     rightAlign.setFont(JvSwingUtils.getLabelFont());
777     rightAlign.setForeground(Color.black);
778     rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
779     rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
780     rightAlign.setText(MessageManager.getString("label.right_align_ids"));
781     idItalics.setFont(JvSwingUtils.getLabelFont());
782     idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
783     idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
784     idItalics.setText(MessageManager
785             .getString("label.sequence_name_italics"));
786     openoverv.setFont(JvSwingUtils.getLabelFont());
787     openoverv.setActionCommand(MessageManager
788             .getString("label.open_overview"));
789     openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
790     openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
791     openoverv.setText(MessageManager.getString(("label.open_overview")));
792     jPanel2.add(fullScreen);
793     jPanel2.add(openoverv);
794     jPanel2.add(seqLimit);
795     jPanel2.add(rightAlign);
796     jPanel2.add(fontLabel);
797     jPanel2.add(showUnconserved);
798     jPanel2.add(idItalics);
799     jPanel2.add(smoothFont);
800     jPanel2.add(gapLabel);
801     jPanel2.add(wrap);
802     jPanel2.add(sortLabel);
803     jPanel2.add(startupCheckbox);
804     visualTab.add(annotations);
805     visualTab.add(startupFileTextfield);
806     visualTab.add(sortby);
807     visualTab.add(gapSymbolCB);
808     visualTab.add(fontNameCB);
809     visualTab.add(fontSizeCB);
810     visualTab.add(fontStyleCB);
811     annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
812     annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
813     annsettingsPanel.add(autoAnnotSettings1);
814     annsettingsPanel.add(autoAnnotSettings2);
815     annsettingsPanel.add(autoAnnotSettings3);
816     autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
817     autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
818     autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
819     visualTab.add(annsettingsPanel);
820     Border jb = new EmptyBorder(1, 1, 4, 5);
821     quality.setBorder(jb);
822     conservation.setBorder(jb);
823     identity.setBorder(jb);
824     showConsensbits.setBorder(jb);
825     showGroupbits.setBorder(jb);
826     showGroupConsensus.setBorder(jb);
827     showGroupConservation.setBorder(jb);
828     showConsensHistogram.setBorder(jb);
829     showConsensLogo.setBorder(jb);
830
831     autoAnnotSettings2.add(conservation);
832     autoAnnotSettings1.add(quality);
833     autoAnnotSettings3.add(identity);
834     autoAnnotSettings1.add(showGroupbits);
835     autoAnnotSettings3.add(showGroupConsensus);
836     autoAnnotSettings2.add(showGroupConservation);
837     autoAnnotSettings1.add(showConsensbits);
838     autoAnnotSettings2.add(showConsensHistogram);
839     autoAnnotSettings3.add(showConsensLogo);
840
841     JPanel tooltipSettings = new JPanel();
842     tooltipSettings.setBorder(new TitledBorder(MessageManager
843             .getString("label.sequence_id_tooltip")));
844     tooltipSettings.setBounds(173, 130, 200, 62);
845     tooltipSettings.setLayout(new GridLayout(2, 1));
846     tooltipSettings.add(showDbRefTooltip);
847     tooltipSettings.add(showNpTooltip);
848     visualTab.add(tooltipSettings);
849     visualTab.add(jPanel2);
850     JvSwingUtils.addtoLayout(visual2Tab, MessageManager
851             .getString("label.default_colour_scheme_for_alignment"),
852             colourLabel, colour);
853     JPanel annotationShding = new JPanel();
854     annotationShding.setBorder(new TitledBorder(MessageManager
855             .getString("label.annotation_shading_default")));
856     annotationShding.setLayout(new GridLayout(1, 2));
857     JvSwingUtils.addtoLayout(annotationShding, MessageManager
858             .getString("label.default_minimum_colour_annotation_shading"),
859             mincolourLabel, minColour);
860     JvSwingUtils.addtoLayout(annotationShding, MessageManager
861             .getString("label.default_maximum_colour_annotation_shading"),
862             maxcolourLabel, maxColour);
863     visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
864
865     // visual2panel.add(minColour);
866     // visual2panel.add(maxColour);
867     // visual2Tab.add(visual2panel);
868
869     linkPanel.add(editLinkButtons, BorderLayout.EAST);
870     editLinkButtons.add(newLink, null);
871     editLinkButtons.add(editLink, null);
872     editLinkButtons.add(deleteLink, null);
873     linkPanel.add(linkScrollPane, BorderLayout.CENTER);
874     linkScrollPane.getViewport().add(linkPanel2, null);
875     linkPanel2.add(linkURLList, BorderLayout.CENTER);
876     linkPanel2.add(linkNameList, BorderLayout.WEST);
877     okCancelPanel.add(ok);
878     okCancelPanel.add(cancel);
879     this.add(tabbedPane, java.awt.BorderLayout.CENTER);
880
881     this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
882     jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
883             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
884                     2, 4, 0), 5, 0));
885     jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
886             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
887                     0, 4, 0), 11, 6));
888     connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
889             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
890                     16, 0, 0, 12), 359, -17));
891     connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
892             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
893                     21, 0, 35, 12), 4, 6));
894     connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
895             0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
896             new Insets(16, 0, 0, 0), 5, 1));
897     jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
898             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
899             new Insets(0, 2, 4, 2), 54, 1));
900     jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
901             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
902             new Insets(0, 2, 4, 0), 263, 1));
903     connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
904             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
905             new Insets(15, 0, 0, 15), 307, 1));
906     connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
907             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
908             new Insets(0, 2, 4, 2), 70, 1));
909     connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
910             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
911             new Insets(0, 2, 4, 2), 70, 1));
912     connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
913             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
914             new Insets(0, 2, 4, 2), 70, 1));
915
916     jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
917             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
918                     2, 5, 185), 2, -4));
919     DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
920     dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
921     gapSymbolCB.setRenderer(dlcr);
922
923     tabbedPane.add(visualTab, MessageManager.getString("label.visual"));
924     tabbedPane.add(visual2Tab, MessageManager.getString("label.colours"));
925     tabbedPane.add(connectTab,
926             MessageManager.getString("label.connections"));
927     tabbedPane.add(exportTab, MessageManager.getString("label.output"));
928     jPanel11.add(jLabel1);
929     jPanel11.add(blcjv);
930     jPanel11.add(clustaljv);
931     jPanel11.add(fastajv);
932     jPanel11.add(msfjv);
933     jPanel11.add(pfamjv);
934     jPanel11.add(pileupjv);
935     jPanel11.add(pirjv);
936     exportTab.add(autoIdWidth);
937     exportTab.add(userIdWidth);
938     exportTab.add(userIdWidthlabel);
939     exportTab.add(modellerOutput);
940     tabbedPane.add(calcTab, MessageManager.getString("label.editing"));
941     calcTab.add(autoCalculateConsCheck);
942     calcTab.add(padGaps);
943     calcTab.add(sortByTree);
944
945     tabbedPane
946             .add(dasPanel, MessageManager.getString("label.das_settings"));
947     tabbedPane.add(wsPanel, MessageManager.getString("label.web_services"));
948
949     exportTab.add(epsLabel);
950     exportTab.add(epsRendering);
951     exportTab.add(jPanel11);
952   }
953
954   protected void autoIdWidth_actionPerformed()
955   {
956     // TODO Auto-generated method stub
957
958   }
959
960   protected void userIdWidth_actionPerformed()
961   {
962     // TODO Auto-generated method stub
963
964   }
965
966   protected void maxColour_actionPerformed()
967   {
968     // TODO Auto-generated method stub
969
970   }
971
972   protected void minColour_actionPerformed()
973   {
974     // TODO Auto-generated method stub
975
976   }
977
978   protected void showunconserved_actionPerformed(ActionEvent e)
979   {
980     // TODO Auto-generated method stub
981
982   }
983
984   /**
985    * DOCUMENT ME!
986    * 
987    * @param e
988    *          DOCUMENT ME!
989    */
990   public void ok_actionPerformed(ActionEvent e)
991   {
992   }
993
994   /**
995    * DOCUMENT ME!
996    * 
997    * @param e
998    *          DOCUMENT ME!
999    */
1000   public void cancel_actionPerformed(ActionEvent e)
1001   {
1002   }
1003
1004   /**
1005    * DOCUMENT ME!
1006    * 
1007    * @param e
1008    *          DOCUMENT ME!
1009    */
1010   public void annotations_actionPerformed(ActionEvent e)
1011   {
1012   }
1013
1014   /**
1015    * DOCUMENT ME!
1016    */
1017   public void startupFileTextfield_mouseClicked()
1018   {
1019   }
1020
1021   public void newLink_actionPerformed(ActionEvent e)
1022   {
1023
1024   }
1025
1026   public void editLink_actionPerformed(ActionEvent e)
1027   {
1028
1029   }
1030
1031   public void deleteLink_actionPerformed(ActionEvent e)
1032   {
1033
1034   }
1035
1036   public void defaultBrowser_mouseClicked(MouseEvent e)
1037   {
1038
1039   }
1040
1041   public void linkURLList_keyTyped(KeyEvent e)
1042   {
1043
1044   }
1045
1046   public void useProxy_actionPerformed()
1047   {
1048     proxyServerTB.setEnabled(useProxy.isSelected());
1049     proxyPortTB.setEnabled(useProxy.isSelected());
1050   }
1051
1052 }