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 = new java.awt.Font("Verdana", Font.PLAIN, 11);
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(new java.awt.Font("Verdana", Font.PLAIN,
627 autoCalculateConsCheck.setText("AutoCalculate Consensus");
628 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
629 padGaps.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
630 padGaps.setText("Pad gaps when editing");
631 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
632 modellerOutput.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
633 modellerOutput.setText("Use Modeller Output");
634 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
635 dasPanel.setLayout(borderLayout4);
636 wsPanel.setLayout(borderLayout5);
637 wrap.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
638 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
639 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
640 wrap.setText("Wrap Alignment");
641 rightAlign.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
642 rightAlign.setForeground(Color.black);
643 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
644 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
645 rightAlign.setText("Right Align Ids");
646 idItalics.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
647 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
648 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
649 idItalics.setText("Sequence Name Italics");
650 openoverv.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
651 openoverv.setActionCommand("Open Overview");
652 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
653 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
654 openoverv.setText("Open Overview");
655 jPanel2.add(fullScreen);
656 jPanel2.add(openoverv);
657 jPanel2.add(seqLimit);
658 jPanel2.add(rightAlign);
659 jPanel2.add(fontLabel);
660 jPanel2.add(showUnconserved);
661 jPanel2.add(idItalics);
662 jPanel2.add(smoothFont);
663 jPanel2.add(gapLabel);
665 jPanel2.add(sortLabel);
666 jPanel2.add(startupCheckbox);
667 visualTab.add(annotations);
668 visualTab.add(startupFileTextfield);
669 visualTab.add(sortby);
670 visualTab.add(gapSymbolCB);
671 visualTab.add(fontNameCB);
672 visualTab.add(fontSizeCB);
673 visualTab.add(fontStyleCB);
674 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
675 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
676 annsettingsPanel.add(autoAnnotSettings1);
677 annsettingsPanel.add(autoAnnotSettings2);
678 annsettingsPanel.add(autoAnnotSettings3);
679 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
680 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
681 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
682 visualTab.add(annsettingsPanel);
683 Border jb = new EmptyBorder(1, 1, 4, 5);
684 quality.setBorder(jb);
685 conservation.setBorder(jb);
686 identity.setBorder(jb);
687 showConsensbits.setBorder(jb);
688 showGroupbits.setBorder(jb);
689 showGroupConsensus.setBorder(jb);
690 showGroupConservation.setBorder(jb);
691 showConsensHistogram.setBorder(jb);
692 showConsensLogo.setBorder(jb);
694 autoAnnotSettings2.add(conservation);
695 autoAnnotSettings1.add(quality);
696 autoAnnotSettings3.add(identity);
697 autoAnnotSettings1.add(showGroupbits);
698 autoAnnotSettings3.add(showGroupConsensus);
699 autoAnnotSettings2.add(showGroupConservation);
700 autoAnnotSettings1.add(showConsensbits);
701 autoAnnotSettings2.add(showConsensHistogram);
702 autoAnnotSettings3.add(showConsensLogo);
704 JPanel tooltipSettings = new JPanel();
705 tooltipSettings.setBorder(new TitledBorder("Sequence ID Tooltip"));
706 tooltipSettings.setBounds(173, 130, 200, 62);
707 tooltipSettings.setLayout(new GridLayout(2, 1));
708 tooltipSettings.add(showDbRefTooltip);
709 tooltipSettings.add(showNpTooltip);
710 visualTab.add(tooltipSettings);
711 visualTab.add(jPanel2);
712 JvSwingUtils.addtoLayout(visual2Tab, "Default Colourscheme for alignment", colourLabel, colour);
713 JPanel annotationShding=new JPanel();
714 annotationShding.setBorder(new TitledBorder("Annotation Shading Default"));
715 annotationShding.setLayout(new GridLayout(1,2));
716 JvSwingUtils.addtoLayout(annotationShding, "Default Minimum Colour for annotation shading", mincolourLabel,minColour);
717 JvSwingUtils.addtoLayout(annotationShding,"Default Maximum Colour for annotation shading", maxcolourLabel, maxColour);
718 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
720 // visual2panel.add(minColour);
721 // visual2panel.add(maxColour);
722 // visual2Tab.add(visual2panel);
724 linkPanel.add(editLinkButtons, BorderLayout.EAST);
725 editLinkButtons.add(newLink, null);
726 editLinkButtons.add(editLink, null);
727 editLinkButtons.add(deleteLink, null);
728 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
729 linkScrollPane.getViewport().add(linkPanel2, null);
730 linkPanel2.add(linkURLList, BorderLayout.CENTER);
731 linkPanel2.add(linkNameList, BorderLayout.WEST);
732 okCancelPanel.add(ok);
733 okCancelPanel.add(cancel);
734 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
736 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
737 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
738 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
740 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
741 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
743 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
744 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
745 16, 0, 0, 12), 359, -17));
746 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
747 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
748 21, 0, 35, 12), 4, 6));
749 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
750 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
751 new Insets(16, 0, 0, 0), 5, 1));
752 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
753 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
754 new Insets(0, 2, 4, 2), 54, 1));
755 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
756 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
757 new Insets(0, 2, 4, 0), 263, 1));
758 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
759 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
760 new Insets(15, 0, 0, 15), 307, 1));
761 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
762 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
763 new Insets(0, 2, 4, 2), 70, 1));
764 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
765 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
766 new Insets(0, 2, 4, 2), 70, 1));
767 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
768 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
769 new Insets(0, 2, 4, 2), 70, 1));
771 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
772 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
774 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
775 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
776 gapSymbolCB.setRenderer(dlcr);
778 tabbedPane.add(visualTab, "Visual");
779 tabbedPane.add(visual2Tab,"Colours");
780 tabbedPane.add(connectTab, "Connections");
781 tabbedPane.add(exportTab, "Output");
782 jPanel11.add(jLabel1);
784 jPanel11.add(clustaljv);
785 jPanel11.add(fastajv);
787 jPanel11.add(pfamjv);
788 jPanel11.add(pileupjv);
790 exportTab.add(modellerOutput);
791 tabbedPane.add(calcTab, "Editing");
792 calcTab.add(autoCalculateConsCheck);
793 calcTab.add(padGaps);
794 tabbedPane.add(dasPanel, "DAS Settings");
795 tabbedPane.add(wsPanel, "Web Services");
797 exportTab.add(epsLabel);
798 exportTab.add(epsRendering);
799 exportTab.add(jPanel11);
802 protected void maxColour_actionPerformed()
804 // TODO Auto-generated method stub
808 protected void minColour_actionPerformed()
810 // TODO Auto-generated method stub
814 protected void showunconserved_actionPerformed(ActionEvent e)
816 // TODO Auto-generated method stub
826 public void ok_actionPerformed(ActionEvent e)
836 public void cancel_actionPerformed(ActionEvent e)
846 public void annotations_actionPerformed(ActionEvent e)
853 public void startupFileTextfield_mouseClicked()
857 public void newLink_actionPerformed(ActionEvent e)
862 public void editLink_actionPerformed(ActionEvent e)
867 public void deleteLink_actionPerformed(ActionEvent e)
872 public void defaultBrowser_mouseClicked(MouseEvent e)
877 public void linkURLList_keyTyped(KeyEvent e)
882 public void useProxy_actionPerformed()
884 proxyServerTB.setEnabled(useProxy.isSelected());
885 proxyPortTB.setEnabled(useProxy.isSelected());