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