bf01a01f31ab7aa2e12bbaf36e6abc2f7faffa54
[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(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.adjusts_width_generated_eps_png")));
681     autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
682     autoIdWidth.addActionListener(new ActionListener()
683     {
684
685       @Override
686       public void actionPerformed(ActionEvent e)
687       {
688         autoIdWidth_actionPerformed();
689       }
690     });
691     userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
692     userIdWidthlabel.setText(MessageManager
693             .getString("label.figure_id_column_width"));
694     userIdWidth
695             .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.manually_specify_width_left_column")));
696     userIdWidthlabel
697             .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.manually_specify_width_left_column")));
698     userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
699     userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
700     userIdWidth.setText("");
701     userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
702     userIdWidth.addActionListener(new ActionListener()
703     {
704
705       @Override
706       public void actionPerformed(ActionEvent e)
707       {
708         userIdWidth_actionPerformed();
709       }
710     });
711     modellerOutput.setFont(JvSwingUtils.getLabelFont());
712     modellerOutput.setText(MessageManager
713             .getString("label.use_modeller_output"));
714     modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
715
716     dasPanel.setLayout(borderLayout4);
717     wsPanel.setLayout(borderLayout5);
718     wrap.setFont(JvSwingUtils.getLabelFont());
719     wrap.setHorizontalAlignment(SwingConstants.TRAILING);
720     wrap.setHorizontalTextPosition(SwingConstants.LEADING);
721     wrap.setText(MessageManager.getString("label.wrap_alignment"));
722     rightAlign.setFont(JvSwingUtils.getLabelFont());
723     rightAlign.setForeground(Color.black);
724     rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
725     rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
726     rightAlign.setText(MessageManager.getString("label.right_align_ids"));
727     idItalics.setFont(JvSwingUtils.getLabelFont());
728     idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
729     idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
730     idItalics.setText(MessageManager
731             .getString("label.sequence_name_italics"));
732     openoverv.setFont(JvSwingUtils.getLabelFont());
733     openoverv.setActionCommand(MessageManager
734             .getString("label.open_overview"));
735     openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
736     openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
737     openoverv.setText(MessageManager.getString(("label.open_overview")));
738     jPanel2.add(fullScreen);
739     jPanel2.add(openoverv);
740     jPanel2.add(seqLimit);
741     jPanel2.add(rightAlign);
742     jPanel2.add(fontLabel);
743     jPanel2.add(showUnconserved);
744     jPanel2.add(idItalics);
745     jPanel2.add(smoothFont);
746     jPanel2.add(gapLabel);
747     jPanel2.add(wrap);
748     jPanel2.add(sortLabel);
749     jPanel2.add(startupCheckbox);
750     visualTab.add(annotations);
751     visualTab.add(startupFileTextfield);
752     visualTab.add(sortby);
753     visualTab.add(gapSymbolCB);
754     visualTab.add(fontNameCB);
755     visualTab.add(fontSizeCB);
756     visualTab.add(fontStyleCB);
757     annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
758     annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
759     annsettingsPanel.add(autoAnnotSettings1);
760     annsettingsPanel.add(autoAnnotSettings2);
761     annsettingsPanel.add(autoAnnotSettings3);
762     autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
763     autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
764     autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
765     visualTab.add(annsettingsPanel);
766     Border jb = new EmptyBorder(1, 1, 4, 5);
767     quality.setBorder(jb);
768     conservation.setBorder(jb);
769     identity.setBorder(jb);
770     showConsensbits.setBorder(jb);
771     showGroupbits.setBorder(jb);
772     showGroupConsensus.setBorder(jb);
773     showGroupConservation.setBorder(jb);
774     showConsensHistogram.setBorder(jb);
775     showConsensLogo.setBorder(jb);
776
777     autoAnnotSettings2.add(conservation);
778     autoAnnotSettings1.add(quality);
779     autoAnnotSettings3.add(identity);
780     autoAnnotSettings1.add(showGroupbits);
781     autoAnnotSettings3.add(showGroupConsensus);
782     autoAnnotSettings2.add(showGroupConservation);
783     autoAnnotSettings1.add(showConsensbits);
784     autoAnnotSettings2.add(showConsensHistogram);
785     autoAnnotSettings3.add(showConsensLogo);
786
787     JPanel tooltipSettings = new JPanel();
788     tooltipSettings.setBorder(new TitledBorder(MessageManager
789             .getString("label.sequence_id_tooltip")));
790     tooltipSettings.setBounds(173, 130, 200, 62);
791     tooltipSettings.setLayout(new GridLayout(2, 1));
792     tooltipSettings.add(showDbRefTooltip);
793     tooltipSettings.add(showNpTooltip);
794     visualTab.add(tooltipSettings);
795     visualTab.add(jPanel2);
796     JvSwingUtils.addtoLayout(visual2Tab, MessageManager
797             .getString("label.default_colour_scheme_for_alignment"),
798             colourLabel, colour);
799     JPanel annotationShding = new JPanel();
800     annotationShding.setBorder(new TitledBorder(MessageManager
801             .getString("label.annotation_shading_default")));
802     annotationShding.setLayout(new GridLayout(1, 2));
803     JvSwingUtils.addtoLayout(annotationShding, MessageManager
804             .getString("label.default_minimum_colour_annotation_shading"),
805             mincolourLabel, minColour);
806     JvSwingUtils.addtoLayout(annotationShding, MessageManager
807             .getString("label.default_maximum_colour_annotation_shading"),
808             maxcolourLabel, maxColour);
809     visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
810
811     // visual2panel.add(minColour);
812     // visual2panel.add(maxColour);
813     // visual2Tab.add(visual2panel);
814
815     linkPanel.add(editLinkButtons, BorderLayout.EAST);
816     editLinkButtons.add(newLink, null);
817     editLinkButtons.add(editLink, null);
818     editLinkButtons.add(deleteLink, null);
819     linkPanel.add(linkScrollPane, BorderLayout.CENTER);
820     linkScrollPane.getViewport().add(linkPanel2, null);
821     linkPanel2.add(linkURLList, BorderLayout.CENTER);
822     linkPanel2.add(linkNameList, BorderLayout.WEST);
823     okCancelPanel.add(ok);
824     okCancelPanel.add(cancel);
825     this.add(tabbedPane, java.awt.BorderLayout.CENTER);
826
827     this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
828     jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
829             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
830                     2, 4, 0), 5, 0));
831     jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
832             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
833                     0, 4, 0), 11, 6));
834     connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
835             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
836                     16, 0, 0, 12), 359, -17));
837     connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
838             GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
839                     21, 0, 35, 12), 4, 6));
840     connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
841             0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
842             new Insets(16, 0, 0, 0), 5, 1));
843     jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
844             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
845             new Insets(0, 2, 4, 2), 54, 1));
846     jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
847             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
848             new Insets(0, 2, 4, 0), 263, 1));
849     connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
850             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
851             new Insets(15, 0, 0, 15), 307, 1));
852     connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
853             GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
854             new Insets(0, 2, 4, 2), 70, 1));
855     connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
856             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
857             new Insets(0, 2, 4, 2), 70, 1));
858     connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
859             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
860             new Insets(0, 2, 4, 2), 70, 1));
861
862     jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
863             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
864                     2, 5, 185), 2, -4));
865     DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
866     dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
867     gapSymbolCB.setRenderer(dlcr);
868
869     tabbedPane.add(visualTab, MessageManager.getString("label.visual"));
870     tabbedPane.add(visual2Tab, MessageManager.getString("label.colours"));
871     tabbedPane.add(connectTab,
872             MessageManager.getString("label.connections"));
873     tabbedPane.add(exportTab, MessageManager.getString("label.output"));
874     jPanel11.add(jLabel1);
875     jPanel11.add(blcjv);
876     jPanel11.add(clustaljv);
877     jPanel11.add(fastajv);
878     jPanel11.add(msfjv);
879     jPanel11.add(pfamjv);
880     jPanel11.add(pileupjv);
881     jPanel11.add(pirjv);
882     exportTab.add(autoIdWidth);
883     exportTab.add(userIdWidth);
884     exportTab.add(userIdWidthlabel);
885     exportTab.add(modellerOutput);
886     tabbedPane.add(calcTab, MessageManager.getString("label.editing"));
887     calcTab.add(autoCalculateConsCheck);
888     calcTab.add(padGaps);
889     calcTab.add(sortByTree);
890
891     tabbedPane
892             .add(dasPanel, MessageManager.getString("label.das_settings"));
893     tabbedPane.add(wsPanel, MessageManager.getString("label.web_services"));
894
895     exportTab.add(epsLabel);
896     exportTab.add(epsRendering);
897     exportTab.add(jPanel11);
898   }
899
900   protected void autoIdWidth_actionPerformed()
901   {
902     // TODO Auto-generated method stub
903
904   }
905
906   protected void userIdWidth_actionPerformed()
907   {
908     // TODO Auto-generated method stub
909
910   }
911
912   protected void maxColour_actionPerformed()
913   {
914     // TODO Auto-generated method stub
915
916   }
917
918   protected void minColour_actionPerformed()
919   {
920     // TODO Auto-generated method stub
921
922   }
923
924   protected void showunconserved_actionPerformed(ActionEvent e)
925   {
926     // TODO Auto-generated method stub
927
928   }
929
930   /**
931    * DOCUMENT ME!
932    * 
933    * @param e
934    *          DOCUMENT ME!
935    */
936   public void ok_actionPerformed(ActionEvent e)
937   {
938   }
939
940   /**
941    * DOCUMENT ME!
942    * 
943    * @param e
944    *          DOCUMENT ME!
945    */
946   public void cancel_actionPerformed(ActionEvent e)
947   {
948   }
949
950   /**
951    * DOCUMENT ME!
952    * 
953    * @param e
954    *          DOCUMENT ME!
955    */
956   public void annotations_actionPerformed(ActionEvent e)
957   {
958   }
959
960   /**
961    * DOCUMENT ME!
962    */
963   public void startupFileTextfield_mouseClicked()
964   {
965   }
966
967   public void newLink_actionPerformed(ActionEvent e)
968   {
969
970   }
971
972   public void editLink_actionPerformed(ActionEvent e)
973   {
974
975   }
976
977   public void deleteLink_actionPerformed(ActionEvent e)
978   {
979
980   }
981
982   public void defaultBrowser_mouseClicked(MouseEvent e)
983   {
984
985   }
986
987   public void linkURLList_keyTyped(KeyEvent e)
988   {
989
990   }
991
992   public void useProxy_actionPerformed()
993   {
994     proxyServerTB.setEnabled(useProxy.isSelected());
995     proxyPortTB.setEnabled(useProxy.isSelected());
996   }
997
998 }