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