X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGCutAndPasteTransfer.java;fp=src%2Fjalview%2Fjbgui%2FGCutAndPasteTransfer.java;h=b037919d2bb57d6e6ffc7563fa19d219821f8ef5;hb=e894eb87d40be6e8452d19032ddffe80dad5f804;hp=a917ebeb512170a209ed977ecdb771e89f0a10dc;hpb=0f71bfca98457c30f1051f142c31b6aaa3e23ead;p=jalview.git diff --git a/src/jalview/jbgui/GCutAndPasteTransfer.java b/src/jalview/jbgui/GCutAndPasteTransfer.java index a917ebe..b037919 100755 --- a/src/jalview/jbgui/GCutAndPasteTransfer.java +++ b/src/jalview/jbgui/GCutAndPasteTransfer.java @@ -1,215 +1,205 @@ -/* -* 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.jbgui; - -import java.awt.*; -import java.awt.event.*; - -import java.beans.PropertyChangeEvent; -import java.beans.PropertyVetoException; -import java.beans.VetoableChangeListener; - -import javax.swing.*; - - -/** - * DOCUMENT ME! - * - * @author $author$ - * @version $Revision$ - */ -public class GCutAndPasteTransfer extends JInternalFrame -{ - protected JTextArea textarea = new JTextArea(); - protected JScrollPane scrollPane = new JScrollPane(); - BorderLayout borderLayout1 = new BorderLayout(); - JMenuBar editMenubar = new JMenuBar(); - JMenu editMenu = new JMenu(); - JMenuItem copyItem = new JMenuItem(); - JMenuItem pasteMenu = new JMenuItem(); - BorderLayout borderLayout2 = new BorderLayout(); - protected JPanel inputButtonPanel = new JPanel(); - JButton ok = new JButton(); - JButton cancel = new JButton(); - JMenuItem selectAll = new JMenuItem(); - - /** - * Creates a new GCutAndPasteTransfer object. - */ - public GCutAndPasteTransfer() - { - try - { - setJMenuBar(editMenubar); - jbInit(); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - - /** - * DOCUMENT ME! - * - * @throws Exception DOCUMENT ME! - */ - private void jbInit() throws Exception - { - scrollPane.setBorder(null); - ok.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); - ok.setText("Accept"); - ok.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - ok_actionPerformed(e); - } - }); - cancel.setText("Cancel"); - cancel.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - cancel_actionPerformed(e); - } - }); - textarea.setBorder(null); - textarea.addVetoableChangeListener(new VetoableChangeListener() - { - public void vetoableChange(PropertyChangeEvent evt) - { - try - { - textarea_vetoableChange(evt); - } - catch (java.beans.PropertyVetoException exception0) - { - exception0.printStackTrace(); - } - } - }); - selectAll.setText("Select All"); - selectAll.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - selectAll_actionPerformed(e); - } - }); - editMenubar.add(editMenu); - textarea.setFont(new java.awt.Font("Monospaced", Font.PLAIN, 12)); - textarea.addMouseListener(new java.awt.event.MouseAdapter() - { - public void mousePressed(MouseEvent e) - { - textarea_mousePressed(e); - } - }); - editMenu.setText("Edit"); - pasteMenu.setText("Paste"); - pasteMenu.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - pasteMenu_actionPerformed(e); - } - }); - copyItem.setText("Copy"); - copyItem.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - copyItem_actionPerformed(e); - } - }); - this.getContentPane().setLayout(borderLayout2); - scrollPane.setBorder(null); - scrollPane.getViewport().add(textarea, null); - editMenu.add(selectAll); - editMenu.add(copyItem); - editMenu.add(pasteMenu); - this.getContentPane().add(scrollPane, java.awt.BorderLayout.CENTER); - inputButtonPanel.add(ok); - inputButtonPanel.add(cancel); - } - - /** - * DOCUMENT ME! - * - * @param e DOCUMENT ME! - */ - public void textarea_mousePressed(MouseEvent e) - { - - } - - /** - * DOCUMENT ME! - * - * @param e DOCUMENT ME! - */ - public void copyItem_actionPerformed(ActionEvent e) - { - } - - /** - * DOCUMENT ME! - * - * @param e DOCUMENT ME! - */ - public void pasteMenu_actionPerformed(ActionEvent e) - { - } - - /** - * DOCUMENT ME! - * - * @param e DOCUMENT ME! - */ - public void ok_actionPerformed(ActionEvent e) - { - } - - /** - * DOCUMENT ME! - * - * @param e DOCUMENT ME! - */ - public void cancel_actionPerformed(ActionEvent e) - { - } - - /** - * DOCUMENT ME! - * - * @param evt DOCUMENT ME! - * - * @throws PropertyVetoException DOCUMENT ME! - */ - public void textarea_vetoableChange(PropertyChangeEvent evt) - throws PropertyVetoException - { - } - - public void selectAll_actionPerformed(ActionEvent e) - { - textarea.selectAll(); - } -} +/* +* Jalview - A Sequence Alignment Editor and Viewer +* Copyright (C) 2006 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.jbgui; + +import java.awt.*; +import java.awt.event.*; + +import javax.swing.*; + + +/** + * DOCUMENT ME! + * + * @author $author$ + * @version $Revision$ + */ +public class GCutAndPasteTransfer extends JInternalFrame +{ + protected JTextArea textarea = new JTextArea(); + protected JScrollPane scrollPane = new JScrollPane(); + BorderLayout borderLayout1 = new BorderLayout(); + JMenuBar editMenubar = new JMenuBar(); + JMenu editMenu = new JMenu(); + JMenuItem copyItem = new JMenuItem(); + JMenuItem pasteMenu = new JMenuItem(); + BorderLayout borderLayout2 = new BorderLayout(); + protected JPanel inputButtonPanel = new JPanel(); + JButton ok = new JButton(); + JButton cancel = new JButton(); + JMenuItem selectAll = new JMenuItem(); + JMenu jMenu1 = new JMenu(); + JMenuItem save = new JMenuItem(); + + /** + * Creates a new GCutAndPasteTransfer object. + */ + public GCutAndPasteTransfer() + { + try + { + setJMenuBar(editMenubar); + jbInit(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + /** + * DOCUMENT ME! + * + * @throws Exception DOCUMENT ME! + */ + private void jbInit() throws Exception + { + scrollPane.setBorder(null); + ok.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + ok.setText("Accept"); + ok.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + ok_actionPerformed(e); + } + }); + cancel.setText("Close"); + cancel.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + cancel_actionPerformed(e); + } + }); + textarea.setBorder(null); + + selectAll.setText("Select All"); + selectAll.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + selectAll_actionPerformed(e); + } + }); + jMenu1.setText("File"); + save.setText("Save"); + save.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + save_actionPerformed(e); + } + }); + editMenubar.add(jMenu1); + editMenubar.add(editMenu); + textarea.setFont(new java.awt.Font("Monospaced", Font.PLAIN, 12)); + textarea.addMouseListener(new java.awt.event.MouseAdapter() + { + public void mousePressed(MouseEvent e) + { + textarea_mousePressed(e); + } + }); + editMenu.setText("Edit"); + pasteMenu.setText("Paste"); + pasteMenu.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + pasteMenu_actionPerformed(e); + } + }); + copyItem.setText("Copy"); + copyItem.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + copyItem_actionPerformed(e); + } + }); + this.getContentPane().setLayout(borderLayout2); + scrollPane.setBorder(null); + scrollPane.getViewport().add(textarea, null); + editMenu.add(selectAll); + editMenu.add(copyItem); + editMenu.add(pasteMenu); + this.getContentPane().add(scrollPane, java.awt.BorderLayout.CENTER); + inputButtonPanel.add(ok); + inputButtonPanel.add(cancel); + jMenu1.add(save); + } + + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + public void textarea_mousePressed(MouseEvent e) + { + + } + + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + public void copyItem_actionPerformed(ActionEvent e) + { + } + + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + public void pasteMenu_actionPerformed(ActionEvent e) + { + } + + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + public void ok_actionPerformed(ActionEvent e) + { + } + + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + public void cancel_actionPerformed(ActionEvent e) + { + } + + + public void selectAll_actionPerformed(ActionEvent e) + { + textarea.selectAll(); + } + + public void save_actionPerformed(ActionEvent e) + { + + } +}