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