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