2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
18 package jalview.jbgui;
20 import jalview.gui.JvSwingUtils;
21 import jalview.util.MessageManager;
24 import java.awt.event.*;
27 import javax.swing.border.*;
28 import javax.swing.event.*;
29 import java.awt.Rectangle;
37 public class GPreferences extends JPanel
39 JTabbedPane tabbedPane = new JTabbedPane();
41 JButton ok = new JButton();
43 JButton cancel = new JButton();
45 JPanel okCancelPanel = new JPanel();
47 BorderLayout borderLayout1 = new BorderLayout();
49 protected JCheckBox quality = new JCheckBox();
51 JPanel visualTab = new JPanel();
53 JPanel visual2Tab = new JPanel();
55 protected JCheckBox fullScreen = new JCheckBox();
57 protected JCheckBox conservation = new JCheckBox();
59 protected JCheckBox identity = new JCheckBox();
61 protected JCheckBox annotations = new JCheckBox();
63 protected JPanel minColour = new JPanel();
65 JLabel mincolourLabel = new JLabel();
67 protected JPanel maxColour = new JPanel();
69 JLabel maxcolourLabel = new JLabel();
71 JLabel gapLabel = new JLabel();
73 protected JComboBox colour = new JComboBox();
75 JLabel colourLabel = new JLabel();
77 JLabel fontLabel = new JLabel();
79 protected JComboBox fontSizeCB = new JComboBox();
81 protected JComboBox fontStyleCB = new JComboBox();
83 protected JComboBox fontNameCB = new JComboBox();
85 protected JComboBox gapSymbolCB = new JComboBox();
87 protected JCheckBox startupCheckbox = new JCheckBox();
89 protected JTextField startupFileTextfield = new JTextField();
91 JPanel connectTab = new JPanel();
93 JLabel serverLabel = new JLabel();
95 protected JList linkURLList = new JList();
97 protected JTextField proxyServerTB = new JTextField();
99 protected JTextField proxyPortTB = new JTextField();
101 JLabel portLabel = new JLabel();
103 JLabel browserLabel = new JLabel();
105 protected JTextField defaultBrowser = new JTextField();
107 JButton newLink = new JButton();
109 JButton editLink = new JButton();
111 JButton deleteLink = new JButton();
113 JScrollPane linkScrollPane = new JScrollPane();
115 JPanel linkPanel = new JPanel();
117 BorderLayout borderLayout2 = new BorderLayout();
119 JPanel editLinkButtons = new JPanel();
121 GridLayout gridLayout1 = new GridLayout();
123 protected JList linkNameList = new JList();
125 JPanel linkPanel2 = new JPanel();
127 BorderLayout borderLayout3 = new BorderLayout();
129 protected JCheckBox useProxy = new JCheckBox();
131 JPanel jPanel1 = new JPanel();
133 TitledBorder titledBorder1 = new TitledBorder(MessageManager.getString("label.proxy_server"));
135 TitledBorder titledBorder2 = new TitledBorder(MessageManager.getString("label.file_output"));
137 GridBagLayout gridBagLayout2 = new GridBagLayout();
139 GridBagLayout gridBagLayout1 = new GridBagLayout();
141 GridBagLayout gridBagLayout3 = new GridBagLayout();
143 protected JComboBox sortby = new JComboBox();
145 JLabel sortLabel = new JLabel();
147 JPanel jPanel2 = new JPanel();
149 JPanel visual2panel = new JPanel();
151 GridLayout gridLayout2 = new GridLayout();
153 GridLayout gridLayout4 = new GridLayout();
155 JPanel annsettingsPanel = new JPanel();
157 JPanel autoAnnotSettings1 = new JPanel();
159 JPanel autoAnnotSettings2 = new JPanel();
161 JPanel autoAnnotSettings3 = new JPanel();
163 JPanel exportTab = new JPanel();
165 JLabel epsLabel = new JLabel();
167 protected JComboBox epsRendering = new JComboBox();
169 protected JLabel userIdWidthlabel = new JLabel();
171 protected JCheckBox autoIdWidth = new JCheckBox();
173 protected JTextField userIdWidth = new JTextField();
175 JLabel jLabel1 = new JLabel();
177 protected JCheckBox blcjv = new JCheckBox();
179 protected JCheckBox pileupjv = new JCheckBox();
181 protected JCheckBox clustaljv = new JCheckBox();
183 protected JCheckBox msfjv = new JCheckBox();
185 protected JCheckBox fastajv = new JCheckBox();
187 protected JCheckBox pfamjv = new JCheckBox();
189 FlowLayout flowLayout1 = new FlowLayout();
191 protected JCheckBox pirjv = new JCheckBox();
193 JPanel jPanel11 = new JPanel();
195 Font verdana11 = JvSwingUtils.getLabelFont();
197 protected JCheckBox seqLimit = new JCheckBox();
199 GridLayout gridLayout3 = new GridLayout();
201 protected JCheckBox smoothFont = new JCheckBox();
203 JPanel calcTab = new JPanel();
205 protected JCheckBox autoCalculateConsCheck = new JCheckBox();
207 protected JCheckBox padGaps = new JCheckBox();
209 protected JCheckBox modellerOutput = new JCheckBox();
211 protected JPanel dasPanel = new JPanel();
213 BorderLayout borderLayout4 = new BorderLayout();
215 protected JPanel wsPanel = new JPanel();
217 BorderLayout borderLayout5 = new BorderLayout();
219 protected JCheckBox wrap = new JCheckBox();
221 protected JCheckBox rightAlign = new JCheckBox();
223 protected JCheckBox showUnconserved = new JCheckBox();
225 protected JCheckBox showDbRefTooltip = new JCheckBox();
227 protected JCheckBox showNpTooltip = new JCheckBox();
229 protected JCheckBox idItalics = new JCheckBox();
231 protected JCheckBox openoverv = new JCheckBox();
233 protected JCheckBox usagestats = new JCheckBox();
235 protected JCheckBox questionnaire = new JCheckBox();
237 protected JCheckBox versioncheck = new JCheckBox();
239 protected JLabel showGroupbits = new JLabel();
241 protected JLabel showConsensbits = new JLabel();
243 protected JCheckBox showConsensLogo = new JCheckBox();
245 protected JCheckBox showConsensHistogram = new JCheckBox();
247 protected JCheckBox showGroupConsensus = new JCheckBox();
249 protected JCheckBox showGroupConservation = new JCheckBox();
251 protected JCheckBox shareSelections = new JCheckBox();
253 protected JCheckBox followHighlight = new JCheckBox();
255 protected JCheckBox sortByTree = new JCheckBox();
258 * Creates a new GPreferences object.
260 public GPreferences()
265 } catch (Exception ex)
267 ex.printStackTrace();
277 private void jbInit() throws Exception
279 this.setLayout(borderLayout1);
280 ok.setText(MessageManager.getString("action.ok"));
281 ok.addActionListener(new ActionListener()
283 public void actionPerformed(ActionEvent e)
285 ok_actionPerformed(e);
288 cancel.setText(MessageManager.getString("action.cancel"));
289 cancel.addActionListener(new ActionListener()
291 public void actionPerformed(ActionEvent e)
293 cancel_actionPerformed(e);
296 quality.setEnabled(false);
297 quality.setFont(verdana11);
298 quality.setHorizontalAlignment(SwingConstants.RIGHT);
299 quality.setHorizontalTextPosition(SwingConstants.LEFT);
300 quality.setSelected(true);
301 quality.setText(MessageManager.getString("label.quality"));
302 visualTab.setBorder(new TitledBorder(MessageManager.getString("action.open_new_aligmnent")));
303 visualTab.setLayout(null);
304 visual2Tab.setBorder(new TitledBorder(MessageManager.getString("action.open_new_aligmnent")));
305 visual2Tab.setLayout(new FlowLayout());
306 fullScreen.setFont(verdana11);
307 fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
308 fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
309 fullScreen.setText(MessageManager.getString("label.maximize_window"));
310 conservation.setEnabled(false);
311 conservation.setFont(verdana11);
312 conservation.setHorizontalAlignment(SwingConstants.RIGHT);
313 conservation.setHorizontalTextPosition(SwingConstants.LEFT);
314 conservation.setSelected(true);
315 conservation.setText(MessageManager.getString("label.conservation"));
316 identity.setEnabled(false);
317 identity.setFont(verdana11);
318 identity.setHorizontalAlignment(SwingConstants.RIGHT);
319 identity.setHorizontalTextPosition(SwingConstants.LEFT);
320 identity.setSelected(true);
321 identity.setText(MessageManager.getString("label.consensus"));
322 showGroupbits.setFont(verdana11);
323 showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
324 showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
325 showGroupbits.setText(MessageManager.getString("action.show_group") + ":");
326 showConsensbits.setFont(verdana11);
327 showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
328 showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
329 showConsensbits.setText(MessageManager.getString("label.consensus") + ":");
330 showConsensHistogram.setEnabled(false);
331 showConsensHistogram.setFont(verdana11);
332 showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
333 showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
334 showConsensHistogram.setSelected(true);
335 showConsensHistogram.setText(MessageManager.getString("label.histogram"));
336 showConsensLogo.setEnabled(false);
337 showConsensLogo.setFont(verdana11);
338 showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
339 showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
340 showConsensLogo.setSelected(true);
341 showConsensLogo.setText(MessageManager.getString("label.logo"));
342 showGroupConsensus.setEnabled(false);
343 showGroupConsensus.setFont(verdana11);
344 showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
345 showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
346 showGroupConsensus.setSelected(true);
347 showGroupConsensus.setText(MessageManager.getString("label.consensus"));
348 showGroupConservation.setEnabled(false);
349 showGroupConservation.setFont(verdana11);
350 showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
351 showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
352 showGroupConservation.setSelected(true);
353 showGroupConservation.setText(MessageManager.getString("label.conservation"));
354 showNpTooltip.setEnabled(true);
355 showNpTooltip.setFont(verdana11);
356 showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
357 showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
358 showNpTooltip.setSelected(true);
359 showNpTooltip.setText(MessageManager.getString("label.non_positional_features"));
360 showDbRefTooltip.setEnabled(true);
361 showDbRefTooltip.setFont(verdana11);
362 showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
363 showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
364 showDbRefTooltip.setSelected(true);
365 showDbRefTooltip.setText(MessageManager.getString("label.database_references"));
366 annotations.setFont(verdana11);
367 annotations.setHorizontalAlignment(SwingConstants.RIGHT);
368 annotations.setHorizontalTextPosition(SwingConstants.LEADING);
369 annotations.setSelected(true);
370 annotations.setText(MessageManager.getString("label.show_annotations"));
371 annotations.setBounds(new Rectangle(169, 12, 200, 23));
372 annotations.addActionListener(new ActionListener()
374 public void actionPerformed(ActionEvent e)
376 annotations_actionPerformed(e);
379 identity.addActionListener(new ActionListener()
381 public void actionPerformed(ActionEvent e)
383 annotations_actionPerformed(e);
386 showGroupConsensus.addActionListener(new ActionListener()
388 public void actionPerformed(ActionEvent e)
390 annotations_actionPerformed(e);
393 showUnconserved.setFont(verdana11);
394 showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
395 showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
396 showUnconserved.setSelected(true);
397 showUnconserved.setText(MessageManager.getString("action.show_unconserved"));
398 showUnconserved.addActionListener(new ActionListener()
400 public void actionPerformed(ActionEvent e)
402 showunconserved_actionPerformed(e);
405 // / TODO: fit these in to preferences panel!!!!!
406 shareSelections.setFont(verdana11);
407 shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
408 shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
409 shareSelections.setSelected(true);
410 shareSelections.setText(MessageManager.getString("label.share_selection_across_views"));
411 followHighlight.setFont(verdana11);
412 followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
413 followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
414 // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
415 followHighlight.setSelected(true);
416 followHighlight.setText(MessageManager.getString("label.scroll_highlighted_regions"));
418 gapLabel.setFont(verdana11);
419 gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
420 gapLabel.setText(MessageManager.getString("label.gap_symbol") + " ");
421 colour.setFont(verdana11);
422 colour.setBounds(new Rectangle(172, 225, 155, 21));
423 colourLabel.setFont(verdana11);
424 colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
425 colourLabel.setText(MessageManager.getString("label.alignment_colour") + " ");
426 fontLabel.setFont(verdana11);
427 fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
428 fontLabel.setText(MessageManager.getString("label.font"));
429 fontSizeCB.setFont(verdana11);
430 fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
431 fontStyleCB.setFont(verdana11);
432 fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
433 fontNameCB.setFont(verdana11);
434 fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
435 gapSymbolCB.setFont(verdana11);
436 gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
437 mincolourLabel.setFont(verdana11);
438 mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
439 mincolourLabel.setText(MessageManager.getString("label.min_colour"));
440 minColour.setFont(verdana11);
441 minColour.setBorder(BorderFactory.createEtchedBorder());
442 minColour.setPreferredSize(new Dimension(40, 20));
443 minColour.addMouseListener(new MouseAdapter()
445 public void mousePressed(MouseEvent e)
447 minColour_actionPerformed();
450 maxcolourLabel.setFont(verdana11);
451 maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
452 maxcolourLabel.setText(MessageManager.getString("label.max_colour"));
453 maxColour.setFont(verdana11);
454 maxColour.setBorder(BorderFactory.createEtchedBorder());
455 maxColour.setPreferredSize(new Dimension(40, 20));
456 maxColour.addMouseListener(new MouseAdapter()
458 public void mousePressed(MouseEvent e)
460 maxColour_actionPerformed();
464 startupCheckbox.setText(MessageManager.getString("action.open_file"));
465 startupCheckbox.setFont(verdana11);
466 startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
467 startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
468 startupCheckbox.setSelected(true);
469 startupFileTextfield.setFont(verdana11);
470 startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
471 startupFileTextfield.addMouseListener(new MouseAdapter()
473 public void mouseClicked(MouseEvent e)
475 if (e.getClickCount() > 1)
477 startupFileTextfield_mouseClicked();
482 connectTab.setLayout(gridBagLayout3);
483 serverLabel.setText(MessageManager.getString("label.address"));
484 serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
485 serverLabel.setFont(verdana11);
486 proxyServerTB.setFont(verdana11);
487 proxyPortTB.setFont(verdana11);
488 portLabel.setFont(verdana11);
489 portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
490 portLabel.setText(MessageManager.getString("label.port"));
491 browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
492 browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
493 browserLabel.setText(MessageManager.getString("label.default_browser_unix"));
494 defaultBrowser.setFont(verdana11);
495 defaultBrowser.setText("");
496 usagestats.setText(MessageManager.getString("label.send_usage_statistics"));
497 usagestats.setFont(verdana11);
498 usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
499 usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
500 questionnaire.setText(MessageManager.getString("label.check_for_questionnaires"));
501 questionnaire.setFont(verdana11);
502 questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
503 questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
504 versioncheck.setText(MessageManager.getString("label.check_for_latest_version"));
505 versioncheck.setFont(verdana11);
506 versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
507 versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
508 newLink.setText(MessageManager.getString("action.new"));
509 newLink.addActionListener(new java.awt.event.ActionListener()
511 public void actionPerformed(ActionEvent e)
513 newLink_actionPerformed(e);
516 editLink.setText(MessageManager.getString("action.edit"));
517 editLink.addActionListener(new java.awt.event.ActionListener()
519 public void actionPerformed(ActionEvent e)
521 editLink_actionPerformed(e);
524 deleteLink.setText(MessageManager.getString("action.delete"));
525 deleteLink.addActionListener(new java.awt.event.ActionListener()
527 public void actionPerformed(ActionEvent e)
529 deleteLink_actionPerformed(e);
533 linkURLList.addListSelectionListener(new ListSelectionListener()
535 public void valueChanged(ListSelectionEvent e)
537 int index = linkURLList.getSelectedIndex();
538 linkNameList.setSelectedIndex(index);
542 linkNameList.addListSelectionListener(new ListSelectionListener()
544 public void valueChanged(ListSelectionEvent e)
546 int index = linkNameList.getSelectedIndex();
547 linkURLList.setSelectedIndex(index);
551 linkScrollPane.setBorder(null);
552 linkPanel.setBorder(new TitledBorder(MessageManager.getString("label.url_linkfrom_sequence_id")));
553 linkPanel.setLayout(borderLayout2);
554 editLinkButtons.setLayout(gridLayout1);
555 gridLayout1.setRows(3);
556 linkNameList.setFont(verdana11);
557 linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
558 linkPanel2.setLayout(borderLayout3);
559 linkURLList.setFont(verdana11);
560 linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
562 defaultBrowser.addMouseListener(new MouseAdapter()
564 public void mouseClicked(MouseEvent e)
566 if (e.getClickCount() > 1)
568 defaultBrowser_mouseClicked(e);
572 useProxy.setFont(verdana11);
573 useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
574 useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
575 useProxy.setText(MessageManager.getString("label.use_proxy_server"));
576 useProxy.addActionListener(new ActionListener()
578 public void actionPerformed(ActionEvent e)
580 useProxy_actionPerformed();
583 jPanel1.setBorder(titledBorder1);
584 jPanel1.setLayout(gridBagLayout1);
585 sortby.setFont(verdana11);
586 sortby.setBounds(new Rectangle(172, 249, 155, 21));
587 sortLabel.setFont(verdana11);
588 sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
589 sortLabel.setText(MessageManager.getString("label.sort_by"));
590 jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
591 jPanel2.setLayout(gridLayout2);
592 gridLayout2.setRows(12);
593 exportTab.setLayout(null);
594 epsLabel.setFont(verdana11);
595 epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
596 epsLabel.setText(MessageManager.getString("label.eps_rendering_style"));
597 epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
598 epsRendering.setFont(verdana11);
599 epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
600 jLabel1.setFont(verdana11);
601 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
602 jLabel1.setText(MessageManager.getString("label.append_start_end"));
603 jLabel1.setFont(verdana11);
604 fastajv.setFont(verdana11);
605 fastajv.setHorizontalAlignment(SwingConstants.LEFT);
606 clustaljv.setText(MessageManager.getString("label.clustal") + " ");
607 blcjv.setText(MessageManager.getString("label.blc") + " ");
608 fastajv.setText(MessageManager.getString("label.fasta") + " ");
609 msfjv.setText(MessageManager.getString("label.msf")+ " ");
610 pfamjv.setText(MessageManager.getString("label.pfam") + " ");
611 pileupjv.setText(MessageManager.getString("label.pileup") + " ");
612 msfjv.setFont(verdana11);
613 msfjv.setHorizontalAlignment(SwingConstants.LEFT);
614 pirjv.setText(MessageManager.getString("label.pir") + " ");
615 jPanel11.setFont(verdana11);
616 jPanel11.setBorder(titledBorder2);
617 jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
618 jPanel11.setLayout(gridLayout3);
619 blcjv.setFont(verdana11);
620 blcjv.setHorizontalAlignment(SwingConstants.LEFT);
621 clustaljv.setFont(verdana11);
622 clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
623 pfamjv.setFont(verdana11);
624 pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
625 pileupjv.setFont(verdana11);
626 pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
627 pirjv.setFont(verdana11);
628 pirjv.setHorizontalAlignment(SwingConstants.LEFT);
629 seqLimit.setFont(verdana11);
630 seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
631 seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
632 seqLimit.setText(MessageManager.getString("label.full_sequence_id"));
633 gridLayout3.setRows(8);
634 smoothFont.setFont(verdana11);
635 smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
636 smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
637 smoothFont.setText(MessageManager.getString("label.smooth_font"));
638 calcTab.setLayout(null);
639 autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
640 autoCalculateConsCheck.setText(MessageManager.getString("label.autocalculate_consensus"));
641 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
642 padGaps.setFont(JvSwingUtils.getLabelFont());
643 padGaps.setText(MessageManager.getString("label.pad_gaps_when_editing"));
644 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
645 sortByTree.setFont(JvSwingUtils.getLabelFont());
646 sortByTree.setText(MessageManager.getString("label.sort_with_new_tree"));
648 .setToolTipText(MessageManager.getString("label.any_trees_calculated_or_loaded_alignment_automatically_sort"));
649 sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
651 autoIdWidth.setFont(JvSwingUtils.getLabelFont());
652 autoIdWidth.setText(MessageManager.getString("label.automatically_set_id_width"));
654 .setToolTipText("<html>"
656 .wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")
658 autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
659 autoIdWidth.addActionListener(new ActionListener()
663 public void actionPerformed(ActionEvent e)
665 autoIdWidth_actionPerformed();
668 userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
669 userIdWidthlabel.setText(MessageManager.getString("label.figure_id_column_width"));
671 .setToolTipText("<html>"
673 .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")
676 .setToolTipText("<html>"
678 .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")
680 userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
681 userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
682 userIdWidth.setText("");
683 userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
684 userIdWidth.addActionListener(new ActionListener()
688 public void actionPerformed(ActionEvent e)
690 userIdWidth_actionPerformed();
693 modellerOutput.setFont(JvSwingUtils.getLabelFont());
694 modellerOutput.setText(MessageManager.getString("label.use_modeller_output"));
695 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
697 dasPanel.setLayout(borderLayout4);
698 wsPanel.setLayout(borderLayout5);
699 wrap.setFont(JvSwingUtils.getLabelFont());
700 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
701 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
702 wrap.setText(MessageManager.getString("label.wrap_alignment"));
703 rightAlign.setFont(JvSwingUtils.getLabelFont());
704 rightAlign.setForeground(Color.black);
705 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
706 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
707 rightAlign.setText(MessageManager.getString("label.right_align_ids"));
708 idItalics.setFont(JvSwingUtils.getLabelFont());
709 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
710 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
711 idItalics.setText(MessageManager.getString("label.sequence_name_italics"));
712 openoverv.setFont(JvSwingUtils.getLabelFont());
713 openoverv.setActionCommand(MessageManager.getString("label.open_overview"));
714 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
715 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
716 openoverv.setText(MessageManager.getString(("label.open_overview")));
717 jPanel2.add(fullScreen);
718 jPanel2.add(openoverv);
719 jPanel2.add(seqLimit);
720 jPanel2.add(rightAlign);
721 jPanel2.add(fontLabel);
722 jPanel2.add(showUnconserved);
723 jPanel2.add(idItalics);
724 jPanel2.add(smoothFont);
725 jPanel2.add(gapLabel);
727 jPanel2.add(sortLabel);
728 jPanel2.add(startupCheckbox);
729 visualTab.add(annotations);
730 visualTab.add(startupFileTextfield);
731 visualTab.add(sortby);
732 visualTab.add(gapSymbolCB);
733 visualTab.add(fontNameCB);
734 visualTab.add(fontSizeCB);
735 visualTab.add(fontStyleCB);
736 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
737 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
738 annsettingsPanel.add(autoAnnotSettings1);
739 annsettingsPanel.add(autoAnnotSettings2);
740 annsettingsPanel.add(autoAnnotSettings3);
741 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
742 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
743 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
744 visualTab.add(annsettingsPanel);
745 Border jb = new EmptyBorder(1, 1, 4, 5);
746 quality.setBorder(jb);
747 conservation.setBorder(jb);
748 identity.setBorder(jb);
749 showConsensbits.setBorder(jb);
750 showGroupbits.setBorder(jb);
751 showGroupConsensus.setBorder(jb);
752 showGroupConservation.setBorder(jb);
753 showConsensHistogram.setBorder(jb);
754 showConsensLogo.setBorder(jb);
756 autoAnnotSettings2.add(conservation);
757 autoAnnotSettings1.add(quality);
758 autoAnnotSettings3.add(identity);
759 autoAnnotSettings1.add(showGroupbits);
760 autoAnnotSettings3.add(showGroupConsensus);
761 autoAnnotSettings2.add(showGroupConservation);
762 autoAnnotSettings1.add(showConsensbits);
763 autoAnnotSettings2.add(showConsensHistogram);
764 autoAnnotSettings3.add(showConsensLogo);
766 JPanel tooltipSettings = new JPanel();
767 tooltipSettings.setBorder(new TitledBorder(MessageManager.getString("label.sequence_id_tooltip")));
768 tooltipSettings.setBounds(173, 130, 200, 62);
769 tooltipSettings.setLayout(new GridLayout(2, 1));
770 tooltipSettings.add(showDbRefTooltip);
771 tooltipSettings.add(showNpTooltip);
772 visualTab.add(tooltipSettings);
773 visualTab.add(jPanel2);
774 JvSwingUtils.addtoLayout(visual2Tab,
775 MessageManager.getString("label.default_colour_scheme_for_alignment"), colourLabel, colour);
776 JPanel annotationShding = new JPanel();
777 annotationShding.setBorder(new TitledBorder(
778 MessageManager.getString("label.annotation_shading_default")));
779 annotationShding.setLayout(new GridLayout(1, 2));
780 JvSwingUtils.addtoLayout(annotationShding,
781 MessageManager.getString("label.default_minimum_colour_annotation_shading"),
782 mincolourLabel, minColour);
783 JvSwingUtils.addtoLayout(annotationShding,
784 MessageManager.getString("label.default_maximum_colour_annotation_shading"),
785 maxcolourLabel, maxColour);
786 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
788 // visual2panel.add(minColour);
789 // visual2panel.add(maxColour);
790 // visual2Tab.add(visual2panel);
792 linkPanel.add(editLinkButtons, BorderLayout.EAST);
793 editLinkButtons.add(newLink, null);
794 editLinkButtons.add(editLink, null);
795 editLinkButtons.add(deleteLink, null);
796 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
797 linkScrollPane.getViewport().add(linkPanel2, null);
798 linkPanel2.add(linkURLList, BorderLayout.CENTER);
799 linkPanel2.add(linkNameList, BorderLayout.WEST);
800 okCancelPanel.add(ok);
801 okCancelPanel.add(cancel);
802 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
804 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
805 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
806 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
808 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
809 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
811 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
812 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
813 16, 0, 0, 12), 359, -17));
814 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
815 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
816 21, 0, 35, 12), 4, 6));
817 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
818 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
819 new Insets(16, 0, 0, 0), 5, 1));
820 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
821 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
822 new Insets(0, 2, 4, 2), 54, 1));
823 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
824 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
825 new Insets(0, 2, 4, 0), 263, 1));
826 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
827 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
828 new Insets(15, 0, 0, 15), 307, 1));
829 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
830 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
831 new Insets(0, 2, 4, 2), 70, 1));
832 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
833 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
834 new Insets(0, 2, 4, 2), 70, 1));
835 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
836 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
837 new Insets(0, 2, 4, 2), 70, 1));
839 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
840 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
842 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
843 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
844 gapSymbolCB.setRenderer(dlcr);
846 tabbedPane.add(visualTab, MessageManager.getString("label.visual"));
847 tabbedPane.add(visual2Tab, MessageManager.getString("label.colours"));
848 tabbedPane.add(connectTab, MessageManager.getString("label.connections"));
849 tabbedPane.add(exportTab, MessageManager.getString("label.output"));
850 jPanel11.add(jLabel1);
852 jPanel11.add(clustaljv);
853 jPanel11.add(fastajv);
855 jPanel11.add(pfamjv);
856 jPanel11.add(pileupjv);
858 exportTab.add(autoIdWidth);
859 exportTab.add(userIdWidth);
860 exportTab.add(userIdWidthlabel);
861 exportTab.add(modellerOutput);
862 tabbedPane.add(calcTab, MessageManager.getString("label.editing"));
863 calcTab.add(autoCalculateConsCheck);
864 calcTab.add(padGaps);
865 calcTab.add(sortByTree);
867 tabbedPane.add(dasPanel, MessageManager.getString("label.das_settings"));
868 tabbedPane.add(wsPanel, MessageManager.getString("label.web_services"));
870 exportTab.add(epsLabel);
871 exportTab.add(epsRendering);
872 exportTab.add(jPanel11);
875 protected void autoIdWidth_actionPerformed()
877 // TODO Auto-generated method stub
881 protected void userIdWidth_actionPerformed()
883 // TODO Auto-generated method stub
887 protected void maxColour_actionPerformed()
889 // TODO Auto-generated method stub
893 protected void minColour_actionPerformed()
895 // TODO Auto-generated method stub
899 protected void showunconserved_actionPerformed(ActionEvent e)
901 // TODO Auto-generated method stub
911 public void ok_actionPerformed(ActionEvent e)
921 public void cancel_actionPerformed(ActionEvent e)
931 public void annotations_actionPerformed(ActionEvent e)
938 public void startupFileTextfield_mouseClicked()
942 public void newLink_actionPerformed(ActionEvent e)
947 public void editLink_actionPerformed(ActionEvent e)
952 public void deleteLink_actionPerformed(ActionEvent e)
957 public void defaultBrowser_mouseClicked(MouseEvent e)
962 public void linkURLList_keyTyped(KeyEvent e)
967 public void useProxy_actionPerformed()
969 proxyServerTB.setEnabled(useProxy.isSelected());
970 proxyPortTB.setEnabled(useProxy.isSelected());