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;
21 import java.awt.event.*;
24 import javax.swing.border.*;
25 import javax.swing.event.*;
26 import java.awt.Rectangle;
34 public class GPreferences extends JPanel
36 JTabbedPane tabbedPane = new JTabbedPane();
38 JButton ok = new JButton();
40 JButton cancel = new JButton();
42 JPanel okCancelPanel = new JPanel();
44 BorderLayout borderLayout1 = new BorderLayout();
46 protected JCheckBox quality = new JCheckBox();
48 JPanel visualTab = new JPanel();
49 JPanel visual2Tab = new JPanel();
51 protected JCheckBox fullScreen = new JCheckBox();
53 protected JCheckBox conservation = new JCheckBox();
55 protected JCheckBox identity = new JCheckBox();
57 protected JCheckBox annotations = new JCheckBox();
59 protected JPanel minColour = new JPanel();
60 JLabel mincolourLabel = new JLabel();
62 protected JPanel maxColour = new JPanel();
63 JLabel maxcolourLabel = new JLabel();
65 JLabel gapLabel = new JLabel();
67 protected JComboBox colour = new JComboBox();
69 JLabel colourLabel = new JLabel();
71 JLabel fontLabel = new JLabel();
73 protected JComboBox fontSizeCB = new JComboBox();
75 protected JComboBox fontStyleCB = new JComboBox();
77 protected JComboBox fontNameCB = new JComboBox();
79 protected JComboBox gapSymbolCB = new JComboBox();
81 protected JCheckBox startupCheckbox = new JCheckBox();
83 protected JTextField startupFileTextfield = new JTextField();
85 JPanel connectTab = new JPanel();
87 JLabel serverLabel = new JLabel();
89 protected JList linkURLList = new JList();
91 protected JTextField proxyServerTB = new JTextField();
93 protected JTextField proxyPortTB = new JTextField();
95 JLabel portLabel = new JLabel();
97 JLabel browserLabel = new JLabel();
99 protected JTextField defaultBrowser = new JTextField();
101 JButton newLink = new JButton();
103 JButton editLink = new JButton();
105 JButton deleteLink = new JButton();
107 JScrollPane linkScrollPane = new JScrollPane();
109 JPanel linkPanel = new JPanel();
111 BorderLayout borderLayout2 = new BorderLayout();
113 JPanel editLinkButtons = new JPanel();
115 GridLayout gridLayout1 = new GridLayout();
117 protected JList linkNameList = new JList();
119 JPanel linkPanel2 = new JPanel();
121 BorderLayout borderLayout3 = new BorderLayout();
123 protected JCheckBox useProxy = new JCheckBox();
125 JPanel jPanel1 = new JPanel();
127 TitledBorder titledBorder1 = new TitledBorder("Proxy Server");
129 TitledBorder titledBorder2 = new TitledBorder("File Output");
131 GridBagLayout gridBagLayout2 = new GridBagLayout();
133 GridBagLayout gridBagLayout1 = new GridBagLayout();
135 GridBagLayout gridBagLayout3 = new GridBagLayout();
137 protected JComboBox sortby = new JComboBox();
139 JLabel sortLabel = new JLabel();
141 JPanel jPanel2 = new JPanel();
142 JPanel visual2panel = new JPanel();
144 GridLayout gridLayout2 = new GridLayout();
146 GridLayout gridLayout4 = new GridLayout();
148 JPanel annsettingsPanel = new JPanel();
150 JPanel autoAnnotSettings1 = new JPanel();
152 JPanel autoAnnotSettings2 = new JPanel();
154 JPanel autoAnnotSettings3 = new JPanel();
156 JPanel exportTab = new JPanel();
158 JLabel epsLabel = new JLabel();
160 protected JComboBox epsRendering = new JComboBox();
162 JLabel jLabel1 = new JLabel();
164 protected JCheckBox blcjv = new JCheckBox();
166 protected JCheckBox pileupjv = new JCheckBox();
168 protected JCheckBox clustaljv = new JCheckBox();
170 protected JCheckBox msfjv = new JCheckBox();
172 protected JCheckBox fastajv = new JCheckBox();
174 protected JCheckBox pfamjv = new JCheckBox();
176 FlowLayout flowLayout1 = new FlowLayout();
178 protected JCheckBox pirjv = new JCheckBox();
180 JPanel jPanel11 = new JPanel();
182 Font verdana11 = new java.awt.Font("Verdana", Font.PLAIN, 11);
184 protected JCheckBox seqLimit = new JCheckBox();
186 GridLayout gridLayout3 = new GridLayout();
188 protected JCheckBox smoothFont = new JCheckBox();
190 JPanel calcTab = new JPanel();
192 protected JCheckBox autoCalculateConsCheck = new JCheckBox();
194 protected JCheckBox padGaps = new JCheckBox();
196 protected JCheckBox modellerOutput = new JCheckBox();
198 protected JPanel dasPanel = new JPanel();
200 BorderLayout borderLayout4 = new BorderLayout();
202 protected JPanel wsPanel = new JPanel();
204 BorderLayout borderLayout5 = new BorderLayout();
206 protected JCheckBox wrap = new JCheckBox();
208 protected JCheckBox rightAlign = new JCheckBox();
210 protected JCheckBox showUnconserved = new JCheckBox();
212 protected JCheckBox showDbRefTooltip = new JCheckBox();
214 protected JCheckBox showNpTooltip = new JCheckBox();
216 protected JCheckBox idItalics = new JCheckBox();
218 protected JCheckBox openoverv = new JCheckBox();
220 protected JCheckBox usagestats = new JCheckBox();
222 protected JCheckBox questionnaire = new JCheckBox();
224 protected JCheckBox versioncheck = new JCheckBox();
226 protected JLabel showGroupbits = new JLabel();
228 protected JLabel showConsensbits = new JLabel();
230 protected JCheckBox showConsensLogo = new JCheckBox();
232 protected JCheckBox showConsensHistogram = new JCheckBox();
234 protected JCheckBox showGroupConsensus = new JCheckBox();
236 protected JCheckBox showGroupConservation = new JCheckBox();
238 protected JCheckBox shareSelections = new JCheckBox();
240 protected JCheckBox followHighlight = new JCheckBox();
242 public void addtoLayout(JPanel panel, String tooltip, JComponent label, JComponent valBox)
244 JPanel laypanel = new JPanel(),labPanel=new JPanel(), valPanel=new JPanel();
245 // laypanel.setSize(panel.getPreferredSize());
246 // laypanel.setLayout(null);
247 labPanel.setBounds(new Rectangle(7, 7, 158, 23));
248 valPanel.setBounds(new Rectangle(172, 7, 270,23));
249 //labPanel.setLayout(new GridLayout(1,1));
250 //valPanel.setLayout(new GridLayout(1,1));
252 valPanel.add(valBox);
253 laypanel.add(labPanel);
254 laypanel.add(valPanel);
255 valPanel.setToolTipText(tooltip);
256 labPanel.setToolTipText(tooltip);
257 valBox.setToolTipText(tooltip);
263 * Creates a new GPreferences object.
265 public GPreferences()
270 } catch (Exception ex)
272 ex.printStackTrace();
282 private void jbInit() throws Exception
284 this.setLayout(borderLayout1);
286 ok.addActionListener(new ActionListener()
288 public void actionPerformed(ActionEvent e)
290 ok_actionPerformed(e);
293 cancel.setText("Cancel");
294 cancel.addActionListener(new ActionListener()
296 public void actionPerformed(ActionEvent e)
298 cancel_actionPerformed(e);
301 quality.setEnabled(false);
302 quality.setFont(verdana11);
303 quality.setHorizontalAlignment(SwingConstants.RIGHT);
304 quality.setHorizontalTextPosition(SwingConstants.LEFT);
305 quality.setSelected(true);
306 quality.setText("Quality");
307 visualTab.setBorder(new TitledBorder("Open new alignment"));
308 visualTab.setLayout(null);
309 visual2Tab.setBorder(new TitledBorder("Open new alignment"));
310 visual2Tab.setLayout(new FlowLayout());
311 fullScreen.setFont(verdana11);
312 fullScreen.setHorizontalAlignment(SwingConstants.RIGHT);
313 fullScreen.setHorizontalTextPosition(SwingConstants.LEFT);
314 fullScreen.setText("Maximise Window");
315 conservation.setEnabled(false);
316 conservation.setFont(verdana11);
317 conservation.setHorizontalAlignment(SwingConstants.RIGHT);
318 conservation.setHorizontalTextPosition(SwingConstants.LEFT);
319 conservation.setSelected(true);
320 conservation.setText("Conservation");
321 identity.setEnabled(false);
322 identity.setFont(verdana11);
323 identity.setHorizontalAlignment(SwingConstants.RIGHT);
324 identity.setHorizontalTextPosition(SwingConstants.LEFT);
325 identity.setSelected(true);
326 identity.setText("Consensus");
327 showGroupbits.setFont(verdana11);
328 showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
329 showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
330 showGroupbits.setText("Show group:");
331 showConsensbits.setFont(verdana11);
332 showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
333 showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
334 showConsensbits.setText("Consensus:");
335 showConsensHistogram.setEnabled(false);
336 showConsensHistogram.setFont(verdana11);
337 showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
338 showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
339 showConsensHistogram.setSelected(true);
340 showConsensHistogram.setText("Histogram");
341 showConsensLogo.setEnabled(false);
342 showConsensLogo.setFont(verdana11);
343 showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT);
344 showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT);
345 showConsensLogo.setSelected(true);
346 showConsensLogo.setText("Logo");
347 showGroupConsensus.setEnabled(false);
348 showGroupConsensus.setFont(verdana11);
349 showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
350 showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
351 showGroupConsensus.setSelected(true);
352 showGroupConsensus.setText("Consensus");
353 showGroupConservation.setEnabled(false);
354 showGroupConservation.setFont(verdana11);
355 showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
356 showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
357 showGroupConservation.setSelected(true);
358 showGroupConservation.setText("Conservation");
359 showNpTooltip.setEnabled(true);
360 showNpTooltip.setFont(verdana11);
361 showNpTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
362 showNpTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
363 showNpTooltip.setSelected(true);
364 showNpTooltip.setText("Non-positional Features");
365 showDbRefTooltip.setEnabled(true);
366 showDbRefTooltip.setFont(verdana11);
367 showDbRefTooltip.setHorizontalAlignment(SwingConstants.RIGHT);
368 showDbRefTooltip.setHorizontalTextPosition(SwingConstants.LEFT);
369 showDbRefTooltip.setSelected(true);
370 showDbRefTooltip.setText("Database References");
371 annotations.setFont(verdana11);
372 annotations.setHorizontalAlignment(SwingConstants.RIGHT);
373 annotations.setHorizontalTextPosition(SwingConstants.LEADING);
374 annotations.setSelected(true);
375 annotations.setText("Show Annotations");
376 annotations.setBounds(new Rectangle(169, 12, 200, 23));
377 annotations.addActionListener(new ActionListener()
379 public void actionPerformed(ActionEvent e)
381 annotations_actionPerformed(e);
384 identity.addActionListener(new ActionListener()
386 public void actionPerformed(ActionEvent e)
388 annotations_actionPerformed(e);
391 showGroupConsensus.addActionListener(new ActionListener()
393 public void actionPerformed(ActionEvent e)
395 annotations_actionPerformed(e);
398 showUnconserved.setFont(verdana11);
399 showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
400 showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
401 showUnconserved.setSelected(true);
402 showUnconserved.setText("Show Unconserved");
403 showUnconserved.addActionListener(new ActionListener()
405 public void actionPerformed(ActionEvent e)
407 showunconserved_actionPerformed(e);
410 // / TODO: fit these in to preferences panel!!!!!
411 shareSelections.setFont(verdana11);
412 shareSelections.setHorizontalAlignment(SwingConstants.RIGHT);
413 shareSelections.setHorizontalTextPosition(SwingConstants.LEFT);
414 shareSelections.setSelected(true);
415 shareSelections.setText("Share selection across views");
416 followHighlight.setFont(verdana11);
417 followHighlight.setHorizontalAlignment(SwingConstants.RIGHT);
418 followHighlight.setHorizontalTextPosition(SwingConstants.LEFT);
419 // showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
420 followHighlight.setSelected(true);
421 followHighlight.setText("Scroll to highlighted regions");
423 gapLabel.setFont(verdana11);
424 gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
425 gapLabel.setText("Gap Symbol ");
426 colour.setFont(verdana11);
427 colour.setBounds(new Rectangle(172, 225, 155, 21));
428 colourLabel.setFont(verdana11);
429 colourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
430 colourLabel.setText("Alignment Colour ");
431 fontLabel.setFont(verdana11);
432 fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
433 fontLabel.setText("Font ");
434 fontSizeCB.setFont(verdana11);
435 fontSizeCB.setBounds(new Rectangle(319, 104, 49, 23));
436 fontStyleCB.setFont(verdana11);
437 fontStyleCB.setBounds(new Rectangle(367, 104, 70, 23));
438 fontNameCB.setFont(verdana11);
439 fontNameCB.setBounds(new Rectangle(172, 104, 147, 23));
440 gapSymbolCB.setFont(verdana11);
441 gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 23));
442 mincolourLabel.setFont(verdana11);
443 mincolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
444 mincolourLabel.setText("Minimum Colour");
445 minColour.setFont(verdana11);
446 minColour.setBorder(BorderFactory.createEtchedBorder());
447 minColour.setPreferredSize(new Dimension(40, 20));
448 minColour.addMouseListener(new MouseAdapter()
450 public void mousePressed(MouseEvent e)
452 minColour_actionPerformed();
455 maxcolourLabel.setFont(verdana11);
456 maxcolourLabel.setHorizontalAlignment(SwingConstants.RIGHT);
457 maxcolourLabel.setText("Maximumum Colour ");
458 maxColour.setFont(verdana11);
459 maxColour.setBorder(BorderFactory.createEtchedBorder());
460 maxColour.setPreferredSize(new Dimension(40, 20));
461 maxColour.addMouseListener(new MouseAdapter()
463 public void mousePressed(MouseEvent e)
465 maxColour_actionPerformed();
468 startupCheckbox.setText("Open file");
469 startupCheckbox.setFont(verdana11);
470 startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT);
471 startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT);
472 startupCheckbox.setSelected(true);
473 startupFileTextfield.setFont(verdana11);
474 startupFileTextfield.setBounds(new Rectangle(172, 273, 270, 20));
475 startupFileTextfield.addMouseListener(new MouseAdapter()
477 public void mouseClicked(MouseEvent e)
479 if (e.getClickCount() > 1)
481 startupFileTextfield_mouseClicked();
486 connectTab.setLayout(gridBagLayout3);
487 serverLabel.setText("Address");
488 serverLabel.setHorizontalAlignment(SwingConstants.RIGHT);
489 serverLabel.setFont(verdana11);
490 proxyServerTB.setFont(verdana11);
491 proxyPortTB.setFont(verdana11);
492 portLabel.setFont(verdana11);
493 portLabel.setHorizontalAlignment(SwingConstants.RIGHT);
494 portLabel.setText("Port");
495 browserLabel.setFont(new java.awt.Font("SansSerif", 0, 11));
496 browserLabel.setHorizontalAlignment(SwingConstants.TRAILING);
497 browserLabel.setText("Default Browser (Unix)");
498 defaultBrowser.setFont(verdana11);
499 defaultBrowser.setText("");
500 usagestats.setText("Send usage statistics");
501 usagestats.setFont(verdana11);
502 usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
503 usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
504 questionnaire.setText("Check for questionnaires");
505 questionnaire.setFont(verdana11);
506 questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
507 questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
508 versioncheck.setText("Check for latest version");
509 versioncheck.setFont(verdana11);
510 versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
511 versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
512 newLink.setText("New");
513 newLink.addActionListener(new java.awt.event.ActionListener()
515 public void actionPerformed(ActionEvent e)
517 newLink_actionPerformed(e);
520 editLink.setText("Edit");
521 editLink.addActionListener(new java.awt.event.ActionListener()
523 public void actionPerformed(ActionEvent e)
525 editLink_actionPerformed(e);
528 deleteLink.setText("Delete");
529 deleteLink.addActionListener(new java.awt.event.ActionListener()
531 public void actionPerformed(ActionEvent e)
533 deleteLink_actionPerformed(e);
537 linkURLList.addListSelectionListener(new ListSelectionListener()
539 public void valueChanged(ListSelectionEvent e)
541 int index = linkURLList.getSelectedIndex();
542 linkNameList.setSelectedIndex(index);
546 linkNameList.addListSelectionListener(new ListSelectionListener()
548 public void valueChanged(ListSelectionEvent e)
550 int index = linkNameList.getSelectedIndex();
551 linkURLList.setSelectedIndex(index);
555 linkScrollPane.setBorder(null);
556 linkPanel.setBorder(new TitledBorder("URL link from Sequence ID"));
557 linkPanel.setLayout(borderLayout2);
558 editLinkButtons.setLayout(gridLayout1);
559 gridLayout1.setRows(3);
560 linkNameList.setFont(verdana11);
561 linkNameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
562 linkPanel2.setLayout(borderLayout3);
563 linkURLList.setFont(verdana11);
564 linkURLList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
566 defaultBrowser.addMouseListener(new MouseAdapter()
568 public void mouseClicked(MouseEvent e)
570 if (e.getClickCount() > 1)
572 defaultBrowser_mouseClicked(e);
576 useProxy.setFont(verdana11);
577 useProxy.setHorizontalAlignment(SwingConstants.RIGHT);
578 useProxy.setHorizontalTextPosition(SwingConstants.LEADING);
579 useProxy.setText("Use a proxy server");
580 useProxy.addActionListener(new ActionListener()
582 public void actionPerformed(ActionEvent e)
584 useProxy_actionPerformed();
587 jPanel1.setBorder(titledBorder1);
588 jPanel1.setLayout(gridBagLayout1);
589 sortby.setFont(verdana11);
590 sortby.setBounds(new Rectangle(172, 249, 155, 21));
591 sortLabel.setFont(verdana11);
592 sortLabel.setHorizontalAlignment(SwingConstants.RIGHT);
593 sortLabel.setText("Sort by ");
594 jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
595 jPanel2.setLayout(gridLayout2);
596 gridLayout2.setRows(12);
597 exportTab.setLayout(null);
598 epsLabel.setFont(verdana11);
599 epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
600 epsLabel.setText("EPS Rendering Style");
601 epsLabel.setBounds(new Rectangle(9, 31, 140, 24));
602 epsRendering.setFont(verdana11);
603 epsRendering.setBounds(new Rectangle(154, 34, 187, 21));
604 jLabel1.setFont(verdana11);
605 jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
606 jLabel1.setText("Append /start-end (/15-380)");
607 jLabel1.setFont(verdana11);
608 fastajv.setFont(verdana11);
609 fastajv.setHorizontalAlignment(SwingConstants.LEFT);
610 clustaljv.setText("Clustal ");
611 blcjv.setText("BLC ");
612 fastajv.setText("Fasta ");
613 msfjv.setText("MSF ");
614 pfamjv.setText("PFAM ");
615 pileupjv.setText("Pileup ");
616 msfjv.setFont(verdana11);
617 msfjv.setHorizontalAlignment(SwingConstants.LEFT);
618 pirjv.setText("PIR ");
619 jPanel11.setFont(verdana11);
620 jPanel11.setBorder(titledBorder2);
621 jPanel11.setBounds(new Rectangle(30, 72, 196, 182));
622 jPanel11.setLayout(gridLayout3);
623 blcjv.setFont(verdana11);
624 blcjv.setHorizontalAlignment(SwingConstants.LEFT);
625 clustaljv.setFont(verdana11);
626 clustaljv.setHorizontalAlignment(SwingConstants.LEFT);
627 pfamjv.setFont(verdana11);
628 pfamjv.setHorizontalAlignment(SwingConstants.LEFT);
629 pileupjv.setFont(verdana11);
630 pileupjv.setHorizontalAlignment(SwingConstants.LEFT);
631 pirjv.setFont(verdana11);
632 pirjv.setHorizontalAlignment(SwingConstants.LEFT);
633 seqLimit.setFont(verdana11);
634 seqLimit.setHorizontalAlignment(SwingConstants.RIGHT);
635 seqLimit.setHorizontalTextPosition(SwingConstants.LEFT);
636 seqLimit.setText("Full Sequence Id");
637 gridLayout3.setRows(8);
638 smoothFont.setFont(verdana11);
639 smoothFont.setHorizontalAlignment(SwingConstants.RIGHT);
640 smoothFont.setHorizontalTextPosition(SwingConstants.LEADING);
641 smoothFont.setText("Smooth Font");
642 calcTab.setLayout(null);
643 autoCalculateConsCheck.setFont(new java.awt.Font("Verdana", Font.PLAIN,
645 autoCalculateConsCheck.setText("AutoCalculate Consensus");
646 autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23));
647 padGaps.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
648 padGaps.setText("Pad gaps when editing");
649 padGaps.setBounds(new Rectangle(22, 94, 168, 23));
650 modellerOutput.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
651 modellerOutput.setText("Use Modeller Output");
652 modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
653 dasPanel.setLayout(borderLayout4);
654 wsPanel.setLayout(borderLayout5);
655 wrap.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
656 wrap.setHorizontalAlignment(SwingConstants.TRAILING);
657 wrap.setHorizontalTextPosition(SwingConstants.LEADING);
658 wrap.setText("Wrap Alignment");
659 rightAlign.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
660 rightAlign.setForeground(Color.black);
661 rightAlign.setHorizontalAlignment(SwingConstants.RIGHT);
662 rightAlign.setHorizontalTextPosition(SwingConstants.LEFT);
663 rightAlign.setText("Right Align Ids");
664 idItalics.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
665 idItalics.setHorizontalAlignment(SwingConstants.RIGHT);
666 idItalics.setHorizontalTextPosition(SwingConstants.LEADING);
667 idItalics.setText("Sequence Name Italics");
668 openoverv.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11));
669 openoverv.setActionCommand("Open Overview");
670 openoverv.setHorizontalAlignment(SwingConstants.RIGHT);
671 openoverv.setHorizontalTextPosition(SwingConstants.LEFT);
672 openoverv.setText("Open Overview");
673 jPanel2.add(fullScreen);
674 jPanel2.add(openoverv);
675 jPanel2.add(seqLimit);
676 jPanel2.add(rightAlign);
677 jPanel2.add(fontLabel);
678 jPanel2.add(showUnconserved);
679 jPanel2.add(idItalics);
680 jPanel2.add(smoothFont);
681 jPanel2.add(gapLabel);
683 jPanel2.add(sortLabel);
684 jPanel2.add(startupCheckbox);
685 visualTab.add(annotations);
686 visualTab.add(startupFileTextfield);
687 visualTab.add(sortby);
688 visualTab.add(gapSymbolCB);
689 visualTab.add(fontNameCB);
690 visualTab.add(fontSizeCB);
691 visualTab.add(fontStyleCB);
692 annsettingsPanel.setBounds(new Rectangle(173, 34, 300, 61));
693 annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
694 annsettingsPanel.add(autoAnnotSettings1);
695 annsettingsPanel.add(autoAnnotSettings2);
696 annsettingsPanel.add(autoAnnotSettings3);
697 autoAnnotSettings1.setLayout(new GridLayout(3, 1, 0, 0));
698 autoAnnotSettings2.setLayout(new GridLayout(3, 1, 0, 0));
699 autoAnnotSettings3.setLayout(new GridLayout(3, 1, 0, 0));
700 visualTab.add(annsettingsPanel);
701 Border jb = new EmptyBorder(1, 1, 4, 5);
702 quality.setBorder(jb);
703 conservation.setBorder(jb);
704 identity.setBorder(jb);
705 showConsensbits.setBorder(jb);
706 showGroupbits.setBorder(jb);
707 showGroupConsensus.setBorder(jb);
708 showGroupConservation.setBorder(jb);
709 showConsensHistogram.setBorder(jb);
710 showConsensLogo.setBorder(jb);
712 autoAnnotSettings2.add(conservation);
713 autoAnnotSettings1.add(quality);
714 autoAnnotSettings3.add(identity);
715 autoAnnotSettings1.add(showGroupbits);
716 autoAnnotSettings3.add(showGroupConsensus);
717 autoAnnotSettings2.add(showGroupConservation);
718 autoAnnotSettings1.add(showConsensbits);
719 autoAnnotSettings2.add(showConsensHistogram);
720 autoAnnotSettings3.add(showConsensLogo);
722 JPanel tooltipSettings = new JPanel();
723 tooltipSettings.setBorder(new TitledBorder("Sequence ID Tooltip"));
724 tooltipSettings.setBounds(173, 130, 200, 62);
725 tooltipSettings.setLayout(new GridLayout(2, 1));
726 tooltipSettings.add(showDbRefTooltip);
727 tooltipSettings.add(showNpTooltip);
728 visualTab.add(tooltipSettings);
729 visualTab.add(jPanel2);
730 addtoLayout(visual2Tab, "Default Colourscheme for alignment", colourLabel, colour);
731 JPanel annotationShding=new JPanel();
732 annotationShding.setBorder(new TitledBorder("Annotation Shading Default"));
733 annotationShding.setLayout(new GridLayout(1,2));
734 addtoLayout(annotationShding, "Default Minimum Colour for annotation shading", mincolourLabel,minColour);
735 addtoLayout(annotationShding,"Default Maximum Colour for annotation shading", maxcolourLabel, maxColour);
736 visual2Tab.add(annotationShding); // , FlowLayout.LEFT);
738 // visual2panel.add(minColour);
739 // visual2panel.add(maxColour);
740 // visual2Tab.add(visual2panel);
742 linkPanel.add(editLinkButtons, BorderLayout.EAST);
743 editLinkButtons.add(newLink, null);
744 editLinkButtons.add(editLink, null);
745 editLinkButtons.add(deleteLink, null);
746 linkPanel.add(linkScrollPane, BorderLayout.CENTER);
747 linkScrollPane.getViewport().add(linkPanel2, null);
748 linkPanel2.add(linkURLList, BorderLayout.CENTER);
749 linkPanel2.add(linkNameList, BorderLayout.WEST);
750 okCancelPanel.add(ok);
751 okCancelPanel.add(cancel);
752 this.add(tabbedPane, java.awt.BorderLayout.CENTER);
754 this.add(okCancelPanel, java.awt.BorderLayout.SOUTH);
755 jPanel1.add(serverLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
756 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
758 jPanel1.add(portLabel, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
759 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
761 connectTab.add(linkPanel, new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0,
762 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
763 16, 0, 0, 12), 359, -17));
764 connectTab.add(jPanel1, new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0,
765 GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
766 21, 0, 35, 12), 4, 6));
767 connectTab.add(browserLabel, new GridBagConstraints(0, 1, 1, 1, 0.0,
768 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
769 new Insets(16, 0, 0, 0), 5, 1));
770 jPanel1.add(proxyPortTB, new GridBagConstraints(3, 1, 1, 1, 1.0, 0.0,
771 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
772 new Insets(0, 2, 4, 2), 54, 1));
773 jPanel1.add(proxyServerTB, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0,
774 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
775 new Insets(0, 2, 4, 0), 263, 1));
776 connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
777 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
778 new Insets(15, 0, 0, 15), 307, 1));
779 connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0, 0.0,
780 GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
781 new Insets(0, 2, 4, 2), 70, 1));
782 connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
783 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
784 new Insets(0, 2, 4, 2), 70, 1));
785 connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
786 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
787 new Insets(0, 2, 4, 2), 70, 1));
789 jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
790 GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
792 DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
793 dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER);
794 gapSymbolCB.setRenderer(dlcr);
796 tabbedPane.add(visualTab, "Visual");
797 tabbedPane.add(visual2Tab,"Colours");
798 tabbedPane.add(connectTab, "Connections");
799 tabbedPane.add(exportTab, "Output");
800 jPanel11.add(jLabel1);
802 jPanel11.add(clustaljv);
803 jPanel11.add(fastajv);
805 jPanel11.add(pfamjv);
806 jPanel11.add(pileupjv);
808 exportTab.add(modellerOutput);
809 tabbedPane.add(calcTab, "Editing");
810 calcTab.add(autoCalculateConsCheck);
811 calcTab.add(padGaps);
812 tabbedPane.add(dasPanel, "DAS Settings");
813 tabbedPane.add(wsPanel, "Web Services");
815 exportTab.add(epsLabel);
816 exportTab.add(epsRendering);
817 exportTab.add(jPanel11);
820 protected void maxColour_actionPerformed()
822 // TODO Auto-generated method stub
826 protected void minColour_actionPerformed()
828 // TODO Auto-generated method stub
832 protected void showunconserved_actionPerformed(ActionEvent e)
834 // TODO Auto-generated method stub
844 public void ok_actionPerformed(ActionEvent e)
854 public void cancel_actionPerformed(ActionEvent e)
864 public void annotations_actionPerformed(ActionEvent e)
871 public void startupFileTextfield_mouseClicked()
875 public void newLink_actionPerformed(ActionEvent e)
880 public void editLink_actionPerformed(ActionEvent e)
885 public void deleteLink_actionPerformed(ActionEvent e)
890 public void defaultBrowser_mouseClicked(MouseEvent e)
895 public void linkURLList_keyTyped(KeyEvent e)
900 public void useProxy_actionPerformed()
902 proxyServerTB.setEnabled(useProxy.isSelected());
903 proxyPortTB.setEnabled(useProxy.isSelected());