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