2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3 * Copyright (C) 2014 The Jalview Authors
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
10 * of the License, or (at your option) any later version.
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.
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.
21 package jalview.jbgui;
23 import jalview.gui.JvSwingUtils;
24 import jalview.util.MessageManager;
26 import java.awt.BorderLayout;
27 import java.awt.Color;
28 import java.awt.Dimension;
29 import java.awt.FlowLayout;
31 import java.awt.GridBagConstraints;
32 import java.awt.GridBagLayout;
33 import java.awt.GridLayout;
34 import java.awt.Insets;
35 import java.awt.Rectangle;
36 import java.awt.event.ActionEvent;
37 import java.awt.event.ActionListener;
38 import java.awt.event.KeyEvent;
39 import java.awt.event.MouseAdapter;
40 import java.awt.event.MouseEvent;
42 import javax.swing.BorderFactory;
43 import javax.swing.DefaultListCellRenderer;
44 import javax.swing.JButton;
45 import javax.swing.JCheckBox;
46 import javax.swing.JComboBox;
47 import javax.swing.JLabel;
48 import javax.swing.JList;
49 import javax.swing.JPanel;
50 import javax.swing.JScrollPane;
51 import javax.swing.JTabbedPane;
52 import javax.swing.JTextField;
53 import javax.swing.ListSelectionModel;
54 import javax.swing.SwingConstants;
55 import javax.swing.border.Border;
56 import javax.swing.border.EmptyBorder;
57 import javax.swing.border.TitledBorder;
58 import javax.swing.event.ListSelectionEvent;
59 import javax.swing.event.ListSelectionListener;
67 public class GPreferences extends JPanel
69 JTabbedPane tabbedPane = new JTabbedPane();
71 JButton ok = new JButton();
73 JButton cancel = new JButton();
75 JPanel okCancelPanel = new JPanel();
77 BorderLayout borderLayout1 = new BorderLayout();
79 protected JCheckBox quality = new JCheckBox();
81 JPanel visualTab = new JPanel();
83 JPanel visual2Tab = new JPanel();
85 protected JCheckBox fullScreen = new JCheckBox();
87 protected JCheckBox conservation = new JCheckBox();
89 protected JCheckBox identity = new JCheckBox();
91 protected JCheckBox annotations = new JCheckBox();
93 protected JPanel minColour = new JPanel();
95 JLabel mincolourLabel = new JLabel();
97 protected JPanel maxColour = new JPanel();
99 JLabel maxcolourLabel = new JLabel();
101 JLabel gapLabel = new JLabel();
103 protected JComboBox colour = new JComboBox();
105 JLabel colourLabel = new JLabel();
107 JLabel fontLabel = new JLabel();
109 protected JComboBox fontSizeCB = new JComboBox();
111 protected JComboBox fontStyleCB = new JComboBox();
113 protected JComboBox fontNameCB = new JComboBox();
115 protected JComboBox gapSymbolCB = new JComboBox();
117 protected JCheckBox startupCheckbox = new JCheckBox();
119 protected JTextField startupFileTextfield = new JTextField();
121 JPanel connectTab = new JPanel();
123 JLabel serverLabel = new JLabel();
125 protected JList linkURLList = new JList();
127 protected JTextField proxyServerTB = new JTextField();
129 protected JTextField proxyPortTB = new JTextField();
131 JLabel portLabel = new JLabel();
133 JLabel browserLabel = new JLabel();
135 protected JTextField defaultBrowser = new JTextField();
137 JButton newLink = new JButton();
139 JButton editLink = new JButton();
141 JButton deleteLink = new JButton();
143 JScrollPane linkScrollPane = new JScrollPane();
145 JPanel linkPanel = new JPanel();
147 BorderLayout borderLayout2 = new BorderLayout();
149 JPanel editLinkButtons = new JPanel();
151 GridLayout gridLayout1 = new GridLayout();
153 protected JList linkNameList = new JList();
155 JPanel linkPanel2 = new JPanel();
157 BorderLayout borderLayout3 = new BorderLayout();
159 protected JCheckBox useProxy = new JCheckBox();
161 JPanel jPanel1 = new JPanel();
163 TitledBorder titledBorder1 = new TitledBorder(
164 MessageManager.getString("label.proxy_server"));
166 TitledBorder titledBorder2 = new TitledBorder(
167 MessageManager.getString("label.file_output"));
169 GridBagLayout gridBagLayout2 = new GridBagLayout();
171 GridBagLayout gridBagLayout1 = new GridBagLayout();
173 GridBagLayout gridBagLayout3 = new GridBagLayout();
175 protected JComboBox sortby = new JComboBox();
177 JLabel sortLabel = new JLabel();
179 JPanel jPanel2 = new JPanel();
181 JPanel visual2panel = new JPanel();
183 GridLayout gridLayout2 = new GridLayout();
185 GridLayout gridLayout4 = new GridLayout();
187 JPanel annsettingsPanel = new JPanel();
189 JPanel autoAnnotSettings1 = new JPanel();
191 JPanel autoAnnotSettings2 = new JPanel();
193 JPanel autoAnnotSettings3 = new JPanel();
195 JPanel exportTab = new JPanel();
197 JLabel epsLabel = new JLabel();
199 protected JComboBox epsRendering = new JComboBox();
201 protected JLabel userIdWidthlabel = new JLabel();
203 protected JCheckBox autoIdWidth = new JCheckBox();
205 protected JTextField userIdWidth = new JTextField();
207 JLabel jLabel1 = new JLabel();
209 protected JCheckBox blcjv = new JCheckBox();
211 protected JCheckBox pileupjv = new JCheckBox();
213 protected JCheckBox clustaljv = new JCheckBox();
215 protected JCheckBox megajv = new JCheckBox();
217 protected JCheckBox msfjv = new JCheckBox();
219 protected JCheckBox fastajv = new JCheckBox();
221 protected JCheckBox pfamjv = new JCheckBox();
223 FlowLayout flowLayout1 = new FlowLayout();
225 protected JCheckBox pirjv = new JCheckBox();
227 JPanel jPanel11 = new JPanel();
229 Font verdana11 = JvSwingUtils.getLabelFont();
231 protected JCheckBox seqLimit = new JCheckBox();
233 GridLayout gridLayout3 = new GridLayout();
235 protected JCheckBox smoothFont = new JCheckBox();
237 JPanel calcTab = new JPanel();
239 protected JCheckBox autoCalculateConsCheck = new JCheckBox();
241 protected JCheckBox padGaps = new JCheckBox();
243 protected JCheckBox modellerOutput = new JCheckBox();
245 protected JPanel dasPanel = new JPanel();
247 BorderLayout borderLayout4 = new BorderLayout();
249 protected JPanel wsPanel = new JPanel();
251 BorderLayout borderLayout5 = new BorderLayout();
253 protected JCheckBox wrap = new JCheckBox();
255 protected JCheckBox rightAlign = new JCheckBox();
257 protected JCheckBox showUnconserved = new JCheckBox();
259 protected JCheckBox showDbRefTooltip = new JCheckBox();
261 protected JCheckBox showNpTooltip = new JCheckBox();
263 protected JCheckBox idItalics = new JCheckBox();
265 protected JCheckBox openoverv = new JCheckBox();
267 protected JCheckBox usagestats = new JCheckBox();
269 protected JCheckBox questionnaire = new JCheckBox();
271 protected JCheckBox versioncheck = new JCheckBox();
273 protected JLabel showGroupbits = new JLabel();
275 protected JLabel showConsensbits = new JLabel();
277 protected JCheckBox showConsensLogo = new JCheckBox();
279 protected JCheckBox showConsensHistogram = new JCheckBox();
281 protected JCheckBox showGroupConsensus = new JCheckBox();
283 protected JCheckBox showGroupConservation = new JCheckBox();
285 protected JCheckBox shareSelections = new JCheckBox();
287 protected JCheckBox followHighlight = new JCheckBox();
289 protected JCheckBox sortByTree = new JCheckBox();
292 * Creates a new GPreferences object.
294 public GPreferences()
299 } catch (Exception ex)
301 ex.printStackTrace();
311 private void jbInit() throws Exception
313 this.setLayout(borderLayout1);
314 ok.setText(MessageManager.getString("action.ok"));
315 ok.addActionListener(new ActionListener()
318 public void actionPerformed(ActionEvent e)
320 ok_actionPerformed(e);
323 cancel.setText(MessageManager.getString("action.cancel"));
324 cancel.addActionListener(new ActionListener()
327 public void actionPerformed(ActionEvent e)
329 cancel_actionPerformed(e);
332 quality.setEnabled(false);
333 quality.setFont(verdana11);
334 quality.setHorizontalAlignment(SwingConstants.RIGHT);
335 quality.setHorizontalTextPosition(SwingConstants.LEFT);
336 quality.setSelected(true);
337 quality.setText(MessageManager.getString("label.quality"));
338 visualTab.setBorder(new TitledBorder(MessageManager
339 .getString("action.open_new_aligmnent")));
340 visualTab.setLayout(null);
341 visual2Tab.setBorder(new TitledBorder(MessageManager
342 .getString("action.open_new_aligmnent")));
343 visual2Tab.setLayout(new FlowLayout());
344 fullScreen.setFont(verdana11);
345 fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
346 fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
347 fullScreen.setText(MessageManager.getString("label.maximize_window"));
348 conservation.setEnabled(false);
349 conservation.setFont(verdana11);
350 conservation.setHorizontalAlignment(SwingConstants.RIGHT);
351 conservation.setHorizontalTextPosition(SwingConstants.LEFT);
352 conservation.setSelected(true);
353 conservation.setText(MessageManager.getString("label.conservation"));
354 identity.setEnabled(false);
355 identity.setFont(verdana11);
356 identity.setHorizontalAlignment(SwingConstants.RIGHT);
357 identity.setHorizontalTextPosition(SwingConstants.LEFT);
358 identity.setSelected(true);
359 identity.setText(MessageManager.getString("label.consensus"));
360 showGroupbits.setFont(verdana11);
361 showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
362 showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
363 showGroupbits.setText(MessageManager.getString("action.show_group")
365 showConsensbits.setFont(verdana11);
366 showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
367 showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
368 showConsensbits.setText(MessageManager.getString("label.consensus")
370 showConsensHistogram.setEnabled(false);
371 showConsensHistogram.setFont(verdana11);
372 showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
373 showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
374 showConsensHistogram.setSelected(true);
375 showConsensHistogram.setText(MessageManager
376 .getString("label.histogram"));
377 showConsensLogo.setEnabled(false);
378 showConsensLogo.setFont(verdana11);
379 showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
380 showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
381 showConsensLogo.setSelected(true);
382 showConsensLogo.setText(MessageManager.getString("label.logo"));
383 showGroupConsensus.setEnabled(false);
384 showGroupConsensus.setFont(verdana11);
385 showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
386 showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
387 showGroupConsensus.setSelected(true);
388 showGroupConsensus.setText(MessageManager.getString("label.consensus"));
389 showGroupConservation.setEnabled(false);
390 showGroupConservation.setFont(verdana11);
391 showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
392 showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
393 showGroupConservation.setSelected(true);
394 showGroupConservation.setText(MessageManager
395 .getString("label.conservation"));
396 showNpTooltip.setEnabled(true);
397 showNpTooltip.setFont(verdana11);
398 showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
399 showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
400 showNpTooltip.setSelected(true);
401 showNpTooltip.setText(MessageManager
402 .getString("label.non_positional_features"));
403 showDbRefTooltip.setEnabled(true);
404 showDbRefTooltip.setFont(verdana11);
405 showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
406 showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
407 showDbRefTooltip.setSelected(true);
408 showDbRefTooltip.setText(MessageManager
409 .getString("label.database_references"));
410 annotations.setFont(verdana11);
411 annotations.setHorizontalAlignment(SwingConstants.RIGHT);
412 annotations.setHorizontalTextPosition(SwingConstants.LEADING);
413 annotations.setSelected(true);
414 annotations.setText(MessageManager.getString("label.show_annotations"));
415 annotations.setBounds(new Rectangle(169, 12, 200, 23));
416 annotations.addActionListener(new ActionListener()
419 public void actionPerformed(ActionEvent e)
421 annotations_actionPerformed(e);
424 identity.addActionListener(new ActionListener()
427 public void actionPerformed(ActionEvent e)
429 annotations_actionPerformed(e);
432 showGroupConsensus.addActionListener(new ActionListener()
435 public void actionPerformed(ActionEvent e)
437 annotations_actionPerformed(e);
440 showUnconserved.setFont(verdana11);
441 showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
442 showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
443 showUnconserved.setSelected(true);
444 showUnconserved.setText(MessageManager
445 .getString("action.show_unconserved"));
446 showUnconserved.addActionListener(new ActionListener()
449 public void actionPerformed(ActionEvent e)
451 showunconserved_actionPerformed(e);
454 // / TODO: fit these in to preferences panel!!!!!
455 shareSelections.setFont(verdana11);
456 shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
457 shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
458 shareSelections.setSelected(true);
459 shareSelections.setText(MessageManager
460 .getString("label.share_selection_across_views"));
461 followHighlight.setFont(verdana11);
462 followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
463 followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
464 // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
465 followHighlight.setSelected(true);
466 followHighlight.setText(MessageManager
467 .getString("label.scroll_highlighted_regions"));
469 gapLabel.setFont(verdana11);
470 gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
471 gapLabel.setText(MessageManager.getString("label.gap_symbol") + " ");
472 colour.setFont(verdana11);
473 colour.setBounds(new Rectangle(172, 225, 155, 21));
474 colourLabel.setFont(verdana11);
475 colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
476 colourLabel.setText(MessageManager.getString("label.alignment_colour")
478 fontLabel.setFont(verdana11);
479 fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
480 fontLabel.setText(MessageManager.getString("label.font"));
481 fontSizeCB.setFont(verdana11);
482 fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
483 fontStyleCB.setFont(verdana11);
484 fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
485 fontNameCB.setFont(verdana11);
486 fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
487 gapSymbolCB.setFont(verdana11);
488 gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
489 mincolourLabel.setFont(verdana11);
490 mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
491 mincolourLabel.setText(MessageManager.getString("label.min_colour"));
492 minColour.setFont(verdana11);
493 minColour.setBorder(BorderFactory.createEtchedBorder());
494 minColour.setPreferredSize(new Dimension(40, 20));
495 minColour.addMouseListener(new MouseAdapter()
498 public void mousePressed(MouseEvent e)
500 minColour_actionPerformed();
503 maxcolourLabel.setFont(verdana11);
504 maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
505 maxcolourLabel.setText(MessageManager.getString("label.max_colour"));
506 maxColour.setFont(verdana11);
507 maxColour.setBorder(BorderFactory.createEtchedBorder());
508 maxColour.setPreferredSize(new Dimension(40, 20));
509 maxColour.addMouseListener(new MouseAdapter()
512 public void mousePressed(MouseEvent e)
514 maxColour_actionPerformed();
518 startupCheckbox.setText(MessageManager.getString("action.open_file"));
519 startupCheckbox.setFont(verdana11);
520 startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
521 startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
522 startupCheckbox.setSelected(true);
523 startupFileTextfield.setFont(verdana11);
524 startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
525 startupFileTextfield.addMouseListener(new MouseAdapter()
528 public void mouseClicked(MouseEvent e)
530 if (e.getClickCount() > 1)
532 startupFileTextfield_mouseClicked();
537 connectTab.setLayout(gridBagLayout3);
538 serverLabel.setText(MessageManager.getString("label.address"));
539 serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
540 serverLabel.setFont(verdana11);
541 proxyServerTB.setFont(verdana11);
542 proxyPortTB.setFont(verdana11);
543 portLabel.setFont(verdana11);
544 portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
545 portLabel.setText(MessageManager.getString("label.port"));
546 browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
547 browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
548 browserLabel.setText(MessageManager
549 .getString("label.default_browser_unix"));
550 defaultBrowser.setFont(verdana11);
551 defaultBrowser.setText("");
552 usagestats.setText(MessageManager
553 .getString("label.send_usage_statistics"));
554 usagestats.setFont(verdana11);
555 usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
556 usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
557 questionnaire.setText(MessageManager
558 .getString("label.check_for_questionnaires"));
559 questionnaire.setFont(verdana11);
560 questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
561 questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
562 versioncheck.setText(MessageManager
563 .getString("label.check_for_latest_version"));
564 versioncheck.setFont(verdana11);
565 versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
566 versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
567 newLink.setText(MessageManager.getString("action.new"));
568 newLink.addActionListener(new java.awt.event.ActionListener()
571 public void actionPerformed(ActionEvent e)
573 newLink_actionPerformed(e);
576 editLink.setText(MessageManager.getString("action.edit"));
577 editLink.addActionListener(new java.awt.event.ActionListener()
580 public void actionPerformed(ActionEvent e)
582 editLink_actionPerformed(e);
585 deleteLink.setText(MessageManager.getString("action.delete"));
586 deleteLink.addActionListener(new java.awt.event.ActionListener()
589 public void actionPerformed(ActionEvent e)
591 deleteLink_actionPerformed(e);
595 linkURLList.addListSelectionListener(new ListSelectionListener()
598 public void valueChanged(ListSelectionEvent e)
600 int index = linkURLList.getSelectedIndex();
601 linkNameList.setSelectedIndex(index);
605 linkNameList.addListSelectionListener(new ListSelectionListener()
608 public void valueChanged(ListSelectionEvent e)
610 int index = linkNameList.getSelectedIndex();
611 linkURLList.setSelectedIndex(index);
615 linkScrollPane.setBorder(null);
616 linkPanel.setBorder(new TitledBorder(MessageManager
617 .getString("label.url_linkfrom_sequence_id")));
618 linkPanel.setLayout(borderLayout2);
619 editLinkButtons.setLayout(gridLayout1);
620 gridLayout1.setRows(3);
621 linkNameList.setFont(verdana11);
622 linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
623 linkPanel2.setLayout(borderLayout3);
624 linkURLList.setFont(verdana11);
625 linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
627 defaultBrowser.addMouseListener(new MouseAdapter()
630 public void mouseClicked(MouseEvent e)
632 if (e.getClickCount() > 1)
634 defaultBrowser_mouseClicked(e);
638 useProxy.setFont(verdana11);
639 useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
640 useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
641 useProxy.setText(MessageManager.getString("label.use_proxy_server"));
642 useProxy.addActionListener(new ActionListener()
645 public void actionPerformed(ActionEvent e)
647 useProxy_actionPerformed();
650 jPanel1.setBorder(titledBorder1);
651 jPanel1.setLayout(gridBagLayout1);
652 sortby.setFont(verdana11);
653 sortby.setBounds(new Rectangle(172, 249, 155, 21));
654 sortLabel.setFont(verdana11);
655 sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
656 sortLabel.setText(MessageManager.getString("label.sort_by"));
657 jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
658 jPanel2.setLayout(gridLayout2);
659 gridLayout2.setRows(12);
660 exportTab.setLayout(null);
661 epsLabel.setFont(verdana11);
662 epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
663 epsLabel.setText(MessageManager.getString("label.eps_rendering_style"));
664 epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
665 epsRendering.setFont(verdana11);
666 epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
667 jLabel1.setFont(verdana11);
668 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
669 jLabel1.setText(MessageManager.getString("label.append_start_end"));
670 jLabel1.setFont(verdana11);
671 fastajv.setFont(verdana11);
672 fastajv.setHorizontalAlignment(SwingConstants.LEFT);
673 clustaljv.setText(MessageManager.getString("label.clustal") + " ");
674 blcjv.setText(MessageManager.getString("label.blc") + " ");
675 fastajv.setText(MessageManager.getString("label.fasta") + " ");
676 msfjv.setText(MessageManager.getString("label.msf") + " ");
677 pfamjv.setText(MessageManager.getString("label.pfam") + " ");
678 pileupjv.setText(MessageManager.getString("label.pileup") + " ");
679 msfjv.setFont(verdana11);
680 msfjv.setHorizontalAlignment(SwingConstants.LEFT);
681 pirjv.setText(MessageManager.getString("label.pir") + " ");
682 jPanel11.setFont(verdana11);
683 jPanel11.setBorder(titledBorder2);
684 jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
685 jPanel11.setLayout(gridLayout3);
686 blcjv.setFont(verdana11);
687 blcjv.setHorizontalAlignment(SwingConstants.LEFT);
688 clustaljv.setFont(verdana11);
689 clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
690 pfamjv.setFont(verdana11);
691 pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
692 pileupjv.setFont(verdana11);
693 pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
694 pirjv.setFont(verdana11);
695 pirjv.setHorizontalAlignment(SwingConstants.LEFT);
696 seqLimit.setFont(verdana11);
697 seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
698 seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
699 seqLimit.setText(MessageManager.getString("label.full_sequence_id"));
700 gridLayout3.setRows(8);
701 smoothFont.setFont(verdana11);
702 smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
703 smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
704 smoothFont.setText(MessageManager.getString("label.smooth_font"));
705 calcTab.setLayout(null);
706 autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
707 autoCalculateConsCheck.setText(MessageManager
708 .getString("label.autocalculate_consensus"));
709 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
710 padGaps.setFont(JvSwingUtils.getLabelFont());
711 padGaps.setText(MessageManager.getString("label.pad_gaps_when_editing"));
712 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
713 sortByTree.setFont(JvSwingUtils.getLabelFont());
715 .setText(MessageManager.getString("label.sort_with_new_tree"));
717 .setToolTipText(MessageManager
718 .getString("label.any_trees_calculated_or_loaded_alignment_automatically_sort"));
719 sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
721 autoIdWidth.setFont(JvSwingUtils.getLabelFont());
722 autoIdWidth.setText(MessageManager
723 .getString("label.automatically_set_id_width"));
725 .setToolTipText("<html>"
727 .wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")
729 autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
730 autoIdWidth.addActionListener(new ActionListener()
734 public void actionPerformed(ActionEvent e)
736 autoIdWidth_actionPerformed();
739 userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
740 userIdWidthlabel.setText(MessageManager
741 .getString("label.figure_id_column_width"));
743 .setToolTipText("<html>"
745 .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")
748 .setToolTipText("<html>"
750 .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")
752 userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
753 userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
754 userIdWidth.setText("");
755 userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
756 userIdWidth.addActionListener(new ActionListener()
760 public void actionPerformed(ActionEvent e)
762 userIdWidth_actionPerformed();
765 modellerOutput.setFont(JvSwingUtils.getLabelFont());
766 modellerOutput.setText(MessageManager
767 .getString("label.use_modeller_output"));
768 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
770 dasPanel.setLayout(borderLayout4);
771 wsPanel.setLayout(borderLayout5);
772 wrap.setFont(JvSwingUtils.getLabelFont());
773 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
774 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
775 wrap.setText(MessageManager.getString("label.wrap_alignment"));
776 rightAlign.setFont(JvSwingUtils.getLabelFont());
777 rightAlign.setForeground(Color.black);
778 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
779 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
780 rightAlign.setText(MessageManager.getString("label.right_align_ids"));
781 idItalics.setFont(JvSwingUtils.getLabelFont());
782 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
783 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
784 idItalics.setText(MessageManager
785 .getString("label.sequence_name_italics"));
786 openoverv.setFont(JvSwingUtils.getLabelFont());
787 openoverv.setActionCommand(MessageManager
788 .getString("label.open_overview"));
789 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
790 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
791 openoverv.setText(MessageManager.getString(("label.open_overview")));
792 jPanel2.add(fullScreen);
793 jPanel2.add(openoverv);
794 jPanel2.add(seqLimit);
795 jPanel2.add(rightAlign);
796 jPanel2.add(fontLabel);
797 jPanel2.add(showUnconserved);
798 jPanel2.add(idItalics);
799 jPanel2.add(smoothFont);
800 jPanel2.add(gapLabel);
802 jPanel2.add(sortLabel);
803 jPanel2.add(startupCheckbox);
804 visualTab.add(annotations);
805 visualTab.add(startupFileTextfield);
806 visualTab.add(sortby);
807 visualTab.add(gapSymbolCB);
808 visualTab.add(fontNameCB);
809 visualTab.add(fontSizeCB);
810 visualTab.add(fontStyleCB);
811 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
812 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
813 annsettingsPanel.add(autoAnnotSettings1);
814 annsettingsPanel.add(autoAnnotSettings2);
815 annsettingsPanel.add(autoAnnotSettings3);
816 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
817 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
818 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
819 visualTab.add(annsettingsPanel);
820 Border jb = new EmptyBorder(1, 1, 4, 5);
821 quality.setBorder(jb);
822 conservation.setBorder(jb);
823 identity.setBorder(jb);
824 showConsensbits.setBorder(jb);
825 showGroupbits.setBorder(jb);
826 showGroupConsensus.setBorder(jb);
827 showGroupConservation.setBorder(jb);
828 showConsensHistogram.setBorder(jb);
829 showConsensLogo.setBorder(jb);
831 autoAnnotSettings2.add(conservation);
832 autoAnnotSettings1.add(quality);
833 autoAnnotSettings3.add(identity);
834 autoAnnotSettings1.add(showGroupbits);
835 autoAnnotSettings3.add(showGroupConsensus);
836 autoAnnotSettings2.add(showGroupConservation);
837 autoAnnotSettings1.add(showConsensbits);
838 autoAnnotSettings2.add(showConsensHistogram);
839 autoAnnotSettings3.add(showConsensLogo);
841 JPanel tooltipSettings = new JPanel();
842 tooltipSettings.setBorder(new TitledBorder(MessageManager
843 .getString("label.sequence_id_tooltip")));
844 tooltipSettings.setBounds(173, 130, 200, 62);
845 tooltipSettings.setLayout(new GridLayout(2, 1));
846 tooltipSettings.add(showDbRefTooltip);
847 tooltipSettings.add(showNpTooltip);
848 visualTab.add(tooltipSettings);
849 visualTab.add(jPanel2);
850 JvSwingUtils.addtoLayout(visual2Tab, MessageManager
851 .getString("label.default_colour_scheme_for_alignment"),
852 colourLabel, colour);
853 JPanel annotationShding = new JPanel();
854 annotationShding.setBorder(new TitledBorder(MessageManager
855 .getString("label.annotation_shading_default")));
856 annotationShding.setLayout(new GridLayout(1, 2));
857 JvSwingUtils.addtoLayout(annotationShding, MessageManager
858 .getString("label.default_minimum_colour_annotation_shading"),
859 mincolourLabel, minColour);
860 JvSwingUtils.addtoLayout(annotationShding, MessageManager
861 .getString("label.default_maximum_colour_annotation_shading"),
862 maxcolourLabel, maxColour);
863 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
865 // visual2panel.add(minColour);
866 // visual2panel.add(maxColour);
867 // visual2Tab.add(visual2panel);
869 linkPanel.add(editLinkButtons, BorderLayout.EAST);
870 editLinkButtons.add(newLink, null);
871 editLinkButtons.add(editLink, null);
872 editLinkButtons.add(deleteLink, null);
873 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
874 linkScrollPane.getViewport().add(linkPanel2, null);
875 linkPanel2.add(linkURLList, BorderLayout.CENTER);
876 linkPanel2.add(linkNameList, BorderLayout.WEST);
877 okCancelPanel.add(ok);
878 okCancelPanel.add(cancel);
879 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
881 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
882 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
883 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
885 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
886 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
888 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
889 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
890 16, 0, 0, 12), 359, -17));
891 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
892 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
893 21, 0, 35, 12), 4, 6));
894 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
895 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
896 new Insets(16, 0, 0, 0), 5, 1));
897 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
898 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
899 new Insets(0, 2, 4, 2), 54, 1));
900 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
901 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
902 new Insets(0, 2, 4, 0), 263, 1));
903 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
904 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
905 new Insets(15, 0, 0, 15), 307, 1));
906 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
907 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
908 new Insets(0, 2, 4, 2), 70, 1));
909 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
910 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
911 new Insets(0, 2, 4, 2), 70, 1));
912 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
913 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
914 new Insets(0, 2, 4, 2), 70, 1));
916 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
917 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
919 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
920 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
921 gapSymbolCB.setRenderer(dlcr);
923 tabbedPane.add(visualTab, MessageManager.getString("label.visual"));
924 tabbedPane.add(visual2Tab, MessageManager.getString("label.colours"));
925 tabbedPane.add(connectTab,
926 MessageManager.getString("label.connections"));
927 tabbedPane.add(exportTab, MessageManager.getString("label.output"));
928 jPanel11.add(jLabel1);
930 jPanel11.add(clustaljv);
931 jPanel11.add(fastajv);
933 jPanel11.add(pfamjv);
934 jPanel11.add(pileupjv);
936 exportTab.add(autoIdWidth);
937 exportTab.add(userIdWidth);
938 exportTab.add(userIdWidthlabel);
939 exportTab.add(modellerOutput);
940 tabbedPane.add(calcTab, MessageManager.getString("label.editing"));
941 calcTab.add(autoCalculateConsCheck);
942 calcTab.add(padGaps);
943 calcTab.add(sortByTree);
946 .add(dasPanel, MessageManager.getString("label.das_settings"));
947 tabbedPane.add(wsPanel, MessageManager.getString("label.web_services"));
949 exportTab.add(epsLabel);
950 exportTab.add(epsRendering);
951 exportTab.add(jPanel11);
954 protected void autoIdWidth_actionPerformed()
956 // TODO Auto-generated method stub
960 protected void userIdWidth_actionPerformed()
962 // TODO Auto-generated method stub
966 protected void maxColour_actionPerformed()
968 // TODO Auto-generated method stub
972 protected void minColour_actionPerformed()
974 // TODO Auto-generated method stub
978 protected void showunconserved_actionPerformed(ActionEvent e)
980 // TODO Auto-generated method stub
990 public void ok_actionPerformed(ActionEvent e)
1000 public void cancel_actionPerformed(ActionEvent e)
1010 public void annotations_actionPerformed(ActionEvent e)
1017 public void startupFileTextfield_mouseClicked()
1021 public void newLink_actionPerformed(ActionEvent e)
1026 public void editLink_actionPerformed(ActionEvent e)
1031 public void deleteLink_actionPerformed(ActionEvent e)
1036 public void defaultBrowser_mouseClicked(MouseEvent e)
1041 public void linkURLList_keyTyped(KeyEvent e)
1046 public void useProxy_actionPerformed()
1048 proxyServerTB.setEnabled(useProxy.isSelected());
1049 proxyPortTB.setEnabled(useProxy.isSelected());