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(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.adjusts_width_generated_eps_png")));
681 autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
682 autoIdWidth.addActionListener(new ActionListener()
686 public void actionPerformed(ActionEvent e)
688 autoIdWidth_actionPerformed();
691 userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
692 userIdWidthlabel.setText(MessageManager
693 .getString("label.figure_id_column_width"));
695 .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.manually_specify_width_left_column")));
697 .setToolTipText(JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.manually_specify_width_left_column")));
698 userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
699 userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
700 userIdWidth.setText("");
701 userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
702 userIdWidth.addActionListener(new ActionListener()
706 public void actionPerformed(ActionEvent e)
708 userIdWidth_actionPerformed();
711 modellerOutput.setFont(JvSwingUtils.getLabelFont());
712 modellerOutput.setText(MessageManager
713 .getString("label.use_modeller_output"));
714 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
716 dasPanel.setLayout(borderLayout4);
717 wsPanel.setLayout(borderLayout5);
718 wrap.setFont(JvSwingUtils.getLabelFont());
719 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
720 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
721 wrap.setText(MessageManager.getString("label.wrap_alignment"));
722 rightAlign.setFont(JvSwingUtils.getLabelFont());
723 rightAlign.setForeground(Color.black);
724 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
725 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
726 rightAlign.setText(MessageManager.getString("label.right_align_ids"));
727 idItalics.setFont(JvSwingUtils.getLabelFont());
728 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
729 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
730 idItalics.setText(MessageManager
731 .getString("label.sequence_name_italics"));
732 openoverv.setFont(JvSwingUtils.getLabelFont());
733 openoverv.setActionCommand(MessageManager
734 .getString("label.open_overview"));
735 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
736 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
737 openoverv.setText(MessageManager.getString(("label.open_overview")));
738 jPanel2.add(fullScreen);
739 jPanel2.add(openoverv);
740 jPanel2.add(seqLimit);
741 jPanel2.add(rightAlign);
742 jPanel2.add(fontLabel);
743 jPanel2.add(showUnconserved);
744 jPanel2.add(idItalics);
745 jPanel2.add(smoothFont);
746 jPanel2.add(gapLabel);
748 jPanel2.add(sortLabel);
749 jPanel2.add(startupCheckbox);
750 visualTab.add(annotations);
751 visualTab.add(startupFileTextfield);
752 visualTab.add(sortby);
753 visualTab.add(gapSymbolCB);
754 visualTab.add(fontNameCB);
755 visualTab.add(fontSizeCB);
756 visualTab.add(fontStyleCB);
757 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
758 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
759 annsettingsPanel.add(autoAnnotSettings1);
760 annsettingsPanel.add(autoAnnotSettings2);
761 annsettingsPanel.add(autoAnnotSettings3);
762 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
763 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
764 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
765 visualTab.add(annsettingsPanel);
766 Border jb = new EmptyBorder(1, 1, 4, 5);
767 quality.setBorder(jb);
768 conservation.setBorder(jb);
769 identity.setBorder(jb);
770 showConsensbits.setBorder(jb);
771 showGroupbits.setBorder(jb);
772 showGroupConsensus.setBorder(jb);
773 showGroupConservation.setBorder(jb);
774 showConsensHistogram.setBorder(jb);
775 showConsensLogo.setBorder(jb);
777 autoAnnotSettings2.add(conservation);
778 autoAnnotSettings1.add(quality);
779 autoAnnotSettings3.add(identity);
780 autoAnnotSettings1.add(showGroupbits);
781 autoAnnotSettings3.add(showGroupConsensus);
782 autoAnnotSettings2.add(showGroupConservation);
783 autoAnnotSettings1.add(showConsensbits);
784 autoAnnotSettings2.add(showConsensHistogram);
785 autoAnnotSettings3.add(showConsensLogo);
787 JPanel tooltipSettings = new JPanel();
788 tooltipSettings.setBorder(new TitledBorder(MessageManager
789 .getString("label.sequence_id_tooltip")));
790 tooltipSettings.setBounds(173, 130, 200, 62);
791 tooltipSettings.setLayout(new GridLayout(2, 1));
792 tooltipSettings.add(showDbRefTooltip);
793 tooltipSettings.add(showNpTooltip);
794 visualTab.add(tooltipSettings);
795 visualTab.add(jPanel2);
796 JvSwingUtils.addtoLayout(visual2Tab, MessageManager
797 .getString("label.default_colour_scheme_for_alignment"),
798 colourLabel, colour);
799 JPanel annotationShding = new JPanel();
800 annotationShding.setBorder(new TitledBorder(MessageManager
801 .getString("label.annotation_shading_default")));
802 annotationShding.setLayout(new GridLayout(1, 2));
803 JvSwingUtils.addtoLayout(annotationShding, MessageManager
804 .getString("label.default_minimum_colour_annotation_shading"),
805 mincolourLabel, minColour);
806 JvSwingUtils.addtoLayout(annotationShding, MessageManager
807 .getString("label.default_maximum_colour_annotation_shading"),
808 maxcolourLabel, maxColour);
809 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
811 // visual2panel.add(minColour);
812 // visual2panel.add(maxColour);
813 // visual2Tab.add(visual2panel);
815 linkPanel.add(editLinkButtons, BorderLayout.EAST);
816 editLinkButtons.add(newLink, null);
817 editLinkButtons.add(editLink, null);
818 editLinkButtons.add(deleteLink, null);
819 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
820 linkScrollPane.getViewport().add(linkPanel2, null);
821 linkPanel2.add(linkURLList, BorderLayout.CENTER);
822 linkPanel2.add(linkNameList, BorderLayout.WEST);
823 okCancelPanel.add(ok);
824 okCancelPanel.add(cancel);
825 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
827 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
828 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
829 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
831 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
832 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
834 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
835 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
836 16, 0, 0, 12), 359, -17));
837 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
838 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
839 21, 0, 35, 12), 4, 6));
840 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
841 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
842 new Insets(16, 0, 0, 0), 5, 1));
843 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
844 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
845 new Insets(0, 2, 4, 2), 54, 1));
846 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
847 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
848 new Insets(0, 2, 4, 0), 263, 1));
849 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
850 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
851 new Insets(15, 0, 0, 15), 307, 1));
852 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
853 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
854 new Insets(0, 2, 4, 2), 70, 1));
855 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
856 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
857 new Insets(0, 2, 4, 2), 70, 1));
858 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
859 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
860 new Insets(0, 2, 4, 2), 70, 1));
862 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
863 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
865 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
866 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
867 gapSymbolCB.setRenderer(dlcr);
869 tabbedPane.add(visualTab, MessageManager.getString("label.visual"));
870 tabbedPane.add(visual2Tab, MessageManager.getString("label.colours"));
871 tabbedPane.add(connectTab,
872 MessageManager.getString("label.connections"));
873 tabbedPane.add(exportTab, MessageManager.getString("label.output"));
874 jPanel11.add(jLabel1);
876 jPanel11.add(clustaljv);
877 jPanel11.add(fastajv);
879 jPanel11.add(pfamjv);
880 jPanel11.add(pileupjv);
882 exportTab.add(autoIdWidth);
883 exportTab.add(userIdWidth);
884 exportTab.add(userIdWidthlabel);
885 exportTab.add(modellerOutput);
886 tabbedPane.add(calcTab, MessageManager.getString("label.editing"));
887 calcTab.add(autoCalculateConsCheck);
888 calcTab.add(padGaps);
889 calcTab.add(sortByTree);
892 .add(dasPanel, MessageManager.getString("label.das_settings"));
893 tabbedPane.add(wsPanel, MessageManager.getString("label.web_services"));
895 exportTab.add(epsLabel);
896 exportTab.add(epsRendering);
897 exportTab.add(jPanel11);
900 protected void autoIdWidth_actionPerformed()
902 // TODO Auto-generated method stub
906 protected void userIdWidth_actionPerformed()
908 // TODO Auto-generated method stub
912 protected void maxColour_actionPerformed()
914 // TODO Auto-generated method stub
918 protected void minColour_actionPerformed()
920 // TODO Auto-generated method stub
924 protected void showunconserved_actionPerformed(ActionEvent e)
926 // TODO Auto-generated method stub
936 public void ok_actionPerformed(ActionEvent e)
946 public void cancel_actionPerformed(ActionEvent e)
956 public void annotations_actionPerformed(ActionEvent e)
963 public void startupFileTextfield_mouseClicked()
967 public void newLink_actionPerformed(ActionEvent e)
972 public void editLink_actionPerformed(ActionEvent e)
977 public void deleteLink_actionPerformed(ActionEvent e)
982 public void defaultBrowser_mouseClicked(MouseEvent e)
987 public void linkURLList_keyTyped(KeyEvent e)
992 public void useProxy_actionPerformed()
994 proxyServerTB.setEnabled(useProxy.isSelected());
995 proxyPortTB.setEnabled(useProxy.isSelected());