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