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