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