2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package jalview.jbgui;
21 import jalview.gui.JvSwingUtils;
22 import jalview.util.MessageManager;
25 import java.awt.event.*;
28 import javax.swing.border.*;
29 import javax.swing.event.*;
30 import java.awt.Rectangle;
38 public class GPreferences extends JPanel
40 JTabbedPane tabbedPane = new JTabbedPane();
42 JButton ok = new JButton();
44 JButton cancel = new JButton();
46 JPanel okCancelPanel = new JPanel();
48 BorderLayout borderLayout1 = new BorderLayout();
50 protected JCheckBox quality = new JCheckBox();
52 JPanel visualTab = new JPanel();
54 JPanel visual2Tab = new JPanel();
56 protected JCheckBox fullScreen = new JCheckBox();
58 protected JCheckBox conservation = new JCheckBox();
60 protected JCheckBox identity = new JCheckBox();
62 protected JCheckBox annotations = new JCheckBox();
64 protected JPanel minColour = new JPanel();
66 JLabel mincolourLabel = new JLabel();
68 protected JPanel maxColour = new JPanel();
70 JLabel maxcolourLabel = new JLabel();
72 JLabel gapLabel = new JLabel();
74 protected JComboBox colour = new JComboBox();
76 JLabel colourLabel = new JLabel();
78 JLabel fontLabel = new JLabel();
80 protected JComboBox fontSizeCB = new JComboBox();
82 protected JComboBox fontStyleCB = new JComboBox();
84 protected JComboBox fontNameCB = new JComboBox();
86 protected JComboBox gapSymbolCB = new JComboBox();
88 protected JCheckBox startupCheckbox = new JCheckBox();
90 protected JTextField startupFileTextfield = new JTextField();
92 JPanel connectTab = new JPanel();
94 JLabel serverLabel = new JLabel();
96 protected JList linkURLList = new JList();
98 protected JTextField proxyServerTB = new JTextField();
100 protected JTextField proxyPortTB = new JTextField();
102 JLabel portLabel = new JLabel();
104 JLabel browserLabel = new JLabel();
106 protected JTextField defaultBrowser = new JTextField();
108 JButton newLink = new JButton();
110 JButton editLink = new JButton();
112 JButton deleteLink = new JButton();
114 JScrollPane linkScrollPane = new JScrollPane();
116 JPanel linkPanel = new JPanel();
118 BorderLayout borderLayout2 = new BorderLayout();
120 JPanel editLinkButtons = new JPanel();
122 GridLayout gridLayout1 = new GridLayout();
124 protected JList linkNameList = new JList();
126 JPanel linkPanel2 = new JPanel();
128 BorderLayout borderLayout3 = new BorderLayout();
130 protected JCheckBox useProxy = new JCheckBox();
132 JPanel jPanel1 = new JPanel();
134 TitledBorder titledBorder1 = new TitledBorder(MessageManager.getString("label.proxy_server"));
136 TitledBorder titledBorder2 = new TitledBorder(MessageManager.getString("label.file_output"));
138 GridBagLayout gridBagLayout2 = new GridBagLayout();
140 GridBagLayout gridBagLayout1 = new GridBagLayout();
142 GridBagLayout gridBagLayout3 = new GridBagLayout();
144 protected JComboBox sortby = new JComboBox();
146 JLabel sortLabel = new JLabel();
148 JPanel jPanel2 = new JPanel();
150 JPanel visual2panel = new JPanel();
152 GridLayout gridLayout2 = new GridLayout();
154 GridLayout gridLayout4 = new GridLayout();
156 JPanel annsettingsPanel = new JPanel();
158 JPanel autoAnnotSettings1 = new JPanel();
160 JPanel autoAnnotSettings2 = new JPanel();
162 JPanel autoAnnotSettings3 = new JPanel();
164 JPanel exportTab = new JPanel();
166 JLabel epsLabel = new JLabel();
168 protected JComboBox epsRendering = new JComboBox();
170 protected JLabel userIdWidthlabel = new JLabel();
172 protected JCheckBox autoIdWidth = new JCheckBox();
174 protected JTextField userIdWidth = new JTextField();
176 JLabel jLabel1 = new JLabel();
178 protected JCheckBox blcjv = new JCheckBox();
180 protected JCheckBox pileupjv = new JCheckBox();
182 protected JCheckBox clustaljv = new JCheckBox();
184 protected JCheckBox msfjv = new JCheckBox();
186 protected JCheckBox fastajv = new JCheckBox();
188 protected JCheckBox pfamjv = new JCheckBox();
190 FlowLayout flowLayout1 = new FlowLayout();
192 protected JCheckBox pirjv = new JCheckBox();
194 JPanel jPanel11 = new JPanel();
196 Font verdana11 = JvSwingUtils.getLabelFont();
198 protected JCheckBox seqLimit = new JCheckBox();
200 GridLayout gridLayout3 = new GridLayout();
202 protected JCheckBox smoothFont = new JCheckBox();
204 JPanel calcTab = new JPanel();
206 protected JCheckBox autoCalculateConsCheck = new JCheckBox();
208 protected JCheckBox padGaps = new JCheckBox();
210 protected JCheckBox modellerOutput = new JCheckBox();
212 protected JPanel dasPanel = new JPanel();
214 BorderLayout borderLayout4 = new BorderLayout();
216 protected JPanel wsPanel = new JPanel();
218 BorderLayout borderLayout5 = new BorderLayout();
220 protected JCheckBox wrap = new JCheckBox();
222 protected JCheckBox rightAlign = new JCheckBox();
224 protected JCheckBox showUnconserved = new JCheckBox();
226 protected JCheckBox showDbRefTooltip = new JCheckBox();
228 protected JCheckBox showNpTooltip = new JCheckBox();
230 protected JCheckBox idItalics = new JCheckBox();
232 protected JCheckBox openoverv = new JCheckBox();
234 protected JCheckBox usagestats = new JCheckBox();
236 protected JCheckBox questionnaire = new JCheckBox();
238 protected JCheckBox versioncheck = new JCheckBox();
240 protected JLabel showGroupbits = new JLabel();
242 protected JLabel showConsensbits = new JLabel();
244 protected JCheckBox showConsensLogo = new JCheckBox();
246 protected JCheckBox showConsensHistogram = new JCheckBox();
248 protected JCheckBox showGroupConsensus = new JCheckBox();
250 protected JCheckBox showGroupConservation = new JCheckBox();
252 protected JCheckBox shareSelections = new JCheckBox();
254 protected JCheckBox followHighlight = new JCheckBox();
256 protected JCheckBox sortByTree = new JCheckBox();
259 * Creates a new GPreferences object.
261 public GPreferences()
266 } catch (Exception ex)
268 ex.printStackTrace();
278 private void jbInit() throws Exception
280 this.setLayout(borderLayout1);
281 ok.setText(MessageManager.getString("action.ok"));
282 ok.addActionListener(new ActionListener()
284 public void actionPerformed(ActionEvent e)
286 ok_actionPerformed(e);
289 cancel.setText(MessageManager.getString("action.cancel"));
290 cancel.addActionListener(new ActionListener()
292 public void actionPerformed(ActionEvent e)
294 cancel_actionPerformed(e);
297 quality.setEnabled(false);
298 quality.setFont(verdana11);
299 quality.setHorizontalAlignment(SwingConstants.RIGHT);
300 quality.setHorizontalTextPosition(SwingConstants.LEFT);
301 quality.setSelected(true);
302 quality.setText(MessageManager.getString("label.quality"));
303 visualTab.setBorder(new TitledBorder(MessageManager.getString("action.open_new_aligmnent")));
304 visualTab.setLayout(null);
305 visual2Tab.setBorder(new TitledBorder(MessageManager.getString("action.open_new_aligmnent")));
306 visual2Tab.setLayout(new FlowLayout());
307 fullScreen.setFont(verdana11);
308 fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
309 fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
310 fullScreen.setText(MessageManager.getString("label.maximize_window"));
311 conservation.setEnabled(false);
312 conservation.setFont(verdana11);
313 conservation.setHorizontalAlignment(SwingConstants.RIGHT);
314 conservation.setHorizontalTextPosition(SwingConstants.LEFT);
315 conservation.setSelected(true);
316 conservation.setText(MessageManager.getString("label.conservation"));
317 identity.setEnabled(false);
318 identity.setFont(verdana11);
319 identity.setHorizontalAlignment(SwingConstants.RIGHT);
320 identity.setHorizontalTextPosition(SwingConstants.LEFT);
321 identity.setSelected(true);
322 identity.setText(MessageManager.getString("label.consensus"));
323 showGroupbits.setFont(verdana11);
324 showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
325 showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
326 showGroupbits.setText(MessageManager.getString("action.show_group") + ":");
327 showConsensbits.setFont(verdana11);
328 showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
329 showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
330 showConsensbits.setText(MessageManager.getString("label.consensus") + ":");
331 showConsensHistogram.setEnabled(false);
332 showConsensHistogram.setFont(verdana11);
333 showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
334 showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
335 showConsensHistogram.setSelected(true);
336 showConsensHistogram.setText(MessageManager.getString("label.histogram"));
337 showConsensLogo.setEnabled(false);
338 showConsensLogo.setFont(verdana11);
339 showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
340 showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
341 showConsensLogo.setSelected(true);
342 showConsensLogo.setText(MessageManager.getString("label.logo"));
343 showGroupConsensus.setEnabled(false);
344 showGroupConsensus.setFont(verdana11);
345 showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
346 showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
347 showGroupConsensus.setSelected(true);
348 showGroupConsensus.setText(MessageManager.getString("label.consensus"));
349 showGroupConservation.setEnabled(false);
350 showGroupConservation.setFont(verdana11);
351 showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
352 showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
353 showGroupConservation.setSelected(true);
354 showGroupConservation.setText(MessageManager.getString("label.conservation"));
355 showNpTooltip.setEnabled(true);
356 showNpTooltip.setFont(verdana11);
357 showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
358 showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
359 showNpTooltip.setSelected(true);
360 showNpTooltip.setText(MessageManager.getString("label.non_positional_features"));
361 showDbRefTooltip.setEnabled(true);
362 showDbRefTooltip.setFont(verdana11);
363 showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
364 showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
365 showDbRefTooltip.setSelected(true);
366 showDbRefTooltip.setText(MessageManager.getString("label.database_references"));
367 annotations.setFont(verdana11);
368 annotations.setHorizontalAlignment(SwingConstants.RIGHT);
369 annotations.setHorizontalTextPosition(SwingConstants.LEADING);
370 annotations.setSelected(true);
371 annotations.setText(MessageManager.getString("label.show_annotations"));
372 annotations.setBounds(new Rectangle(169, 12, 200, 23));
373 annotations.addActionListener(new ActionListener()
375 public void actionPerformed(ActionEvent e)
377 annotations_actionPerformed(e);
380 identity.addActionListener(new ActionListener()
382 public void actionPerformed(ActionEvent e)
384 annotations_actionPerformed(e);
387 showGroupConsensus.addActionListener(new ActionListener()
389 public void actionPerformed(ActionEvent e)
391 annotations_actionPerformed(e);
394 showUnconserved.setFont(verdana11);
395 showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
396 showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
397 showUnconserved.setSelected(true);
398 showUnconserved.setText(MessageManager.getString("action.show_unconserved"));
399 showUnconserved.addActionListener(new ActionListener()
401 public void actionPerformed(ActionEvent e)
403 showunconserved_actionPerformed(e);
406 // / TODO: fit these in to preferences panel!!!!!
407 shareSelections.setFont(verdana11);
408 shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
409 shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
410 shareSelections.setSelected(true);
411 shareSelections.setText(MessageManager.getString("label.share_selection_across_views"));
412 followHighlight.setFont(verdana11);
413 followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
414 followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
415 // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
416 followHighlight.setSelected(true);
417 followHighlight.setText(MessageManager.getString("label.scroll_highlighted_regions"));
419 gapLabel.setFont(verdana11);
420 gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
421 gapLabel.setText(MessageManager.getString("label.gap_symbol") + " ");
422 colour.setFont(verdana11);
423 colour.setBounds(new Rectangle(172, 225, 155, 21));
424 colourLabel.setFont(verdana11);
425 colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
426 colourLabel.setText(MessageManager.getString("label.alignment_colour") + " ");
427 fontLabel.setFont(verdana11);
428 fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
429 fontLabel.setText(MessageManager.getString("label.font"));
430 fontSizeCB.setFont(verdana11);
431 fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
432 fontStyleCB.setFont(verdana11);
433 fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
434 fontNameCB.setFont(verdana11);
435 fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
436 gapSymbolCB.setFont(verdana11);
437 gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
438 mincolourLabel.setFont(verdana11);
439 mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
440 mincolourLabel.setText(MessageManager.getString("label.min_colour"));
441 minColour.setFont(verdana11);
442 minColour.setBorder(BorderFactory.createEtchedBorder());
443 minColour.setPreferredSize(new Dimension(40, 20));
444 minColour.addMouseListener(new MouseAdapter()
446 public void mousePressed(MouseEvent e)
448 minColour_actionPerformed();
451 maxcolourLabel.setFont(verdana11);
452 maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
453 maxcolourLabel.setText(MessageManager.getString("label.max_colour"));
454 maxColour.setFont(verdana11);
455 maxColour.setBorder(BorderFactory.createEtchedBorder());
456 maxColour.setPreferredSize(new Dimension(40, 20));
457 maxColour.addMouseListener(new MouseAdapter()
459 public void mousePressed(MouseEvent e)
461 maxColour_actionPerformed();
465 startupCheckbox.setText(MessageManager.getString("action.open_file"));
466 startupCheckbox.setFont(verdana11);
467 startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
468 startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
469 startupCheckbox.setSelected(true);
470 startupFileTextfield.setFont(verdana11);
471 startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
472 startupFileTextfield.addMouseListener(new MouseAdapter()
474 public void mouseClicked(MouseEvent e)
476 if (e.getClickCount() > 1)
478 startupFileTextfield_mouseClicked();
483 connectTab.setLayout(gridBagLayout3);
484 serverLabel.setText(MessageManager.getString("label.address"));
485 serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
486 serverLabel.setFont(verdana11);
487 proxyServerTB.setFont(verdana11);
488 proxyPortTB.setFont(verdana11);
489 portLabel.setFont(verdana11);
490 portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
491 portLabel.setText(MessageManager.getString("label.port"));
492 browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
493 browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
494 browserLabel.setText(MessageManager.getString("label.default_browser_unix"));
495 defaultBrowser.setFont(verdana11);
496 defaultBrowser.setText("");
497 usagestats.setText(MessageManager.getString("label.send_usage_statistics"));
498 usagestats.setFont(verdana11);
499 usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
500 usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
501 questionnaire.setText(MessageManager.getString("label.check_for_questionnaires"));
502 questionnaire.setFont(verdana11);
503 questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
504 questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
505 versioncheck.setText(MessageManager.getString("label.check_for_latest_version"));
506 versioncheck.setFont(verdana11);
507 versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
508 versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
509 newLink.setText(MessageManager.getString("action.new"));
510 newLink.addActionListener(new java.awt.event.ActionListener()
512 public void actionPerformed(ActionEvent e)
514 newLink_actionPerformed(e);
517 editLink.setText(MessageManager.getString("action.edit"));
518 editLink.addActionListener(new java.awt.event.ActionListener()
520 public void actionPerformed(ActionEvent e)
522 editLink_actionPerformed(e);
525 deleteLink.setText(MessageManager.getString("action.delete"));
526 deleteLink.addActionListener(new java.awt.event.ActionListener()
528 public void actionPerformed(ActionEvent e)
530 deleteLink_actionPerformed(e);
534 linkURLList.addListSelectionListener(new ListSelectionListener()
536 public void valueChanged(ListSelectionEvent e)
538 int index = linkURLList.getSelectedIndex();
539 linkNameList.setSelectedIndex(index);
543 linkNameList.addListSelectionListener(new ListSelectionListener()
545 public void valueChanged(ListSelectionEvent e)
547 int index = linkNameList.getSelectedIndex();
548 linkURLList.setSelectedIndex(index);
552 linkScrollPane.setBorder(null);
553 linkPanel.setBorder(new TitledBorder(MessageManager.getString("label.url_linkfrom_sequence_id")));
554 linkPanel.setLayout(borderLayout2);
555 editLinkButtons.setLayout(gridLayout1);
556 gridLayout1.setRows(3);
557 linkNameList.setFont(verdana11);
558 linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
559 linkPanel2.setLayout(borderLayout3);
560 linkURLList.setFont(verdana11);
561 linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
563 defaultBrowser.addMouseListener(new MouseAdapter()
565 public void mouseClicked(MouseEvent e)
567 if (e.getClickCount() > 1)
569 defaultBrowser_mouseClicked(e);
573 useProxy.setFont(verdana11);
574 useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
575 useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
576 useProxy.setText(MessageManager.getString("label.use_proxy_server"));
577 useProxy.addActionListener(new ActionListener()
579 public void actionPerformed(ActionEvent e)
581 useProxy_actionPerformed();
584 jPanel1.setBorder(titledBorder1);
585 jPanel1.setLayout(gridBagLayout1);
586 sortby.setFont(verdana11);
587 sortby.setBounds(new Rectangle(172, 249, 155, 21));
588 sortLabel.setFont(verdana11);
589 sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
590 sortLabel.setText(MessageManager.getString("label.sort_by"));
591 jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
592 jPanel2.setLayout(gridLayout2);
593 gridLayout2.setRows(12);
594 exportTab.setLayout(null);
595 epsLabel.setFont(verdana11);
596 epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
597 epsLabel.setText(MessageManager.getString("label.eps_rendering_style"));
598 epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
599 epsRendering.setFont(verdana11);
600 epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
601 jLabel1.setFont(verdana11);
602 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
603 jLabel1.setText(MessageManager.getString("label.append_start_end"));
604 jLabel1.setFont(verdana11);
605 fastajv.setFont(verdana11);
606 fastajv.setHorizontalAlignment(SwingConstants.LEFT);
607 clustaljv.setText(MessageManager.getString("label.clustal") + " ");
608 blcjv.setText(MessageManager.getString("label.blc") + " ");
609 fastajv.setText(MessageManager.getString("label.fasta") + " ");
610 msfjv.setText(MessageManager.getString("label.msf")+ " ");
611 pfamjv.setText(MessageManager.getString("label.pfam") + " ");
612 pileupjv.setText(MessageManager.getString("label.pileup") + " ");
613 msfjv.setFont(verdana11);
614 msfjv.setHorizontalAlignment(SwingConstants.LEFT);
615 pirjv.setText(MessageManager.getString("label.pir") + " ");
616 jPanel11.setFont(verdana11);
617 jPanel11.setBorder(titledBorder2);
618 jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
619 jPanel11.setLayout(gridLayout3);
620 blcjv.setFont(verdana11);
621 blcjv.setHorizontalAlignment(SwingConstants.LEFT);
622 clustaljv.setFont(verdana11);
623 clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
624 pfamjv.setFont(verdana11);
625 pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
626 pileupjv.setFont(verdana11);
627 pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
628 pirjv.setFont(verdana11);
629 pirjv.setHorizontalAlignment(SwingConstants.LEFT);
630 seqLimit.setFont(verdana11);
631 seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
632 seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
633 seqLimit.setText(MessageManager.getString("label.full_sequence_id"));
634 gridLayout3.setRows(8);
635 smoothFont.setFont(verdana11);
636 smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
637 smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
638 smoothFont.setText(MessageManager.getString("label.smooth_font"));
639 calcTab.setLayout(null);
640 autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
641 autoCalculateConsCheck.setText(MessageManager.getString("label.autocalculate_consensus"));
642 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
643 padGaps.setFont(JvSwingUtils.getLabelFont());
644 padGaps.setText(MessageManager.getString("label.pad_gaps_when_editing"));
645 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
646 sortByTree.setFont(JvSwingUtils.getLabelFont());
647 sortByTree.setText(MessageManager.getString("label.sort_with_new_tree"));
649 .setToolTipText(MessageManager.getString("label.any_trees_calculated_or_loaded_alignment_automatically_sort"));
650 sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
652 autoIdWidth.setFont(JvSwingUtils.getLabelFont());
653 autoIdWidth.setText(MessageManager.getString("label.automatically_set_id_width"));
655 .setToolTipText("<html>"
657 .wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")
659 autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
660 autoIdWidth.addActionListener(new ActionListener()
664 public void actionPerformed(ActionEvent e)
666 autoIdWidth_actionPerformed();
669 userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
670 userIdWidthlabel.setText(MessageManager.getString("label.figure_id_column_width"));
672 .setToolTipText("<html>"
674 .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")
677 .setToolTipText("<html>"
679 .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")
681 userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
682 userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
683 userIdWidth.setText("");
684 userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
685 userIdWidth.addActionListener(new ActionListener()
689 public void actionPerformed(ActionEvent e)
691 userIdWidth_actionPerformed();
694 modellerOutput.setFont(JvSwingUtils.getLabelFont());
695 modellerOutput.setText(MessageManager.getString("label.use_modeller_output"));
696 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
698 dasPanel.setLayout(borderLayout4);
699 wsPanel.setLayout(borderLayout5);
700 wrap.setFont(JvSwingUtils.getLabelFont());
701 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
702 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
703 wrap.setText(MessageManager.getString("label.wrap_alignment"));
704 rightAlign.setFont(JvSwingUtils.getLabelFont());
705 rightAlign.setForeground(Color.black);
706 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
707 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
708 rightAlign.setText(MessageManager.getString("label.right_align_ids"));
709 idItalics.setFont(JvSwingUtils.getLabelFont());
710 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
711 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
712 idItalics.setText(MessageManager.getString("label.sequence_name_italics"));
713 openoverv.setFont(JvSwingUtils.getLabelFont());
714 openoverv.setActionCommand(MessageManager.getString("label.open_overview"));
715 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
716 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
717 openoverv.setText(MessageManager.getString(("label.open_overview")));
718 jPanel2.add(fullScreen);
719 jPanel2.add(openoverv);
720 jPanel2.add(seqLimit);
721 jPanel2.add(rightAlign);
722 jPanel2.add(fontLabel);
723 jPanel2.add(showUnconserved);
724 jPanel2.add(idItalics);
725 jPanel2.add(smoothFont);
726 jPanel2.add(gapLabel);
728 jPanel2.add(sortLabel);
729 jPanel2.add(startupCheckbox);
730 visualTab.add(annotations);
731 visualTab.add(startupFileTextfield);
732 visualTab.add(sortby);
733 visualTab.add(gapSymbolCB);
734 visualTab.add(fontNameCB);
735 visualTab.add(fontSizeCB);
736 visualTab.add(fontStyleCB);
737 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
738 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
739 annsettingsPanel.add(autoAnnotSettings1);
740 annsettingsPanel.add(autoAnnotSettings2);
741 annsettingsPanel.add(autoAnnotSettings3);
742 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
743 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
744 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
745 visualTab.add(annsettingsPanel);
746 Border jb = new EmptyBorder(1, 1, 4, 5);
747 quality.setBorder(jb);
748 conservation.setBorder(jb);
749 identity.setBorder(jb);
750 showConsensbits.setBorder(jb);
751 showGroupbits.setBorder(jb);
752 showGroupConsensus.setBorder(jb);
753 showGroupConservation.setBorder(jb);
754 showConsensHistogram.setBorder(jb);
755 showConsensLogo.setBorder(jb);
757 autoAnnotSettings2.add(conservation);
758 autoAnnotSettings1.add(quality);
759 autoAnnotSettings3.add(identity);
760 autoAnnotSettings1.add(showGroupbits);
761 autoAnnotSettings3.add(showGroupConsensus);
762 autoAnnotSettings2.add(showGroupConservation);
763 autoAnnotSettings1.add(showConsensbits);
764 autoAnnotSettings2.add(showConsensHistogram);
765 autoAnnotSettings3.add(showConsensLogo);
767 JPanel tooltipSettings = new JPanel();
768 tooltipSettings.setBorder(new TitledBorder(MessageManager.getString("label.sequence_id_tooltip")));
769 tooltipSettings.setBounds(173, 130, 200, 62);
770 tooltipSettings.setLayout(new GridLayout(2, 1));
771 tooltipSettings.add(showDbRefTooltip);
772 tooltipSettings.add(showNpTooltip);
773 visualTab.add(tooltipSettings);
774 visualTab.add(jPanel2);
775 JvSwingUtils.addtoLayout(visual2Tab,
776 MessageManager.getString("label.default_colour_scheme_for_alignment"), colourLabel, colour);
777 JPanel annotationShding = new JPanel();
778 annotationShding.setBorder(new TitledBorder(
779 MessageManager.getString("label.annotation_shading_default")));
780 annotationShding.setLayout(new GridLayout(1, 2));
781 JvSwingUtils.addtoLayout(annotationShding,
782 MessageManager.getString("label.default_minimum_colour_annotation_shading"),
783 mincolourLabel, minColour);
784 JvSwingUtils.addtoLayout(annotationShding,
785 MessageManager.getString("label.default_maximum_colour_annotation_shading"),
786 maxcolourLabel, maxColour);
787 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
789 // visual2panel.add(minColour);
790 // visual2panel.add(maxColour);
791 // visual2Tab.add(visual2panel);
793 linkPanel.add(editLinkButtons, BorderLayout.EAST);
794 editLinkButtons.add(newLink, null);
795 editLinkButtons.add(editLink, null);
796 editLinkButtons.add(deleteLink, null);
797 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
798 linkScrollPane.getViewport().add(linkPanel2, null);
799 linkPanel2.add(linkURLList, BorderLayout.CENTER);
800 linkPanel2.add(linkNameList, BorderLayout.WEST);
801 okCancelPanel.add(ok);
802 okCancelPanel.add(cancel);
803 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
805 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
806 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
807 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
809 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
810 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
812 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
813 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
814 16, 0, 0, 12), 359, -17));
815 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
816 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
817 21, 0, 35, 12), 4, 6));
818 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
819 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
820 new Insets(16, 0, 0, 0), 5, 1));
821 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
822 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
823 new Insets(0, 2, 4, 2), 54, 1));
824 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
825 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
826 new Insets(0, 2, 4, 0), 263, 1));
827 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
828 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
829 new Insets(15, 0, 0, 15), 307, 1));
830 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
831 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
832 new Insets(0, 2, 4, 2), 70, 1));
833 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
834 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
835 new Insets(0, 2, 4, 2), 70, 1));
836 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
837 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
838 new Insets(0, 2, 4, 2), 70, 1));
840 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
841 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
843 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
844 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
845 gapSymbolCB.setRenderer(dlcr);
847 tabbedPane.add(visualTab, MessageManager.getString("label.visual"));
848 tabbedPane.add(visual2Tab, MessageManager.getString("label.colours"));
849 tabbedPane.add(connectTab, MessageManager.getString("label.connections"));
850 tabbedPane.add(exportTab, MessageManager.getString("label.output"));
851 jPanel11.add(jLabel1);
853 jPanel11.add(clustaljv);
854 jPanel11.add(fastajv);
856 jPanel11.add(pfamjv);
857 jPanel11.add(pileupjv);
859 exportTab.add(autoIdWidth);
860 exportTab.add(userIdWidth);
861 exportTab.add(userIdWidthlabel);
862 exportTab.add(modellerOutput);
863 tabbedPane.add(calcTab, MessageManager.getString("label.editing"));
864 calcTab.add(autoCalculateConsCheck);
865 calcTab.add(padGaps);
866 calcTab.add(sortByTree);
868 tabbedPane.add(dasPanel, MessageManager.getString("label.das_settings"));
869 tabbedPane.add(wsPanel, MessageManager.getString("label.web_services"));
871 exportTab.add(epsLabel);
872 exportTab.add(epsRendering);
873 exportTab.add(jPanel11);
876 protected void autoIdWidth_actionPerformed()
878 // TODO Auto-generated method stub
882 protected void userIdWidth_actionPerformed()
884 // TODO Auto-generated method stub
888 protected void maxColour_actionPerformed()
890 // TODO Auto-generated method stub
894 protected void minColour_actionPerformed()
896 // TODO Auto-generated method stub
900 protected void showunconserved_actionPerformed(ActionEvent e)
902 // TODO Auto-generated method stub
912 public void ok_actionPerformed(ActionEvent e)
922 public void cancel_actionPerformed(ActionEvent e)
932 public void annotations_actionPerformed(ActionEvent e)
939 public void startupFileTextfield_mouseClicked()
943 public void newLink_actionPerformed(ActionEvent e)
948 public void editLink_actionPerformed(ActionEvent e)
953 public void deleteLink_actionPerformed(ActionEvent e)
958 public void defaultBrowser_mouseClicked(MouseEvent e)
963 public void linkURLList_keyTyped(KeyEvent e)
968 public void useProxy_actionPerformed()
970 proxyServerTB.setEnabled(useProxy.isSelected());
971 proxyPortTB.setEnabled(useProxy.isSelected());