formatting
[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, J Engelhardt, LM Lui, 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("Automatically set ID width");
646     autoIdWidth.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")+"</html>");
647     autoIdWidth.setBounds(new Rectangle(228, 96,188,23));
648     autoIdWidth.addActionListener(new ActionListener()
649     {
650       
651       @Override
652       public void actionPerformed(ActionEvent e)
653       {
654         autoIdWidth_actionPerformed();
655       }
656     });
657     userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
658     userIdWidthlabel.setText("Figure ID column width");
659     userIdWidth
660             .setToolTipText("<html>"+JvSwingUtils
661                     .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")+"</html>");
662     userIdWidthlabel
663             .setToolTipText("<html>"+JvSwingUtils
664                     .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")+"</html>");
665     userIdWidthlabel.setBounds(new Rectangle(236, 120,168,23));
666     userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
667     userIdWidth.setText("");
668     userIdWidth.setBounds(new Rectangle(232,144,84,23));
669     userIdWidth.addActionListener(new ActionListener()
670     {
671       
672       @Override
673       public void actionPerformed(ActionEvent e)
674       {
675         userIdWidth_actionPerformed();
676       }
677     });
678     modellerOutput.setFont(JvSwingUtils.getLabelFont());
679     modellerOutput.setText("Use Modeller Output");
680     modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
681
682     dasPanel.setLayout(borderLayout4);
683     wsPanel.setLayout(borderLayout5);
684     wrap.setFont(JvSwingUtils.getLabelFont());
685     wrap.setHorizontalAlignment(SwingConstants.TRAILING);
686     wrap.setHorizontalTextPosition(SwingConstants.LEADING);
687     wrap.setText("Wrap Alignment");
688     rightAlign.setFont(JvSwingUtils.getLabelFont());
689     rightAlign.setForeground(Color.black);
690     rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
691     rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
692     rightAlign.setText("Right Align Ids");
693     idItalics.setFont(JvSwingUtils.getLabelFont());
694     idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
695     idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
696     idItalics.setText("Sequence Name Italics");
697     openoverv.setFont(JvSwingUtils.getLabelFont());
698     openoverv.setActionCommand("Open Overview");
699     openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
700     openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
701     openoverv.setText("Open Overview");
702     jPanel2.add(fullScreen);
703     jPanel2.add(openoverv);
704     jPanel2.add(seqLimit);
705     jPanel2.add(rightAlign);
706     jPanel2.add(fontLabel);
707     jPanel2.add(showUnconserved);
708     jPanel2.add(idItalics);
709     jPanel2.add(smoothFont);
710     jPanel2.add(gapLabel);
711     jPanel2.add(wrap);
712     jPanel2.add(sortLabel);
713     jPanel2.add(startupCheckbox);
714     visualTab.add(annotations);
715     visualTab.add(startupFileTextfield);
716     visualTab.add(sortby);
717     visualTab.add(gapSymbolCB);
718     visualTab.add(fontNameCB);
719     visualTab.add(fontSizeCB);
720     visualTab.add(fontStyleCB);
721     annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
722     annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
723     annsettingsPanel.add(autoAnnotSettings1);
724     annsettingsPanel.add(autoAnnotSettings2);
725     annsettingsPanel.add(autoAnnotSettings3);
726     autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
727     autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
728     autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
729     visualTab.add(annsettingsPanel);
730     Border jb = new EmptyBorder(1, 1, 4, 5);
731     quality.setBorder(jb);
732     conservation.setBorder(jb);
733     identity.setBorder(jb);
734     showConsensbits.setBorder(jb);
735     showGroupbits.setBorder(jb);
736     showGroupConsensus.setBorder(jb);
737     showGroupConservation.setBorder(jb);
738     showConsensHistogram.setBorder(jb);
739     showConsensLogo.setBorder(jb);
740
741     autoAnnotSettings2.add(conservation);
742     autoAnnotSettings1.add(quality);
743     autoAnnotSettings3.add(identity);
744     autoAnnotSettings1.add(showGroupbits);
745     autoAnnotSettings3.add(showGroupConsensus);
746     autoAnnotSettings2.add(showGroupConservation);
747     autoAnnotSettings1.add(showConsensbits);
748     autoAnnotSettings2.add(showConsensHistogram);
749     autoAnnotSettings3.add(showConsensLogo);
750
751     JPanel tooltipSettings = new JPanel();
752     tooltipSettings.setBorder(new TitledBorder("Sequence ID Tooltip"));
753     tooltipSettings.setBounds(173, 130, 200, 62);
754     tooltipSettings.setLayout(new GridLayout(2, 1));
755     tooltipSettings.add(showDbRefTooltip);
756     tooltipSettings.add(showNpTooltip);
757     visualTab.add(tooltipSettings);
758     visualTab.add(jPanel2);
759     JvSwingUtils.addtoLayout(visual2Tab, "Default Colourscheme for alignment", colourLabel, colour);
760     JPanel annotationShding=new JPanel();
761     annotationShding.setBorder(new TitledBorder("Annotation Shading Default"));
762     annotationShding.setLayout(new GridLayout(1,2));
763     JvSwingUtils.addtoLayout(annotationShding, "Default Minimum Colour for annotation shading", mincolourLabel,minColour);
764     JvSwingUtils.addtoLayout(annotationShding,"Default Maximum Colour for annotation shading", maxcolourLabel, maxColour);
765     visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
766
767 //    visual2panel.add(minColour);
768 //    visual2panel.add(maxColour);
769 //    visual2Tab.add(visual2panel);
770
771     linkPanel.add(editLinkButtons, BorderLayout.EAST);
772     editLinkButtons.add(newLink, null);
773     editLinkButtons.add(editLink, null);
774     editLinkButtons.add(deleteLink, null);
775     linkPanel.add(linkScrollPane, BorderLayout.CENTER);
776     linkScrollPane.getViewport().add(linkPanel2, null);
777     linkPanel2.add(linkURLList, BorderLayout.CENTER);
778     linkPanel2.add(linkNameList, BorderLayout.WEST);
779     okCancelPanel.add(ok);
780     okCancelPanel.add(cancel);
781     this.add(tabbedPane, java.awt.BorderLayout.CENTER);
782
783     this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
784     jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
785             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
786                     2, 4, 0), 5, 0));
787     jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
788             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
789                     0, 4, 0), 11, 6));
790     connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
791             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
792                     16, 0, 0, 12), 359, -17));
793     connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
794             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
795                     21, 0, 35, 12), 4, 6));
796     connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
797             0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
798             new Insets(16, 0, 0, 0), 5, 1));
799     jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
800             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
801             new Insets(0, 2, 4, 2), 54, 1));
802     jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
803             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
804             new Insets(0, 2, 4, 0), 263, 1));
805     connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
806             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
807             new Insets(15, 0, 0, 15), 307, 1));
808     connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
809             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
810             new Insets(0, 2, 4, 2), 70, 1));
811     connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
812             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
813             new Insets(0, 2, 4, 2), 70, 1));
814     connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
815             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
816             new Insets(0, 2, 4, 2), 70, 1));
817
818     jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
819             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
820                     2, 5, 185), 2, -4));
821     DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
822     dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
823     gapSymbolCB.setRenderer(dlcr);
824
825     tabbedPane.add(visualTab, "Visual");
826     tabbedPane.add(visual2Tab,"Colours");
827     tabbedPane.add(connectTab, "Connections");
828     tabbedPane.add(exportTab, "Output");
829     jPanel11.add(jLabel1);
830     jPanel11.add(blcjv);
831     jPanel11.add(clustaljv);
832     jPanel11.add(fastajv);
833     jPanel11.add(msfjv);
834     jPanel11.add(pfamjv);
835     jPanel11.add(pileupjv);
836     jPanel11.add(pirjv);
837     exportTab.add(autoIdWidth);
838     exportTab.add(userIdWidth);
839     exportTab.add(userIdWidthlabel);
840     exportTab.add(modellerOutput);
841     tabbedPane.add(calcTab, "Editing");
842     calcTab.add(autoCalculateConsCheck);
843     calcTab.add(padGaps);
844     calcTab.add(sortByTree);
845     
846     tabbedPane.add(dasPanel, "DAS Settings");
847     tabbedPane.add(wsPanel, "Web Services");
848
849     exportTab.add(epsLabel);
850     exportTab.add(epsRendering);
851     exportTab.add(jPanel11);
852   }
853
854   protected void autoIdWidth_actionPerformed()
855   {
856     // TODO Auto-generated method stub
857     
858   }
859
860   protected void userIdWidth_actionPerformed()
861   {
862     // TODO Auto-generated method stub
863     
864   }
865
866   protected void maxColour_actionPerformed()
867   {
868     // TODO Auto-generated method stub
869     
870   }
871
872   protected void minColour_actionPerformed()
873   {
874     // TODO Auto-generated method stub
875     
876   }
877
878   protected void showunconserved_actionPerformed(ActionEvent e)
879   {
880     // TODO Auto-generated method stub
881
882   }
883
884   /**
885    * DOCUMENT ME!
886    * 
887    * @param e
888    *          DOCUMENT ME!
889    */
890   public void ok_actionPerformed(ActionEvent e)
891   {
892   }
893
894   /**
895    * DOCUMENT ME!
896    * 
897    * @param e
898    *          DOCUMENT ME!
899    */
900   public void cancel_actionPerformed(ActionEvent e)
901   {
902   }
903
904   /**
905    * DOCUMENT ME!
906    * 
907    * @param e
908    *          DOCUMENT ME!
909    */
910   public void annotations_actionPerformed(ActionEvent e)
911   {
912   }
913
914   /**
915    * DOCUMENT ME!
916    */
917   public void startupFileTextfield_mouseClicked()
918   {
919   }
920
921   public void newLink_actionPerformed(ActionEvent e)
922   {
923
924   }
925
926   public void editLink_actionPerformed(ActionEvent e)
927   {
928
929   }
930
931   public void deleteLink_actionPerformed(ActionEvent e)
932   {
933
934   }
935
936   public void defaultBrowser_mouseClicked(MouseEvent e)
937   {
938
939   }
940
941   public void linkURLList_keyTyped(KeyEvent e)
942   {
943
944   }
945
946   public void useProxy_actionPerformed()
947   {
948     proxyServerTB.setEnabled(useProxy.isSelected());
949     proxyPortTB.setEnabled(useProxy.isSelected());
950   }
951
952 }