2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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/>.
18 package jalview.jbgui;
20 import jalview.gui.JvSwingUtils;
23 import java.awt.event.*;
26 import javax.swing.border.*;
27 import javax.swing.event.*;
28 import java.awt.Rectangle;
36 public class GPreferences extends JPanel
38 JTabbedPane tabbedPane = new JTabbedPane();
40 JButton ok = new JButton();
42 JButton cancel = new JButton();
44 JPanel okCancelPanel = new JPanel();
46 BorderLayout borderLayout1 = new BorderLayout();
48 protected JCheckBox quality = new JCheckBox();
50 JPanel visualTab = new JPanel();
52 JPanel visual2Tab = new JPanel();
54 protected JCheckBox fullScreen = new JCheckBox();
56 protected JCheckBox conservation = new JCheckBox();
58 protected JCheckBox identity = new JCheckBox();
60 protected JCheckBox annotations = new JCheckBox();
62 protected JPanel minColour = new JPanel();
64 JLabel mincolourLabel = new JLabel();
66 protected JPanel maxColour = new JPanel();
68 JLabel maxcolourLabel = new JLabel();
70 JLabel gapLabel = new JLabel();
72 protected JComboBox colour = new JComboBox();
74 JLabel colourLabel = new JLabel();
76 JLabel fontLabel = new JLabel();
78 protected JComboBox fontSizeCB = new JComboBox();
80 protected JComboBox fontStyleCB = new JComboBox();
82 protected JComboBox fontNameCB = new JComboBox();
84 protected JComboBox gapSymbolCB = new JComboBox();
86 protected JCheckBox startupCheckbox = new JCheckBox();
88 protected JTextField startupFileTextfield = new JTextField();
90 JPanel connectTab = new JPanel();
92 JLabel serverLabel = new JLabel();
94 protected JList linkURLList = new JList();
96 protected JTextField proxyServerTB = new JTextField();
98 protected JTextField proxyPortTB = new JTextField();
100 JLabel portLabel = new JLabel();
102 JLabel browserLabel = new JLabel();
104 protected JTextField defaultBrowser = new JTextField();
106 JButton newLink = new JButton();
108 JButton editLink = new JButton();
110 JButton deleteLink = new JButton();
112 JScrollPane linkScrollPane = new JScrollPane();
114 JPanel linkPanel = new JPanel();
116 BorderLayout borderLayout2 = new BorderLayout();
118 JPanel editLinkButtons = new JPanel();
120 GridLayout gridLayout1 = new GridLayout();
122 protected JList linkNameList = new JList();
124 JPanel linkPanel2 = new JPanel();
126 BorderLayout borderLayout3 = new BorderLayout();
128 protected JCheckBox useProxy = new JCheckBox();
130 JPanel jPanel1 = new JPanel();
132 TitledBorder titledBorder1 = new TitledBorder("Proxy Server");
134 TitledBorder titledBorder2 = new TitledBorder("File Output");
136 GridBagLayout gridBagLayout2 = new GridBagLayout();
138 GridBagLayout gridBagLayout1 = new GridBagLayout();
140 GridBagLayout gridBagLayout3 = new GridBagLayout();
142 protected JComboBox sortby = new JComboBox();
144 JLabel sortLabel = new JLabel();
146 JPanel jPanel2 = new JPanel();
148 JPanel visual2panel = new JPanel();
150 GridLayout gridLayout2 = new GridLayout();
152 GridLayout gridLayout4 = new GridLayout();
154 JPanel annsettingsPanel = new JPanel();
156 JPanel autoAnnotSettings1 = new JPanel();
158 JPanel autoAnnotSettings2 = new JPanel();
160 JPanel autoAnnotSettings3 = new JPanel();
162 JPanel exportTab = new JPanel();
164 JLabel epsLabel = new JLabel();
166 protected JComboBox epsRendering = new JComboBox();
168 protected JLabel userIdWidthlabel = new JLabel();
170 protected JCheckBox autoIdWidth = new JCheckBox();
172 protected JTextField userIdWidth = new JTextField();
174 JLabel jLabel1 = new JLabel();
176 protected JCheckBox blcjv = new JCheckBox();
178 protected JCheckBox pileupjv = new JCheckBox();
180 protected JCheckBox clustaljv = new JCheckBox();
182 protected JCheckBox msfjv = new JCheckBox();
184 protected JCheckBox fastajv = new JCheckBox();
186 protected JCheckBox pfamjv = new JCheckBox();
188 FlowLayout flowLayout1 = new FlowLayout();
190 protected JCheckBox pirjv = new JCheckBox();
192 JPanel jPanel11 = new JPanel();
194 Font verdana11 = JvSwingUtils.getLabelFont();
196 protected JCheckBox seqLimit = new JCheckBox();
198 GridLayout gridLayout3 = new GridLayout();
200 protected JCheckBox smoothFont = new JCheckBox();
202 JPanel calcTab = new JPanel();
204 protected JCheckBox autoCalculateConsCheck = new JCheckBox();
206 protected JCheckBox padGaps = new JCheckBox();
208 protected JCheckBox modellerOutput = new JCheckBox();
210 protected JPanel dasPanel = new JPanel();
212 BorderLayout borderLayout4 = new BorderLayout();
214 protected JPanel wsPanel = new JPanel();
216 BorderLayout borderLayout5 = new BorderLayout();
218 protected JCheckBox wrap = new JCheckBox();
220 protected JCheckBox rightAlign = new JCheckBox();
222 protected JCheckBox showUnconserved = new JCheckBox();
224 protected JCheckBox showDbRefTooltip = new JCheckBox();
226 protected JCheckBox showNpTooltip = new JCheckBox();
228 protected JCheckBox idItalics = new JCheckBox();
230 protected JCheckBox openoverv = new JCheckBox();
232 protected JCheckBox usagestats = new JCheckBox();
234 protected JCheckBox questionnaire = new JCheckBox();
236 protected JCheckBox versioncheck = new JCheckBox();
238 protected JLabel showGroupbits = new JLabel();
240 protected JLabel showConsensbits = new JLabel();
242 protected JCheckBox showConsensLogo = new JCheckBox();
244 protected JCheckBox showConsensHistogram = new JCheckBox();
246 protected JCheckBox showGroupConsensus = new JCheckBox();
248 protected JCheckBox showGroupConservation = new JCheckBox();
250 protected JCheckBox shareSelections = new JCheckBox();
252 protected JCheckBox followHighlight = new JCheckBox();
254 protected JCheckBox sortByTree = new JCheckBox();
257 * Creates a new GPreferences object.
259 public GPreferences()
264 } catch (Exception ex)
266 ex.printStackTrace();
276 private void jbInit() throws Exception
278 this.setLayout(borderLayout1);
280 ok.addActionListener(new ActionListener()
282 public void actionPerformed(ActionEvent e)
284 ok_actionPerformed(e);
287 cancel.setText("Cancel");
288 cancel.addActionListener(new ActionListener()
290 public void actionPerformed(ActionEvent e)
292 cancel_actionPerformed(e);
295 quality.setEnabled(false);
296 quality.setFont(verdana11);
297 quality.setHorizontalAlignment(SwingConstants.RIGHT);
298 quality.setHorizontalTextPosition(SwingConstants.LEFT);
299 quality.setSelected(true);
300 quality.setText("Quality");
301 visualTab.setBorder(new TitledBorder("Open new alignment"));
302 visualTab.setLayout(null);
303 visual2Tab.setBorder(new TitledBorder("Open new alignment"));
304 visual2Tab.setLayout(new FlowLayout());
305 fullScreen.setFont(verdana11);
306 fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
307 fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
308 fullScreen.setText("Maximise Window");
309 conservation.setEnabled(false);
310 conservation.setFont(verdana11);
311 conservation.setHorizontalAlignment(SwingConstants.RIGHT);
312 conservation.setHorizontalTextPosition(SwingConstants.LEFT);
313 conservation.setSelected(true);
314 conservation.setText("Conservation");
315 identity.setEnabled(false);
316 identity.setFont(verdana11);
317 identity.setHorizontalAlignment(SwingConstants.RIGHT);
318 identity.setHorizontalTextPosition(SwingConstants.LEFT);
319 identity.setSelected(true);
320 identity.setText("Consensus");
321 showGroupbits.setFont(verdana11);
322 showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
323 showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
324 showGroupbits.setText("Show group:");
325 showConsensbits.setFont(verdana11);
326 showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
327 showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
328 showConsensbits.setText("Consensus:");
329 showConsensHistogram.setEnabled(false);
330 showConsensHistogram.setFont(verdana11);
331 showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
332 showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
333 showConsensHistogram.setSelected(true);
334 showConsensHistogram.setText("Histogram");
335 showConsensLogo.setEnabled(false);
336 showConsensLogo.setFont(verdana11);
337 showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
338 showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
339 showConsensLogo.setSelected(true);
340 showConsensLogo.setText("Logo");
341 showGroupConsensus.setEnabled(false);
342 showGroupConsensus.setFont(verdana11);
343 showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
344 showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
345 showGroupConsensus.setSelected(true);
346 showGroupConsensus.setText("Consensus");
347 showGroupConservation.setEnabled(false);
348 showGroupConservation.setFont(verdana11);
349 showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
350 showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
351 showGroupConservation.setSelected(true);
352 showGroupConservation.setText("Conservation");
353 showNpTooltip.setEnabled(true);
354 showNpTooltip.setFont(verdana11);
355 showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
356 showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
357 showNpTooltip.setSelected(true);
358 showNpTooltip.setText("Non-positional Features");
359 showDbRefTooltip.setEnabled(true);
360 showDbRefTooltip.setFont(verdana11);
361 showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
362 showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
363 showDbRefTooltip.setSelected(true);
364 showDbRefTooltip.setText("Database References");
365 annotations.setFont(verdana11);
366 annotations.setHorizontalAlignment(SwingConstants.RIGHT);
367 annotations.setHorizontalTextPosition(SwingConstants.LEADING);
368 annotations.setSelected(true);
369 annotations.setText("Show Annotations");
370 annotations.setBounds(new Rectangle(169, 12, 200, 23));
371 annotations.addActionListener(new ActionListener()
373 public void actionPerformed(ActionEvent e)
375 annotations_actionPerformed(e);
378 identity.addActionListener(new ActionListener()
380 public void actionPerformed(ActionEvent e)
382 annotations_actionPerformed(e);
385 showGroupConsensus.addActionListener(new ActionListener()
387 public void actionPerformed(ActionEvent e)
389 annotations_actionPerformed(e);
392 showUnconserved.setFont(verdana11);
393 showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
394 showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
395 showUnconserved.setSelected(true);
396 showUnconserved.setText("Show Unconserved");
397 showUnconserved.addActionListener(new ActionListener()
399 public void actionPerformed(ActionEvent e)
401 showunconserved_actionPerformed(e);
404 // / TODO: fit these in to preferences panel!!!!!
405 shareSelections.setFont(verdana11);
406 shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
407 shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
408 shareSelections.setSelected(true);
409 shareSelections.setText("Share selection across views");
410 followHighlight.setFont(verdana11);
411 followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
412 followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
413 // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
414 followHighlight.setSelected(true);
415 followHighlight.setText("Scroll to highlighted regions");
417 gapLabel.setFont(verdana11);
418 gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
419 gapLabel.setText("Gap Symbol ");
420 colour.setFont(verdana11);
421 colour.setBounds(new Rectangle(172, 225, 155, 21));
422 colourLabel.setFont(verdana11);
423 colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
424 colourLabel.setText("Alignment Colour ");
425 fontLabel.setFont(verdana11);
426 fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
427 fontLabel.setText("Font ");
428 fontSizeCB.setFont(verdana11);
429 fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
430 fontStyleCB.setFont(verdana11);
431 fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
432 fontNameCB.setFont(verdana11);
433 fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
434 gapSymbolCB.setFont(verdana11);
435 gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
436 mincolourLabel.setFont(verdana11);
437 mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
438 mincolourLabel.setText("Minimum Colour");
439 minColour.setFont(verdana11);
440 minColour.setBorder(BorderFactory.createEtchedBorder());
441 minColour.setPreferredSize(new Dimension(40, 20));
442 minColour.addMouseListener(new MouseAdapter()
444 public void mousePressed(MouseEvent e)
446 minColour_actionPerformed();
449 maxcolourLabel.setFont(verdana11);
450 maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
451 maxcolourLabel.setText("Maximum Colour ");
452 maxColour.setFont(verdana11);
453 maxColour.setBorder(BorderFactory.createEtchedBorder());
454 maxColour.setPreferredSize(new Dimension(40, 20));
455 maxColour.addMouseListener(new MouseAdapter()
457 public void mousePressed(MouseEvent e)
459 maxColour_actionPerformed();
463 startupCheckbox.setText("Open file");
464 startupCheckbox.setFont(verdana11);
465 startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
466 startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
467 startupCheckbox.setSelected(true);
468 startupFileTextfield.setFont(verdana11);
469 startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
470 startupFileTextfield.addMouseListener(new MouseAdapter()
472 public void mouseClicked(MouseEvent e)
474 if (e.getClickCount() > 1)
476 startupFileTextfield_mouseClicked();
481 connectTab.setLayout(gridBagLayout3);
482 serverLabel.setText("Address");
483 serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
484 serverLabel.setFont(verdana11);
485 proxyServerTB.setFont(verdana11);
486 proxyPortTB.setFont(verdana11);
487 portLabel.setFont(verdana11);
488 portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
489 portLabel.setText("Port");
490 browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
491 browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
492 browserLabel.setText("Default Browser (Unix)");
493 defaultBrowser.setFont(verdana11);
494 defaultBrowser.setText("");
495 usagestats.setText("Send usage statistics");
496 usagestats.setFont(verdana11);
497 usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
498 usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
499 questionnaire.setText("Check for questionnaires");
500 questionnaire.setFont(verdana11);
501 questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
502 questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
503 versioncheck.setText("Check for latest version");
504 versioncheck.setFont(verdana11);
505 versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
506 versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
507 newLink.setText("New");
508 newLink.addActionListener(new java.awt.event.ActionListener()
510 public void actionPerformed(ActionEvent e)
512 newLink_actionPerformed(e);
515 editLink.setText("Edit");
516 editLink.addActionListener(new java.awt.event.ActionListener()
518 public void actionPerformed(ActionEvent e)
520 editLink_actionPerformed(e);
523 deleteLink.setText("Delete");
524 deleteLink.addActionListener(new java.awt.event.ActionListener()
526 public void actionPerformed(ActionEvent e)
528 deleteLink_actionPerformed(e);
532 linkURLList.addListSelectionListener(new ListSelectionListener()
534 public void valueChanged(ListSelectionEvent e)
536 int index = linkURLList.getSelectedIndex();
537 linkNameList.setSelectedIndex(index);
541 linkNameList.addListSelectionListener(new ListSelectionListener()
543 public void valueChanged(ListSelectionEvent e)
545 int index = linkNameList.getSelectedIndex();
546 linkURLList.setSelectedIndex(index);
550 linkScrollPane.setBorder(null);
551 linkPanel.setBorder(new TitledBorder("URL link from Sequence ID"));
552 linkPanel.setLayout(borderLayout2);
553 editLinkButtons.setLayout(gridLayout1);
554 gridLayout1.setRows(3);
555 linkNameList.setFont(verdana11);
556 linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
557 linkPanel2.setLayout(borderLayout3);
558 linkURLList.setFont(verdana11);
559 linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
561 defaultBrowser.addMouseListener(new MouseAdapter()
563 public void mouseClicked(MouseEvent e)
565 if (e.getClickCount() > 1)
567 defaultBrowser_mouseClicked(e);
571 useProxy.setFont(verdana11);
572 useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
573 useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
574 useProxy.setText("Use a proxy server");
575 useProxy.addActionListener(new ActionListener()
577 public void actionPerformed(ActionEvent e)
579 useProxy_actionPerformed();
582 jPanel1.setBorder(titledBorder1);
583 jPanel1.setLayout(gridBagLayout1);
584 sortby.setFont(verdana11);
585 sortby.setBounds(new Rectangle(172, 249, 155, 21));
586 sortLabel.setFont(verdana11);
587 sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
588 sortLabel.setText("Sort by ");
589 jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
590 jPanel2.setLayout(gridLayout2);
591 gridLayout2.setRows(12);
592 exportTab.setLayout(null);
593 epsLabel.setFont(verdana11);
594 epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
595 epsLabel.setText("EPS Rendering Style");
596 epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
597 epsRendering.setFont(verdana11);
598 epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
599 jLabel1.setFont(verdana11);
600 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
601 jLabel1.setText("Append /start-end (/15-380)");
602 jLabel1.setFont(verdana11);
603 fastajv.setFont(verdana11);
604 fastajv.setHorizontalAlignment(SwingConstants.LEFT);
605 clustaljv.setText("Clustal ");
606 blcjv.setText("BLC ");
607 fastajv.setText("Fasta ");
608 msfjv.setText("MSF ");
609 pfamjv.setText("PFAM ");
610 pileupjv.setText("Pileup ");
611 msfjv.setFont(verdana11);
612 msfjv.setHorizontalAlignment(SwingConstants.LEFT);
613 pirjv.setText("PIR ");
614 jPanel11.setFont(verdana11);
615 jPanel11.setBorder(titledBorder2);
616 jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
617 jPanel11.setLayout(gridLayout3);
618 blcjv.setFont(verdana11);
619 blcjv.setHorizontalAlignment(SwingConstants.LEFT);
620 clustaljv.setFont(verdana11);
621 clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
622 pfamjv.setFont(verdana11);
623 pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
624 pileupjv.setFont(verdana11);
625 pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
626 pirjv.setFont(verdana11);
627 pirjv.setHorizontalAlignment(SwingConstants.LEFT);
628 seqLimit.setFont(verdana11);
629 seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
630 seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
631 seqLimit.setText("Full Sequence Id");
632 gridLayout3.setRows(8);
633 smoothFont.setFont(verdana11);
634 smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
635 smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
636 smoothFont.setText("Smooth Font");
637 calcTab.setLayout(null);
638 autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
639 autoCalculateConsCheck.setText("AutoCalculate Consensus");
640 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
641 padGaps.setFont(JvSwingUtils.getLabelFont());
642 padGaps.setText("Pad Gaps When Editing");
643 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
644 sortByTree.setFont(JvSwingUtils.getLabelFont());
645 sortByTree.setText("Sort With New Tree");
647 .setToolTipText("When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment.");
648 sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
650 autoIdWidth.setFont(JvSwingUtils.getLabelFont());
651 autoIdWidth.setText("Automatically set ID width");
653 .setToolTipText("<html>"
655 .wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")
657 autoIdWidth.setBounds(new Rectangle(228, 96, 188, 23));
658 autoIdWidth.addActionListener(new ActionListener()
662 public void actionPerformed(ActionEvent e)
664 autoIdWidth_actionPerformed();
667 userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
668 userIdWidthlabel.setText("Figure ID column width");
670 .setToolTipText("<html>"
672 .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")
675 .setToolTipText("<html>"
677 .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")
679 userIdWidthlabel.setBounds(new Rectangle(236, 120, 168, 23));
680 userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
681 userIdWidth.setText("");
682 userIdWidth.setBounds(new Rectangle(232, 144, 84, 23));
683 userIdWidth.addActionListener(new ActionListener()
687 public void actionPerformed(ActionEvent e)
689 userIdWidth_actionPerformed();
692 modellerOutput.setFont(JvSwingUtils.getLabelFont());
693 modellerOutput.setText("Use Modeller Output");
694 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
696 dasPanel.setLayout(borderLayout4);
697 wsPanel.setLayout(borderLayout5);
698 wrap.setFont(JvSwingUtils.getLabelFont());
699 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
700 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
701 wrap.setText("Wrap Alignment");
702 rightAlign.setFont(JvSwingUtils.getLabelFont());
703 rightAlign.setForeground(Color.black);
704 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
705 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
706 rightAlign.setText("Right Align Ids");
707 idItalics.setFont(JvSwingUtils.getLabelFont());
708 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
709 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
710 idItalics.setText("Sequence Name Italics");
711 openoverv.setFont(JvSwingUtils.getLabelFont());
712 openoverv.setActionCommand("Open Overview");
713 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
714 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
715 openoverv.setText("Open Overview");
716 jPanel2.add(fullScreen);
717 jPanel2.add(openoverv);
718 jPanel2.add(seqLimit);
719 jPanel2.add(rightAlign);
720 jPanel2.add(fontLabel);
721 jPanel2.add(showUnconserved);
722 jPanel2.add(idItalics);
723 jPanel2.add(smoothFont);
724 jPanel2.add(gapLabel);
726 jPanel2.add(sortLabel);
727 jPanel2.add(startupCheckbox);
728 visualTab.add(annotations);
729 visualTab.add(startupFileTextfield);
730 visualTab.add(sortby);
731 visualTab.add(gapSymbolCB);
732 visualTab.add(fontNameCB);
733 visualTab.add(fontSizeCB);
734 visualTab.add(fontStyleCB);
735 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
736 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
737 annsettingsPanel.add(autoAnnotSettings1);
738 annsettingsPanel.add(autoAnnotSettings2);
739 annsettingsPanel.add(autoAnnotSettings3);
740 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
741 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
742 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
743 visualTab.add(annsettingsPanel);
744 Border jb = new EmptyBorder(1, 1, 4, 5);
745 quality.setBorder(jb);
746 conservation.setBorder(jb);
747 identity.setBorder(jb);
748 showConsensbits.setBorder(jb);
749 showGroupbits.setBorder(jb);
750 showGroupConsensus.setBorder(jb);
751 showGroupConservation.setBorder(jb);
752 showConsensHistogram.setBorder(jb);
753 showConsensLogo.setBorder(jb);
755 autoAnnotSettings2.add(conservation);
756 autoAnnotSettings1.add(quality);
757 autoAnnotSettings3.add(identity);
758 autoAnnotSettings1.add(showGroupbits);
759 autoAnnotSettings3.add(showGroupConsensus);
760 autoAnnotSettings2.add(showGroupConservation);
761 autoAnnotSettings1.add(showConsensbits);
762 autoAnnotSettings2.add(showConsensHistogram);
763 autoAnnotSettings3.add(showConsensLogo);
765 JPanel tooltipSettings = new JPanel();
766 tooltipSettings.setBorder(new TitledBorder("Sequence ID Tooltip"));
767 tooltipSettings.setBounds(173, 130, 200, 62);
768 tooltipSettings.setLayout(new GridLayout(2, 1));
769 tooltipSettings.add(showDbRefTooltip);
770 tooltipSettings.add(showNpTooltip);
771 visualTab.add(tooltipSettings);
772 visualTab.add(jPanel2);
773 JvSwingUtils.addtoLayout(visual2Tab,
774 "Default Colourscheme for alignment", colourLabel, colour);
775 JPanel annotationShding = new JPanel();
776 annotationShding.setBorder(new TitledBorder(
777 "Annotation Shading Default"));
778 annotationShding.setLayout(new GridLayout(1, 2));
779 JvSwingUtils.addtoLayout(annotationShding,
780 "Default Minimum Colour for annotation shading",
781 mincolourLabel, minColour);
782 JvSwingUtils.addtoLayout(annotationShding,
783 "Default Maximum Colour for annotation shading",
784 maxcolourLabel, maxColour);
785 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
787 // visual2panel.add(minColour);
788 // visual2panel.add(maxColour);
789 // visual2Tab.add(visual2panel);
791 linkPanel.add(editLinkButtons, BorderLayout.EAST);
792 editLinkButtons.add(newLink, null);
793 editLinkButtons.add(editLink, null);
794 editLinkButtons.add(deleteLink, null);
795 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
796 linkScrollPane.getViewport().add(linkPanel2, null);
797 linkPanel2.add(linkURLList, BorderLayout.CENTER);
798 linkPanel2.add(linkNameList, BorderLayout.WEST);
799 okCancelPanel.add(ok);
800 okCancelPanel.add(cancel);
801 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
803 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
804 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
805 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
807 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
808 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
810 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
811 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
812 16, 0, 0, 12), 359, -17));
813 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
814 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
815 21, 0, 35, 12), 4, 6));
816 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
817 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
818 new Insets(16, 0, 0, 0), 5, 1));
819 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
820 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
821 new Insets(0, 2, 4, 2), 54, 1));
822 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
823 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
824 new Insets(0, 2, 4, 0), 263, 1));
825 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
826 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
827 new Insets(15, 0, 0, 15), 307, 1));
828 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
829 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
830 new Insets(0, 2, 4, 2), 70, 1));
831 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
832 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
833 new Insets(0, 2, 4, 2), 70, 1));
834 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
835 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
836 new Insets(0, 2, 4, 2), 70, 1));
838 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
839 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
841 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
842 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
843 gapSymbolCB.setRenderer(dlcr);
845 tabbedPane.add(visualTab, "Visual");
846 tabbedPane.add(visual2Tab, "Colours");
847 tabbedPane.add(connectTab, "Connections");
848 tabbedPane.add(exportTab, "Output");
849 jPanel11.add(jLabel1);
851 jPanel11.add(clustaljv);
852 jPanel11.add(fastajv);
854 jPanel11.add(pfamjv);
855 jPanel11.add(pileupjv);
857 exportTab.add(autoIdWidth);
858 exportTab.add(userIdWidth);
859 exportTab.add(userIdWidthlabel);
860 exportTab.add(modellerOutput);
861 tabbedPane.add(calcTab, "Editing");
862 calcTab.add(autoCalculateConsCheck);
863 calcTab.add(padGaps);
864 calcTab.add(sortByTree);
866 tabbedPane.add(dasPanel, "DAS Settings");
867 tabbedPane.add(wsPanel, "Web Services");
869 exportTab.add(epsLabel);
870 exportTab.add(epsRendering);
871 exportTab.add(jPanel11);
874 protected void autoIdWidth_actionPerformed()
876 // TODO Auto-generated method stub
880 protected void userIdWidth_actionPerformed()
882 // TODO Auto-generated method stub
886 protected void maxColour_actionPerformed()
888 // TODO Auto-generated method stub
892 protected void minColour_actionPerformed()
894 // TODO Auto-generated method stub
898 protected void showunconserved_actionPerformed(ActionEvent e)
900 // TODO Auto-generated method stub
910 public void ok_actionPerformed(ActionEvent e)
920 public void cancel_actionPerformed(ActionEvent e)
930 public void annotations_actionPerformed(ActionEvent e)
937 public void startupFileTextfield_mouseClicked()
941 public void newLink_actionPerformed(ActionEvent e)
946 public void editLink_actionPerformed(ActionEvent e)
951 public void deleteLink_actionPerformed(ActionEvent e)
956 public void defaultBrowser_mouseClicked(MouseEvent e)
961 public void linkURLList_keyTyped(KeyEvent e)
966 public void useProxy_actionPerformed()
968 proxyServerTB.setEnabled(useProxy.isSelected());
969 proxyPortTB.setEnabled(useProxy.isSelected());