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<String> colour = new JComboBox<String>();
105 JLabel colourLabel = new JLabel();
107 JLabel fontLabel = new JLabel();
109 protected JComboBox<String> fontSizeCB = new JComboBox<String>();
111 protected JComboBox<String> fontStyleCB = new JComboBox<String>();
113 protected JComboBox<String> fontNameCB = new JComboBox<String>();
115 protected JComboBox<String> gapSymbolCB = new JComboBox<String>();
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<String> sortby = new JComboBox<String>();
177 JLabel sortLabel = new JLabel();
179 protected JComboBox<String> sortAnnBy = new JComboBox<String>();
181 protected JComboBox<String> sortAutocalc = new JComboBox<String>();
183 JLabel sortAnnLabel = new JLabel();
185 JPanel jPanel2 = new JPanel();
187 JPanel visual2panel = new JPanel();
189 GridLayout gridLayout2 = new GridLayout();
191 GridLayout gridLayout4 = new GridLayout();
193 JPanel annsettingsPanel = new JPanel();
195 JPanel autoAnnotSettings1 = new JPanel();
197 JPanel autoAnnotSettings2 = new JPanel();
199 JPanel autoAnnotSettings3 = new JPanel();
201 JPanel exportTab = new JPanel();
203 JLabel epsLabel = new JLabel();
205 protected JComboBox<String> epsRendering = new JComboBox<String>();
207 protected JLabel userIdWidthlabel = new JLabel();
209 protected JCheckBox autoIdWidth = new JCheckBox();
211 protected JTextField userIdWidth = new JTextField();
213 JLabel jLabel1 = new JLabel();
215 protected JCheckBox blcjv = new JCheckBox();
217 protected JCheckBox pileupjv = new JCheckBox();
219 protected JCheckBox clustaljv = new JCheckBox();
221 protected JCheckBox msfjv = new JCheckBox();
223 protected JCheckBox fastajv = new JCheckBox();
225 protected JCheckBox pfamjv = new JCheckBox();
227 FlowLayout flowLayout1 = new FlowLayout();
229 protected JCheckBox pirjv = new JCheckBox();
231 JPanel jPanel11 = new JPanel();
233 Font verdana11 = JvSwingUtils.getLabelFont();
235 protected JCheckBox seqLimit = new JCheckBox();
237 GridLayout gridLayout3 = new GridLayout();
239 protected JCheckBox smoothFont = new JCheckBox();
241 JPanel calcTab = new JPanel();
243 protected JCheckBox autoCalculateConsCheck = new JCheckBox();
245 protected JCheckBox padGaps = new JCheckBox();
247 protected JCheckBox modellerOutput = new JCheckBox();
249 protected JPanel dasPanel = new JPanel();
251 BorderLayout borderLayout4 = new BorderLayout();
253 protected JPanel wsPanel = new JPanel();
255 BorderLayout borderLayout5 = new BorderLayout();
257 protected JCheckBox wrap = new JCheckBox();
259 protected JCheckBox rightAlign = new JCheckBox();
261 protected JCheckBox showUnconserved = new JCheckBox();
263 protected JCheckBox showDbRefTooltip = new JCheckBox();
265 protected JCheckBox showNpTooltip = new JCheckBox();
267 protected JCheckBox idItalics = new JCheckBox();
269 protected JCheckBox openoverv = new JCheckBox();
271 protected JCheckBox usagestats = new JCheckBox();
273 protected JCheckBox questionnaire = new JCheckBox();
275 protected JCheckBox versioncheck = new JCheckBox();
277 protected JLabel showGroupbits = new JLabel();
279 protected JLabel showConsensbits = new JLabel();
281 protected JCheckBox showConsensLogo = new JCheckBox();
283 protected JCheckBox showConsensHistogram = new JCheckBox();
285 protected JCheckBox showGroupConsensus = new JCheckBox();
287 protected JCheckBox showGroupConservation = new JCheckBox();
289 protected JCheckBox shareSelections = new JCheckBox();
291 protected JCheckBox followHighlight = new JCheckBox();
293 protected JCheckBox sortByTree = new JCheckBox();
296 * Creates a new GPreferences object.
298 public GPreferences()
303 } catch (Exception ex)
305 ex.printStackTrace();
315 private void jbInit() throws Exception
317 this.setLayout(borderLayout1);
318 ok.setText(MessageManager.getString("action.ok"));
319 ok.addActionListener(new ActionListener()
321 public void actionPerformed(ActionEvent e)
323 ok_actionPerformed(e);
326 cancel.setText(MessageManager.getString("action.cancel"));
327 cancel.addActionListener(new ActionListener()
329 public void actionPerformed(ActionEvent e)
331 cancel_actionPerformed(e);
334 quality.setEnabled(false);
335 quality.setFont(verdana11);
336 quality.setHorizontalAlignment(SwingConstants.RIGHT);
337 quality.setHorizontalTextPosition(SwingConstants.LEFT);
338 quality.setSelected(true);
339 quality.setText(MessageManager.getString("label.quality"));
340 visualTab.setBorder(new TitledBorder(MessageManager
341 .getString("action.open_new_aligmnent")));
342 visualTab.setLayout(null);
343 visual2Tab.setBorder(new TitledBorder(MessageManager
344 .getString("action.open_new_aligmnent")));
345 visual2Tab.setLayout(new FlowLayout());
346 fullScreen.setFont(verdana11);
347 fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
348 fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
349 fullScreen.setText(MessageManager.getString("label.maximize_window"));
350 conservation.setEnabled(false);
351 conservation.setFont(verdana11);
352 conservation.setHorizontalAlignment(SwingConstants.RIGHT);
353 conservation.setHorizontalTextPosition(SwingConstants.LEFT);
354 conservation.setSelected(true);
355 conservation.setText(MessageManager.getString("label.conservation"));
356 identity.setEnabled(false);
357 identity.setFont(verdana11);
358 identity.setHorizontalAlignment(SwingConstants.RIGHT);
359 identity.setHorizontalTextPosition(SwingConstants.LEFT);
360 identity.setSelected(true);
361 identity.setText(MessageManager.getString("label.consensus"));
362 showGroupbits.setFont(verdana11);
363 showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
364 showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
365 showGroupbits.setText(MessageManager.getString("action.show_group")
367 showConsensbits.setFont(verdana11);
368 showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
369 showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
370 showConsensbits.setText(MessageManager.getString("label.consensus")
372 showConsensHistogram.setEnabled(false);
373 showConsensHistogram.setFont(verdana11);
374 showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
375 showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
376 showConsensHistogram.setSelected(true);
377 showConsensHistogram.setText(MessageManager
378 .getString("label.histogram"));
379 showConsensLogo.setEnabled(false);
380 showConsensLogo.setFont(verdana11);
381 showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
382 showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
383 showConsensLogo.setSelected(true);
384 showConsensLogo.setText(MessageManager.getString("label.logo"));
385 showGroupConsensus.setEnabled(false);
386 showGroupConsensus.setFont(verdana11);
387 showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
388 showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
389 showGroupConsensus.setSelected(true);
390 showGroupConsensus.setText(MessageManager.getString("label.consensus"));
391 showGroupConservation.setEnabled(false);
392 showGroupConservation.setFont(verdana11);
393 showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
394 showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
395 showGroupConservation.setSelected(true);
396 showGroupConservation.setText(MessageManager
397 .getString("label.conservation"));
398 showNpTooltip.setEnabled(true);
399 showNpTooltip.setFont(verdana11);
400 showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
401 showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
402 showNpTooltip.setSelected(true);
403 showNpTooltip.setText(MessageManager
404 .getString("label.non_positional_features"));
405 showDbRefTooltip.setEnabled(true);
406 showDbRefTooltip.setFont(verdana11);
407 showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
408 showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
409 showDbRefTooltip.setSelected(true);
410 showDbRefTooltip.setText(MessageManager
411 .getString("label.database_references"));
412 annotations.setFont(verdana11);
413 annotations.setHorizontalAlignment(SwingConstants.RIGHT);
414 annotations.setHorizontalTextPosition(SwingConstants.LEADING);
415 annotations.setSelected(true);
416 annotations.setText(MessageManager.getString("label.show_annotations"));
417 annotations.setBounds(new Rectangle(169, 12, 200, 23));
418 annotations.addActionListener(new ActionListener()
420 public void actionPerformed(ActionEvent e)
422 annotations_actionPerformed(e);
425 identity.addActionListener(new ActionListener()
427 public void actionPerformed(ActionEvent e)
429 annotations_actionPerformed(e);
432 showGroupConsensus.addActionListener(new ActionListener()
434 public void actionPerformed(ActionEvent e)
436 annotations_actionPerformed(e);
439 showUnconserved.setFont(verdana11);
440 showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
441 showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
442 showUnconserved.setSelected(true);
443 showUnconserved.setText(MessageManager
444 .getString("action.show_unconserved"));
445 showUnconserved.addActionListener(new ActionListener()
447 public void actionPerformed(ActionEvent e)
449 showunconserved_actionPerformed(e);
452 // / TODO: fit these in to preferences panel!!!!!
453 shareSelections.setFont(verdana11);
454 shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
455 shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
456 shareSelections.setSelected(true);
457 shareSelections.setText(MessageManager
458 .getString("label.share_selection_across_views"));
459 followHighlight.setFont(verdana11);
460 followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
461 followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
462 // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
463 followHighlight.setSelected(true);
464 followHighlight.setText(MessageManager
465 .getString("label.scroll_highlighted_regions"));
467 gapLabel.setFont(verdana11);
468 gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
469 gapLabel.setText(MessageManager.getString("label.gap_symbol") + " ");
470 colour.setFont(verdana11);
471 colour.setBounds(new Rectangle(172, 225, 155, 21));
472 colourLabel.setFont(verdana11);
473 colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
474 colourLabel.setText(MessageManager.getString("label.alignment_colour")
476 fontLabel.setFont(verdana11);
477 fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
478 fontLabel.setText(MessageManager.getString("label.font"));
479 fontSizeCB.setFont(verdana11);
480 fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
481 fontStyleCB.setFont(verdana11);
482 fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
483 fontNameCB.setFont(verdana11);
484 fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
485 gapSymbolCB.setFont(verdana11);
486 gapSymbolCB.setBounds(new Rectangle(172, 196, 69, 23));
487 mincolourLabel.setFont(verdana11);
488 mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
489 mincolourLabel.setText(MessageManager.getString("label.min_colour"));
490 minColour.setFont(verdana11);
491 minColour.setBorder(BorderFactory.createEtchedBorder());
492 minColour.setPreferredSize(new Dimension(40, 20));
493 minColour.addMouseListener(new MouseAdapter()
495 public void mousePressed(MouseEvent e)
497 minColour_actionPerformed();
500 maxcolourLabel.setFont(verdana11);
501 maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
502 maxcolourLabel.setText(MessageManager.getString("label.max_colour"));
503 maxColour.setFont(verdana11);
504 maxColour.setBorder(BorderFactory.createEtchedBorder());
505 maxColour.setPreferredSize(new Dimension(40, 20));
506 maxColour.addMouseListener(new MouseAdapter()
508 public void mousePressed(MouseEvent e)
510 maxColour_actionPerformed();
514 startupCheckbox.setText(MessageManager.getString("action.open_file"));
515 startupCheckbox.setFont(verdana11);
516 startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
517 startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
518 startupCheckbox.setSelected(true);
519 startupFileTextfield.setFont(verdana11);
520 startupFileTextfield.setBounds(new Rectangle(172, 287, 270, 20));
521 startupFileTextfield.addMouseListener(new MouseAdapter()
523 public void mouseClicked(MouseEvent e)
525 if (e.getClickCount() > 1)
527 startupFileTextfield_mouseClicked();
532 connectTab.setLayout(gridBagLayout3);
533 serverLabel.setText(MessageManager.getString("label.address"));
534 serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
535 serverLabel.setFont(verdana11);
536 proxyServerTB.setFont(verdana11);
537 proxyPortTB.setFont(verdana11);
538 portLabel.setFont(verdana11);
539 portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
540 portLabel.setText(MessageManager.getString("label.port"));
541 browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
542 browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
543 browserLabel.setText(MessageManager
544 .getString("label.default_browser_unix"));
545 defaultBrowser.setFont(verdana11);
546 defaultBrowser.setText("");
547 usagestats.setText(MessageManager
548 .getString("label.send_usage_statistics"));
549 usagestats.setFont(verdana11);
550 usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
551 usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
552 questionnaire.setText(MessageManager
553 .getString("label.check_for_questionnaires"));
554 questionnaire.setFont(verdana11);
555 questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
556 questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
557 versioncheck.setText(MessageManager
558 .getString("label.check_for_latest_version"));
559 versioncheck.setFont(verdana11);
560 versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
561 versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
562 newLink.setText(MessageManager.getString("action.new"));
563 newLink.addActionListener(new java.awt.event.ActionListener()
565 public void actionPerformed(ActionEvent e)
567 newLink_actionPerformed(e);
570 editLink.setText(MessageManager.getString("action.edit"));
571 editLink.addActionListener(new java.awt.event.ActionListener()
573 public void actionPerformed(ActionEvent e)
575 editLink_actionPerformed(e);
578 deleteLink.setText(MessageManager.getString("action.delete"));
579 deleteLink.addActionListener(new java.awt.event.ActionListener()
581 public void actionPerformed(ActionEvent e)
583 deleteLink_actionPerformed(e);
587 linkURLList.addListSelectionListener(new ListSelectionListener()
589 public void valueChanged(ListSelectionEvent e)
591 int index = linkURLList.getSelectedIndex();
592 linkNameList.setSelectedIndex(index);
596 linkNameList.addListSelectionListener(new ListSelectionListener()
598 public void valueChanged(ListSelectionEvent e)
600 int index = linkNameList.getSelectedIndex();
601 linkURLList.setSelectedIndex(index);
605 linkScrollPane.setBorder(null);
606 linkPanel.setBorder(new TitledBorder(MessageManager
607 .getString("label.url_linkfrom_sequence_id")));
608 linkPanel.setLayout(borderLayout2);
609 editLinkButtons.setLayout(gridLayout1);
610 gridLayout1.setRows(3);
611 linkNameList.setFont(verdana11);
612 linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
613 linkPanel2.setLayout(borderLayout3);
614 linkURLList.setFont(verdana11);
615 linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
617 defaultBrowser.addMouseListener(new MouseAdapter()
619 public void mouseClicked(MouseEvent e)
621 if (e.getClickCount() > 1)
623 defaultBrowser_mouseClicked(e);
627 useProxy.setFont(verdana11);
628 useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
629 useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
630 useProxy.setText(MessageManager.getString("label.use_proxy_server"));
631 useProxy.addActionListener(new ActionListener()
633 public void actionPerformed(ActionEvent e)
635 useProxy_actionPerformed();
638 jPanel1.setBorder(titledBorder1);
639 jPanel1.setLayout(gridBagLayout1);
640 sortby.setFont(verdana11);
641 sortby.setBounds(new Rectangle(172, 240, 155, 21));
642 sortLabel.setFont(verdana11);
643 sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
644 sortLabel.setText(MessageManager.getString("label.sort_by"));
645 sortAnnBy.setFont(verdana11);
646 sortAnnBy.setBounds(new Rectangle(172, 264, 120, 21));
647 sortAnnLabel.setFont(verdana11);
648 sortAnnLabel.setHorizontalAlignment(SwingConstants.RIGHT);
649 sortAnnLabel.setText(MessageManager.getString("label.sort_ann_by"));
650 sortAutocalc.setFont(verdana11);
651 sortAutocalc.setBounds(new Rectangle(300, 264, 185, 21));
652 jPanel2.setBounds(new Rectangle(7, 17, 158, 297));
653 jPanel2.setLayout(gridLayout2);
654 gridLayout2.setRows(13);
655 exportTab.setLayout(null);
656 epsLabel.setFont(verdana11);
657 epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
658 epsLabel.setText(MessageManager.getString("label.eps_rendering_style"));
659 epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
660 epsRendering.setFont(verdana11);
661 epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
662 jLabel1.setFont(verdana11);
663 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
664 jLabel1.setText(MessageManager.getString("label.append_start_end"));
665 jLabel1.setFont(verdana11);
666 fastajv.setFont(verdana11);
667 fastajv.setHorizontalAlignment(SwingConstants.LEFT);
668 clustaljv.setText(MessageManager.getString("label.clustal") + " ");
669 blcjv.setText(MessageManager.getString("label.blc") + " ");
670 fastajv.setText(MessageManager.getString("label.fasta") + " ");
671 msfjv.setText(MessageManager.getString("label.msf") + " ");
672 pfamjv.setText(MessageManager.getString("label.pfam") + " ");
673 pileupjv.setText(MessageManager.getString("label.pileup") + " ");
674 msfjv.setFont(verdana11);
675 msfjv.setHorizontalAlignment(SwingConstants.LEFT);
676 pirjv.setText(MessageManager.getString("label.pir") + " ");
677 jPanel11.setFont(verdana11);
678 jPanel11.setBorder(titledBorder2);
679 jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
680 jPanel11.setLayout(gridLayout3);
681 blcjv.setFont(verdana11);
682 blcjv.setHorizontalAlignment(SwingConstants.LEFT);
683 clustaljv.setFont(verdana11);
684 clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
685 pfamjv.setFont(verdana11);
686 pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
687 pileupjv.setFont(verdana11);
688 pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
689 pirjv.setFont(verdana11);
690 pirjv.setHorizontalAlignment(SwingConstants.LEFT);
691 seqLimit.setFont(verdana11);
692 seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
693 seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
694 seqLimit.setText(MessageManager.getString("label.full_sequence_id"));
695 gridLayout3.setRows(8);
696 smoothFont.setFont(verdana11);
697 smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
698 smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
699 smoothFont.setText(MessageManager.getString("label.smooth_font"));
700 calcTab.setLayout(null);
701 autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
702 autoCalculateConsCheck.setText(MessageManager
703 .getString("label.autocalculate_consensus"));
704 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
705 padGaps.setFont(JvSwingUtils.getLabelFont());
706 padGaps.setText(MessageManager.getString("label.pad_gaps_when_editing"));
707 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
708 sortByTree.setFont(JvSwingUtils.getLabelFont());
710 .setText(MessageManager.getString("label.sort_with_new_tree"));
712 .setToolTipText(MessageManager
713 .getString("label.any_trees_calculated_or_loaded_alignment_automatically_sort"));
714 sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
716 autoIdWidth.setFont(JvSwingUtils.getLabelFont());
717 autoIdWidth.setText(MessageManager
718 .getString("label.automatically_set_id_width"));
720 .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.adjusts_width_generated_eps_png")));
721 autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
722 autoIdWidth.addActionListener(new ActionListener()
726 public void actionPerformed(ActionEvent e)
728 autoIdWidth_actionPerformed();
731 userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
732 userIdWidthlabel.setText(MessageManager
733 .getString("label.figure_id_column_width"));
735 .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.manually_specify_width_left_column")));
737 .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.manually_specify_width_left_column")));
738 userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
739 userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
740 userIdWidth.setText("");
741 userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
742 userIdWidth.addActionListener(new ActionListener()
746 public void actionPerformed(ActionEvent e)
748 userIdWidth_actionPerformed();
751 modellerOutput.setFont(JvSwingUtils.getLabelFont());
752 modellerOutput.setText(MessageManager
753 .getString("label.use_modeller_output"));
754 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
756 dasPanel.setLayout(borderLayout4);
757 wsPanel.setLayout(borderLayout5);
758 wrap.setFont(JvSwingUtils.getLabelFont());
759 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
760 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
761 wrap.setText(MessageManager.getString("label.wrap_alignment"));
762 rightAlign.setFont(JvSwingUtils.getLabelFont());
763 rightAlign.setForeground(Color.black);
764 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
765 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
766 rightAlign.setText(MessageManager.getString("label.right_align_ids"));
767 idItalics.setFont(JvSwingUtils.getLabelFont());
768 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
769 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
770 idItalics.setText(MessageManager
771 .getString("label.sequence_name_italics"));
772 openoverv.setFont(JvSwingUtils.getLabelFont());
773 openoverv.setActionCommand(MessageManager
774 .getString("label.open_overview"));
775 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
776 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
777 openoverv.setText(MessageManager.getString(("label.open_overview")));
778 jPanel2.add(fullScreen);
779 jPanel2.add(openoverv);
780 jPanel2.add(seqLimit);
781 jPanel2.add(rightAlign);
782 jPanel2.add(fontLabel);
783 jPanel2.add(showUnconserved);
784 jPanel2.add(idItalics);
785 jPanel2.add(smoothFont);
786 jPanel2.add(gapLabel);
788 jPanel2.add(sortLabel);
789 jPanel2.add(sortAnnLabel);
790 jPanel2.add(startupCheckbox);
791 visualTab.add(annotations);
792 visualTab.add(startupFileTextfield);
793 visualTab.add(sortby);
794 visualTab.add(sortAnnBy);
795 visualTab.add(sortAutocalc);
796 visualTab.add(gapSymbolCB);
797 visualTab.add(fontNameCB);
798 visualTab.add(fontSizeCB);
799 visualTab.add(fontStyleCB);
800 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
801 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
802 annsettingsPanel.add(autoAnnotSettings1);
803 annsettingsPanel.add(autoAnnotSettings2);
804 annsettingsPanel.add(autoAnnotSettings3);
805 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
806 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
807 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
808 visualTab.add(annsettingsPanel);
809 Border jb = new EmptyBorder(1, 1, 4, 5);
810 quality.setBorder(jb);
811 conservation.setBorder(jb);
812 identity.setBorder(jb);
813 showConsensbits.setBorder(jb);
814 showGroupbits.setBorder(jb);
815 showGroupConsensus.setBorder(jb);
816 showGroupConservation.setBorder(jb);
817 showConsensHistogram.setBorder(jb);
818 showConsensLogo.setBorder(jb);
820 autoAnnotSettings2.add(conservation);
821 autoAnnotSettings1.add(quality);
822 autoAnnotSettings3.add(identity);
823 autoAnnotSettings1.add(showGroupbits);
824 autoAnnotSettings3.add(showGroupConsensus);
825 autoAnnotSettings2.add(showGroupConservation);
826 autoAnnotSettings1.add(showConsensbits);
827 autoAnnotSettings2.add(showConsensHistogram);
828 autoAnnotSettings3.add(showConsensLogo);
830 JPanel tooltipSettings = new JPanel();
831 tooltipSettings.setBorder(new TitledBorder(MessageManager
832 .getString("label.sequence_id_tooltip")));
833 tooltipSettings.setBounds(173, 130, 200, 62);
834 tooltipSettings.setLayout(new GridLayout(2, 1));
835 tooltipSettings.add(showDbRefTooltip);
836 tooltipSettings.add(showNpTooltip);
837 visualTab.add(tooltipSettings);
838 visualTab.add(jPanel2);
839 JvSwingUtils.addtoLayout(visual2Tab, MessageManager
840 .getString("label.default_colour_scheme_for_alignment"),
841 colourLabel, colour);
842 JPanel annotationShding = new JPanel();
843 annotationShding.setBorder(new TitledBorder(MessageManager
844 .getString("label.annotation_shading_default")));
845 annotationShding.setLayout(new GridLayout(1, 2));
846 JvSwingUtils.addtoLayout(annotationShding, MessageManager
847 .getString("label.default_minimum_colour_annotation_shading"),
848 mincolourLabel, minColour);
849 JvSwingUtils.addtoLayout(annotationShding, MessageManager
850 .getString("label.default_maximum_colour_annotation_shading"),
851 maxcolourLabel, maxColour);
852 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
854 // visual2panel.add(minColour);
855 // visual2panel.add(maxColour);
856 // visual2Tab.add(visual2panel);
858 linkPanel.add(editLinkButtons, BorderLayout.EAST);
859 editLinkButtons.add(newLink, null);
860 editLinkButtons.add(editLink, null);
861 editLinkButtons.add(deleteLink, null);
862 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
863 linkScrollPane.getViewport().add(linkPanel2, null);
864 linkPanel2.add(linkURLList, BorderLayout.CENTER);
865 linkPanel2.add(linkNameList, BorderLayout.WEST);
866 okCancelPanel.add(ok);
867 okCancelPanel.add(cancel);
868 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
870 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
871 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
872 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
874 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
875 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
877 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
878 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
879 16, 0, 0, 12), 359, -17));
880 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
881 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
882 21, 0, 35, 12), 4, 6));
883 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
884 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
885 new Insets(16, 0, 0, 0), 5, 1));
886 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
887 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
888 new Insets(0, 2, 4, 2), 54, 1));
889 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
890 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
891 new Insets(0, 2, 4, 0), 263, 1));
892 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
893 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
894 new Insets(15, 0, 0, 15), 307, 1));
895 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
896 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
897 new Insets(0, 2, 4, 2), 70, 1));
898 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
899 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
900 new Insets(0, 2, 4, 2), 70, 1));
901 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
902 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
903 new Insets(0, 2, 4, 2), 70, 1));
905 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
906 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
908 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
909 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
910 gapSymbolCB.setRenderer(dlcr);
912 tabbedPane.add(visualTab, MessageManager.getString("label.visual"));
913 tabbedPane.add(visual2Tab, MessageManager.getString("label.colours"));
914 tabbedPane.add(connectTab,
915 MessageManager.getString("label.connections"));
916 tabbedPane.add(exportTab, MessageManager.getString("label.output"));
917 jPanel11.add(jLabel1);
919 jPanel11.add(clustaljv);
920 jPanel11.add(fastajv);
922 jPanel11.add(pfamjv);
923 jPanel11.add(pileupjv);
925 exportTab.add(autoIdWidth);
926 exportTab.add(userIdWidth);
927 exportTab.add(userIdWidthlabel);
928 exportTab.add(modellerOutput);
929 tabbedPane.add(calcTab, MessageManager.getString("label.editing"));
930 calcTab.add(autoCalculateConsCheck);
931 calcTab.add(padGaps);
932 calcTab.add(sortByTree);
935 .add(dasPanel, MessageManager.getString("label.das_settings"));
936 tabbedPane.add(wsPanel, MessageManager.getString("label.web_services"));
938 exportTab.add(epsLabel);
939 exportTab.add(epsRendering);
940 exportTab.add(jPanel11);
943 protected void autoIdWidth_actionPerformed()
945 // TODO Auto-generated method stub
949 protected void userIdWidth_actionPerformed()
951 // TODO Auto-generated method stub
955 protected void maxColour_actionPerformed()
957 // TODO Auto-generated method stub
961 protected void minColour_actionPerformed()
963 // TODO Auto-generated method stub
967 protected void showunconserved_actionPerformed(ActionEvent e)
969 // TODO Auto-generated method stub
979 public void ok_actionPerformed(ActionEvent e)
989 public void cancel_actionPerformed(ActionEvent e)
999 public void annotations_actionPerformed(ActionEvent e)
1006 public void startupFileTextfield_mouseClicked()
1010 public void newLink_actionPerformed(ActionEvent e)
1015 public void editLink_actionPerformed(ActionEvent e)
1020 public void deleteLink_actionPerformed(ActionEvent e)
1025 public void defaultBrowser_mouseClicked(MouseEvent e)
1030 public void linkURLList_keyTyped(KeyEvent e)
1035 public void useProxy_actionPerformed()
1037 proxyServerTB.setEnabled(useProxy.isSelected());
1038 proxyPortTB.setEnabled(useProxy.isSelected());