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(
137 MessageManager.getString("label.proxy_server"));
139 TitledBorder titledBorder2 = new TitledBorder(
140 MessageManager.getString("label.file_output"));
142 GridBagLayout gridBagLayout2 = new GridBagLayout();
144 GridBagLayout gridBagLayout1 = new GridBagLayout();
146 GridBagLayout gridBagLayout3 = new GridBagLayout();
148 protected JComboBox sortby = new JComboBox();
150 JLabel sortLabel = new JLabel();
152 JPanel jPanel2 = new JPanel();
154 JPanel visual2panel = new JPanel();
156 GridLayout gridLayout2 = new GridLayout();
158 GridLayout gridLayout4 = new GridLayout();
160 JPanel annsettingsPanel = new JPanel();
162 JPanel autoAnnotSettings1 = new JPanel();
164 JPanel autoAnnotSettings2 = new JPanel();
166 JPanel autoAnnotSettings3 = new JPanel();
168 JPanel exportTab = new JPanel();
170 JLabel epsLabel = new JLabel();
172 protected JComboBox epsRendering = new JComboBox();
174 protected JLabel userIdWidthlabel = new JLabel();
176 protected JCheckBox autoIdWidth = new JCheckBox();
178 protected JTextField userIdWidth = new JTextField();
180 JLabel jLabel1 = new JLabel();
182 protected JCheckBox blcjv = new JCheckBox();
184 protected JCheckBox pileupjv = new JCheckBox();
186 protected JCheckBox clustaljv = new JCheckBox();
188 protected JCheckBox msfjv = new JCheckBox();
190 protected JCheckBox fastajv = new JCheckBox();
192 protected JCheckBox pfamjv = new JCheckBox();
194 FlowLayout flowLayout1 = new FlowLayout();
196 protected JCheckBox pirjv = new JCheckBox();
198 JPanel jPanel11 = new JPanel();
200 Font verdana11 = JvSwingUtils.getLabelFont();
202 protected JCheckBox seqLimit = new JCheckBox();
204 GridLayout gridLayout3 = new GridLayout();
206 protected JCheckBox smoothFont = new JCheckBox();
208 JPanel calcTab = new JPanel();
210 protected JCheckBox autoCalculateConsCheck = new JCheckBox();
212 protected JCheckBox padGaps = new JCheckBox();
214 protected JCheckBox modellerOutput = new JCheckBox();
216 protected JPanel dasPanel = new JPanel();
218 BorderLayout borderLayout4 = new BorderLayout();
220 protected JPanel wsPanel = new JPanel();
222 BorderLayout borderLayout5 = new BorderLayout();
224 protected JCheckBox wrap = new JCheckBox();
226 protected JCheckBox rightAlign = new JCheckBox();
228 protected JCheckBox showUnconserved = new JCheckBox();
230 protected JCheckBox showDbRefTooltip = new JCheckBox();
232 protected JCheckBox showNpTooltip = new JCheckBox();
234 protected JCheckBox idItalics = new JCheckBox();
236 protected JCheckBox openoverv = new JCheckBox();
238 protected JCheckBox usagestats = new JCheckBox();
240 protected JCheckBox questionnaire = new JCheckBox();
242 protected JCheckBox versioncheck = new JCheckBox();
244 protected JLabel showGroupbits = new JLabel();
246 protected JLabel showConsensbits = new JLabel();
248 protected JCheckBox showConsensLogo = new JCheckBox();
250 protected JCheckBox showConsensHistogram = new JCheckBox();
252 protected JCheckBox showGroupConsensus = new JCheckBox();
254 protected JCheckBox showGroupConservation = new JCheckBox();
256 protected JCheckBox shareSelections = new JCheckBox();
258 protected JCheckBox followHighlight = new JCheckBox();
260 protected JCheckBox sortByTree = new JCheckBox();
263 * Creates a new GPreferences object.
265 public GPreferences()
270 } catch (Exception ex)
272 ex.printStackTrace();
282 private void jbInit() throws Exception
284 this.setLayout(borderLayout1);
285 ok.setText(MessageManager.getString("action.ok"));
286 ok.addActionListener(new ActionListener()
288 public void actionPerformed(ActionEvent e)
290 ok_actionPerformed(e);
293 cancel.setText(MessageManager.getString("action.cancel"));
294 cancel.addActionListener(new ActionListener()
296 public void actionPerformed(ActionEvent e)
298 cancel_actionPerformed(e);
301 quality.setEnabled(false);
302 quality.setFont(verdana11);
303 quality.setHorizontalAlignment(SwingConstants.RIGHT);
304 quality.setHorizontalTextPosition(SwingConstants.LEFT);
305 quality.setSelected(true);
306 quality.setText(MessageManager.getString("label.quality"));
307 visualTab.setBorder(new TitledBorder(MessageManager
308 .getString("action.open_new_aligmnent")));
309 visualTab.setLayout(null);
310 visual2Tab.setBorder(new TitledBorder(MessageManager
311 .getString("action.open_new_aligmnent")));
312 visual2Tab.setLayout(new FlowLayout());
313 fullScreen.setFont(verdana11);
314 fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
315 fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
316 fullScreen.setText(MessageManager.getString("label.maximize_window"));
317 conservation.setEnabled(false);
318 conservation.setFont(verdana11);
319 conservation.setHorizontalAlignment(SwingConstants.RIGHT);
320 conservation.setHorizontalTextPosition(SwingConstants.LEFT);
321 conservation.setSelected(true);
322 conservation.setText(MessageManager.getString("label.conservation"));
323 identity.setEnabled(false);
324 identity.setFont(verdana11);
325 identity.setHorizontalAlignment(SwingConstants.RIGHT);
326 identity.setHorizontalTextPosition(SwingConstants.LEFT);
327 identity.setSelected(true);
328 identity.setText(MessageManager.getString("label.consensus"));
329 showGroupbits.setFont(verdana11);
330 showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
331 showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
332 showGroupbits.setText(MessageManager.getString("action.show_group")
334 showConsensbits.setFont(verdana11);
335 showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
336 showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
337 showConsensbits.setText(MessageManager.getString("label.consensus")
339 showConsensHistogram.setEnabled(false);
340 showConsensHistogram.setFont(verdana11);
341 showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
342 showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
343 showConsensHistogram.setSelected(true);
344 showConsensHistogram.setText(MessageManager
345 .getString("label.histogram"));
346 showConsensLogo.setEnabled(false);
347 showConsensLogo.setFont(verdana11);
348 showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
349 showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
350 showConsensLogo.setSelected(true);
351 showConsensLogo.setText(MessageManager.getString("label.logo"));
352 showGroupConsensus.setEnabled(false);
353 showGroupConsensus.setFont(verdana11);
354 showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
355 showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
356 showGroupConsensus.setSelected(true);
357 showGroupConsensus.setText(MessageManager.getString("label.consensus"));
358 showGroupConservation.setEnabled(false);
359 showGroupConservation.setFont(verdana11);
360 showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
361 showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
362 showGroupConservation.setSelected(true);
363 showGroupConservation.setText(MessageManager
364 .getString("label.conservation"));
365 showNpTooltip.setEnabled(true);
366 showNpTooltip.setFont(verdana11);
367 showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
368 showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
369 showNpTooltip.setSelected(true);
370 showNpTooltip.setText(MessageManager
371 .getString("label.non_positional_features"));
372 showDbRefTooltip.setEnabled(true);
373 showDbRefTooltip.setFont(verdana11);
374 showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
375 showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
376 showDbRefTooltip.setSelected(true);
377 showDbRefTooltip.setText(MessageManager
378 .getString("label.database_references"));
379 annotations.setFont(verdana11);
380 annotations.setHorizontalAlignment(SwingConstants.RIGHT);
381 annotations.setHorizontalTextPosition(SwingConstants.LEADING);
382 annotations.setSelected(true);
383 annotations.setText(MessageManager.getString("label.show_annotations"));
384 annotations.setBounds(new Rectangle(169, 12, 200, 23));
385 annotations.addActionListener(new ActionListener()
387 public void actionPerformed(ActionEvent e)
389 annotations_actionPerformed(e);
392 identity.addActionListener(new ActionListener()
394 public void actionPerformed(ActionEvent e)
396 annotations_actionPerformed(e);
399 showGroupConsensus.addActionListener(new ActionListener()
401 public void actionPerformed(ActionEvent e)
403 annotations_actionPerformed(e);
406 showUnconserved.setFont(verdana11);
407 showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
408 showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
409 showUnconserved.setSelected(true);
410 showUnconserved.setText(MessageManager
411 .getString("action.show_unconserved"));
412 showUnconserved.addActionListener(new ActionListener()
414 public void actionPerformed(ActionEvent e)
416 showunconserved_actionPerformed(e);
419 // / TODO: fit these in to preferences panel!!!!!
420 shareSelections.setFont(verdana11);
421 shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
422 shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
423 shareSelections.setSelected(true);
424 shareSelections.setText(MessageManager
425 .getString("label.share_selection_across_views"));
426 followHighlight.setFont(verdana11);
427 followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
428 followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
429 // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
430 followHighlight.setSelected(true);
431 followHighlight.setText(MessageManager
432 .getString("label.scroll_highlighted_regions"));
434 gapLabel.setFont(verdana11);
435 gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
436 gapLabel.setText(MessageManager.getString("label.gap_symbol") + " ");
437 colour.setFont(verdana11);
438 colour.setBounds(new Rectangle(172, 225, 155, 21));
439 colourLabel.setFont(verdana11);
440 colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
441 colourLabel.setText(MessageManager.getString("label.alignment_colour")
443 fontLabel.setFont(verdana11);
444 fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
445 fontLabel.setText(MessageManager.getString("label.font"));
446 fontSizeCB.setFont(verdana11);
447 fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
448 fontStyleCB.setFont(verdana11);
449 fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
450 fontNameCB.setFont(verdana11);
451 fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
452 gapSymbolCB.setFont(verdana11);
453 gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
454 mincolourLabel.setFont(verdana11);
455 mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
456 mincolourLabel.setText(MessageManager.getString("label.min_colour"));
457 minColour.setFont(verdana11);
458 minColour.setBorder(BorderFactory.createEtchedBorder());
459 minColour.setPreferredSize(new Dimension(40, 20));
460 minColour.addMouseListener(new MouseAdapter()
462 public void mousePressed(MouseEvent e)
464 minColour_actionPerformed();
467 maxcolourLabel.setFont(verdana11);
468 maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
469 maxcolourLabel.setText(MessageManager.getString("label.max_colour"));
470 maxColour.setFont(verdana11);
471 maxColour.setBorder(BorderFactory.createEtchedBorder());
472 maxColour.setPreferredSize(new Dimension(40, 20));
473 maxColour.addMouseListener(new MouseAdapter()
475 public void mousePressed(MouseEvent e)
477 maxColour_actionPerformed();
481 startupCheckbox.setText(MessageManager.getString("action.open_file"));
482 startupCheckbox.setFont(verdana11);
483 startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
484 startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
485 startupCheckbox.setSelected(true);
486 startupFileTextfield.setFont(verdana11);
487 startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
488 startupFileTextfield.addMouseListener(new MouseAdapter()
490 public void mouseClicked(MouseEvent e)
492 if (e.getClickCount() > 1)
494 startupFileTextfield_mouseClicked();
499 connectTab.setLayout(gridBagLayout3);
500 serverLabel.setText(MessageManager.getString("label.address"));
501 serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
502 serverLabel.setFont(verdana11);
503 proxyServerTB.setFont(verdana11);
504 proxyPortTB.setFont(verdana11);
505 portLabel.setFont(verdana11);
506 portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
507 portLabel.setText(MessageManager.getString("label.port"));
508 browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
509 browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
510 browserLabel.setText(MessageManager
511 .getString("label.default_browser_unix"));
512 defaultBrowser.setFont(verdana11);
513 defaultBrowser.setText("");
514 usagestats.setText(MessageManager
515 .getString("label.send_usage_statistics"));
516 usagestats.setFont(verdana11);
517 usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
518 usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
519 questionnaire.setText(MessageManager
520 .getString("label.check_for_questionnaires"));
521 questionnaire.setFont(verdana11);
522 questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
523 questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
524 versioncheck.setText(MessageManager
525 .getString("label.check_for_latest_version"));
526 versioncheck.setFont(verdana11);
527 versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
528 versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
529 newLink.setText(MessageManager.getString("action.new"));
530 newLink.addActionListener(new java.awt.event.ActionListener()
532 public void actionPerformed(ActionEvent e)
534 newLink_actionPerformed(e);
537 editLink.setText(MessageManager.getString("action.edit"));
538 editLink.addActionListener(new java.awt.event.ActionListener()
540 public void actionPerformed(ActionEvent e)
542 editLink_actionPerformed(e);
545 deleteLink.setText(MessageManager.getString("action.delete"));
546 deleteLink.addActionListener(new java.awt.event.ActionListener()
548 public void actionPerformed(ActionEvent e)
550 deleteLink_actionPerformed(e);
554 linkURLList.addListSelectionListener(new ListSelectionListener()
556 public void valueChanged(ListSelectionEvent e)
558 int index = linkURLList.getSelectedIndex();
559 linkNameList.setSelectedIndex(index);
563 linkNameList.addListSelectionListener(new ListSelectionListener()
565 public void valueChanged(ListSelectionEvent e)
567 int index = linkNameList.getSelectedIndex();
568 linkURLList.setSelectedIndex(index);
572 linkScrollPane.setBorder(null);
573 linkPanel.setBorder(new TitledBorder(MessageManager
574 .getString("label.url_linkfrom_sequence_id")));
575 linkPanel.setLayout(borderLayout2);
576 editLinkButtons.setLayout(gridLayout1);
577 gridLayout1.setRows(3);
578 linkNameList.setFont(verdana11);
579 linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
580 linkPanel2.setLayout(borderLayout3);
581 linkURLList.setFont(verdana11);
582 linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
584 defaultBrowser.addMouseListener(new MouseAdapter()
586 public void mouseClicked(MouseEvent e)
588 if (e.getClickCount() > 1)
590 defaultBrowser_mouseClicked(e);
594 useProxy.setFont(verdana11);
595 useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
596 useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
597 useProxy.setText(MessageManager.getString("label.use_proxy_server"));
598 useProxy.addActionListener(new ActionListener()
600 public void actionPerformed(ActionEvent e)
602 useProxy_actionPerformed();
605 jPanel1.setBorder(titledBorder1);
606 jPanel1.setLayout(gridBagLayout1);
607 sortby.setFont(verdana11);
608 sortby.setBounds(new Rectangle(172, 249, 155, 21));
609 sortLabel.setFont(verdana11);
610 sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
611 sortLabel.setText(MessageManager.getString("label.sort_by"));
612 jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
613 jPanel2.setLayout(gridLayout2);
614 gridLayout2.setRows(12);
615 exportTab.setLayout(null);
616 epsLabel.setFont(verdana11);
617 epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
618 epsLabel.setText(MessageManager.getString("label.eps_rendering_style"));
619 epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
620 epsRendering.setFont(verdana11);
621 epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
622 jLabel1.setFont(verdana11);
623 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
624 jLabel1.setText(MessageManager.getString("label.append_start_end"));
625 jLabel1.setFont(verdana11);
626 fastajv.setFont(verdana11);
627 fastajv.setHorizontalAlignment(SwingConstants.LEFT);
628 clustaljv.setText(MessageManager.getString("label.clustal") + " ");
629 blcjv.setText(MessageManager.getString("label.blc") + " ");
630 fastajv.setText(MessageManager.getString("label.fasta") + " ");
631 msfjv.setText(MessageManager.getString("label.msf") + " ");
632 pfamjv.setText(MessageManager.getString("label.pfam") + " ");
633 pileupjv.setText(MessageManager.getString("label.pileup") + " ");
634 msfjv.setFont(verdana11);
635 msfjv.setHorizontalAlignment(SwingConstants.LEFT);
636 pirjv.setText(MessageManager.getString("label.pir") + " ");
637 jPanel11.setFont(verdana11);
638 jPanel11.setBorder(titledBorder2);
639 jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
640 jPanel11.setLayout(gridLayout3);
641 blcjv.setFont(verdana11);
642 blcjv.setHorizontalAlignment(SwingConstants.LEFT);
643 clustaljv.setFont(verdana11);
644 clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
645 pfamjv.setFont(verdana11);
646 pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
647 pileupjv.setFont(verdana11);
648 pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
649 pirjv.setFont(verdana11);
650 pirjv.setHorizontalAlignment(SwingConstants.LEFT);
651 seqLimit.setFont(verdana11);
652 seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
653 seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
654 seqLimit.setText(MessageManager.getString("label.full_sequence_id"));
655 gridLayout3.setRows(8);
656 smoothFont.setFont(verdana11);
657 smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
658 smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
659 smoothFont.setText(MessageManager.getString("label.smooth_font"));
660 calcTab.setLayout(null);
661 autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
662 autoCalculateConsCheck.setText(MessageManager
663 .getString("label.autocalculate_consensus"));
664 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
665 padGaps.setFont(JvSwingUtils.getLabelFont());
666 padGaps.setText(MessageManager.getString("label.pad_gaps_when_editing"));
667 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
668 sortByTree.setFont(JvSwingUtils.getLabelFont());
670 .setText(MessageManager.getString("label.sort_with_new_tree"));
672 .setToolTipText(MessageManager
673 .getString("label.any_trees_calculated_or_loaded_alignment_automatically_sort"));
674 sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
676 autoIdWidth.setFont(JvSwingUtils.getLabelFont());
677 autoIdWidth.setText(MessageManager
678 .getString("label.automatically_set_id_width"));
680 .setToolTipText("<html>"
682 .wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")
684 autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
685 autoIdWidth.addActionListener(new ActionListener()
689 public void actionPerformed(ActionEvent e)
691 autoIdWidth_actionPerformed();
694 userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
695 userIdWidthlabel.setText(MessageManager
696 .getString("label.figure_id_column_width"));
698 .setToolTipText("<html>"
700 .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")
703 .setToolTipText("<html>"
705 .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")
707 userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
708 userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
709 userIdWidth.setText("");
710 userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
711 userIdWidth.addActionListener(new ActionListener()
715 public void actionPerformed(ActionEvent e)
717 userIdWidth_actionPerformed();
720 modellerOutput.setFont(JvSwingUtils.getLabelFont());
721 modellerOutput.setText(MessageManager
722 .getString("label.use_modeller_output"));
723 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
725 dasPanel.setLayout(borderLayout4);
726 wsPanel.setLayout(borderLayout5);
727 wrap.setFont(JvSwingUtils.getLabelFont());
728 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
729 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
730 wrap.setText(MessageManager.getString("label.wrap_alignment"));
731 rightAlign.setFont(JvSwingUtils.getLabelFont());
732 rightAlign.setForeground(Color.black);
733 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
734 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
735 rightAlign.setText(MessageManager.getString("label.right_align_ids"));
736 idItalics.setFont(JvSwingUtils.getLabelFont());
737 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
738 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
739 idItalics.setText(MessageManager
740 .getString("label.sequence_name_italics"));
741 openoverv.setFont(JvSwingUtils.getLabelFont());
742 openoverv.setActionCommand(MessageManager
743 .getString("label.open_overview"));
744 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
745 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
746 openoverv.setText(MessageManager.getString(("label.open_overview")));
747 jPanel2.add(fullScreen);
748 jPanel2.add(openoverv);
749 jPanel2.add(seqLimit);
750 jPanel2.add(rightAlign);
751 jPanel2.add(fontLabel);
752 jPanel2.add(showUnconserved);
753 jPanel2.add(idItalics);
754 jPanel2.add(smoothFont);
755 jPanel2.add(gapLabel);
757 jPanel2.add(sortLabel);
758 jPanel2.add(startupCheckbox);
759 visualTab.add(annotations);
760 visualTab.add(startupFileTextfield);
761 visualTab.add(sortby);
762 visualTab.add(gapSymbolCB);
763 visualTab.add(fontNameCB);
764 visualTab.add(fontSizeCB);
765 visualTab.add(fontStyleCB);
766 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
767 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
768 annsettingsPanel.add(autoAnnotSettings1);
769 annsettingsPanel.add(autoAnnotSettings2);
770 annsettingsPanel.add(autoAnnotSettings3);
771 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
772 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
773 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
774 visualTab.add(annsettingsPanel);
775 Border jb = new EmptyBorder(1, 1, 4, 5);
776 quality.setBorder(jb);
777 conservation.setBorder(jb);
778 identity.setBorder(jb);
779 showConsensbits.setBorder(jb);
780 showGroupbits.setBorder(jb);
781 showGroupConsensus.setBorder(jb);
782 showGroupConservation.setBorder(jb);
783 showConsensHistogram.setBorder(jb);
784 showConsensLogo.setBorder(jb);
786 autoAnnotSettings2.add(conservation);
787 autoAnnotSettings1.add(quality);
788 autoAnnotSettings3.add(identity);
789 autoAnnotSettings1.add(showGroupbits);
790 autoAnnotSettings3.add(showGroupConsensus);
791 autoAnnotSettings2.add(showGroupConservation);
792 autoAnnotSettings1.add(showConsensbits);
793 autoAnnotSettings2.add(showConsensHistogram);
794 autoAnnotSettings3.add(showConsensLogo);
796 JPanel tooltipSettings = new JPanel();
797 tooltipSettings.setBorder(new TitledBorder(MessageManager
798 .getString("label.sequence_id_tooltip")));
799 tooltipSettings.setBounds(173, 130, 200, 62);
800 tooltipSettings.setLayout(new GridLayout(2, 1));
801 tooltipSettings.add(showDbRefTooltip);
802 tooltipSettings.add(showNpTooltip);
803 visualTab.add(tooltipSettings);
804 visualTab.add(jPanel2);
805 JvSwingUtils.addtoLayout(visual2Tab, MessageManager
806 .getString("label.default_colour_scheme_for_alignment"),
807 colourLabel, colour);
808 JPanel annotationShding = new JPanel();
809 annotationShding.setBorder(new TitledBorder(MessageManager
810 .getString("label.annotation_shading_default")));
811 annotationShding.setLayout(new GridLayout(1, 2));
812 JvSwingUtils.addtoLayout(annotationShding, MessageManager
813 .getString("label.default_minimum_colour_annotation_shading"),
814 mincolourLabel, minColour);
815 JvSwingUtils.addtoLayout(annotationShding, MessageManager
816 .getString("label.default_maximum_colour_annotation_shading"),
817 maxcolourLabel, maxColour);
818 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
820 // visual2panel.add(minColour);
821 // visual2panel.add(maxColour);
822 // visual2Tab.add(visual2panel);
824 linkPanel.add(editLinkButtons, BorderLayout.EAST);
825 editLinkButtons.add(newLink, null);
826 editLinkButtons.add(editLink, null);
827 editLinkButtons.add(deleteLink, null);
828 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
829 linkScrollPane.getViewport().add(linkPanel2, null);
830 linkPanel2.add(linkURLList, BorderLayout.CENTER);
831 linkPanel2.add(linkNameList, BorderLayout.WEST);
832 okCancelPanel.add(ok);
833 okCancelPanel.add(cancel);
834 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
836 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
837 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
838 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
840 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
841 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
843 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
844 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
845 16, 0, 0, 12), 359, -17));
846 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
847 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
848 21, 0, 35, 12), 4, 6));
849 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
850 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
851 new Insets(16, 0, 0, 0), 5, 1));
852 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
853 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
854 new Insets(0, 2, 4, 2), 54, 1));
855 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
856 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
857 new Insets(0, 2, 4, 0), 263, 1));
858 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
859 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
860 new Insets(15, 0, 0, 15), 307, 1));
861 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
862 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
863 new Insets(0, 2, 4, 2), 70, 1));
864 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
865 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
866 new Insets(0, 2, 4, 2), 70, 1));
867 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
868 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
869 new Insets(0, 2, 4, 2), 70, 1));
871 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
872 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
874 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
875 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
876 gapSymbolCB.setRenderer(dlcr);
878 tabbedPane.add(visualTab, MessageManager.getString("label.visual"));
879 tabbedPane.add(visual2Tab, MessageManager.getString("label.colours"));
880 tabbedPane.add(connectTab,
881 MessageManager.getString("label.connections"));
882 tabbedPane.add(exportTab, MessageManager.getString("label.output"));
883 jPanel11.add(jLabel1);
885 jPanel11.add(clustaljv);
886 jPanel11.add(fastajv);
888 jPanel11.add(pfamjv);
889 jPanel11.add(pileupjv);
891 exportTab.add(autoIdWidth);
892 exportTab.add(userIdWidth);
893 exportTab.add(userIdWidthlabel);
894 exportTab.add(modellerOutput);
895 tabbedPane.add(calcTab, MessageManager.getString("label.editing"));
896 calcTab.add(autoCalculateConsCheck);
897 calcTab.add(padGaps);
898 calcTab.add(sortByTree);
901 .add(dasPanel, MessageManager.getString("label.das_settings"));
902 tabbedPane.add(wsPanel, MessageManager.getString("label.web_services"));
904 exportTab.add(epsLabel);
905 exportTab.add(epsRendering);
906 exportTab.add(jPanel11);
909 protected void autoIdWidth_actionPerformed()
911 // TODO Auto-generated method stub
915 protected void userIdWidth_actionPerformed()
917 // TODO Auto-generated method stub
921 protected void maxColour_actionPerformed()
923 // TODO Auto-generated method stub
927 protected void minColour_actionPerformed()
929 // TODO Auto-generated method stub
933 protected void showunconserved_actionPerformed(ActionEvent e)
935 // TODO Auto-generated method stub
945 public void ok_actionPerformed(ActionEvent e)
955 public void cancel_actionPerformed(ActionEvent e)
965 public void annotations_actionPerformed(ActionEvent e)
972 public void startupFileTextfield_mouseClicked()
976 public void newLink_actionPerformed(ActionEvent e)
981 public void editLink_actionPerformed(ActionEvent e)
986 public void deleteLink_actionPerformed(ActionEvent e)
991 public void defaultBrowser_mouseClicked(MouseEvent e)
996 public void linkURLList_keyTyped(KeyEvent e)
1001 public void useProxy_actionPerformed()
1003 proxyServerTB.setEnabled(useProxy.isSelected());
1004 proxyPortTB.setEnabled(useProxy.isSelected());