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