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();
245 * Creates a new GPreferences object.
247 public GPreferences()
252 } catch (Exception ex)
254 ex.printStackTrace();
264 private void jbInit() throws Exception
266 this.setLayout(borderLayout1);
268 ok.addActionListener(new ActionListener()
270 public void actionPerformed(ActionEvent e)
272 ok_actionPerformed(e);
275 cancel.setText("Cancel");
276 cancel.addActionListener(new ActionListener()
278 public void actionPerformed(ActionEvent e)
280 cancel_actionPerformed(e);
283 quality.setEnabled(false);
284 quality.setFont(verdana11);
285 quality.setHorizontalAlignment(SwingConstants.RIGHT);
286 quality.setHorizontalTextPosition(SwingConstants.LEFT);
287 quality.setSelected(true);
288 quality.setText("Quality");
289 visualTab.setBorder(new TitledBorder("Open new alignment"));
290 visualTab.setLayout(null);
291 visual2Tab.setBorder(new TitledBorder("Open new alignment"));
292 visual2Tab.setLayout(new FlowLayout());
293 fullScreen.setFont(verdana11);
294 fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
295 fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
296 fullScreen.setText("Maximise Window");
297 conservation.setEnabled(false);
298 conservation.setFont(verdana11);
299 conservation.setHorizontalAlignment(SwingConstants.RIGHT);
300 conservation.setHorizontalTextPosition(SwingConstants.LEFT);
301 conservation.setSelected(true);
302 conservation.setText("Conservation");
303 identity.setEnabled(false);
304 identity.setFont(verdana11);
305 identity.setHorizontalAlignment(SwingConstants.RIGHT);
306 identity.setHorizontalTextPosition(SwingConstants.LEFT);
307 identity.setSelected(true);
308 identity.setText("Consensus");
309 showGroupbits.setFont(verdana11);
310 showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
311 showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
312 showGroupbits.setText("Show group:");
313 showConsensbits.setFont(verdana11);
314 showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
315 showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
316 showConsensbits.setText("Consensus:");
317 showConsensHistogram.setEnabled(false);
318 showConsensHistogram.setFont(verdana11);
319 showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
320 showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
321 showConsensHistogram.setSelected(true);
322 showConsensHistogram.setText("Histogram");
323 showConsensLogo.setEnabled(false);
324 showConsensLogo.setFont(verdana11);
325 showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
326 showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
327 showConsensLogo.setSelected(true);
328 showConsensLogo.setText("Logo");
329 showGroupConsensus.setEnabled(false);
330 showGroupConsensus.setFont(verdana11);
331 showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
332 showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
333 showGroupConsensus.setSelected(true);
334 showGroupConsensus.setText("Consensus");
335 showGroupConservation.setEnabled(false);
336 showGroupConservation.setFont(verdana11);
337 showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
338 showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
339 showGroupConservation.setSelected(true);
340 showGroupConservation.setText("Conservation");
341 showNpTooltip.setEnabled(true);
342 showNpTooltip.setFont(verdana11);
343 showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
344 showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
345 showNpTooltip.setSelected(true);
346 showNpTooltip.setText("Non-positional Features");
347 showDbRefTooltip.setEnabled(true);
348 showDbRefTooltip.setFont(verdana11);
349 showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
350 showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
351 showDbRefTooltip.setSelected(true);
352 showDbRefTooltip.setText("Database References");
353 annotations.setFont(verdana11);
354 annotations.setHorizontalAlignment(SwingConstants.RIGHT);
355 annotations.setHorizontalTextPosition(SwingConstants.LEADING);
356 annotations.setSelected(true);
357 annotations.setText("Show Annotations");
358 annotations.setBounds(new Rectangle(169, 12, 200, 23));
359 annotations.addActionListener(new ActionListener()
361 public void actionPerformed(ActionEvent e)
363 annotations_actionPerformed(e);
366 identity.addActionListener(new ActionListener()
368 public void actionPerformed(ActionEvent e)
370 annotations_actionPerformed(e);
373 showGroupConsensus.addActionListener(new ActionListener()
375 public void actionPerformed(ActionEvent e)
377 annotations_actionPerformed(e);
380 showUnconserved.setFont(verdana11);
381 showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
382 showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
383 showUnconserved.setSelected(true);
384 showUnconserved.setText("Show Unconserved");
385 showUnconserved.addActionListener(new ActionListener()
387 public void actionPerformed(ActionEvent e)
389 showunconserved_actionPerformed(e);
392 // / TODO: fit these in to preferences panel!!!!!
393 shareSelections.setFont(verdana11);
394 shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
395 shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
396 shareSelections.setSelected(true);
397 shareSelections.setText("Share selection across views");
398 followHighlight.setFont(verdana11);
399 followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
400 followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
401 // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
402 followHighlight.setSelected(true);
403 followHighlight.setText("Scroll to highlighted regions");
405 gapLabel.setFont(verdana11);
406 gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
407 gapLabel.setText("Gap Symbol ");
408 colour.setFont(verdana11);
409 colour.setBounds(new Rectangle(172, 225, 155, 21));
410 colourLabel.setFont(verdana11);
411 colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
412 colourLabel.setText("Alignment Colour ");
413 fontLabel.setFont(verdana11);
414 fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
415 fontLabel.setText("Font ");
416 fontSizeCB.setFont(verdana11);
417 fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
418 fontStyleCB.setFont(verdana11);
419 fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
420 fontNameCB.setFont(verdana11);
421 fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
422 gapSymbolCB.setFont(verdana11);
423 gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
424 mincolourLabel.setFont(verdana11);
425 mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
426 mincolourLabel.setText("Minimum Colour");
427 minColour.setFont(verdana11);
428 minColour.setBorder(BorderFactory.createEtchedBorder());
429 minColour.setPreferredSize(new Dimension(40, 20));
430 minColour.addMouseListener(new MouseAdapter()
432 public void mousePressed(MouseEvent e)
434 minColour_actionPerformed();
437 maxcolourLabel.setFont(verdana11);
438 maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
439 maxcolourLabel.setText("Maximumum Colour ");
440 maxColour.setFont(verdana11);
441 maxColour.setBorder(BorderFactory.createEtchedBorder());
442 maxColour.setPreferredSize(new Dimension(40, 20));
443 maxColour.addMouseListener(new MouseAdapter()
445 public void mousePressed(MouseEvent e)
447 maxColour_actionPerformed();
450 startupCheckbox.setText("Open file");
451 startupCheckbox.setFont(verdana11);
452 startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
453 startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
454 startupCheckbox.setSelected(true);
455 startupFileTextfield.setFont(verdana11);
456 startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
457 startupFileTextfield.addMouseListener(new MouseAdapter()
459 public void mouseClicked(MouseEvent e)
461 if (e.getClickCount() > 1)
463 startupFileTextfield_mouseClicked();
468 connectTab.setLayout(gridBagLayout3);
469 serverLabel.setText("Address");
470 serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
471 serverLabel.setFont(verdana11);
472 proxyServerTB.setFont(verdana11);
473 proxyPortTB.setFont(verdana11);
474 portLabel.setFont(verdana11);
475 portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
476 portLabel.setText("Port");
477 browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
478 browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
479 browserLabel.setText("Default Browser (Unix)");
480 defaultBrowser.setFont(verdana11);
481 defaultBrowser.setText("");
482 usagestats.setText("Send usage statistics");
483 usagestats.setFont(verdana11);
484 usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
485 usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
486 questionnaire.setText("Check for questionnaires");
487 questionnaire.setFont(verdana11);
488 questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
489 questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
490 versioncheck.setText("Check for latest version");
491 versioncheck.setFont(verdana11);
492 versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
493 versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
494 newLink.setText("New");
495 newLink.addActionListener(new java.awt.event.ActionListener()
497 public void actionPerformed(ActionEvent e)
499 newLink_actionPerformed(e);
502 editLink.setText("Edit");
503 editLink.addActionListener(new java.awt.event.ActionListener()
505 public void actionPerformed(ActionEvent e)
507 editLink_actionPerformed(e);
510 deleteLink.setText("Delete");
511 deleteLink.addActionListener(new java.awt.event.ActionListener()
513 public void actionPerformed(ActionEvent e)
515 deleteLink_actionPerformed(e);
519 linkURLList.addListSelectionListener(new ListSelectionListener()
521 public void valueChanged(ListSelectionEvent e)
523 int index = linkURLList.getSelectedIndex();
524 linkNameList.setSelectedIndex(index);
528 linkNameList.addListSelectionListener(new ListSelectionListener()
530 public void valueChanged(ListSelectionEvent e)
532 int index = linkNameList.getSelectedIndex();
533 linkURLList.setSelectedIndex(index);
537 linkScrollPane.setBorder(null);
538 linkPanel.setBorder(new TitledBorder("URL link from Sequence ID"));
539 linkPanel.setLayout(borderLayout2);
540 editLinkButtons.setLayout(gridLayout1);
541 gridLayout1.setRows(3);
542 linkNameList.setFont(verdana11);
543 linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
544 linkPanel2.setLayout(borderLayout3);
545 linkURLList.setFont(verdana11);
546 linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
548 defaultBrowser.addMouseListener(new MouseAdapter()
550 public void mouseClicked(MouseEvent e)
552 if (e.getClickCount() > 1)
554 defaultBrowser_mouseClicked(e);
558 useProxy.setFont(verdana11);
559 useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
560 useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
561 useProxy.setText("Use a proxy server");
562 useProxy.addActionListener(new ActionListener()
564 public void actionPerformed(ActionEvent e)
566 useProxy_actionPerformed();
569 jPanel1.setBorder(titledBorder1);
570 jPanel1.setLayout(gridBagLayout1);
571 sortby.setFont(verdana11);
572 sortby.setBounds(new Rectangle(172, 249, 155, 21));
573 sortLabel.setFont(verdana11);
574 sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
575 sortLabel.setText("Sort by ");
576 jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
577 jPanel2.setLayout(gridLayout2);
578 gridLayout2.setRows(12);
579 exportTab.setLayout(null);
580 epsLabel.setFont(verdana11);
581 epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
582 epsLabel.setText("EPS Rendering Style");
583 epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
584 epsRendering.setFont(verdana11);
585 epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
586 jLabel1.setFont(verdana11);
587 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
588 jLabel1.setText("Append /start-end (/15-380)");
589 jLabel1.setFont(verdana11);
590 fastajv.setFont(verdana11);
591 fastajv.setHorizontalAlignment(SwingConstants.LEFT);
592 clustaljv.setText("Clustal ");
593 blcjv.setText("BLC ");
594 fastajv.setText("Fasta ");
595 msfjv.setText("MSF ");
596 pfamjv.setText("PFAM ");
597 pileupjv.setText("Pileup ");
598 msfjv.setFont(verdana11);
599 msfjv.setHorizontalAlignment(SwingConstants.LEFT);
600 pirjv.setText("PIR ");
601 jPanel11.setFont(verdana11);
602 jPanel11.setBorder(titledBorder2);
603 jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
604 jPanel11.setLayout(gridLayout3);
605 blcjv.setFont(verdana11);
606 blcjv.setHorizontalAlignment(SwingConstants.LEFT);
607 clustaljv.setFont(verdana11);
608 clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
609 pfamjv.setFont(verdana11);
610 pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
611 pileupjv.setFont(verdana11);
612 pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
613 pirjv.setFont(verdana11);
614 pirjv.setHorizontalAlignment(SwingConstants.LEFT);
615 seqLimit.setFont(verdana11);
616 seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
617 seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
618 seqLimit.setText("Full Sequence Id");
619 gridLayout3.setRows(8);
620 smoothFont.setFont(verdana11);
621 smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
622 smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
623 smoothFont.setText("Smooth Font");
624 calcTab.setLayout(null);
625 autoCalculateConsCheck.setFont(JvSwingUtils.getLabelFont());
626 autoCalculateConsCheck.setText("AutoCalculate Consensus");
627 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
628 padGaps.setFont(JvSwingUtils.getLabelFont());
629 padGaps.setText("Pad gaps when editing");
630 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
631 modellerOutput.setFont(JvSwingUtils.getLabelFont());
632 modellerOutput.setText("Use Modeller Output");
633 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
634 dasPanel.setLayout(borderLayout4);
635 wsPanel.setLayout(borderLayout5);
636 wrap.setFont(JvSwingUtils.getLabelFont());
637 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
638 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
639 wrap.setText("Wrap Alignment");
640 rightAlign.setFont(JvSwingUtils.getLabelFont());
641 rightAlign.setForeground(Color.black);
642 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
643 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
644 rightAlign.setText("Right Align Ids");
645 idItalics.setFont(JvSwingUtils.getLabelFont());
646 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
647 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
648 idItalics.setText("Sequence Name Italics");
649 openoverv.setFont(JvSwingUtils.getLabelFont());
650 openoverv.setActionCommand("Open Overview");
651 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
652 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
653 openoverv.setText("Open Overview");
654 jPanel2.add(fullScreen);
655 jPanel2.add(openoverv);
656 jPanel2.add(seqLimit);
657 jPanel2.add(rightAlign);
658 jPanel2.add(fontLabel);
659 jPanel2.add(showUnconserved);
660 jPanel2.add(idItalics);
661 jPanel2.add(smoothFont);
662 jPanel2.add(gapLabel);
664 jPanel2.add(sortLabel);
665 jPanel2.add(startupCheckbox);
666 visualTab.add(annotations);
667 visualTab.add(startupFileTextfield);
668 visualTab.add(sortby);
669 visualTab.add(gapSymbolCB);
670 visualTab.add(fontNameCB);
671 visualTab.add(fontSizeCB);
672 visualTab.add(fontStyleCB);
673 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
674 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
675 annsettingsPanel.add(autoAnnotSettings1);
676 annsettingsPanel.add(autoAnnotSettings2);
677 annsettingsPanel.add(autoAnnotSettings3);
678 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
679 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
680 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
681 visualTab.add(annsettingsPanel);
682 Border jb = new EmptyBorder(1, 1, 4, 5);
683 quality.setBorder(jb);
684 conservation.setBorder(jb);
685 identity.setBorder(jb);
686 showConsensbits.setBorder(jb);
687 showGroupbits.setBorder(jb);
688 showGroupConsensus.setBorder(jb);
689 showGroupConservation.setBorder(jb);
690 showConsensHistogram.setBorder(jb);
691 showConsensLogo.setBorder(jb);
693 autoAnnotSettings2.add(conservation);
694 autoAnnotSettings1.add(quality);
695 autoAnnotSettings3.add(identity);
696 autoAnnotSettings1.add(showGroupbits);
697 autoAnnotSettings3.add(showGroupConsensus);
698 autoAnnotSettings2.add(showGroupConservation);
699 autoAnnotSettings1.add(showConsensbits);
700 autoAnnotSettings2.add(showConsensHistogram);
701 autoAnnotSettings3.add(showConsensLogo);
703 JPanel tooltipSettings = new JPanel();
704 tooltipSettings.setBorder(new TitledBorder("Sequence ID Tooltip"));
705 tooltipSettings.setBounds(173, 130, 200, 62);
706 tooltipSettings.setLayout(new GridLayout(2, 1));
707 tooltipSettings.add(showDbRefTooltip);
708 tooltipSettings.add(showNpTooltip);
709 visualTab.add(tooltipSettings);
710 visualTab.add(jPanel2);
711 JvSwingUtils.addtoLayout(visual2Tab, "Default Colourscheme for alignment", colourLabel, colour);
712 JPanel annotationShding=new JPanel();
713 annotationShding.setBorder(new TitledBorder("Annotation Shading Default"));
714 annotationShding.setLayout(new GridLayout(1,2));
715 JvSwingUtils.addtoLayout(annotationShding, "Default Minimum Colour for annotation shading", mincolourLabel,minColour);
716 JvSwingUtils.addtoLayout(annotationShding,"Default Maximum Colour for annotation shading", maxcolourLabel, maxColour);
717 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
719 // visual2panel.add(minColour);
720 // visual2panel.add(maxColour);
721 // visual2Tab.add(visual2panel);
723 linkPanel.add(editLinkButtons, BorderLayout.EAST);
724 editLinkButtons.add(newLink, null);
725 editLinkButtons.add(editLink, null);
726 editLinkButtons.add(deleteLink, null);
727 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
728 linkScrollPane.getViewport().add(linkPanel2, null);
729 linkPanel2.add(linkURLList, BorderLayout.CENTER);
730 linkPanel2.add(linkNameList, BorderLayout.WEST);
731 okCancelPanel.add(ok);
732 okCancelPanel.add(cancel);
733 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
735 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
736 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
737 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
739 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
740 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
742 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
743 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
744 16, 0, 0, 12), 359, -17));
745 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
746 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
747 21, 0, 35, 12), 4, 6));
748 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
749 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
750 new Insets(16, 0, 0, 0), 5, 1));
751 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
752 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
753 new Insets(0, 2, 4, 2), 54, 1));
754 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
755 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
756 new Insets(0, 2, 4, 0), 263, 1));
757 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
758 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
759 new Insets(15, 0, 0, 15), 307, 1));
760 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
761 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
762 new Insets(0, 2, 4, 2), 70, 1));
763 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
764 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
765 new Insets(0, 2, 4, 2), 70, 1));
766 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
767 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
768 new Insets(0, 2, 4, 2), 70, 1));
770 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
771 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
773 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
774 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
775 gapSymbolCB.setRenderer(dlcr);
777 tabbedPane.add(visualTab, "Visual");
778 tabbedPane.add(visual2Tab,"Colours");
779 tabbedPane.add(connectTab, "Connections");
780 tabbedPane.add(exportTab, "Output");
781 jPanel11.add(jLabel1);
783 jPanel11.add(clustaljv);
784 jPanel11.add(fastajv);
786 jPanel11.add(pfamjv);
787 jPanel11.add(pileupjv);
789 exportTab.add(modellerOutput);
790 tabbedPane.add(calcTab, "Editing");
791 calcTab.add(autoCalculateConsCheck);
792 calcTab.add(padGaps);
793 tabbedPane.add(dasPanel, "DAS Settings");
794 tabbedPane.add(wsPanel, "Web Services");
796 exportTab.add(epsLabel);
797 exportTab.add(epsRendering);
798 exportTab.add(jPanel11);
801 protected void maxColour_actionPerformed()
803 // TODO Auto-generated method stub
807 protected void minColour_actionPerformed()
809 // TODO Auto-generated method stub
813 protected void showunconserved_actionPerformed(ActionEvent e)
815 // TODO Auto-generated method stub
825 public void ok_actionPerformed(ActionEvent e)
835 public void cancel_actionPerformed(ActionEvent e)
845 public void annotations_actionPerformed(ActionEvent e)
852 public void startupFileTextfield_mouseClicked()
856 public void newLink_actionPerformed(ActionEvent e)
861 public void editLink_actionPerformed(ActionEvent e)
866 public void deleteLink_actionPerformed(ActionEvent e)
871 public void defaultBrowser_mouseClicked(MouseEvent e)
876 public void linkURLList_keyTyped(KeyEvent e)
881 public void useProxy_actionPerformed()
883 proxyServerTB.setEnabled(useProxy.isSelected());
884 proxyPortTB.setEnabled(useProxy.isSelected());