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;
27 import java.awt.event.*;
30 import javax.swing.border.*;
31 import javax.swing.event.*;
32 import java.awt.Rectangle;
40 public class GPreferences extends JPanel
42 JTabbedPane tabbedPane = new JTabbedPane();
44 JButton ok = new JButton();
46 JButton cancel = new JButton();
48 JPanel okCancelPanel = new JPanel();
50 BorderLayout borderLayout1 = new BorderLayout();
52 protected JCheckBox quality = new JCheckBox();
54 JPanel visualTab = new JPanel();
56 JPanel visual2Tab = new JPanel();
58 protected JCheckBox fullScreen = new JCheckBox();
60 protected JCheckBox conservation = new JCheckBox();
62 protected JCheckBox identity = new JCheckBox();
64 protected JCheckBox annotations = new JCheckBox();
66 protected JPanel minColour = new JPanel();
68 JLabel mincolourLabel = new JLabel();
70 protected JPanel maxColour = new JPanel();
72 JLabel maxcolourLabel = new JLabel();
74 JLabel gapLabel = new JLabel();
76 protected JComboBox colour = new JComboBox();
78 JLabel colourLabel = new JLabel();
80 JLabel fontLabel = new JLabel();
82 protected JComboBox fontSizeCB = new JComboBox();
84 protected JComboBox fontStyleCB = new JComboBox();
86 protected JComboBox fontNameCB = new JComboBox();
88 protected JComboBox gapSymbolCB = new JComboBox();
90 protected JCheckBox startupCheckbox = new JCheckBox();
92 protected JTextField startupFileTextfield = new JTextField();
94 JPanel connectTab = new JPanel();
96 JLabel serverLabel = new JLabel();
98 protected JList linkURLList = new JList();
100 protected JTextField proxyServerTB = new JTextField();
102 protected JTextField proxyPortTB = new JTextField();
104 JLabel portLabel = new JLabel();
106 JLabel browserLabel = new JLabel();
108 protected JTextField defaultBrowser = new JTextField();
110 JButton newLink = new JButton();
112 JButton editLink = new JButton();
114 JButton deleteLink = new JButton();
116 JScrollPane linkScrollPane = new JScrollPane();
118 JPanel linkPanel = new JPanel();
120 BorderLayout borderLayout2 = new BorderLayout();
122 JPanel editLinkButtons = new JPanel();
124 GridLayout gridLayout1 = new GridLayout();
126 protected JList linkNameList = new JList();
128 JPanel linkPanel2 = new JPanel();
130 BorderLayout borderLayout3 = new BorderLayout();
132 protected JCheckBox useProxy = new JCheckBox();
134 JPanel jPanel1 = new JPanel();
136 TitledBorder titledBorder1 = new TitledBorder(MessageManager.getString("label.proxy_server"));
138 TitledBorder titledBorder2 = new TitledBorder(MessageManager.getString("label.file_output"));
140 GridBagLayout gridBagLayout2 = new GridBagLayout();
142 GridBagLayout gridBagLayout1 = new GridBagLayout();
144 GridBagLayout gridBagLayout3 = new GridBagLayout();
146 protected JComboBox sortby = new JComboBox();
148 JLabel sortLabel = new JLabel();
150 JPanel jPanel2 = new JPanel();
152 JPanel visual2panel = new JPanel();
154 GridLayout gridLayout2 = new GridLayout();
156 GridLayout gridLayout4 = new GridLayout();
158 JPanel annsettingsPanel = new JPanel();
160 JPanel autoAnnotSettings1 = new JPanel();
162 JPanel autoAnnotSettings2 = new JPanel();
164 JPanel autoAnnotSettings3 = new JPanel();
166 JPanel exportTab = new JPanel();
168 JLabel epsLabel = new JLabel();
170 protected JComboBox epsRendering = new JComboBox();
172 protected JLabel userIdWidthlabel = new JLabel();
174 protected JCheckBox autoIdWidth = new JCheckBox();
176 protected JTextField userIdWidth = new JTextField();
178 JLabel jLabel1 = new JLabel();
180 protected JCheckBox blcjv = new JCheckBox();
182 protected JCheckBox pileupjv = new JCheckBox();
184 protected JCheckBox clustaljv = new JCheckBox();
186 protected JCheckBox msfjv = new JCheckBox();
188 protected JCheckBox fastajv = new JCheckBox();
190 protected JCheckBox pfamjv = new JCheckBox();
192 FlowLayout flowLayout1 = new FlowLayout();
194 protected JCheckBox pirjv = new JCheckBox();
196 JPanel jPanel11 = new JPanel();
198 Font verdana11 = JvSwingUtils.getLabelFont();
200 protected JCheckBox seqLimit = new JCheckBox();
202 GridLayout gridLayout3 = new GridLayout();
204 protected JCheckBox smoothFont = new JCheckBox();
206 JPanel calcTab = new JPanel();
208 protected JCheckBox autoCalculateConsCheck = new JCheckBox();
210 protected JCheckBox padGaps = new JCheckBox();
212 protected JCheckBox modellerOutput = new JCheckBox();
214 protected JPanel dasPanel = new JPanel();
216 BorderLayout borderLayout4 = new BorderLayout();
218 protected JPanel wsPanel = new JPanel();
220 BorderLayout borderLayout5 = new BorderLayout();
222 protected JCheckBox wrap = new JCheckBox();
224 protected JCheckBox rightAlign = new JCheckBox();
226 protected JCheckBox showUnconserved = new JCheckBox();
228 protected JCheckBox showDbRefTooltip = new JCheckBox();
230 protected JCheckBox showNpTooltip = new JCheckBox();
232 protected JCheckBox idItalics = new JCheckBox();
234 protected JCheckBox openoverv = new JCheckBox();
236 protected JCheckBox usagestats = new JCheckBox();
238 protected JCheckBox questionnaire = new JCheckBox();
240 protected JCheckBox versioncheck = new JCheckBox();
242 protected JLabel showGroupbits = new JLabel();
244 protected JLabel showConsensbits = new JLabel();
246 protected JCheckBox showConsensLogo = new JCheckBox();
248 protected JCheckBox showConsensHistogram = new JCheckBox();
250 protected JCheckBox showGroupConsensus = new JCheckBox();
252 protected JCheckBox showGroupConservation = new JCheckBox();
254 protected JCheckBox shareSelections = new JCheckBox();
256 protected JCheckBox followHighlight = new JCheckBox();
258 protected JCheckBox sortByTree = new JCheckBox();
261 * Creates a new GPreferences object.
263 public GPreferences()
268 } catch (Exception ex)
270 ex.printStackTrace();
280 private void jbInit() throws Exception
282 this.setLayout(borderLayout1);
283 ok.setText(MessageManager.getString("action.ok"));
284 ok.addActionListener(new ActionListener()
286 public void actionPerformed(ActionEvent e)
288 ok_actionPerformed(e);
291 cancel.setText(MessageManager.getString("action.cancel"));
292 cancel.addActionListener(new ActionListener()
294 public void actionPerformed(ActionEvent e)
296 cancel_actionPerformed(e);
299 quality.setEnabled(false);
300 quality.setFont(verdana11);
301 quality.setHorizontalAlignment(SwingConstants.RIGHT);
302 quality.setHorizontalTextPosition(SwingConstants.LEFT);
303 quality.setSelected(true);
304 quality.setText(MessageManager.getString("label.quality"));
305 visualTab.setBorder(new TitledBorder(MessageManager.getString("action.open_new_aligmnent")));
306 visualTab.setLayout(null);
307 visual2Tab.setBorder(new TitledBorder(MessageManager.getString("action.open_new_aligmnent")));
308 visual2Tab.setLayout(new FlowLayout());
309 fullScreen.setFont(verdana11);
310 fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
311 fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
312 fullScreen.setText(MessageManager.getString("label.maximize_window"));
313 conservation.setEnabled(false);
314 conservation.setFont(verdana11);
315 conservation.setHorizontalAlignment(SwingConstants.RIGHT);
316 conservation.setHorizontalTextPosition(SwingConstants.LEFT);
317 conservation.setSelected(true);
318 conservation.setText(MessageManager.getString("label.conservation"));
319 identity.setEnabled(false);
320 identity.setFont(verdana11);
321 identity.setHorizontalAlignment(SwingConstants.RIGHT);
322 identity.setHorizontalTextPosition(SwingConstants.LEFT);
323 identity.setSelected(true);
324 identity.setText(MessageManager.getString("label.consensus"));
325 showGroupbits.setFont(verdana11);
326 showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
327 showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
328 showGroupbits.setText(MessageManager.getString("action.show_group") + ":");
329 showConsensbits.setFont(verdana11);
330 showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
331 showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
332 showConsensbits.setText(MessageManager.getString("label.consensus") + ":");
333 showConsensHistogram.setEnabled(false);
334 showConsensHistogram.setFont(verdana11);
335 showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
336 showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
337 showConsensHistogram.setSelected(true);
338 showConsensHistogram.setText(MessageManager.getString("label.histogram"));
339 showConsensLogo.setEnabled(false);
340 showConsensLogo.setFont(verdana11);
341 showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
342 showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
343 showConsensLogo.setSelected(true);
344 showConsensLogo.setText(MessageManager.getString("label.logo"));
345 showGroupConsensus.setEnabled(false);
346 showGroupConsensus.setFont(verdana11);
347 showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
348 showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
349 showGroupConsensus.setSelected(true);
350 showGroupConsensus.setText(MessageManager.getString("label.consensus"));
351 showGroupConservation.setEnabled(false);
352 showGroupConservation.setFont(verdana11);
353 showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
354 showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
355 showGroupConservation.setSelected(true);
356 showGroupConservation.setText(MessageManager.getString("label.conservation"));
357 showNpTooltip.setEnabled(true);
358 showNpTooltip.setFont(verdana11);
359 showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
360 showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
361 showNpTooltip.setSelected(true);
362 showNpTooltip.setText(MessageManager.getString("label.non_positional_features"));
363 showDbRefTooltip.setEnabled(true);
364 showDbRefTooltip.setFont(verdana11);
365 showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
366 showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
367 showDbRefTooltip.setSelected(true);
368 showDbRefTooltip.setText(MessageManager.getString("label.database_references"));
369 annotations.setFont(verdana11);
370 annotations.setHorizontalAlignment(SwingConstants.RIGHT);
371 annotations.setHorizontalTextPosition(SwingConstants.LEADING);
372 annotations.setSelected(true);
373 annotations.setText(MessageManager.getString("label.show_annotations"));
374 annotations.setBounds(new Rectangle(169, 12, 200, 23));
375 annotations.addActionListener(new ActionListener()
377 public void actionPerformed(ActionEvent e)
379 annotations_actionPerformed(e);
382 identity.addActionListener(new ActionListener()
384 public void actionPerformed(ActionEvent e)
386 annotations_actionPerformed(e);
389 showGroupConsensus.addActionListener(new ActionListener()
391 public void actionPerformed(ActionEvent e)
393 annotations_actionPerformed(e);
396 showUnconserved.setFont(verdana11);
397 showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
398 showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
399 showUnconserved.setSelected(true);
400 showUnconserved.setText(MessageManager.getString("action.show_unconserved"));
401 showUnconserved.addActionListener(new ActionListener()
403 public void actionPerformed(ActionEvent e)
405 showunconserved_actionPerformed(e);
408 // / TODO: fit these in to preferences panel!!!!!
409 shareSelections.setFont(verdana11);
410 shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
411 shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
412 shareSelections.setSelected(true);
413 shareSelections.setText(MessageManager.getString("label.share_selection_across_views"));
414 followHighlight.setFont(verdana11);
415 followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
416 followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
417 // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
418 followHighlight.setSelected(true);
419 followHighlight.setText(MessageManager.getString("label.scroll_highlighted_regions"));
421 gapLabel.setFont(verdana11);
422 gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
423 gapLabel.setText(MessageManager.getString("label.gap_symbol") + " ");
424 colour.setFont(verdana11);
425 colour.setBounds(new Rectangle(172, 225, 155, 21));
426 colourLabel.setFont(verdana11);
427 colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
428 colourLabel.setText(MessageManager.getString("label.alignment_colour") + " ");
429 fontLabel.setFont(verdana11);
430 fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
431 fontLabel.setText(MessageManager.getString("label.font"));
432 fontSizeCB.setFont(verdana11);
433 fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
434 fontStyleCB.setFont(verdana11);
435 fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
436 fontNameCB.setFont(verdana11);
437 fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
438 gapSymbolCB.setFont(verdana11);
439 gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
440 mincolourLabel.setFont(verdana11);
441 mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
442 mincolourLabel.setText(MessageManager.getString("label.min_colour"));
443 minColour.setFont(verdana11);
444 minColour.setBorder(BorderFactory.createEtchedBorder());
445 minColour.setPreferredSize(new Dimension(40, 20));
446 minColour.addMouseListener(new MouseAdapter()
448 public void mousePressed(MouseEvent e)
450 minColour_actionPerformed();
453 maxcolourLabel.setFont(verdana11);
454 maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
455 maxcolourLabel.setText(MessageManager.getString("label.max_colour"));
456 maxColour.setFont(verdana11);
457 maxColour.setBorder(BorderFactory.createEtchedBorder());
458 maxColour.setPreferredSize(new Dimension(40, 20));
459 maxColour.addMouseListener(new MouseAdapter()
461 public void mousePressed(MouseEvent e)
463 maxColour_actionPerformed();
467 startupCheckbox.setText(MessageManager.getString("action.open_file"));
468 startupCheckbox.setFont(verdana11);
469 startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
470 startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
471 startupCheckbox.setSelected(true);
472 startupFileTextfield.setFont(verdana11);
473 startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
474 startupFileTextfield.addMouseListener(new MouseAdapter()
476 public void mouseClicked(MouseEvent e)
478 if (e.getClickCount() > 1)
480 startupFileTextfield_mouseClicked();
485 connectTab.setLayout(gridBagLayout3);
486 serverLabel.setText(MessageManager.getString("label.address"));
487 serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
488 serverLabel.setFont(verdana11);
489 proxyServerTB.setFont(verdana11);
490 proxyPortTB.setFont(verdana11);
491 portLabel.setFont(verdana11);
492 portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
493 portLabel.setText(MessageManager.getString("label.port"));
494 browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
495 browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
496 browserLabel.setText(MessageManager.getString("label.default_browser_unix"));
497 defaultBrowser.setFont(verdana11);
498 defaultBrowser.setText("");
499 usagestats.setText(MessageManager.getString("label.send_usage_statistics"));
500 usagestats.setFont(verdana11);
501 usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
502 usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
503 questionnaire.setText(MessageManager.getString("label.check_for_questionnaires"));
504 questionnaire.setFont(verdana11);
505 questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
506 questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
507 versioncheck.setText(MessageManager.getString("label.check_for_latest_version"));
508 versioncheck.setFont(verdana11);
509 versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
510 versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
511 newLink.setText(MessageManager.getString("action.new"));
512 newLink.addActionListener(new java.awt.event.ActionListener()
514 public void actionPerformed(ActionEvent e)
516 newLink_actionPerformed(e);
519 editLink.setText(MessageManager.getString("action.edit"));
520 editLink.addActionListener(new java.awt.event.ActionListener()
522 public void actionPerformed(ActionEvent e)
524 editLink_actionPerformed(e);
527 deleteLink.setText(MessageManager.getString("action.delete"));
528 deleteLink.addActionListener(new java.awt.event.ActionListener()
530 public void actionPerformed(ActionEvent e)
532 deleteLink_actionPerformed(e);
536 linkURLList.addListSelectionListener(new ListSelectionListener()
538 public void valueChanged(ListSelectionEvent e)
540 int index = linkURLList.getSelectedIndex();
541 linkNameList.setSelectedIndex(index);
545 linkNameList.addListSelectionListener(new ListSelectionListener()
547 public void valueChanged(ListSelectionEvent e)
549 int index = linkNameList.getSelectedIndex();
550 linkURLList.setSelectedIndex(index);
554 linkScrollPane.setBorder(null);
555 linkPanel.setBorder(new TitledBorder(MessageManager.getString("label.url_linkfrom_sequence_id")));
556 linkPanel.setLayout(borderLayout2);
557 editLinkButtons.setLayout(gridLayout1);
558 gridLayout1.setRows(3);
559 linkNameList.setFont(verdana11);
560 linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
561 linkPanel2.setLayout(borderLayout3);
562 linkURLList.setFont(verdana11);
563 linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
565 defaultBrowser.addMouseListener(new MouseAdapter()
567 public void mouseClicked(MouseEvent e)
569 if (e.getClickCount() > 1)
571 defaultBrowser_mouseClicked(e);
575 useProxy.setFont(verdana11);
576 useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
577 useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
578 useProxy.setText(MessageManager.getString("label.use_proxy_server"));
579 useProxy.addActionListener(new ActionListener()
581 public void actionPerformed(ActionEvent e)
583 useProxy_actionPerformed();
586 jPanel1.setBorder(titledBorder1);
587 jPanel1.setLayout(gridBagLayout1);
588 sortby.setFont(verdana11);
589 sortby.setBounds(new Rectangle(172, 249, 155, 21));
590 sortLabel.setFont(verdana11);
591 sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
592 sortLabel.setText(MessageManager.getString("label.sort_by"));
593 jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
594 jPanel2.setLayout(gridLayout2);
595 gridLayout2.setRows(12);
596 exportTab.setLayout(null);
597 epsLabel.setFont(verdana11);
598 epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
599 epsLabel.setText(MessageManager.getString("label.eps_rendering_style"));
600 epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
601 epsRendering.setFont(verdana11);
602 epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
603 jLabel1.setFont(verdana11);
604 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
605 jLabel1.setText(MessageManager.getString("label.append_start_end"));
606 jLabel1.setFont(verdana11);
607 fastajv.setFont(verdana11);
608 fastajv.setHorizontalAlignment(SwingConstants.LEFT);
609 clustaljv.setText(MessageManager.getString("label.clustal") + " ");
610 blcjv.setText(MessageManager.getString("label.blc") + " ");
611 fastajv.setText(MessageManager.getString("label.fasta") + " ");
612 msfjv.setText(MessageManager.getString("label.msf")+ " ");
613 pfamjv.setText(MessageManager.getString("label.pfam") + " ");
614 pileupjv.setText(MessageManager.getString("label.pileup") + " ");
615 msfjv.setFont(verdana11);
616 msfjv.setHorizontalAlignment(SwingConstants.LEFT);
617 pirjv.setText(MessageManager.getString("label.pir") + " ");
618 jPanel11.setFont(verdana11);
619 jPanel11.setBorder(titledBorder2);
620 jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
621 jPanel11.setLayout(gridLayout3);
622 blcjv.setFont(verdana11);
623 blcjv.setHorizontalAlignment(SwingConstants.LEFT);
624 clustaljv.setFont(verdana11);
625 clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
626 pfamjv.setFont(verdana11);
627 pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
628 pileupjv.setFont(verdana11);
629 pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
630 pirjv.setFont(verdana11);
631 pirjv.setHorizontalAlignment(SwingConstants.LEFT);
632 seqLimit.setFont(verdana11);
633 seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
634 seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
635 seqLimit.setText(MessageManager.getString("label.full_sequence_id"));
636 gridLayout3.setRows(8);
637 smoothFont.setFont(verdana11);
638 smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
639 smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
640 smoothFont.setText(MessageManager.getString("label.smooth_font"));
641 calcTab.setLayout(null);
642 autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
643 autoCalculateConsCheck.setText(MessageManager.getString("label.autocalculate_consensus"));
644 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
645 padGaps.setFont(JvSwingUtils.getLabelFont());
646 padGaps.setText(MessageManager.getString("label.pad_gaps_when_editing"));
647 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
648 sortByTree.setFont(JvSwingUtils.getLabelFont());
649 sortByTree.setText(MessageManager.getString("label.sort_with_new_tree"));
651 .setToolTipText(MessageManager.getString("label.any_trees_calculated_or_loaded_alignment_automatically_sort"));
652 sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
654 autoIdWidth.setFont(JvSwingUtils.getLabelFont());
655 autoIdWidth.setText(MessageManager.getString("label.automatically_set_id_width"));
657 .setToolTipText("<html>"
659 .wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")
661 autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
662 autoIdWidth.addActionListener(new ActionListener()
666 public void actionPerformed(ActionEvent e)
668 autoIdWidth_actionPerformed();
671 userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
672 userIdWidthlabel.setText(MessageManager.getString("label.figure_id_column_width"));
674 .setToolTipText("<html>"
676 .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")
679 .setToolTipText("<html>"
681 .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")
683 userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
684 userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
685 userIdWidth.setText("");
686 userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
687 userIdWidth.addActionListener(new ActionListener()
691 public void actionPerformed(ActionEvent e)
693 userIdWidth_actionPerformed();
696 modellerOutput.setFont(JvSwingUtils.getLabelFont());
697 modellerOutput.setText(MessageManager.getString("label.use_modeller_output"));
698 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
700 dasPanel.setLayout(borderLayout4);
701 wsPanel.setLayout(borderLayout5);
702 wrap.setFont(JvSwingUtils.getLabelFont());
703 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
704 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
705 wrap.setText(MessageManager.getString("label.wrap_alignment"));
706 rightAlign.setFont(JvSwingUtils.getLabelFont());
707 rightAlign.setForeground(Color.black);
708 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
709 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
710 rightAlign.setText(MessageManager.getString("label.right_align_ids"));
711 idItalics.setFont(JvSwingUtils.getLabelFont());
712 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
713 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
714 idItalics.setText(MessageManager.getString("label.sequence_name_italics"));
715 openoverv.setFont(JvSwingUtils.getLabelFont());
716 openoverv.setActionCommand(MessageManager.getString("label.open_overview"));
717 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
718 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
719 openoverv.setText(MessageManager.getString(("label.open_overview")));
720 jPanel2.add(fullScreen);
721 jPanel2.add(openoverv);
722 jPanel2.add(seqLimit);
723 jPanel2.add(rightAlign);
724 jPanel2.add(fontLabel);
725 jPanel2.add(showUnconserved);
726 jPanel2.add(idItalics);
727 jPanel2.add(smoothFont);
728 jPanel2.add(gapLabel);
730 jPanel2.add(sortLabel);
731 jPanel2.add(startupCheckbox);
732 visualTab.add(annotations);
733 visualTab.add(startupFileTextfield);
734 visualTab.add(sortby);
735 visualTab.add(gapSymbolCB);
736 visualTab.add(fontNameCB);
737 visualTab.add(fontSizeCB);
738 visualTab.add(fontStyleCB);
739 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
740 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
741 annsettingsPanel.add(autoAnnotSettings1);
742 annsettingsPanel.add(autoAnnotSettings2);
743 annsettingsPanel.add(autoAnnotSettings3);
744 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
745 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
746 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
747 visualTab.add(annsettingsPanel);
748 Border jb = new EmptyBorder(1, 1, 4, 5);
749 quality.setBorder(jb);
750 conservation.setBorder(jb);
751 identity.setBorder(jb);
752 showConsensbits.setBorder(jb);
753 showGroupbits.setBorder(jb);
754 showGroupConsensus.setBorder(jb);
755 showGroupConservation.setBorder(jb);
756 showConsensHistogram.setBorder(jb);
757 showConsensLogo.setBorder(jb);
759 autoAnnotSettings2.add(conservation);
760 autoAnnotSettings1.add(quality);
761 autoAnnotSettings3.add(identity);
762 autoAnnotSettings1.add(showGroupbits);
763 autoAnnotSettings3.add(showGroupConsensus);
764 autoAnnotSettings2.add(showGroupConservation);
765 autoAnnotSettings1.add(showConsensbits);
766 autoAnnotSettings2.add(showConsensHistogram);
767 autoAnnotSettings3.add(showConsensLogo);
769 JPanel tooltipSettings = new JPanel();
770 tooltipSettings.setBorder(new TitledBorder(MessageManager.getString("label.sequence_id_tooltip")));
771 tooltipSettings.setBounds(173, 130, 200, 62);
772 tooltipSettings.setLayout(new GridLayout(2, 1));
773 tooltipSettings.add(showDbRefTooltip);
774 tooltipSettings.add(showNpTooltip);
775 visualTab.add(tooltipSettings);
776 visualTab.add(jPanel2);
777 JvSwingUtils.addtoLayout(visual2Tab,
778 MessageManager.getString("label.default_colour_scheme_for_alignment"), colourLabel, colour);
779 JPanel annotationShding = new JPanel();
780 annotationShding.setBorder(new TitledBorder(
781 MessageManager.getString("label.annotation_shading_default")));
782 annotationShding.setLayout(new GridLayout(1, 2));
783 JvSwingUtils.addtoLayout(annotationShding,
784 MessageManager.getString("label.default_minimum_colour_annotation_shading"),
785 mincolourLabel, minColour);
786 JvSwingUtils.addtoLayout(annotationShding,
787 MessageManager.getString("label.default_maximum_colour_annotation_shading"),
788 maxcolourLabel, maxColour);
789 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
791 // visual2panel.add(minColour);
792 // visual2panel.add(maxColour);
793 // visual2Tab.add(visual2panel);
795 linkPanel.add(editLinkButtons, BorderLayout.EAST);
796 editLinkButtons.add(newLink, null);
797 editLinkButtons.add(editLink, null);
798 editLinkButtons.add(deleteLink, null);
799 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
800 linkScrollPane.getViewport().add(linkPanel2, null);
801 linkPanel2.add(linkURLList, BorderLayout.CENTER);
802 linkPanel2.add(linkNameList, BorderLayout.WEST);
803 okCancelPanel.add(ok);
804 okCancelPanel.add(cancel);
805 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
807 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
808 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
809 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
811 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
812 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
814 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
815 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
816 16, 0, 0, 12), 359, -17));
817 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
818 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
819 21, 0, 35, 12), 4, 6));
820 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
821 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
822 new Insets(16, 0, 0, 0), 5, 1));
823 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
824 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
825 new Insets(0, 2, 4, 2), 54, 1));
826 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
827 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
828 new Insets(0, 2, 4, 0), 263, 1));
829 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
830 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
831 new Insets(15, 0, 0, 15), 307, 1));
832 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
833 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
834 new Insets(0, 2, 4, 2), 70, 1));
835 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
836 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
837 new Insets(0, 2, 4, 2), 70, 1));
838 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
839 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
840 new Insets(0, 2, 4, 2), 70, 1));
842 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
843 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
845 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
846 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
847 gapSymbolCB.setRenderer(dlcr);
849 tabbedPane.add(visualTab, MessageManager.getString("label.visual"));
850 tabbedPane.add(visual2Tab, MessageManager.getString("label.colours"));
851 tabbedPane.add(connectTab, MessageManager.getString("label.connections"));
852 tabbedPane.add(exportTab, MessageManager.getString("label.output"));
853 jPanel11.add(jLabel1);
855 jPanel11.add(clustaljv);
856 jPanel11.add(fastajv);
858 jPanel11.add(pfamjv);
859 jPanel11.add(pileupjv);
861 exportTab.add(autoIdWidth);
862 exportTab.add(userIdWidth);
863 exportTab.add(userIdWidthlabel);
864 exportTab.add(modellerOutput);
865 tabbedPane.add(calcTab, MessageManager.getString("label.editing"));
866 calcTab.add(autoCalculateConsCheck);
867 calcTab.add(padGaps);
868 calcTab.add(sortByTree);
870 tabbedPane.add(dasPanel, MessageManager.getString("label.das_settings"));
871 tabbedPane.add(wsPanel, MessageManager.getString("label.web_services"));
873 exportTab.add(epsLabel);
874 exportTab.add(epsRendering);
875 exportTab.add(jPanel11);
878 protected void autoIdWidth_actionPerformed()
880 // TODO Auto-generated method stub
884 protected void userIdWidth_actionPerformed()
886 // TODO Auto-generated method stub
890 protected void maxColour_actionPerformed()
892 // TODO Auto-generated method stub
896 protected void minColour_actionPerformed()
898 // TODO Auto-generated method stub
902 protected void showunconserved_actionPerformed(ActionEvent e)
904 // TODO Auto-generated method stub
914 public void ok_actionPerformed(ActionEvent e)
924 public void cancel_actionPerformed(ActionEvent e)
934 public void annotations_actionPerformed(ActionEvent e)
941 public void startupFileTextfield_mouseClicked()
945 public void newLink_actionPerformed(ActionEvent e)
950 public void editLink_actionPerformed(ActionEvent e)
955 public void deleteLink_actionPerformed(ActionEvent e)
960 public void defaultBrowser_mouseClicked(MouseEvent e)
965 public void linkURLList_keyTyped(KeyEvent e)
970 public void useProxy_actionPerformed()
972 proxyServerTB.setEnabled(useProxy.isSelected());
973 proxyPortTB.setEnabled(useProxy.isSelected());