a8626d80b546bf440cf0558f9d2eb1647c3b3645
[jalview.git] / src / jalview / jbgui / GPreferences.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
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  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package jalview.jbgui;
20
21 import jalview.gui.JvSwingUtils;
22 import jalview.util.MessageManager;
23
24 import java.awt.*;
25 import java.awt.event.*;
26
27 import javax.swing.*;
28 import javax.swing.border.*;
29 import javax.swing.event.*;
30 import java.awt.Rectangle;
31
32 /**
33  * DOCUMENT ME!
34  * 
35  * @author $author$
36  * @version $Revision$
37  */
38 public class GPreferences extends JPanel
39 {
40   JTabbedPane tabbedPane = new JTabbedPane();
41
42   JButton ok = new JButton();
43
44   JButton cancel = new JButton();
45
46   JPanel okCancelPanel = new JPanel();
47
48   BorderLayout borderLayout1 = new BorderLayout();
49
50   protected JCheckBox quality = new JCheckBox();
51
52   JPanel visualTab = new JPanel();
53
54   JPanel visual2Tab = new JPanel();
55
56   protected JCheckBox fullScreen = new JCheckBox();
57
58   protected JCheckBox conservation = new JCheckBox();
59
60   protected JCheckBox identity = new JCheckBox();
61
62   protected JCheckBox annotations = new JCheckBox();
63
64   protected JPanel minColour = new JPanel();
65
66   JLabel mincolourLabel = new JLabel();
67
68   protected JPanel maxColour = new JPanel();
69
70   JLabel maxcolourLabel = new JLabel();
71
72   JLabel gapLabel = new JLabel();
73
74   protected JComboBox colour = new JComboBox();
75
76   JLabel colourLabel = new JLabel();
77
78   JLabel fontLabel = new JLabel();
79
80   protected JComboBox fontSizeCB = new JComboBox();
81
82   protected JComboBox fontStyleCB = new JComboBox();
83
84   protected JComboBox fontNameCB = new JComboBox();
85
86   protected JComboBox gapSymbolCB = new JComboBox();
87
88   protected JCheckBox startupCheckbox = new JCheckBox();
89
90   protected JTextField startupFileTextfield = new JTextField();
91
92   JPanel connectTab = new JPanel();
93
94   JLabel serverLabel = new JLabel();
95
96   protected JList linkURLList = new JList();
97
98   protected JTextField proxyServerTB = new JTextField();
99
100   protected JTextField proxyPortTB = new JTextField();
101
102   JLabel portLabel = new JLabel();
103
104   JLabel browserLabel = new JLabel();
105
106   protected JTextField defaultBrowser = new JTextField();
107
108   JButton newLink = new JButton();
109
110   JButton editLink = new JButton();
111
112   JButton deleteLink = new JButton();
113
114   JScrollPane linkScrollPane = new JScrollPane();
115
116   JPanel linkPanel = new JPanel();
117
118   BorderLayout borderLayout2 = new BorderLayout();
119
120   JPanel editLinkButtons = new JPanel();
121
122   GridLayout gridLayout1 = new GridLayout();
123
124   protected JList linkNameList = new JList();
125
126   JPanel linkPanel2 = new JPanel();
127
128   BorderLayout borderLayout3 = new BorderLayout();
129
130   protected JCheckBox useProxy = new JCheckBox();
131
132   JPanel jPanel1 = new JPanel();
133
134   TitledBorder titledBorder1 = new TitledBorder(MessageManager.getString("label.proxy_server"));
135
136   TitledBorder titledBorder2 = new TitledBorder(MessageManager.getString("label.file_output"));
137
138   GridBagLayout gridBagLayout2 = new GridBagLayout();
139
140   GridBagLayout gridBagLayout1 = new GridBagLayout();
141
142   GridBagLayout gridBagLayout3 = new GridBagLayout();
143
144   protected JComboBox sortby = new JComboBox();
145
146   JLabel sortLabel = new JLabel();
147
148   JPanel jPanel2 = new JPanel();
149
150   JPanel visual2panel = new JPanel();
151
152   GridLayout gridLayout2 = new GridLayout();
153
154   GridLayout gridLayout4 = new GridLayout();
155
156   JPanel annsettingsPanel = new JPanel();
157
158   JPanel autoAnnotSettings1 = new JPanel();
159
160   JPanel autoAnnotSettings2 = new JPanel();
161
162   JPanel autoAnnotSettings3 = new JPanel();
163
164   JPanel exportTab = new JPanel();
165
166   JLabel epsLabel = new JLabel();
167
168   protected JComboBox epsRendering = new JComboBox();
169
170   protected JLabel userIdWidthlabel = new JLabel();
171
172   protected JCheckBox autoIdWidth = new JCheckBox();
173
174   protected JTextField userIdWidth = new JTextField();
175
176   JLabel jLabel1 = new JLabel();
177
178   protected JCheckBox blcjv = new JCheckBox();
179
180   protected JCheckBox pileupjv = new JCheckBox();
181
182   protected JCheckBox clustaljv = new JCheckBox();
183
184   protected JCheckBox msfjv = new JCheckBox();
185
186   protected JCheckBox fastajv = new JCheckBox();
187
188   protected JCheckBox pfamjv = new JCheckBox();
189
190   FlowLayout flowLayout1 = new FlowLayout();
191
192   protected JCheckBox pirjv = new JCheckBox();
193
194   JPanel jPanel11 = new JPanel();
195
196   Font verdana11 = JvSwingUtils.getLabelFont();
197
198   protected JCheckBox seqLimit = new JCheckBox();
199
200   GridLayout gridLayout3 = new GridLayout();
201
202   protected JCheckBox smoothFont = new JCheckBox();
203
204   JPanel calcTab = new JPanel();
205
206   protected JCheckBox autoCalculateConsCheck = new JCheckBox();
207
208   protected JCheckBox padGaps = new JCheckBox();
209
210   protected JCheckBox modellerOutput = new JCheckBox();
211
212   protected JPanel dasPanel = new JPanel();
213
214   BorderLayout borderLayout4 = new BorderLayout();
215
216   protected JPanel wsPanel = new JPanel();
217
218   BorderLayout borderLayout5 = new BorderLayout();
219
220   protected JCheckBox wrap = new JCheckBox();
221
222   protected JCheckBox rightAlign = new JCheckBox();
223
224   protected JCheckBox showUnconserved = new JCheckBox();
225
226   protected JCheckBox showDbRefTooltip = new JCheckBox();
227
228   protected JCheckBox showNpTooltip = new JCheckBox();
229
230   protected JCheckBox idItalics = new JCheckBox();
231
232   protected JCheckBox openoverv = new JCheckBox();
233
234   protected JCheckBox usagestats = new JCheckBox();
235
236   protected JCheckBox questionnaire = new JCheckBox();
237
238   protected JCheckBox versioncheck = new JCheckBox();
239
240   protected JLabel showGroupbits = new JLabel();
241
242   protected JLabel showConsensbits = new JLabel();
243
244   protected JCheckBox showConsensLogo = new JCheckBox();
245
246   protected JCheckBox showConsensHistogram = new JCheckBox();
247
248   protected JCheckBox showGroupConsensus = new JCheckBox();
249
250   protected JCheckBox showGroupConservation = new JCheckBox();
251
252   protected JCheckBox shareSelections = new JCheckBox();
253
254   protected JCheckBox followHighlight = new JCheckBox();
255
256   protected JCheckBox sortByTree = new JCheckBox();
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(MessageManager.getString("action.ok"));
282     ok.addActionListener(new ActionListener()
283     {
284       public void actionPerformed(ActionEvent e)
285       {
286         ok_actionPerformed(e);
287       }
288     });
289     cancel.setText(MessageManager.getString("action.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(MessageManager.getString("label.quality"));
303     visualTab.setBorder(new TitledBorder(MessageManager.getString("action.open_new_aligmnent")));
304     visualTab.setLayout(null);
305     visual2Tab.setBorder(new TitledBorder(MessageManager.getString("action.open_new_aligmnent")));
306     visual2Tab.setLayout(new FlowLayout());
307     fullScreen.setFont(verdana11);
308     fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
309     fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
310     fullScreen.setText(MessageManager.getString("label.maximize_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(MessageManager.getString("label.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(MessageManager.getString("label.consensus"));
323     showGroupbits.setFont(verdana11);
324     showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
325     showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
326     showGroupbits.setText(MessageManager.getString("action.show_group") + ":");
327     showConsensbits.setFont(verdana11);
328     showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
329     showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
330     showConsensbits.setText(MessageManager.getString("label.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(MessageManager.getString("label.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(MessageManager.getString("label.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(MessageManager.getString("label.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(MessageManager.getString("label.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(MessageManager.getString("label.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(MessageManager.getString("label.database_references"));
367     annotations.setFont(verdana11);
368     annotations.setHorizontalAlignment(SwingConstants.RIGHT);
369     annotations.setHorizontalTextPosition(SwingConstants.LEADING);
370     annotations.setSelected(true);
371     annotations.setText(MessageManager.getString("label.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(MessageManager.getString("action.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(MessageManager.getString("label.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(MessageManager.getString("label.scroll_highlighted_regions"));
418
419     gapLabel.setFont(verdana11);
420     gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
421     gapLabel.setText(MessageManager.getString("label.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(MessageManager.getString("label.alignment_colour") + " ");
427     fontLabel.setFont(verdana11);
428     fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
429     fontLabel.setText(MessageManager.getString("label.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(MessageManager.getString("label.min_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(MessageManager.getString("label.max_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
465     startupCheckbox.setText(MessageManager.getString("action.open_file"));
466     startupCheckbox.setFont(verdana11);
467     startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
468     startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
469     startupCheckbox.setSelected(true);
470     startupFileTextfield.setFont(verdana11);
471     startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
472     startupFileTextfield.addMouseListener(new MouseAdapter()
473     {
474       public void mouseClicked(MouseEvent e)
475       {
476         if (e.getClickCount() > 1)
477         {
478           startupFileTextfield_mouseClicked();
479         }
480       }
481     });
482
483     connectTab.setLayout(gridBagLayout3);
484     serverLabel.setText(MessageManager.getString("label.address"));
485     serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
486     serverLabel.setFont(verdana11);
487     proxyServerTB.setFont(verdana11);
488     proxyPortTB.setFont(verdana11);
489     portLabel.setFont(verdana11);
490     portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
491     portLabel.setText(MessageManager.getString("label.port"));
492     browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
493     browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
494     browserLabel.setText(MessageManager.getString("label.default_browser_unix"));
495     defaultBrowser.setFont(verdana11);
496     defaultBrowser.setText("");
497     usagestats.setText(MessageManager.getString("label.send_usage_statistics"));
498     usagestats.setFont(verdana11);
499     usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
500     usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
501     questionnaire.setText(MessageManager.getString("label.check_for_questionnaires"));
502     questionnaire.setFont(verdana11);
503     questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
504     questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
505     versioncheck.setText(MessageManager.getString("label.check_for_latest_version"));
506     versioncheck.setFont(verdana11);
507     versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
508     versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
509     newLink.setText(MessageManager.getString("action.new"));
510     newLink.addActionListener(new java.awt.event.ActionListener()
511     {
512       public void actionPerformed(ActionEvent e)
513       {
514         newLink_actionPerformed(e);
515       }
516     });
517     editLink.setText(MessageManager.getString("action.edit"));
518     editLink.addActionListener(new java.awt.event.ActionListener()
519     {
520       public void actionPerformed(ActionEvent e)
521       {
522         editLink_actionPerformed(e);
523       }
524     });
525     deleteLink.setText(MessageManager.getString("action.delete"));
526     deleteLink.addActionListener(new java.awt.event.ActionListener()
527     {
528       public void actionPerformed(ActionEvent e)
529       {
530         deleteLink_actionPerformed(e);
531       }
532     });
533
534     linkURLList.addListSelectionListener(new ListSelectionListener()
535     {
536       public void valueChanged(ListSelectionEvent e)
537       {
538         int index = linkURLList.getSelectedIndex();
539         linkNameList.setSelectedIndex(index);
540       }
541     });
542
543     linkNameList.addListSelectionListener(new ListSelectionListener()
544     {
545       public void valueChanged(ListSelectionEvent e)
546       {
547         int index = linkNameList.getSelectedIndex();
548         linkURLList.setSelectedIndex(index);
549       }
550     });
551
552     linkScrollPane.setBorder(null);
553     linkPanel.setBorder(new TitledBorder(MessageManager.getString("label.url_linkfrom_sequence_id")));
554     linkPanel.setLayout(borderLayout2);
555     editLinkButtons.setLayout(gridLayout1);
556     gridLayout1.setRows(3);
557     linkNameList.setFont(verdana11);
558     linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
559     linkPanel2.setLayout(borderLayout3);
560     linkURLList.setFont(verdana11);
561     linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
562
563     defaultBrowser.addMouseListener(new MouseAdapter()
564     {
565       public void mouseClicked(MouseEvent e)
566       {
567         if (e.getClickCount() > 1)
568         {
569           defaultBrowser_mouseClicked(e);
570         }
571       }
572     });
573     useProxy.setFont(verdana11);
574     useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
575     useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
576     useProxy.setText(MessageManager.getString("label.use_proxy_server"));
577     useProxy.addActionListener(new ActionListener()
578     {
579       public void actionPerformed(ActionEvent e)
580       {
581         useProxy_actionPerformed();
582       }
583     });
584     jPanel1.setBorder(titledBorder1);
585     jPanel1.setLayout(gridBagLayout1);
586     sortby.setFont(verdana11);
587     sortby.setBounds(new Rectangle(172, 249, 155, 21));
588     sortLabel.setFont(verdana11);
589     sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
590     sortLabel.setText(MessageManager.getString("label.sort_by"));
591     jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
592     jPanel2.setLayout(gridLayout2);
593     gridLayout2.setRows(12);
594     exportTab.setLayout(null);
595     epsLabel.setFont(verdana11);
596     epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
597     epsLabel.setText(MessageManager.getString("label.eps_rendering_style"));
598     epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
599     epsRendering.setFont(verdana11);
600     epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
601     jLabel1.setFont(verdana11);
602     jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
603     jLabel1.setText(MessageManager.getString("label.append_start_end"));
604     jLabel1.setFont(verdana11);
605     fastajv.setFont(verdana11);
606     fastajv.setHorizontalAlignment(SwingConstants.LEFT);
607     clustaljv.setText(MessageManager.getString("label.clustal") + "     ");
608     blcjv.setText(MessageManager.getString("label.blc") + "     ");
609     fastajv.setText(MessageManager.getString("label.fasta") + "     ");
610     msfjv.setText(MessageManager.getString("label.msf")+ "     ");
611     pfamjv.setText(MessageManager.getString("label.pfam") + "     ");
612     pileupjv.setText(MessageManager.getString("label.pileup") + "     ");
613     msfjv.setFont(verdana11);
614     msfjv.setHorizontalAlignment(SwingConstants.LEFT);
615     pirjv.setText(MessageManager.getString("label.pir") + "     ");
616     jPanel11.setFont(verdana11);
617     jPanel11.setBorder(titledBorder2);
618     jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
619     jPanel11.setLayout(gridLayout3);
620     blcjv.setFont(verdana11);
621     blcjv.setHorizontalAlignment(SwingConstants.LEFT);
622     clustaljv.setFont(verdana11);
623     clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
624     pfamjv.setFont(verdana11);
625     pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
626     pileupjv.setFont(verdana11);
627     pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
628     pirjv.setFont(verdana11);
629     pirjv.setHorizontalAlignment(SwingConstants.LEFT);
630     seqLimit.setFont(verdana11);
631     seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
632     seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
633     seqLimit.setText(MessageManager.getString("label.full_sequence_id"));
634     gridLayout3.setRows(8);
635     smoothFont.setFont(verdana11);
636     smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
637     smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
638     smoothFont.setText(MessageManager.getString("label.smooth_font"));
639     calcTab.setLayout(null);
640     autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
641     autoCalculateConsCheck.setText(MessageManager.getString("label.autocalculate_consensus"));
642     autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
643     padGaps.setFont(JvSwingUtils.getLabelFont());
644     padGaps.setText(MessageManager.getString("label.pad_gaps_when_editing"));
645     padGaps.setBounds(new Rectangle(22, 94, 168, 23));
646     sortByTree.setFont(JvSwingUtils.getLabelFont());
647     sortByTree.setText(MessageManager.getString("label.sort_with_new_tree"));
648     sortByTree
649             .setToolTipText(MessageManager.getString("label.any_trees_calculated_or_loaded_alignment_automatically_sort"));
650     sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
651
652     autoIdWidth.setFont(JvSwingUtils.getLabelFont());
653     autoIdWidth.setText(MessageManager.getString("label.automatically_set_id_width"));
654     autoIdWidth
655             .setToolTipText("<html>"
656                     + JvSwingUtils
657                             .wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")
658                     + "</html>");
659     autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
660     autoIdWidth.addActionListener(new ActionListener()
661     {
662
663       @Override
664       public void actionPerformed(ActionEvent e)
665       {
666         autoIdWidth_actionPerformed();
667       }
668     });
669     userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
670     userIdWidthlabel.setText(MessageManager.getString("label.figure_id_column_width"));
671     userIdWidth
672             .setToolTipText("<html>"
673                     + JvSwingUtils
674                             .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")
675                     + "</html>");
676     userIdWidthlabel
677             .setToolTipText("<html>"
678                     + JvSwingUtils
679                             .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")
680                     + "</html>");
681     userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
682     userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
683     userIdWidth.setText("");
684     userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
685     userIdWidth.addActionListener(new ActionListener()
686     {
687
688       @Override
689       public void actionPerformed(ActionEvent e)
690       {
691         userIdWidth_actionPerformed();
692       }
693     });
694     modellerOutput.setFont(JvSwingUtils.getLabelFont());
695     modellerOutput.setText(MessageManager.getString("label.use_modeller_output"));
696     modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
697
698     dasPanel.setLayout(borderLayout4);
699     wsPanel.setLayout(borderLayout5);
700     wrap.setFont(JvSwingUtils.getLabelFont());
701     wrap.setHorizontalAlignment(SwingConstants.TRAILING);
702     wrap.setHorizontalTextPosition(SwingConstants.LEADING);
703     wrap.setText(MessageManager.getString("label.wrap_alignment"));
704     rightAlign.setFont(JvSwingUtils.getLabelFont());
705     rightAlign.setForeground(Color.black);
706     rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
707     rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
708     rightAlign.setText(MessageManager.getString("label.right_align_ids"));
709     idItalics.setFont(JvSwingUtils.getLabelFont());
710     idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
711     idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
712     idItalics.setText(MessageManager.getString("label.sequence_name_italics"));
713     openoverv.setFont(JvSwingUtils.getLabelFont());
714     openoverv.setActionCommand(MessageManager.getString("label.open_overview"));
715     openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
716     openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
717     openoverv.setText(MessageManager.getString(("label.open_overview")));
718     jPanel2.add(fullScreen);
719     jPanel2.add(openoverv);
720     jPanel2.add(seqLimit);
721     jPanel2.add(rightAlign);
722     jPanel2.add(fontLabel);
723     jPanel2.add(showUnconserved);
724     jPanel2.add(idItalics);
725     jPanel2.add(smoothFont);
726     jPanel2.add(gapLabel);
727     jPanel2.add(wrap);
728     jPanel2.add(sortLabel);
729     jPanel2.add(startupCheckbox);
730     visualTab.add(annotations);
731     visualTab.add(startupFileTextfield);
732     visualTab.add(sortby);
733     visualTab.add(gapSymbolCB);
734     visualTab.add(fontNameCB);
735     visualTab.add(fontSizeCB);
736     visualTab.add(fontStyleCB);
737     annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
738     annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
739     annsettingsPanel.add(autoAnnotSettings1);
740     annsettingsPanel.add(autoAnnotSettings2);
741     annsettingsPanel.add(autoAnnotSettings3);
742     autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
743     autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
744     autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
745     visualTab.add(annsettingsPanel);
746     Border jb = new EmptyBorder(1, 1, 4, 5);
747     quality.setBorder(jb);
748     conservation.setBorder(jb);
749     identity.setBorder(jb);
750     showConsensbits.setBorder(jb);
751     showGroupbits.setBorder(jb);
752     showGroupConsensus.setBorder(jb);
753     showGroupConservation.setBorder(jb);
754     showConsensHistogram.setBorder(jb);
755     showConsensLogo.setBorder(jb);
756
757     autoAnnotSettings2.add(conservation);
758     autoAnnotSettings1.add(quality);
759     autoAnnotSettings3.add(identity);
760     autoAnnotSettings1.add(showGroupbits);
761     autoAnnotSettings3.add(showGroupConsensus);
762     autoAnnotSettings2.add(showGroupConservation);
763     autoAnnotSettings1.add(showConsensbits);
764     autoAnnotSettings2.add(showConsensHistogram);
765     autoAnnotSettings3.add(showConsensLogo);
766
767     JPanel tooltipSettings = new JPanel();
768     tooltipSettings.setBorder(new TitledBorder(MessageManager.getString("label.sequence_id_tooltip")));
769     tooltipSettings.setBounds(173, 130, 200, 62);
770     tooltipSettings.setLayout(new GridLayout(2, 1));
771     tooltipSettings.add(showDbRefTooltip);
772     tooltipSettings.add(showNpTooltip);
773     visualTab.add(tooltipSettings);
774     visualTab.add(jPanel2);
775     JvSwingUtils.addtoLayout(visual2Tab,
776            MessageManager.getString("label.default_colour_scheme_for_alignment"), colourLabel, colour);
777     JPanel annotationShding = new JPanel();
778     annotationShding.setBorder(new TitledBorder(
779             MessageManager.getString("label.annotation_shading_default")));
780     annotationShding.setLayout(new GridLayout(1, 2));
781     JvSwingUtils.addtoLayout(annotationShding,
782             MessageManager.getString("label.default_minimum_colour_annotation_shading"),
783             mincolourLabel, minColour);
784     JvSwingUtils.addtoLayout(annotationShding,
785             MessageManager.getString("label.default_maximum_colour_annotation_shading"),
786             maxcolourLabel, maxColour);
787     visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
788
789     // visual2panel.add(minColour);
790     // visual2panel.add(maxColour);
791     // visual2Tab.add(visual2panel);
792
793     linkPanel.add(editLinkButtons, BorderLayout.EAST);
794     editLinkButtons.add(newLink, null);
795     editLinkButtons.add(editLink, null);
796     editLinkButtons.add(deleteLink, null);
797     linkPanel.add(linkScrollPane, BorderLayout.CENTER);
798     linkScrollPane.getViewport().add(linkPanel2, null);
799     linkPanel2.add(linkURLList, BorderLayout.CENTER);
800     linkPanel2.add(linkNameList, BorderLayout.WEST);
801     okCancelPanel.add(ok);
802     okCancelPanel.add(cancel);
803     this.add(tabbedPane, java.awt.BorderLayout.CENTER);
804
805     this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
806     jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
807             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
808                     2, 4, 0), 5, 0));
809     jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
810             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
811                     0, 4, 0), 11, 6));
812     connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
813             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
814                     16, 0, 0, 12), 359, -17));
815     connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
816             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
817                     21, 0, 35, 12), 4, 6));
818     connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
819             0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
820             new Insets(16, 0, 0, 0), 5, 1));
821     jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
822             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
823             new Insets(0, 2, 4, 2), 54, 1));
824     jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
825             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
826             new Insets(0, 2, 4, 0), 263, 1));
827     connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
828             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
829             new Insets(15, 0, 0, 15), 307, 1));
830     connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
831             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
832             new Insets(0, 2, 4, 2), 70, 1));
833     connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
834             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
835             new Insets(0, 2, 4, 2), 70, 1));
836     connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
837             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
838             new Insets(0, 2, 4, 2), 70, 1));
839
840     jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
841             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
842                     2, 5, 185), 2, -4));
843     DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
844     dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
845     gapSymbolCB.setRenderer(dlcr);
846
847     tabbedPane.add(visualTab, MessageManager.getString("label.visual"));
848     tabbedPane.add(visual2Tab, MessageManager.getString("label.colours"));
849     tabbedPane.add(connectTab, MessageManager.getString("label.connections"));
850     tabbedPane.add(exportTab, MessageManager.getString("label.output"));
851     jPanel11.add(jLabel1);
852     jPanel11.add(blcjv);
853     jPanel11.add(clustaljv);
854     jPanel11.add(fastajv);
855     jPanel11.add(msfjv);
856     jPanel11.add(pfamjv);
857     jPanel11.add(pileupjv);
858     jPanel11.add(pirjv);
859     exportTab.add(autoIdWidth);
860     exportTab.add(userIdWidth);
861     exportTab.add(userIdWidthlabel);
862     exportTab.add(modellerOutput);
863     tabbedPane.add(calcTab, MessageManager.getString("label.editing"));
864     calcTab.add(autoCalculateConsCheck);
865     calcTab.add(padGaps);
866     calcTab.add(sortByTree);
867
868     tabbedPane.add(dasPanel, MessageManager.getString("label.das_settings"));
869     tabbedPane.add(wsPanel, MessageManager.getString("label.web_services"));
870
871     exportTab.add(epsLabel);
872     exportTab.add(epsRendering);
873     exportTab.add(jPanel11);
874   }
875
876   protected void autoIdWidth_actionPerformed()
877   {
878     // TODO Auto-generated method stub
879
880   }
881
882   protected void userIdWidth_actionPerformed()
883   {
884     // TODO Auto-generated method stub
885
886   }
887
888   protected void maxColour_actionPerformed()
889   {
890     // TODO Auto-generated method stub
891
892   }
893
894   protected void minColour_actionPerformed()
895   {
896     // TODO Auto-generated method stub
897
898   }
899
900   protected void showunconserved_actionPerformed(ActionEvent e)
901   {
902     // TODO Auto-generated method stub
903
904   }
905
906   /**
907    * DOCUMENT ME!
908    * 
909    * @param e
910    *          DOCUMENT ME!
911    */
912   public void ok_actionPerformed(ActionEvent e)
913   {
914   }
915
916   /**
917    * DOCUMENT ME!
918    * 
919    * @param e
920    *          DOCUMENT ME!
921    */
922   public void cancel_actionPerformed(ActionEvent e)
923   {
924   }
925
926   /**
927    * DOCUMENT ME!
928    * 
929    * @param e
930    *          DOCUMENT ME!
931    */
932   public void annotations_actionPerformed(ActionEvent e)
933   {
934   }
935
936   /**
937    * DOCUMENT ME!
938    */
939   public void startupFileTextfield_mouseClicked()
940   {
941   }
942
943   public void newLink_actionPerformed(ActionEvent e)
944   {
945
946   }
947
948   public void editLink_actionPerformed(ActionEvent e)
949   {
950
951   }
952
953   public void deleteLink_actionPerformed(ActionEvent e)
954   {
955
956   }
957
958   public void defaultBrowser_mouseClicked(MouseEvent e)
959   {
960
961   }
962
963   public void linkURLList_keyTyped(KeyEvent e)
964   {
965
966   }
967
968   public void useProxy_actionPerformed()
969   {
970     proxyServerTB.setEnabled(useProxy.isSelected());
971     proxyPortTB.setEnabled(useProxy.isSelected());
972   }
973
974 }