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