X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbappletgui%2FGCutAndPasteTransfer.java;h=df702fd8195c482812a502c5b4b24fea41786afb;hb=588042b69abf8e60bcc950b24c283933c7dd422f;hp=ca5b6d89fa61c760aa65ef86695aa1f021856287;hpb=3539c676cc4d07f10b36616c8e031b481e8ed4de;p=jalview.git diff --git a/src/jalview/jbappletgui/GCutAndPasteTransfer.java b/src/jalview/jbappletgui/GCutAndPasteTransfer.java index ca5b6d8..df702fd 100755 --- a/src/jalview/jbappletgui/GCutAndPasteTransfer.java +++ b/src/jalview/jbappletgui/GCutAndPasteTransfer.java @@ -1,81 +1,78 @@ -/******************** - * 2004 Jalview Reengineered - * Barton Group - * Dundee University - * - * AM Waterhouse - *******************/ - +/* +* Jalview - A Sequence Alignment Editor and Viewer +* Copyright (C) 2005 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 +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* 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) { + } }