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