2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
3 * Copyright (C) 2010 J Procter, AM Waterhouse, 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 JLabel jLabel1 = new JLabel();
166 protected JCheckBox blcjv = new JCheckBox();
168 protected JCheckBox pileupjv = new JCheckBox();
170 protected JCheckBox clustaljv = new JCheckBox();
172 protected JCheckBox msfjv = new JCheckBox();
174 protected JCheckBox fastajv = new JCheckBox();
176 protected JCheckBox pfamjv = new JCheckBox();
178 FlowLayout flowLayout1 = new FlowLayout();
180 protected JCheckBox pirjv = new JCheckBox();
182 JPanel jPanel11 = new JPanel();
184 Font verdana11 = JvSwingUtils.getLabelFont();
186 protected JCheckBox seqLimit = new JCheckBox();
188 GridLayout gridLayout3 = new GridLayout();
190 protected JCheckBox smoothFont = new JCheckBox();
192 JPanel calcTab = new JPanel();
194 protected JCheckBox autoCalculateConsCheck = new JCheckBox();
196 protected JCheckBox padGaps = new JCheckBox();
198 protected JCheckBox modellerOutput = new JCheckBox();
200 protected JPanel dasPanel = new JPanel();
202 BorderLayout borderLayout4 = new BorderLayout();
204 protected JPanel wsPanel = new JPanel();
206 BorderLayout borderLayout5 = new BorderLayout();
208 protected JCheckBox wrap = new JCheckBox();
210 protected JCheckBox rightAlign = new JCheckBox();
212 protected JCheckBox showUnconserved = new JCheckBox();
214 protected JCheckBox showDbRefTooltip = new JCheckBox();
216 protected JCheckBox showNpTooltip = new JCheckBox();
218 protected JCheckBox idItalics = new JCheckBox();
220 protected JCheckBox openoverv = new JCheckBox();
222 protected JCheckBox usagestats = new JCheckBox();
224 protected JCheckBox questionnaire = new JCheckBox();
226 protected JCheckBox versioncheck = new JCheckBox();
228 protected JLabel showGroupbits = new JLabel();
230 protected JLabel showConsensbits = new JLabel();
232 protected JCheckBox showConsensLogo = new JCheckBox();
234 protected JCheckBox showConsensHistogram = new JCheckBox();
236 protected JCheckBox showGroupConsensus = new JCheckBox();
238 protected JCheckBox showGroupConservation = new JCheckBox();
240 protected JCheckBox shareSelections = new JCheckBox();
242 protected JCheckBox followHighlight = new JCheckBox();
244 protected JCheckBox sortByTree= new JCheckBox();
247 * Creates a new GPreferences object.
249 public GPreferences()
254 } catch (Exception ex)
256 ex.printStackTrace();
266 private void jbInit() throws Exception
268 this.setLayout(borderLayout1);
270 ok.addActionListener(new ActionListener()
272 public void actionPerformed(ActionEvent e)
274 ok_actionPerformed(e);
277 cancel.setText("Cancel");
278 cancel.addActionListener(new ActionListener()
280 public void actionPerformed(ActionEvent e)
282 cancel_actionPerformed(e);
285 quality.setEnabled(false);
286 quality.setFont(verdana11);
287 quality.setHorizontalAlignment(SwingConstants.RIGHT);
288 quality.setHorizontalTextPosition(SwingConstants.LEFT);
289 quality.setSelected(true);
290 quality.setText("Quality");
291 visualTab.setBorder(new TitledBorder("Open new alignment"));
292 visualTab.setLayout(null);
293 visual2Tab.setBorder(new TitledBorder("Open new alignment"));
294 visual2Tab.setLayout(new FlowLayout());
295 fullScreen.setFont(verdana11);
296 fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
297 fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
298 fullScreen.setText("Maximise Window");
299 conservation.setEnabled(false);
300 conservation.setFont(verdana11);
301 conservation.setHorizontalAlignment(SwingConstants.RIGHT);
302 conservation.setHorizontalTextPosition(SwingConstants.LEFT);
303 conservation.setSelected(true);
304 conservation.setText("Conservation");
305 identity.setEnabled(false);
306 identity.setFont(verdana11);
307 identity.setHorizontalAlignment(SwingConstants.RIGHT);
308 identity.setHorizontalTextPosition(SwingConstants.LEFT);
309 identity.setSelected(true);
310 identity.setText("Consensus");
311 showGroupbits.setFont(verdana11);
312 showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
313 showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
314 showGroupbits.setText("Show group:");
315 showConsensbits.setFont(verdana11);
316 showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
317 showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
318 showConsensbits.setText("Consensus:");
319 showConsensHistogram.setEnabled(false);
320 showConsensHistogram.setFont(verdana11);
321 showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
322 showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
323 showConsensHistogram.setSelected(true);
324 showConsensHistogram.setText("Histogram");
325 showConsensLogo.setEnabled(false);
326 showConsensLogo.setFont(verdana11);
327 showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
328 showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
329 showConsensLogo.setSelected(true);
330 showConsensLogo.setText("Logo");
331 showGroupConsensus.setEnabled(false);
332 showGroupConsensus.setFont(verdana11);
333 showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
334 showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
335 showGroupConsensus.setSelected(true);
336 showGroupConsensus.setText("Consensus");
337 showGroupConservation.setEnabled(false);
338 showGroupConservation.setFont(verdana11);
339 showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
340 showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
341 showGroupConservation.setSelected(true);
342 showGroupConservation.setText("Conservation");
343 showNpTooltip.setEnabled(true);
344 showNpTooltip.setFont(verdana11);
345 showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
346 showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
347 showNpTooltip.setSelected(true);
348 showNpTooltip.setText("Non-positional Features");
349 showDbRefTooltip.setEnabled(true);
350 showDbRefTooltip.setFont(verdana11);
351 showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
352 showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
353 showDbRefTooltip.setSelected(true);
354 showDbRefTooltip.setText("Database References");
355 annotations.setFont(verdana11);
356 annotations.setHorizontalAlignment(SwingConstants.RIGHT);
357 annotations.setHorizontalTextPosition(SwingConstants.LEADING);
358 annotations.setSelected(true);
359 annotations.setText("Show Annotations");
360 annotations.setBounds(new Rectangle(169, 12, 200, 23));
361 annotations.addActionListener(new ActionListener()
363 public void actionPerformed(ActionEvent e)
365 annotations_actionPerformed(e);
368 identity.addActionListener(new ActionListener()
370 public void actionPerformed(ActionEvent e)
372 annotations_actionPerformed(e);
375 showGroupConsensus.addActionListener(new ActionListener()
377 public void actionPerformed(ActionEvent e)
379 annotations_actionPerformed(e);
382 showUnconserved.setFont(verdana11);
383 showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
384 showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
385 showUnconserved.setSelected(true);
386 showUnconserved.setText("Show Unconserved");
387 showUnconserved.addActionListener(new ActionListener()
389 public void actionPerformed(ActionEvent e)
391 showunconserved_actionPerformed(e);
394 // / TODO: fit these in to preferences panel!!!!!
395 shareSelections.setFont(verdana11);
396 shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
397 shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
398 shareSelections.setSelected(true);
399 shareSelections.setText("Share selection across views");
400 followHighlight.setFont(verdana11);
401 followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
402 followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
403 // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
404 followHighlight.setSelected(true);
405 followHighlight.setText("Scroll to highlighted regions");
407 gapLabel.setFont(verdana11);
408 gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
409 gapLabel.setText("Gap Symbol ");
410 colour.setFont(verdana11);
411 colour.setBounds(new Rectangle(172, 225, 155, 21));
412 colourLabel.setFont(verdana11);
413 colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
414 colourLabel.setText("Alignment Colour ");
415 fontLabel.setFont(verdana11);
416 fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
417 fontLabel.setText("Font ");
418 fontSizeCB.setFont(verdana11);
419 fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
420 fontStyleCB.setFont(verdana11);
421 fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
422 fontNameCB.setFont(verdana11);
423 fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
424 gapSymbolCB.setFont(verdana11);
425 gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
426 mincolourLabel.setFont(verdana11);
427 mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
428 mincolourLabel.setText("Minimum Colour");
429 minColour.setFont(verdana11);
430 minColour.setBorder(BorderFactory.createEtchedBorder());
431 minColour.setPreferredSize(new Dimension(40, 20));
432 minColour.addMouseListener(new MouseAdapter()
434 public void mousePressed(MouseEvent e)
436 minColour_actionPerformed();
439 maxcolourLabel.setFont(verdana11);
440 maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
441 maxcolourLabel.setText("Maximum Colour ");
442 maxColour.setFont(verdana11);
443 maxColour.setBorder(BorderFactory.createEtchedBorder());
444 maxColour.setPreferredSize(new Dimension(40, 20));
445 maxColour.addMouseListener(new MouseAdapter()
447 public void mousePressed(MouseEvent e)
449 maxColour_actionPerformed();
453 startupCheckbox.setText("Open file");
454 startupCheckbox.setFont(verdana11);
455 startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
456 startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
457 startupCheckbox.setSelected(true);
458 startupFileTextfield.setFont(verdana11);
459 startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
460 startupFileTextfield.addMouseListener(new MouseAdapter()
462 public void mouseClicked(MouseEvent e)
464 if (e.getClickCount() > 1)
466 startupFileTextfield_mouseClicked();
471 connectTab.setLayout(gridBagLayout3);
472 serverLabel.setText("Address");
473 serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
474 serverLabel.setFont(verdana11);
475 proxyServerTB.setFont(verdana11);
476 proxyPortTB.setFont(verdana11);
477 portLabel.setFont(verdana11);
478 portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
479 portLabel.setText("Port");
480 browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
481 browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
482 browserLabel.setText("Default Browser (Unix)");
483 defaultBrowser.setFont(verdana11);
484 defaultBrowser.setText("");
485 usagestats.setText("Send usage statistics");
486 usagestats.setFont(verdana11);
487 usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
488 usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
489 questionnaire.setText("Check for questionnaires");
490 questionnaire.setFont(verdana11);
491 questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
492 questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
493 versioncheck.setText("Check for latest version");
494 versioncheck.setFont(verdana11);
495 versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
496 versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
497 newLink.setText("New");
498 newLink.addActionListener(new java.awt.event.ActionListener()
500 public void actionPerformed(ActionEvent e)
502 newLink_actionPerformed(e);
505 editLink.setText("Edit");
506 editLink.addActionListener(new java.awt.event.ActionListener()
508 public void actionPerformed(ActionEvent e)
510 editLink_actionPerformed(e);
513 deleteLink.setText("Delete");
514 deleteLink.addActionListener(new java.awt.event.ActionListener()
516 public void actionPerformed(ActionEvent e)
518 deleteLink_actionPerformed(e);
522 linkURLList.addListSelectionListener(new ListSelectionListener()
524 public void valueChanged(ListSelectionEvent e)
526 int index = linkURLList.getSelectedIndex();
527 linkNameList.setSelectedIndex(index);
531 linkNameList.addListSelectionListener(new ListSelectionListener()
533 public void valueChanged(ListSelectionEvent e)
535 int index = linkNameList.getSelectedIndex();
536 linkURLList.setSelectedIndex(index);
540 linkScrollPane.setBorder(null);
541 linkPanel.setBorder(new TitledBorder("URL link from Sequence ID"));
542 linkPanel.setLayout(borderLayout2);
543 editLinkButtons.setLayout(gridLayout1);
544 gridLayout1.setRows(3);
545 linkNameList.setFont(verdana11);
546 linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
547 linkPanel2.setLayout(borderLayout3);
548 linkURLList.setFont(verdana11);
549 linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
551 defaultBrowser.addMouseListener(new MouseAdapter()
553 public void mouseClicked(MouseEvent e)
555 if (e.getClickCount() > 1)
557 defaultBrowser_mouseClicked(e);
561 useProxy.setFont(verdana11);
562 useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
563 useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
564 useProxy.setText("Use a proxy server");
565 useProxy.addActionListener(new ActionListener()
567 public void actionPerformed(ActionEvent e)
569 useProxy_actionPerformed();
572 jPanel1.setBorder(titledBorder1);
573 jPanel1.setLayout(gridBagLayout1);
574 sortby.setFont(verdana11);
575 sortby.setBounds(new Rectangle(172, 249, 155, 21));
576 sortLabel.setFont(verdana11);
577 sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
578 sortLabel.setText("Sort by ");
579 jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
580 jPanel2.setLayout(gridLayout2);
581 gridLayout2.setRows(12);
582 exportTab.setLayout(null);
583 epsLabel.setFont(verdana11);
584 epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
585 epsLabel.setText("EPS Rendering Style");
586 epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
587 epsRendering.setFont(verdana11);
588 epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
589 jLabel1.setFont(verdana11);
590 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
591 jLabel1.setText("Append /start-end (/15-380)");
592 jLabel1.setFont(verdana11);
593 fastajv.setFont(verdana11);
594 fastajv.setHorizontalAlignment(SwingConstants.LEFT);
595 clustaljv.setText("Clustal ");
596 blcjv.setText("BLC ");
597 fastajv.setText("Fasta ");
598 msfjv.setText("MSF ");
599 pfamjv.setText("PFAM ");
600 pileupjv.setText("Pileup ");
601 msfjv.setFont(verdana11);
602 msfjv.setHorizontalAlignment(SwingConstants.LEFT);
603 pirjv.setText("PIR ");
604 jPanel11.setFont(verdana11);
605 jPanel11.setBorder(titledBorder2);
606 jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
607 jPanel11.setLayout(gridLayout3);
608 blcjv.setFont(verdana11);
609 blcjv.setHorizontalAlignment(SwingConstants.LEFT);
610 clustaljv.setFont(verdana11);
611 clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
612 pfamjv.setFont(verdana11);
613 pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
614 pileupjv.setFont(verdana11);
615 pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
616 pirjv.setFont(verdana11);
617 pirjv.setHorizontalAlignment(SwingConstants.LEFT);
618 seqLimit.setFont(verdana11);
619 seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
620 seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
621 seqLimit.setText("Full Sequence Id");
622 gridLayout3.setRows(8);
623 smoothFont.setFont(verdana11);
624 smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
625 smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
626 smoothFont.setText("Smooth Font");
627 calcTab.setLayout(null);
628 autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
629 autoCalculateConsCheck.setText("AutoCalculate Consensus");
630 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
631 padGaps.setFont(JvSwingUtils.getLabelFont());
632 padGaps.setText("Pad Gaps When Editing");
633 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
634 sortByTree.setFont(JvSwingUtils.getLabelFont());
635 sortByTree.setText("Sort With New Tree");
636 sortByTree.setToolTipText("When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment.");
637 sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
638 modellerOutput.setFont(JvSwingUtils.getLabelFont());
639 modellerOutput.setText("Use Modeller Output");
640 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
641 dasPanel.setLayout(borderLayout4);
642 wsPanel.setLayout(borderLayout5);
643 wrap.setFont(JvSwingUtils.getLabelFont());
644 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
645 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
646 wrap.setText("Wrap Alignment");
647 rightAlign.setFont(JvSwingUtils.getLabelFont());
648 rightAlign.setForeground(Color.black);
649 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
650 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
651 rightAlign.setText("Right Align Ids");
652 idItalics.setFont(JvSwingUtils.getLabelFont());
653 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
654 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
655 idItalics.setText("Sequence Name Italics");
656 openoverv.setFont(JvSwingUtils.getLabelFont());
657 openoverv.setActionCommand("Open Overview");
658 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
659 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
660 openoverv.setText("Open Overview");
661 jPanel2.add(fullScreen);
662 jPanel2.add(openoverv);
663 jPanel2.add(seqLimit);
664 jPanel2.add(rightAlign);
665 jPanel2.add(fontLabel);
666 jPanel2.add(showUnconserved);
667 jPanel2.add(idItalics);
668 jPanel2.add(smoothFont);
669 jPanel2.add(gapLabel);
671 jPanel2.add(sortLabel);
672 jPanel2.add(startupCheckbox);
673 visualTab.add(annotations);
674 visualTab.add(startupFileTextfield);
675 visualTab.add(sortby);
676 visualTab.add(gapSymbolCB);
677 visualTab.add(fontNameCB);
678 visualTab.add(fontSizeCB);
679 visualTab.add(fontStyleCB);
680 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
681 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
682 annsettingsPanel.add(autoAnnotSettings1);
683 annsettingsPanel.add(autoAnnotSettings2);
684 annsettingsPanel.add(autoAnnotSettings3);
685 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
686 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
687 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
688 visualTab.add(annsettingsPanel);
689 Border jb = new EmptyBorder(1, 1, 4, 5);
690 quality.setBorder(jb);
691 conservation.setBorder(jb);
692 identity.setBorder(jb);
693 showConsensbits.setBorder(jb);
694 showGroupbits.setBorder(jb);
695 showGroupConsensus.setBorder(jb);
696 showGroupConservation.setBorder(jb);
697 showConsensHistogram.setBorder(jb);
698 showConsensLogo.setBorder(jb);
700 autoAnnotSettings2.add(conservation);
701 autoAnnotSettings1.add(quality);
702 autoAnnotSettings3.add(identity);
703 autoAnnotSettings1.add(showGroupbits);
704 autoAnnotSettings3.add(showGroupConsensus);
705 autoAnnotSettings2.add(showGroupConservation);
706 autoAnnotSettings1.add(showConsensbits);
707 autoAnnotSettings2.add(showConsensHistogram);
708 autoAnnotSettings3.add(showConsensLogo);
710 JPanel tooltipSettings = new JPanel();
711 tooltipSettings.setBorder(new TitledBorder("Sequence ID Tooltip"));
712 tooltipSettings.setBounds(173, 130, 200, 62);
713 tooltipSettings.setLayout(new GridLayout(2, 1));
714 tooltipSettings.add(showDbRefTooltip);
715 tooltipSettings.add(showNpTooltip);
716 visualTab.add(tooltipSettings);
717 visualTab.add(jPanel2);
718 JvSwingUtils.addtoLayout(visual2Tab, "Default Colourscheme for alignment", colourLabel, colour);
719 JPanel annotationShding=new JPanel();
720 annotationShding.setBorder(new TitledBorder("Annotation Shading Default"));
721 annotationShding.setLayout(new GridLayout(1,2));
722 JvSwingUtils.addtoLayout(annotationShding, "Default Minimum Colour for annotation shading", mincolourLabel,minColour);
723 JvSwingUtils.addtoLayout(annotationShding,"Default Maximum Colour for annotation shading", maxcolourLabel, maxColour);
724 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
726 // visual2panel.add(minColour);
727 // visual2panel.add(maxColour);
728 // visual2Tab.add(visual2panel);
730 linkPanel.add(editLinkButtons, BorderLayout.EAST);
731 editLinkButtons.add(newLink, null);
732 editLinkButtons.add(editLink, null);
733 editLinkButtons.add(deleteLink, null);
734 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
735 linkScrollPane.getViewport().add(linkPanel2, null);
736 linkPanel2.add(linkURLList, BorderLayout.CENTER);
737 linkPanel2.add(linkNameList, BorderLayout.WEST);
738 okCancelPanel.add(ok);
739 okCancelPanel.add(cancel);
740 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
742 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
743 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
744 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
746 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
747 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
749 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
750 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
751 16, 0, 0, 12), 359, -17));
752 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
753 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
754 21, 0, 35, 12), 4, 6));
755 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
756 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
757 new Insets(16, 0, 0, 0), 5, 1));
758 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
759 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
760 new Insets(0, 2, 4, 2), 54, 1));
761 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
762 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
763 new Insets(0, 2, 4, 0), 263, 1));
764 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
765 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
766 new Insets(15, 0, 0, 15), 307, 1));
767 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
768 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
769 new Insets(0, 2, 4, 2), 70, 1));
770 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
771 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
772 new Insets(0, 2, 4, 2), 70, 1));
773 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
774 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
775 new Insets(0, 2, 4, 2), 70, 1));
777 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
778 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
780 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
781 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
782 gapSymbolCB.setRenderer(dlcr);
784 tabbedPane.add(visualTab, "Visual");
785 tabbedPane.add(visual2Tab,"Colours");
786 tabbedPane.add(connectTab, "Connections");
787 tabbedPane.add(exportTab, "Output");
788 jPanel11.add(jLabel1);
790 jPanel11.add(clustaljv);
791 jPanel11.add(fastajv);
793 jPanel11.add(pfamjv);
794 jPanel11.add(pileupjv);
796 exportTab.add(modellerOutput);
797 tabbedPane.add(calcTab, "Editing");
798 calcTab.add(autoCalculateConsCheck);
799 calcTab.add(padGaps);
800 calcTab.add(sortByTree);
802 tabbedPane.add(dasPanel, "DAS Settings");
803 tabbedPane.add(wsPanel, "Web Services");
805 exportTab.add(epsLabel);
806 exportTab.add(epsRendering);
807 exportTab.add(jPanel11);
810 protected void maxColour_actionPerformed()
812 // TODO Auto-generated method stub
816 protected void minColour_actionPerformed()
818 // TODO Auto-generated method stub
822 protected void showunconserved_actionPerformed(ActionEvent e)
824 // TODO Auto-generated method stub
834 public void ok_actionPerformed(ActionEvent e)
844 public void cancel_actionPerformed(ActionEvent e)
854 public void annotations_actionPerformed(ActionEvent e)
861 public void startupFileTextfield_mouseClicked()
865 public void newLink_actionPerformed(ActionEvent e)
870 public void editLink_actionPerformed(ActionEvent e)
875 public void deleteLink_actionPerformed(ActionEvent e)
880 public void defaultBrowser_mouseClicked(MouseEvent e)
885 public void linkURLList_keyTyped(KeyEvent e)
890 public void useProxy_actionPerformed()
892 proxyServerTB.setEnabled(useProxy.isSelected());
893 proxyPortTB.setEnabled(useProxy.isSelected());