X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FPairwiseAlignPanel.java;h=05372a473d21d989d0f26218724ed8a6658af121;hb=4486cbff6855402579eff5ccbada47f15a5e8653;hp=480f719283bd3f63da9d9d5efd027156ffbec2bb;hpb=0452450533728e478ef8c893ea2cb3483c740fb3;p=jalview.git diff --git a/src/jalview/appletgui/PairwiseAlignPanel.java b/src/jalview/appletgui/PairwiseAlignPanel.java index 480f719..05372a4 100755 --- a/src/jalview/appletgui/PairwiseAlignPanel.java +++ b/src/jalview/appletgui/PairwiseAlignPanel.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -21,11 +21,11 @@ package jalview.appletgui; import java.util.*; +import java.awt.*; import java.awt.event.*; import jalview.analysis.*; import jalview.datamodel.*; -import java.awt.*; public class PairwiseAlignPanel extends Panel implements ActionListener @@ -61,7 +61,8 @@ public class PairwiseAlignPanel float scores[][] = new float[seqs.length][seqs.length]; double totscore = 0; int count = ap.av.getSelectionGroup().getSize(); - String type=(ap.av.alignment.isNucleotide()) ? AlignSeq.DNA : AlignSeq.PEP; + String type = (ap.av.alignment.isNucleotide()) ? AlignSeq.DNA : + AlignSeq.PEP; Sequence seq; for (int i = 1; i < count; i++) @@ -126,10 +127,13 @@ public class PairwiseAlignPanel System.out.println("\n"); } } + public void actionPerformed(ActionEvent evt) { - if(evt.getSource()==viewInEditorButton) + if (evt.getSource() == viewInEditorButton) + { viewInEditorButton_actionPerformed(); + } } protected void viewInEditorButton_actionPerformed() @@ -143,28 +147,31 @@ public class PairwiseAlignPanel } new AlignFrame(new Alignment(seq), - ap.av.applet, - "Pairwise Aligned Sequences", - false); + ap.av.applet, + "Pairwise Aligned Sequences", + false); } + protected ScrollPane scrollPane = new ScrollPane(); protected TextArea textarea = new TextArea(); protected Button viewInEditorButton = new Button(); Panel jPanel1 = new Panel(); BorderLayout borderLayout1 = new BorderLayout(); - private void jbInit() throws Exception { - this.setLayout(borderLayout1); - textarea.setFont(new java.awt.Font("Monospaced", 0, 12)); - textarea.setText(""); - viewInEditorButton.setFont(new java.awt.Font("Verdana", 0, 12)); - viewInEditorButton.setLabel("View in alignment editor"); - viewInEditorButton.addActionListener(this); - this.add(scrollPane, BorderLayout.CENTER); - scrollPane.add(textarea); - this.add(jPanel1, BorderLayout.SOUTH); - jPanel1.add(viewInEditorButton, null); + private void jbInit() + throws Exception + { + this.setLayout(borderLayout1); + textarea.setFont(new java.awt.Font("Monospaced", 0, 12)); + textarea.setText(""); + viewInEditorButton.setFont(new java.awt.Font("Verdana", 0, 12)); + viewInEditorButton.setLabel("View in alignment editor"); + viewInEditorButton.addActionListener(this); + this.add(scrollPane, BorderLayout.CENTER); + scrollPane.add(textarea); + this.add(jPanel1, BorderLayout.SOUTH); + jPanel1.add(viewInEditorButton, null); } }