2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, 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();
51 JPanel visual2Tab = new JPanel();
53 protected JCheckBox fullScreen = new JCheckBox();
55 protected JCheckBox conservation = new JCheckBox();
57 protected JCheckBox identity = new JCheckBox();
59 protected JCheckBox annotations = new JCheckBox();
61 protected JPanel minColour = new JPanel();
62 JLabel mincolourLabel = new JLabel();
64 protected JPanel maxColour = new JPanel();
65 JLabel maxcolourLabel = new JLabel();
67 JLabel gapLabel = new JLabel();
69 protected JComboBox colour = new JComboBox();
71 JLabel colourLabel = new JLabel();
73 JLabel fontLabel = new JLabel();
75 protected JComboBox fontSizeCB = new JComboBox();
77 protected JComboBox fontStyleCB = new JComboBox();
79 protected JComboBox fontNameCB = new JComboBox();
81 protected JComboBox gapSymbolCB = new JComboBox();
83 protected JCheckBox startupCheckbox = new JCheckBox();
85 protected JTextField startupFileTextfield = new JTextField();
87 JPanel connectTab = new JPanel();
89 JLabel serverLabel = new JLabel();
91 protected JList linkURLList = new JList();
93 protected JTextField proxyServerTB = new JTextField();
95 protected JTextField proxyPortTB = new JTextField();
97 JLabel portLabel = new JLabel();
99 JLabel browserLabel = new JLabel();
101 protected JTextField defaultBrowser = new JTextField();
103 JButton newLink = new JButton();
105 JButton editLink = new JButton();
107 JButton deleteLink = new JButton();
109 JScrollPane linkScrollPane = new JScrollPane();
111 JPanel linkPanel = new JPanel();
113 BorderLayout borderLayout2 = new BorderLayout();
115 JPanel editLinkButtons = new JPanel();
117 GridLayout gridLayout1 = new GridLayout();
119 protected JList linkNameList = new JList();
121 JPanel linkPanel2 = new JPanel();
123 BorderLayout borderLayout3 = new BorderLayout();
125 protected JCheckBox useProxy = new JCheckBox();
127 JPanel jPanel1 = new JPanel();
129 TitledBorder titledBorder1 = new TitledBorder("Proxy Server");
131 TitledBorder titledBorder2 = new TitledBorder("File Output");
133 GridBagLayout gridBagLayout2 = new GridBagLayout();
135 GridBagLayout gridBagLayout1 = new GridBagLayout();
137 GridBagLayout gridBagLayout3 = new GridBagLayout();
139 protected JComboBox sortby = new JComboBox();
141 JLabel sortLabel = new JLabel();
143 JPanel jPanel2 = new JPanel();
144 JPanel visual2panel = new JPanel();
146 GridLayout gridLayout2 = new GridLayout();
148 GridLayout gridLayout4 = new GridLayout();
150 JPanel annsettingsPanel = new JPanel();
152 JPanel autoAnnotSettings1 = new JPanel();
154 JPanel autoAnnotSettings2 = new JPanel();
156 JPanel autoAnnotSettings3 = new JPanel();
158 JPanel exportTab = new JPanel();
160 JLabel epsLabel = new JLabel();
162 protected JComboBox epsRendering = new JComboBox();
164 protected JLabel userIdWidthlabel = new JLabel();
165 protected JCheckBox autoIdWidth = new JCheckBox();
166 protected JTextField userIdWidth = new JTextField();
169 JLabel jLabel1 = new JLabel();
171 protected JCheckBox blcjv = new JCheckBox();
173 protected JCheckBox pileupjv = new JCheckBox();
175 protected JCheckBox clustaljv = new JCheckBox();
177 protected JCheckBox msfjv = new JCheckBox();
179 protected JCheckBox fastajv = new JCheckBox();
181 protected JCheckBox pfamjv = new JCheckBox();
183 FlowLayout flowLayout1 = new FlowLayout();
185 protected JCheckBox pirjv = new JCheckBox();
187 JPanel jPanel11 = new JPanel();
189 Font verdana11 = JvSwingUtils.getLabelFont();
191 protected JCheckBox seqLimit = new JCheckBox();
193 GridLayout gridLayout3 = new GridLayout();
195 protected JCheckBox smoothFont = new JCheckBox();
197 JPanel calcTab = new JPanel();
199 protected JCheckBox autoCalculateConsCheck = new JCheckBox();
201 protected JCheckBox padGaps = new JCheckBox();
203 protected JCheckBox modellerOutput = new JCheckBox();
205 protected JPanel dasPanel = new JPanel();
207 BorderLayout borderLayout4 = new BorderLayout();
209 protected JPanel wsPanel = new JPanel();
211 BorderLayout borderLayout5 = new BorderLayout();
213 protected JCheckBox wrap = new JCheckBox();
215 protected JCheckBox rightAlign = new JCheckBox();
217 protected JCheckBox showUnconserved = new JCheckBox();
219 protected JCheckBox showDbRefTooltip = new JCheckBox();
221 protected JCheckBox showNpTooltip = new JCheckBox();
223 protected JCheckBox idItalics = new JCheckBox();
225 protected JCheckBox openoverv = new JCheckBox();
227 protected JCheckBox usagestats = new JCheckBox();
229 protected JCheckBox questionnaire = new JCheckBox();
231 protected JCheckBox versioncheck = new JCheckBox();
233 protected JLabel showGroupbits = new JLabel();
235 protected JLabel showConsensbits = new JLabel();
237 protected JCheckBox showConsensLogo = new JCheckBox();
239 protected JCheckBox showConsensHistogram = new JCheckBox();
241 protected JCheckBox showGroupConsensus = new JCheckBox();
243 protected JCheckBox showGroupConservation = new JCheckBox();
245 protected JCheckBox shareSelections = new JCheckBox();
247 protected JCheckBox followHighlight = new JCheckBox();
249 protected JCheckBox sortByTree= new JCheckBox();
252 * Creates a new GPreferences object.
254 public GPreferences()
259 } catch (Exception ex)
261 ex.printStackTrace();
271 private void jbInit() throws Exception
273 this.setLayout(borderLayout1);
275 ok.addActionListener(new ActionListener()
277 public void actionPerformed(ActionEvent e)
279 ok_actionPerformed(e);
282 cancel.setText("Cancel");
283 cancel.addActionListener(new ActionListener()
285 public void actionPerformed(ActionEvent e)
287 cancel_actionPerformed(e);
290 quality.setEnabled(false);
291 quality.setFont(verdana11);
292 quality.setHorizontalAlignment(SwingConstants.RIGHT);
293 quality.setHorizontalTextPosition(SwingConstants.LEFT);
294 quality.setSelected(true);
295 quality.setText("Quality");
296 visualTab.setBorder(new TitledBorder("Open new alignment"));
297 visualTab.setLayout(null);
298 visual2Tab.setBorder(new TitledBorder("Open new alignment"));
299 visual2Tab.setLayout(new FlowLayout());
300 fullScreen.setFont(verdana11);
301 fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
302 fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
303 fullScreen.setText("Maximise Window");
304 conservation.setEnabled(false);
305 conservation.setFont(verdana11);
306 conservation.setHorizontalAlignment(SwingConstants.RIGHT);
307 conservation.setHorizontalTextPosition(SwingConstants.LEFT);
308 conservation.setSelected(true);
309 conservation.setText("Conservation");
310 identity.setEnabled(false);
311 identity.setFont(verdana11);
312 identity.setHorizontalAlignment(SwingConstants.RIGHT);
313 identity.setHorizontalTextPosition(SwingConstants.LEFT);
314 identity.setSelected(true);
315 identity.setText("Consensus");
316 showGroupbits.setFont(verdana11);
317 showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
318 showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
319 showGroupbits.setText("Show group:");
320 showConsensbits.setFont(verdana11);
321 showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
322 showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
323 showConsensbits.setText("Consensus:");
324 showConsensHistogram.setEnabled(false);
325 showConsensHistogram.setFont(verdana11);
326 showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
327 showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
328 showConsensHistogram.setSelected(true);
329 showConsensHistogram.setText("Histogram");
330 showConsensLogo.setEnabled(false);
331 showConsensLogo.setFont(verdana11);
332 showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
333 showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
334 showConsensLogo.setSelected(true);
335 showConsensLogo.setText("Logo");
336 showGroupConsensus.setEnabled(false);
337 showGroupConsensus.setFont(verdana11);
338 showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
339 showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
340 showGroupConsensus.setSelected(true);
341 showGroupConsensus.setText("Consensus");
342 showGroupConservation.setEnabled(false);
343 showGroupConservation.setFont(verdana11);
344 showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
345 showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
346 showGroupConservation.setSelected(true);
347 showGroupConservation.setText("Conservation");
348 showNpTooltip.setEnabled(true);
349 showNpTooltip.setFont(verdana11);
350 showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
351 showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
352 showNpTooltip.setSelected(true);
353 showNpTooltip.setText("Non-positional Features");
354 showDbRefTooltip.setEnabled(true);
355 showDbRefTooltip.setFont(verdana11);
356 showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
357 showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
358 showDbRefTooltip.setSelected(true);
359 showDbRefTooltip.setText("Database References");
360 annotations.setFont(verdana11);
361 annotations.setHorizontalAlignment(SwingConstants.RIGHT);
362 annotations.setHorizontalTextPosition(SwingConstants.LEADING);
363 annotations.setSelected(true);
364 annotations.setText("Show Annotations");
365 annotations.setBounds(new Rectangle(169, 12, 200, 23));
366 annotations.addActionListener(new ActionListener()
368 public void actionPerformed(ActionEvent e)
370 annotations_actionPerformed(e);
373 identity.addActionListener(new ActionListener()
375 public void actionPerformed(ActionEvent e)
377 annotations_actionPerformed(e);
380 showGroupConsensus.addActionListener(new ActionListener()
382 public void actionPerformed(ActionEvent e)
384 annotations_actionPerformed(e);
387 showUnconserved.setFont(verdana11);
388 showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
389 showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
390 showUnconserved.setSelected(true);
391 showUnconserved.setText("Show Unconserved");
392 showUnconserved.addActionListener(new ActionListener()
394 public void actionPerformed(ActionEvent e)
396 showunconserved_actionPerformed(e);
399 // / TODO: fit these in to preferences panel!!!!!
400 shareSelections.setFont(verdana11);
401 shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
402 shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
403 shareSelections.setSelected(true);
404 shareSelections.setText("Share selection across views");
405 followHighlight.setFont(verdana11);
406 followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
407 followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
408 // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
409 followHighlight.setSelected(true);
410 followHighlight.setText("Scroll to highlighted regions");
412 gapLabel.setFont(verdana11);
413 gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
414 gapLabel.setText("Gap Symbol ");
415 colour.setFont(verdana11);
416 colour.setBounds(new Rectangle(172, 225, 155, 21));
417 colourLabel.setFont(verdana11);
418 colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
419 colourLabel.setText("Alignment Colour ");
420 fontLabel.setFont(verdana11);
421 fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
422 fontLabel.setText("Font ");
423 fontSizeCB.setFont(verdana11);
424 fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
425 fontStyleCB.setFont(verdana11);
426 fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
427 fontNameCB.setFont(verdana11);
428 fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
429 gapSymbolCB.setFont(verdana11);
430 gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
431 mincolourLabel.setFont(verdana11);
432 mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
433 mincolourLabel.setText("Minimum Colour");
434 minColour.setFont(verdana11);
435 minColour.setBorder(BorderFactory.createEtchedBorder());
436 minColour.setPreferredSize(new Dimension(40, 20));
437 minColour.addMouseListener(new MouseAdapter()
439 public void mousePressed(MouseEvent e)
441 minColour_actionPerformed();
444 maxcolourLabel.setFont(verdana11);
445 maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
446 maxcolourLabel.setText("Maximum Colour ");
447 maxColour.setFont(verdana11);
448 maxColour.setBorder(BorderFactory.createEtchedBorder());
449 maxColour.setPreferredSize(new Dimension(40, 20));
450 maxColour.addMouseListener(new MouseAdapter()
452 public void mousePressed(MouseEvent e)
454 maxColour_actionPerformed();
458 startupCheckbox.setText("Open file");
459 startupCheckbox.setFont(verdana11);
460 startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
461 startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
462 startupCheckbox.setSelected(true);
463 startupFileTextfield.setFont(verdana11);
464 startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
465 startupFileTextfield.addMouseListener(new MouseAdapter()
467 public void mouseClicked(MouseEvent e)
469 if (e.getClickCount() > 1)
471 startupFileTextfield_mouseClicked();
476 connectTab.setLayout(gridBagLayout3);
477 serverLabel.setText("Address");
478 serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
479 serverLabel.setFont(verdana11);
480 proxyServerTB.setFont(verdana11);
481 proxyPortTB.setFont(verdana11);
482 portLabel.setFont(verdana11);
483 portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
484 portLabel.setText("Port");
485 browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
486 browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
487 browserLabel.setText("Default Browser (Unix)");
488 defaultBrowser.setFont(verdana11);
489 defaultBrowser.setText("");
490 usagestats.setText("Send usage statistics");
491 usagestats.setFont(verdana11);
492 usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
493 usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
494 questionnaire.setText("Check for questionnaires");
495 questionnaire.setFont(verdana11);
496 questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
497 questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
498 versioncheck.setText("Check for latest version");
499 versioncheck.setFont(verdana11);
500 versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
501 versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
502 newLink.setText("New");
503 newLink.addActionListener(new java.awt.event.ActionListener()
505 public void actionPerformed(ActionEvent e)
507 newLink_actionPerformed(e);
510 editLink.setText("Edit");
511 editLink.addActionListener(new java.awt.event.ActionListener()
513 public void actionPerformed(ActionEvent e)
515 editLink_actionPerformed(e);
518 deleteLink.setText("Delete");
519 deleteLink.addActionListener(new java.awt.event.ActionListener()
521 public void actionPerformed(ActionEvent e)
523 deleteLink_actionPerformed(e);
527 linkURLList.addListSelectionListener(new ListSelectionListener()
529 public void valueChanged(ListSelectionEvent e)
531 int index = linkURLList.getSelectedIndex();
532 linkNameList.setSelectedIndex(index);
536 linkNameList.addListSelectionListener(new ListSelectionListener()
538 public void valueChanged(ListSelectionEvent e)
540 int index = linkNameList.getSelectedIndex();
541 linkURLList.setSelectedIndex(index);
545 linkScrollPane.setBorder(null);
546 linkPanel.setBorder(new TitledBorder("URL link from Sequence ID"));
547 linkPanel.setLayout(borderLayout2);
548 editLinkButtons.setLayout(gridLayout1);
549 gridLayout1.setRows(3);
550 linkNameList.setFont(verdana11);
551 linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
552 linkPanel2.setLayout(borderLayout3);
553 linkURLList.setFont(verdana11);
554 linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
556 defaultBrowser.addMouseListener(new MouseAdapter()
558 public void mouseClicked(MouseEvent e)
560 if (e.getClickCount() > 1)
562 defaultBrowser_mouseClicked(e);
566 useProxy.setFont(verdana11);
567 useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
568 useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
569 useProxy.setText("Use a proxy server");
570 useProxy.addActionListener(new ActionListener()
572 public void actionPerformed(ActionEvent e)
574 useProxy_actionPerformed();
577 jPanel1.setBorder(titledBorder1);
578 jPanel1.setLayout(gridBagLayout1);
579 sortby.setFont(verdana11);
580 sortby.setBounds(new Rectangle(172, 249, 155, 21));
581 sortLabel.setFont(verdana11);
582 sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
583 sortLabel.setText("Sort by ");
584 jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
585 jPanel2.setLayout(gridLayout2);
586 gridLayout2.setRows(12);
587 exportTab.setLayout(null);
588 epsLabel.setFont(verdana11);
589 epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
590 epsLabel.setText("EPS Rendering Style");
591 epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
592 epsRendering.setFont(verdana11);
593 epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
594 jLabel1.setFont(verdana11);
595 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
596 jLabel1.setText("Append /start-end (/15-380)");
597 jLabel1.setFont(verdana11);
598 fastajv.setFont(verdana11);
599 fastajv.setHorizontalAlignment(SwingConstants.LEFT);
600 clustaljv.setText("Clustal ");
601 blcjv.setText("BLC ");
602 fastajv.setText("Fasta ");
603 msfjv.setText("MSF ");
604 pfamjv.setText("PFAM ");
605 pileupjv.setText("Pileup ");
606 msfjv.setFont(verdana11);
607 msfjv.setHorizontalAlignment(SwingConstants.LEFT);
608 pirjv.setText("PIR ");
609 jPanel11.setFont(verdana11);
610 jPanel11.setBorder(titledBorder2);
611 jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
612 jPanel11.setLayout(gridLayout3);
613 blcjv.setFont(verdana11);
614 blcjv.setHorizontalAlignment(SwingConstants.LEFT);
615 clustaljv.setFont(verdana11);
616 clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
617 pfamjv.setFont(verdana11);
618 pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
619 pileupjv.setFont(verdana11);
620 pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
621 pirjv.setFont(verdana11);
622 pirjv.setHorizontalAlignment(SwingConstants.LEFT);
623 seqLimit.setFont(verdana11);
624 seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
625 seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
626 seqLimit.setText("Full Sequence Id");
627 gridLayout3.setRows(8);
628 smoothFont.setFont(verdana11);
629 smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
630 smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
631 smoothFont.setText("Smooth Font");
632 calcTab.setLayout(null);
633 autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
634 autoCalculateConsCheck.setText("AutoCalculate Consensus");
635 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
636 padGaps.setFont(JvSwingUtils.getLabelFont());
637 padGaps.setText("Pad Gaps When Editing");
638 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
639 sortByTree.setFont(JvSwingUtils.getLabelFont());
640 sortByTree.setText("Sort With New Tree");
641 sortByTree.setToolTipText("When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment.");
642 sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
644 autoIdWidth.setFont(JvSwingUtils.getLabelFont());
645 autoIdWidth.setText("Automatically set ID width");
646 autoIdWidth.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")+"</html>");
647 autoIdWidth.setBounds(new Rectangle(228, 96,188,23));
648 autoIdWidth.addActionListener(new ActionListener()
652 public void actionPerformed(ActionEvent e)
654 autoIdWidth_actionPerformed();
657 userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
658 userIdWidthlabel.setText("Figure ID column width");
660 .setToolTipText("<html>"+JvSwingUtils
661 .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")+"</html>");
663 .setToolTipText("<html>"+JvSwingUtils
664 .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")+"</html>");
665 userIdWidthlabel.setBounds(new Rectangle(236, 120,168,23));
666 userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
667 userIdWidth.setText("");
668 userIdWidth.setBounds(new Rectangle(232,144,84,23));
669 userIdWidth.addActionListener(new ActionListener()
673 public void actionPerformed(ActionEvent e)
675 userIdWidth_actionPerformed();
678 modellerOutput.setFont(JvSwingUtils.getLabelFont());
679 modellerOutput.setText("Use Modeller Output");
680 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
682 dasPanel.setLayout(borderLayout4);
683 wsPanel.setLayout(borderLayout5);
684 wrap.setFont(JvSwingUtils.getLabelFont());
685 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
686 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
687 wrap.setText("Wrap Alignment");
688 rightAlign.setFont(JvSwingUtils.getLabelFont());
689 rightAlign.setForeground(Color.black);
690 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
691 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
692 rightAlign.setText("Right Align Ids");
693 idItalics.setFont(JvSwingUtils.getLabelFont());
694 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
695 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
696 idItalics.setText("Sequence Name Italics");
697 openoverv.setFont(JvSwingUtils.getLabelFont());
698 openoverv.setActionCommand("Open Overview");
699 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
700 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
701 openoverv.setText("Open Overview");
702 jPanel2.add(fullScreen);
703 jPanel2.add(openoverv);
704 jPanel2.add(seqLimit);
705 jPanel2.add(rightAlign);
706 jPanel2.add(fontLabel);
707 jPanel2.add(showUnconserved);
708 jPanel2.add(idItalics);
709 jPanel2.add(smoothFont);
710 jPanel2.add(gapLabel);
712 jPanel2.add(sortLabel);
713 jPanel2.add(startupCheckbox);
714 visualTab.add(annotations);
715 visualTab.add(startupFileTextfield);
716 visualTab.add(sortby);
717 visualTab.add(gapSymbolCB);
718 visualTab.add(fontNameCB);
719 visualTab.add(fontSizeCB);
720 visualTab.add(fontStyleCB);
721 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
722 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
723 annsettingsPanel.add(autoAnnotSettings1);
724 annsettingsPanel.add(autoAnnotSettings2);
725 annsettingsPanel.add(autoAnnotSettings3);
726 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
727 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
728 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
729 visualTab.add(annsettingsPanel);
730 Border jb = new EmptyBorder(1, 1, 4, 5);
731 quality.setBorder(jb);
732 conservation.setBorder(jb);
733 identity.setBorder(jb);
734 showConsensbits.setBorder(jb);
735 showGroupbits.setBorder(jb);
736 showGroupConsensus.setBorder(jb);
737 showGroupConservation.setBorder(jb);
738 showConsensHistogram.setBorder(jb);
739 showConsensLogo.setBorder(jb);
741 autoAnnotSettings2.add(conservation);
742 autoAnnotSettings1.add(quality);
743 autoAnnotSettings3.add(identity);
744 autoAnnotSettings1.add(showGroupbits);
745 autoAnnotSettings3.add(showGroupConsensus);
746 autoAnnotSettings2.add(showGroupConservation);
747 autoAnnotSettings1.add(showConsensbits);
748 autoAnnotSettings2.add(showConsensHistogram);
749 autoAnnotSettings3.add(showConsensLogo);
751 JPanel tooltipSettings = new JPanel();
752 tooltipSettings.setBorder(new TitledBorder("Sequence ID Tooltip"));
753 tooltipSettings.setBounds(173, 130, 200, 62);
754 tooltipSettings.setLayout(new GridLayout(2, 1));
755 tooltipSettings.add(showDbRefTooltip);
756 tooltipSettings.add(showNpTooltip);
757 visualTab.add(tooltipSettings);
758 visualTab.add(jPanel2);
759 JvSwingUtils.addtoLayout(visual2Tab, "Default Colourscheme for alignment", colourLabel, colour);
760 JPanel annotationShding=new JPanel();
761 annotationShding.setBorder(new TitledBorder("Annotation Shading Default"));
762 annotationShding.setLayout(new GridLayout(1,2));
763 JvSwingUtils.addtoLayout(annotationShding, "Default Minimum Colour for annotation shading", mincolourLabel,minColour);
764 JvSwingUtils.addtoLayout(annotationShding,"Default Maximum Colour for annotation shading", maxcolourLabel, maxColour);
765 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
767 // visual2panel.add(minColour);
768 // visual2panel.add(maxColour);
769 // visual2Tab.add(visual2panel);
771 linkPanel.add(editLinkButtons, BorderLayout.EAST);
772 editLinkButtons.add(newLink, null);
773 editLinkButtons.add(editLink, null);
774 editLinkButtons.add(deleteLink, null);
775 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
776 linkScrollPane.getViewport().add(linkPanel2, null);
777 linkPanel2.add(linkURLList, BorderLayout.CENTER);
778 linkPanel2.add(linkNameList, BorderLayout.WEST);
779 okCancelPanel.add(ok);
780 okCancelPanel.add(cancel);
781 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
783 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
784 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
785 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
787 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
788 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
790 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
791 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
792 16, 0, 0, 12), 359, -17));
793 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
794 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
795 21, 0, 35, 12), 4, 6));
796 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
797 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
798 new Insets(16, 0, 0, 0), 5, 1));
799 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
800 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
801 new Insets(0, 2, 4, 2), 54, 1));
802 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
803 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
804 new Insets(0, 2, 4, 0), 263, 1));
805 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
806 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
807 new Insets(15, 0, 0, 15), 307, 1));
808 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
809 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
810 new Insets(0, 2, 4, 2), 70, 1));
811 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
812 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
813 new Insets(0, 2, 4, 2), 70, 1));
814 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
815 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
816 new Insets(0, 2, 4, 2), 70, 1));
818 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
819 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
821 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
822 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
823 gapSymbolCB.setRenderer(dlcr);
825 tabbedPane.add(visualTab, "Visual");
826 tabbedPane.add(visual2Tab,"Colours");
827 tabbedPane.add(connectTab, "Connections");
828 tabbedPane.add(exportTab, "Output");
829 jPanel11.add(jLabel1);
831 jPanel11.add(clustaljv);
832 jPanel11.add(fastajv);
834 jPanel11.add(pfamjv);
835 jPanel11.add(pileupjv);
837 exportTab.add(autoIdWidth);
838 exportTab.add(userIdWidth);
839 exportTab.add(userIdWidthlabel);
840 exportTab.add(modellerOutput);
841 tabbedPane.add(calcTab, "Editing");
842 calcTab.add(autoCalculateConsCheck);
843 calcTab.add(padGaps);
844 calcTab.add(sortByTree);
846 tabbedPane.add(dasPanel, "DAS Settings");
847 tabbedPane.add(wsPanel, "Web Services");
849 exportTab.add(epsLabel);
850 exportTab.add(epsRendering);
851 exportTab.add(jPanel11);
854 protected void autoIdWidth_actionPerformed()
856 // TODO Auto-generated method stub
860 protected void userIdWidth_actionPerformed()
862 // TODO Auto-generated method stub
866 protected void maxColour_actionPerformed()
868 // TODO Auto-generated method stub
872 protected void minColour_actionPerformed()
874 // TODO Auto-generated method stub
878 protected void showunconserved_actionPerformed(ActionEvent e)
880 // TODO Auto-generated method stub
890 public void ok_actionPerformed(ActionEvent e)
900 public void cancel_actionPerformed(ActionEvent e)
910 public void annotations_actionPerformed(ActionEvent e)
917 public void startupFileTextfield_mouseClicked()
921 public void newLink_actionPerformed(ActionEvent e)
926 public void editLink_actionPerformed(ActionEvent e)
931 public void deleteLink_actionPerformed(ActionEvent e)
936 public void defaultBrowser_mouseClicked(MouseEvent e)
941 public void linkURLList_keyTyped(KeyEvent e)
946 public void useProxy_actionPerformed()
948 proxyServerTB.setEnabled(useProxy.isSelected());
949 proxyPortTB.setEnabled(useProxy.isSelected());