X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbappletgui%2FGCutAndPasteTransfer.java;fp=src%2Fjalview%2Fjbappletgui%2FGCutAndPasteTransfer.java;h=df702fd8195c482812a502c5b4b24fea41786afb;hb=588042b69abf8e60bcc950b24c283933c7dd422f;hp=33fe5a6489721aa10506e9da0069c896154e3099;hpb=5cd8e373c75fb348ecda4d94d8a46468fb92756d;p=jalview.git diff --git a/src/jalview/jbappletgui/GCutAndPasteTransfer.java b/src/jalview/jbappletgui/GCutAndPasteTransfer.java index 33fe5a6..df702fd 100755 --- a/src/jalview/jbappletgui/GCutAndPasteTransfer.java +++ b/src/jalview/jbappletgui/GCutAndPasteTransfer.java @@ -16,77 +16,63 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - package jalview.jbappletgui; import java.awt.*; import java.awt.event.*; -public class GCutAndPasteTransfer extends Panel -{ - protected TextArea textarea = new TextArea(); - Button ok = new Button(); - Button cancel = new Button(); - protected Panel buttonPanel = new Panel(); - BorderLayout borderLayout1 = new BorderLayout(); - public GCutAndPasteTransfer() - { - try - { - jbInit(); - } - catch(Exception e) - { - e.printStackTrace(); - } - - } - private void jbInit() throws Exception - { - textarea.setFont(new java.awt.Font("Verdana", 0, 12)); - textarea.setText("Paste your alignment file here"); - textarea.addMouseListener(new java.awt.event.MouseAdapter() - { - public void mousePressed(MouseEvent e) - { - textarea_mousePressed(e); - } - }); - this.setLayout(borderLayout1); - ok.setLabel("OK"); - ok.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent e) { - ok_actionPerformed(e); - } - }); - cancel.setLabel("Cancel"); - cancel.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent e) { - cancel_actionPerformed(e); - } - }); - this.add(buttonPanel, BorderLayout.SOUTH); - buttonPanel.add(ok, null); - buttonPanel.add(cancel, null); - this.add(textarea, java.awt.BorderLayout.CENTER); - } - - - +public class GCutAndPasteTransfer extends Panel { + protected TextArea textarea = new TextArea(); + Button ok = new Button(); + Button cancel = new Button(); + protected Panel buttonPanel = new Panel(); + BorderLayout borderLayout1 = new BorderLayout(); - void textarea_mousePressed(MouseEvent e) - { - if(textarea.getText().equals("Paste your alignment file here")) - textarea.setText(""); - } - - protected void ok_actionPerformed(ActionEvent e) { + public GCutAndPasteTransfer() { + try { + jbInit(); + } catch (Exception e) { + e.printStackTrace(); + } + } - } + private void jbInit() throws Exception { + textarea.setFont(new java.awt.Font("Verdana", 0, 12)); + textarea.setText("Paste your alignment file here"); + textarea.addMouseListener(new java.awt.event.MouseAdapter() { + public void mousePressed(MouseEvent e) { + textarea_mousePressed(e); + } + }); + this.setLayout(borderLayout1); + ok.setLabel("OK"); + ok.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + ok_actionPerformed(e); + } + }); + cancel.setLabel("Cancel"); + cancel.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + cancel_actionPerformed(e); + } + }); + this.add(buttonPanel, BorderLayout.SOUTH); + buttonPanel.add(ok, null); + buttonPanel.add(cancel, null); + this.add(textarea, java.awt.BorderLayout.CENTER); + } - protected void cancel_actionPerformed(ActionEvent e) { + void textarea_mousePressed(MouseEvent e) { + if (textarea.getText().equals("Paste your alignment file here")) { + textarea.setText(""); + } + } - } + protected void ok_actionPerformed(ActionEvent e) { + } + protected void cancel_actionPerformed(ActionEvent e) { + } }