JAL-1432 updated copyright notices
[jalview.git] / src / jalview / jbgui / GPreferences.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package jalview.jbgui;
20
21 import jalview.gui.JvSwingUtils;
22
23 import java.awt.*;
24 import java.awt.event.*;
25
26 import javax.swing.*;
27 import javax.swing.border.*;
28 import javax.swing.event.*;
29 import java.awt.Rectangle;
30
31 /**
32  * DOCUMENT ME!
33  * 
34  * @author $author$
35  * @version $Revision$
36  */
37 public class GPreferences extends JPanel
38 {
39   JTabbedPane tabbedPane = new JTabbedPane();
40
41   JButton ok = new JButton();
42
43   JButton cancel = new JButton();
44
45   JPanel okCancelPanel = new JPanel();
46
47   BorderLayout borderLayout1 = new BorderLayout();
48
49   protected JCheckBox quality = new JCheckBox();
50
51   JPanel visualTab = new JPanel();
52
53   JPanel visual2Tab = new JPanel();
54
55   protected JCheckBox fullScreen = new JCheckBox();
56
57   protected JCheckBox conservation = new JCheckBox();
58
59   protected JCheckBox identity = new JCheckBox();
60
61   protected JCheckBox annotations = new JCheckBox();
62
63   protected JPanel minColour = new JPanel();
64
65   JLabel mincolourLabel = new JLabel();
66
67   protected JPanel maxColour = new JPanel();
68
69   JLabel maxcolourLabel = new JLabel();
70
71   JLabel gapLabel = new JLabel();
72
73   protected JComboBox colour = new JComboBox();
74
75   JLabel colourLabel = new JLabel();
76
77   JLabel fontLabel = new JLabel();
78
79   protected JComboBox fontSizeCB = new JComboBox();
80
81   protected JComboBox fontStyleCB = new JComboBox();
82
83   protected JComboBox fontNameCB = new JComboBox();
84
85   protected JComboBox gapSymbolCB = new JComboBox();
86
87   protected JCheckBox startupCheckbox = new JCheckBox();
88
89   protected JTextField startupFileTextfield = new JTextField();
90
91   JPanel connectTab = new JPanel();
92
93   JLabel serverLabel = new JLabel();
94
95   protected JList linkURLList = new JList();
96
97   protected JTextField proxyServerTB = new JTextField();
98
99   protected JTextField proxyPortTB = new JTextField();
100
101   JLabel portLabel = new JLabel();
102
103   JLabel browserLabel = new JLabel();
104
105   protected JTextField defaultBrowser = new JTextField();
106
107   JButton newLink = new JButton();
108
109   JButton editLink = new JButton();
110
111   JButton deleteLink = new JButton();
112
113   JScrollPane linkScrollPane = new JScrollPane();
114
115   JPanel linkPanel = new JPanel();
116
117   BorderLayout borderLayout2 = new BorderLayout();
118
119   JPanel editLinkButtons = new JPanel();
120
121   GridLayout gridLayout1 = new GridLayout();
122
123   protected JList linkNameList = new JList();
124
125   JPanel linkPanel2 = new JPanel();
126
127   BorderLayout borderLayout3 = new BorderLayout();
128
129   protected JCheckBox useProxy = new JCheckBox();
130
131   JPanel jPanel1 = new JPanel();
132
133   TitledBorder titledBorder1 = new TitledBorder("Proxy Server");
134
135   TitledBorder titledBorder2 = new TitledBorder("File Output");
136
137   GridBagLayout gridBagLayout2 = new GridBagLayout();
138
139   GridBagLayout gridBagLayout1 = new GridBagLayout();
140
141   GridBagLayout gridBagLayout3 = new GridBagLayout();
142
143   protected JComboBox sortby = new JComboBox();
144
145   JLabel sortLabel = new JLabel();
146
147   JPanel jPanel2 = new JPanel();
148
149   JPanel visual2panel = new JPanel();
150
151   GridLayout gridLayout2 = new GridLayout();
152
153   GridLayout gridLayout4 = new GridLayout();
154
155   JPanel annsettingsPanel = new JPanel();
156
157   JPanel autoAnnotSettings1 = new JPanel();
158
159   JPanel autoAnnotSettings2 = new JPanel();
160
161   JPanel autoAnnotSettings3 = new JPanel();
162
163   JPanel exportTab = new JPanel();
164
165   JLabel epsLabel = new JLabel();
166
167   protected JComboBox epsRendering = new JComboBox();
168
169   protected JLabel userIdWidthlabel = new JLabel();
170
171   protected JCheckBox autoIdWidth = new JCheckBox();
172
173   protected JTextField userIdWidth = new JTextField();
174
175   JLabel jLabel1 = new JLabel();
176
177   protected JCheckBox blcjv = new JCheckBox();
178
179   protected JCheckBox pileupjv = new JCheckBox();
180
181   protected JCheckBox clustaljv = new JCheckBox();
182
183   protected JCheckBox msfjv = new JCheckBox();
184
185   protected JCheckBox fastajv = new JCheckBox();
186
187   protected JCheckBox pfamjv = new JCheckBox();
188
189   FlowLayout flowLayout1 = new FlowLayout();
190
191   protected JCheckBox pirjv = new JCheckBox();
192
193   JPanel jPanel11 = new JPanel();
194
195   Font verdana11 = JvSwingUtils.getLabelFont();
196
197   protected JCheckBox seqLimit = new JCheckBox();
198
199   GridLayout gridLayout3 = new GridLayout();
200
201   protected JCheckBox smoothFont = new JCheckBox();
202
203   JPanel calcTab = new JPanel();
204
205   protected JCheckBox autoCalculateConsCheck = new JCheckBox();
206
207   protected JCheckBox padGaps = new JCheckBox();
208
209   protected JCheckBox modellerOutput = new JCheckBox();
210
211   protected JPanel dasPanel = new JPanel();
212
213   BorderLayout borderLayout4 = new BorderLayout();
214
215   protected JPanel wsPanel = new JPanel();
216
217   BorderLayout borderLayout5 = new BorderLayout();
218
219   protected JCheckBox wrap = new JCheckBox();
220
221   protected JCheckBox rightAlign = new JCheckBox();
222
223   protected JCheckBox showUnconserved = new JCheckBox();
224
225   protected JCheckBox showDbRefTooltip = new JCheckBox();
226
227   protected JCheckBox showNpTooltip = new JCheckBox();
228
229   protected JCheckBox idItalics = new JCheckBox();
230
231   protected JCheckBox openoverv = new JCheckBox();
232
233   protected JCheckBox usagestats = new JCheckBox();
234
235   protected JCheckBox questionnaire = new JCheckBox();
236
237   protected JCheckBox versioncheck = new JCheckBox();
238
239   protected JLabel showGroupbits = new JLabel();
240
241   protected JLabel showConsensbits = new JLabel();
242
243   protected JCheckBox showConsensLogo = new JCheckBox();
244
245   protected JCheckBox showConsensHistogram = new JCheckBox();
246
247   protected JCheckBox showGroupConsensus = new JCheckBox();
248
249   protected JCheckBox showGroupConservation = new JCheckBox();
250
251   protected JCheckBox shareSelections = new JCheckBox();
252
253   protected JCheckBox followHighlight = new JCheckBox();
254
255   protected JCheckBox sortByTree = new JCheckBox();
256
257   /**
258    * Creates a new GPreferences object.
259    */
260   public GPreferences()
261   {
262     try
263     {
264       jbInit();
265     } catch (Exception ex)
266     {
267       ex.printStackTrace();
268     }
269   }
270
271   /**
272    * DOCUMENT ME!
273    * 
274    * @throws Exception
275    *           DOCUMENT ME!
276    */
277   private void jbInit() throws Exception
278   {
279     this.setLayout(borderLayout1);
280     ok.setText("OK");
281     ok.addActionListener(new ActionListener()
282     {
283       public void actionPerformed(ActionEvent e)
284       {
285         ok_actionPerformed(e);
286       }
287     });
288     cancel.setText("Cancel");
289     cancel.addActionListener(new ActionListener()
290     {
291       public void actionPerformed(ActionEvent e)
292       {
293         cancel_actionPerformed(e);
294       }
295     });
296     quality.setEnabled(false);
297     quality.setFont(verdana11);
298     quality.setHorizontalAlignment(SwingConstants.RIGHT);
299     quality.setHorizontalTextPosition(SwingConstants.LEFT);
300     quality.setSelected(true);
301     quality.setText("Quality");
302     visualTab.setBorder(new TitledBorder("Open new alignment"));
303     visualTab.setLayout(null);
304     visual2Tab.setBorder(new TitledBorder("Open new alignment"));
305     visual2Tab.setLayout(new FlowLayout());
306     fullScreen.setFont(verdana11);
307     fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
308     fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
309     fullScreen.setText("Maximise Window");
310     conservation.setEnabled(false);
311     conservation.setFont(verdana11);
312     conservation.setHorizontalAlignment(SwingConstants.RIGHT);
313     conservation.setHorizontalTextPosition(SwingConstants.LEFT);
314     conservation.setSelected(true);
315     conservation.setText("Conservation");
316     identity.setEnabled(false);
317     identity.setFont(verdana11);
318     identity.setHorizontalAlignment(SwingConstants.RIGHT);
319     identity.setHorizontalTextPosition(SwingConstants.LEFT);
320     identity.setSelected(true);
321     identity.setText("Consensus");
322     showGroupbits.setFont(verdana11);
323     showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
324     showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
325     showGroupbits.setText("Show group:");
326     showConsensbits.setFont(verdana11);
327     showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
328     showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
329     showConsensbits.setText("Consensus:");
330     showConsensHistogram.setEnabled(false);
331     showConsensHistogram.setFont(verdana11);
332     showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
333     showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
334     showConsensHistogram.setSelected(true);
335     showConsensHistogram.setText("Histogram");
336     showConsensLogo.setEnabled(false);
337     showConsensLogo.setFont(verdana11);
338     showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
339     showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
340     showConsensLogo.setSelected(true);
341     showConsensLogo.setText("Logo");
342     showGroupConsensus.setEnabled(false);
343     showGroupConsensus.setFont(verdana11);
344     showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
345     showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
346     showGroupConsensus.setSelected(true);
347     showGroupConsensus.setText("Consensus");
348     showGroupConservation.setEnabled(false);
349     showGroupConservation.setFont(verdana11);
350     showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
351     showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
352     showGroupConservation.setSelected(true);
353     showGroupConservation.setText("Conservation");
354     showNpTooltip.setEnabled(true);
355     showNpTooltip.setFont(verdana11);
356     showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
357     showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
358     showNpTooltip.setSelected(true);
359     showNpTooltip.setText("Non-positional Features");
360     showDbRefTooltip.setEnabled(true);
361     showDbRefTooltip.setFont(verdana11);
362     showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
363     showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
364     showDbRefTooltip.setSelected(true);
365     showDbRefTooltip.setText("Database References");
366     annotations.setFont(verdana11);
367     annotations.setHorizontalAlignment(SwingConstants.RIGHT);
368     annotations.setHorizontalTextPosition(SwingConstants.LEADING);
369     annotations.setSelected(true);
370     annotations.setText("Show Annotations");
371     annotations.setBounds(new Rectangle(169, 12, 200, 23));
372     annotations.addActionListener(new ActionListener()
373     {
374       public void actionPerformed(ActionEvent e)
375       {
376         annotations_actionPerformed(e);
377       }
378     });
379     identity.addActionListener(new ActionListener()
380     {
381       public void actionPerformed(ActionEvent e)
382       {
383         annotations_actionPerformed(e);
384       }
385     });
386     showGroupConsensus.addActionListener(new ActionListener()
387     {
388       public void actionPerformed(ActionEvent e)
389       {
390         annotations_actionPerformed(e);
391       }
392     });
393     showUnconserved.setFont(verdana11);
394     showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
395     showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
396     showUnconserved.setSelected(true);
397     showUnconserved.setText("Show Unconserved");
398     showUnconserved.addActionListener(new ActionListener()
399     {
400       public void actionPerformed(ActionEvent e)
401       {
402         showunconserved_actionPerformed(e);
403       }
404     });
405     // / TODO: fit these in to preferences panel!!!!!
406     shareSelections.setFont(verdana11);
407     shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
408     shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
409     shareSelections.setSelected(true);
410     shareSelections.setText("Share selection across views");
411     followHighlight.setFont(verdana11);
412     followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
413     followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
414     // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
415     followHighlight.setSelected(true);
416     followHighlight.setText("Scroll to highlighted regions");
417
418     gapLabel.setFont(verdana11);
419     gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
420     gapLabel.setText("Gap Symbol ");
421     colour.setFont(verdana11);
422     colour.setBounds(new Rectangle(172, 225, 155, 21));
423     colourLabel.setFont(verdana11);
424     colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
425     colourLabel.setText("Alignment Colour ");
426     fontLabel.setFont(verdana11);
427     fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
428     fontLabel.setText("Font ");
429     fontSizeCB.setFont(verdana11);
430     fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
431     fontStyleCB.setFont(verdana11);
432     fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
433     fontNameCB.setFont(verdana11);
434     fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
435     gapSymbolCB.setFont(verdana11);
436     gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
437     mincolourLabel.setFont(verdana11);
438     mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
439     mincolourLabel.setText("Minimum Colour");
440     minColour.setFont(verdana11);
441     minColour.setBorder(BorderFactory.createEtchedBorder());
442     minColour.setPreferredSize(new Dimension(40, 20));
443     minColour.addMouseListener(new MouseAdapter()
444     {
445       public void mousePressed(MouseEvent e)
446       {
447         minColour_actionPerformed();
448       }
449     });
450     maxcolourLabel.setFont(verdana11);
451     maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
452     maxcolourLabel.setText("Maximum Colour ");
453     maxColour.setFont(verdana11);
454     maxColour.setBorder(BorderFactory.createEtchedBorder());
455     maxColour.setPreferredSize(new Dimension(40, 20));
456     maxColour.addMouseListener(new MouseAdapter()
457     {
458       public void mousePressed(MouseEvent e)
459       {
460         maxColour_actionPerformed();
461       }
462     });
463
464     startupCheckbox.setText("Open file");
465     startupCheckbox.setFont(verdana11);
466     startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
467     startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
468     startupCheckbox.setSelected(true);
469     startupFileTextfield.setFont(verdana11);
470     startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
471     startupFileTextfield.addMouseListener(new MouseAdapter()
472     {
473       public void mouseClicked(MouseEvent e)
474       {
475         if (e.getClickCount() > 1)
476         {
477           startupFileTextfield_mouseClicked();
478         }
479       }
480     });
481
482     connectTab.setLayout(gridBagLayout3);
483     serverLabel.setText("Address");
484     serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
485     serverLabel.setFont(verdana11);
486     proxyServerTB.setFont(verdana11);
487     proxyPortTB.setFont(verdana11);
488     portLabel.setFont(verdana11);
489     portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
490     portLabel.setText("Port");
491     browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
492     browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
493     browserLabel.setText("Default Browser (Unix)");
494     defaultBrowser.setFont(verdana11);
495     defaultBrowser.setText("");
496     usagestats.setText("Send usage statistics");
497     usagestats.setFont(verdana11);
498     usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
499     usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
500     questionnaire.setText("Check for questionnaires");
501     questionnaire.setFont(verdana11);
502     questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
503     questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
504     versioncheck.setText("Check for latest version");
505     versioncheck.setFont(verdana11);
506     versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
507     versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
508     newLink.setText("New");
509     newLink.addActionListener(new java.awt.event.ActionListener()
510     {
511       public void actionPerformed(ActionEvent e)
512       {
513         newLink_actionPerformed(e);
514       }
515     });
516     editLink.setText("Edit");
517     editLink.addActionListener(new java.awt.event.ActionListener()
518     {
519       public void actionPerformed(ActionEvent e)
520       {
521         editLink_actionPerformed(e);
522       }
523     });
524     deleteLink.setText("Delete");
525     deleteLink.addActionListener(new java.awt.event.ActionListener()
526     {
527       public void actionPerformed(ActionEvent e)
528       {
529         deleteLink_actionPerformed(e);
530       }
531     });
532
533     linkURLList.addListSelectionListener(new ListSelectionListener()
534     {
535       public void valueChanged(ListSelectionEvent e)
536       {
537         int index = linkURLList.getSelectedIndex();
538         linkNameList.setSelectedIndex(index);
539       }
540     });
541
542     linkNameList.addListSelectionListener(new ListSelectionListener()
543     {
544       public void valueChanged(ListSelectionEvent e)
545       {
546         int index = linkNameList.getSelectedIndex();
547         linkURLList.setSelectedIndex(index);
548       }
549     });
550
551     linkScrollPane.setBorder(null);
552     linkPanel.setBorder(new TitledBorder("URL link from Sequence ID"));
553     linkPanel.setLayout(borderLayout2);
554     editLinkButtons.setLayout(gridLayout1);
555     gridLayout1.setRows(3);
556     linkNameList.setFont(verdana11);
557     linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
558     linkPanel2.setLayout(borderLayout3);
559     linkURLList.setFont(verdana11);
560     linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
561
562     defaultBrowser.addMouseListener(new MouseAdapter()
563     {
564       public void mouseClicked(MouseEvent e)
565       {
566         if (e.getClickCount() > 1)
567         {
568           defaultBrowser_mouseClicked(e);
569         }
570       }
571     });
572     useProxy.setFont(verdana11);
573     useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
574     useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
575     useProxy.setText("Use a proxy server");
576     useProxy.addActionListener(new ActionListener()
577     {
578       public void actionPerformed(ActionEvent e)
579       {
580         useProxy_actionPerformed();
581       }
582     });
583     jPanel1.setBorder(titledBorder1);
584     jPanel1.setLayout(gridBagLayout1);
585     sortby.setFont(verdana11);
586     sortby.setBounds(new Rectangle(172, 249, 155, 21));
587     sortLabel.setFont(verdana11);
588     sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
589     sortLabel.setText("Sort by ");
590     jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
591     jPanel2.setLayout(gridLayout2);
592     gridLayout2.setRows(12);
593     exportTab.setLayout(null);
594     epsLabel.setFont(verdana11);
595     epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
596     epsLabel.setText("EPS Rendering Style");
597     epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
598     epsRendering.setFont(verdana11);
599     epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
600     jLabel1.setFont(verdana11);
601     jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
602     jLabel1.setText("Append /start-end (/15-380)");
603     jLabel1.setFont(verdana11);
604     fastajv.setFont(verdana11);
605     fastajv.setHorizontalAlignment(SwingConstants.LEFT);
606     clustaljv.setText("Clustal     ");
607     blcjv.setText("BLC     ");
608     fastajv.setText("Fasta     ");
609     msfjv.setText("MSF     ");
610     pfamjv.setText("PFAM     ");
611     pileupjv.setText("Pileup     ");
612     msfjv.setFont(verdana11);
613     msfjv.setHorizontalAlignment(SwingConstants.LEFT);
614     pirjv.setText("PIR     ");
615     jPanel11.setFont(verdana11);
616     jPanel11.setBorder(titledBorder2);
617     jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
618     jPanel11.setLayout(gridLayout3);
619     blcjv.setFont(verdana11);
620     blcjv.setHorizontalAlignment(SwingConstants.LEFT);
621     clustaljv.setFont(verdana11);
622     clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
623     pfamjv.setFont(verdana11);
624     pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
625     pileupjv.setFont(verdana11);
626     pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
627     pirjv.setFont(verdana11);
628     pirjv.setHorizontalAlignment(SwingConstants.LEFT);
629     seqLimit.setFont(verdana11);
630     seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
631     seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
632     seqLimit.setText("Full Sequence Id");
633     gridLayout3.setRows(8);
634     smoothFont.setFont(verdana11);
635     smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
636     smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
637     smoothFont.setText("Smooth Font");
638     calcTab.setLayout(null);
639     autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
640     autoCalculateConsCheck.setText("AutoCalculate Consensus");
641     autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
642     padGaps.setFont(JvSwingUtils.getLabelFont());
643     padGaps.setText("Pad Gaps When Editing");
644     padGaps.setBounds(new Rectangle(22, 94, 168, 23));
645     sortByTree.setFont(JvSwingUtils.getLabelFont());
646     sortByTree.setText("Sort With New Tree");
647     sortByTree
648             .setToolTipText("When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment.");
649     sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
650
651     autoIdWidth.setFont(JvSwingUtils.getLabelFont());
652     autoIdWidth.setText("Automatically set ID width");
653     autoIdWidth
654             .setToolTipText("<html>"
655                     + JvSwingUtils
656                             .wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")
657                     + "</html>");
658     autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
659     autoIdWidth.addActionListener(new ActionListener()
660     {
661
662       @Override
663       public void actionPerformed(ActionEvent e)
664       {
665         autoIdWidth_actionPerformed();
666       }
667     });
668     userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
669     userIdWidthlabel.setText("Figure ID column width");
670     userIdWidth
671             .setToolTipText("<html>"
672                     + JvSwingUtils
673                             .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")
674                     + "</html>");
675     userIdWidthlabel
676             .setToolTipText("<html>"
677                     + JvSwingUtils
678                             .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")
679                     + "</html>");
680     userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
681     userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
682     userIdWidth.setText("");
683     userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
684     userIdWidth.addActionListener(new ActionListener()
685     {
686
687       @Override
688       public void actionPerformed(ActionEvent e)
689       {
690         userIdWidth_actionPerformed();
691       }
692     });
693     modellerOutput.setFont(JvSwingUtils.getLabelFont());
694     modellerOutput.setText("Use Modeller Output");
695     modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
696
697     dasPanel.setLayout(borderLayout4);
698     wsPanel.setLayout(borderLayout5);
699     wrap.setFont(JvSwingUtils.getLabelFont());
700     wrap.setHorizontalAlignment(SwingConstants.TRAILING);
701     wrap.setHorizontalTextPosition(SwingConstants.LEADING);
702     wrap.setText("Wrap Alignment");
703     rightAlign.setFont(JvSwingUtils.getLabelFont());
704     rightAlign.setForeground(Color.black);
705     rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
706     rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
707     rightAlign.setText("Right Align Ids");
708     idItalics.setFont(JvSwingUtils.getLabelFont());
709     idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
710     idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
711     idItalics.setText("Sequence Name Italics");
712     openoverv.setFont(JvSwingUtils.getLabelFont());
713     openoverv.setActionCommand("Open Overview");
714     openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
715     openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
716     openoverv.setText("Open Overview");
717     jPanel2.add(fullScreen);
718     jPanel2.add(openoverv);
719     jPanel2.add(seqLimit);
720     jPanel2.add(rightAlign);
721     jPanel2.add(fontLabel);
722     jPanel2.add(showUnconserved);
723     jPanel2.add(idItalics);
724     jPanel2.add(smoothFont);
725     jPanel2.add(gapLabel);
726     jPanel2.add(wrap);
727     jPanel2.add(sortLabel);
728     jPanel2.add(startupCheckbox);
729     visualTab.add(annotations);
730     visualTab.add(startupFileTextfield);
731     visualTab.add(sortby);
732     visualTab.add(gapSymbolCB);
733     visualTab.add(fontNameCB);
734     visualTab.add(fontSizeCB);
735     visualTab.add(fontStyleCB);
736     annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
737     annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
738     annsettingsPanel.add(autoAnnotSettings1);
739     annsettingsPanel.add(autoAnnotSettings2);
740     annsettingsPanel.add(autoAnnotSettings3);
741     autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
742     autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
743     autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
744     visualTab.add(annsettingsPanel);
745     Border jb = new EmptyBorder(1, 1, 4, 5);
746     quality.setBorder(jb);
747     conservation.setBorder(jb);
748     identity.setBorder(jb);
749     showConsensbits.setBorder(jb);
750     showGroupbits.setBorder(jb);
751     showGroupConsensus.setBorder(jb);
752     showGroupConservation.setBorder(jb);
753     showConsensHistogram.setBorder(jb);
754     showConsensLogo.setBorder(jb);
755
756     autoAnnotSettings2.add(conservation);
757     autoAnnotSettings1.add(quality);
758     autoAnnotSettings3.add(identity);
759     autoAnnotSettings1.add(showGroupbits);
760     autoAnnotSettings3.add(showGroupConsensus);
761     autoAnnotSettings2.add(showGroupConservation);
762     autoAnnotSettings1.add(showConsensbits);
763     autoAnnotSettings2.add(showConsensHistogram);
764     autoAnnotSettings3.add(showConsensLogo);
765
766     JPanel tooltipSettings = new JPanel();
767     tooltipSettings.setBorder(new TitledBorder("Sequence ID Tooltip"));
768     tooltipSettings.setBounds(173, 130, 200, 62);
769     tooltipSettings.setLayout(new GridLayout(2, 1));
770     tooltipSettings.add(showDbRefTooltip);
771     tooltipSettings.add(showNpTooltip);
772     visualTab.add(tooltipSettings);
773     visualTab.add(jPanel2);
774     JvSwingUtils.addtoLayout(visual2Tab,
775             "Default Colourscheme for alignment", colourLabel, colour);
776     JPanel annotationShding = new JPanel();
777     annotationShding.setBorder(new TitledBorder(
778             "Annotation Shading Default"));
779     annotationShding.setLayout(new GridLayout(1, 2));
780     JvSwingUtils.addtoLayout(annotationShding,
781             "Default Minimum Colour for annotation shading",
782             mincolourLabel, minColour);
783     JvSwingUtils.addtoLayout(annotationShding,
784             "Default Maximum Colour for annotation shading",
785             maxcolourLabel, maxColour);
786     visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
787
788     // visual2panel.add(minColour);
789     // visual2panel.add(maxColour);
790     // visual2Tab.add(visual2panel);
791
792     linkPanel.add(editLinkButtons, BorderLayout.EAST);
793     editLinkButtons.add(newLink, null);
794     editLinkButtons.add(editLink, null);
795     editLinkButtons.add(deleteLink, null);
796     linkPanel.add(linkScrollPane, BorderLayout.CENTER);
797     linkScrollPane.getViewport().add(linkPanel2, null);
798     linkPanel2.add(linkURLList, BorderLayout.CENTER);
799     linkPanel2.add(linkNameList, BorderLayout.WEST);
800     okCancelPanel.add(ok);
801     okCancelPanel.add(cancel);
802     this.add(tabbedPane, java.awt.BorderLayout.CENTER);
803
804     this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
805     jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
806             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
807                     2, 4, 0), 5, 0));
808     jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
809             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
810                     0, 4, 0), 11, 6));
811     connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
812             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
813                     16, 0, 0, 12), 359, -17));
814     connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
815             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
816                     21, 0, 35, 12), 4, 6));
817     connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
818             0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
819             new Insets(16, 0, 0, 0), 5, 1));
820     jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
821             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
822             new Insets(0, 2, 4, 2), 54, 1));
823     jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
824             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
825             new Insets(0, 2, 4, 0), 263, 1));
826     connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
827             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
828             new Insets(15, 0, 0, 15), 307, 1));
829     connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
830             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
831             new Insets(0, 2, 4, 2), 70, 1));
832     connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
833             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
834             new Insets(0, 2, 4, 2), 70, 1));
835     connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
836             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
837             new Insets(0, 2, 4, 2), 70, 1));
838
839     jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
840             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
841                     2, 5, 185), 2, -4));
842     DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
843     dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
844     gapSymbolCB.setRenderer(dlcr);
845
846     tabbedPane.add(visualTab, "Visual");
847     tabbedPane.add(visual2Tab, "Colours");
848     tabbedPane.add(connectTab, "Connections");
849     tabbedPane.add(exportTab, "Output");
850     jPanel11.add(jLabel1);
851     jPanel11.add(blcjv);
852     jPanel11.add(clustaljv);
853     jPanel11.add(fastajv);
854     jPanel11.add(msfjv);
855     jPanel11.add(pfamjv);
856     jPanel11.add(pileupjv);
857     jPanel11.add(pirjv);
858     exportTab.add(autoIdWidth);
859     exportTab.add(userIdWidth);
860     exportTab.add(userIdWidthlabel);
861     exportTab.add(modellerOutput);
862     tabbedPane.add(calcTab, "Editing");
863     calcTab.add(autoCalculateConsCheck);
864     calcTab.add(padGaps);
865     calcTab.add(sortByTree);
866
867     tabbedPane.add(dasPanel, "DAS Settings");
868     tabbedPane.add(wsPanel, "Web Services");
869
870     exportTab.add(epsLabel);
871     exportTab.add(epsRendering);
872     exportTab.add(jPanel11);
873   }
874
875   protected void autoIdWidth_actionPerformed()
876   {
877     // TODO Auto-generated method stub
878
879   }
880
881   protected void userIdWidth_actionPerformed()
882   {
883     // TODO Auto-generated method stub
884
885   }
886
887   protected void maxColour_actionPerformed()
888   {
889     // TODO Auto-generated method stub
890
891   }
892
893   protected void minColour_actionPerformed()
894   {
895     // TODO Auto-generated method stub
896
897   }
898
899   protected void showunconserved_actionPerformed(ActionEvent e)
900   {
901     // TODO Auto-generated method stub
902
903   }
904
905   /**
906    * DOCUMENT ME!
907    * 
908    * @param e
909    *          DOCUMENT ME!
910    */
911   public void ok_actionPerformed(ActionEvent e)
912   {
913   }
914
915   /**
916    * DOCUMENT ME!
917    * 
918    * @param e
919    *          DOCUMENT ME!
920    */
921   public void cancel_actionPerformed(ActionEvent e)
922   {
923   }
924
925   /**
926    * DOCUMENT ME!
927    * 
928    * @param e
929    *          DOCUMENT ME!
930    */
931   public void annotations_actionPerformed(ActionEvent e)
932   {
933   }
934
935   /**
936    * DOCUMENT ME!
937    */
938   public void startupFileTextfield_mouseClicked()
939   {
940   }
941
942   public void newLink_actionPerformed(ActionEvent e)
943   {
944
945   }
946
947   public void editLink_actionPerformed(ActionEvent e)
948   {
949
950   }
951
952   public void deleteLink_actionPerformed(ActionEvent e)
953   {
954
955   }
956
957   public void defaultBrowser_mouseClicked(MouseEvent e)
958   {
959
960   }
961
962   public void linkURLList_keyTyped(KeyEvent e)
963   {
964
965   }
966
967   public void useProxy_actionPerformed()
968   {
969     proxyServerTB.setEnabled(useProxy.isSelected());
970     proxyPortTB.setEnabled(useProxy.isSelected());
971   }
972
973 }