/******************** * 2004 Jalview Reengineered * Barton Group * Dundee University * * AM Waterhouse *******************/ package jalview.gui; import jalview.jbgui.GCutAndPasteTransfer; import java.awt.*; public class CutAndPasteTransfer extends GCutAndPasteTransfer { public CutAndPasteTransfer(boolean forImport) { super(); for (int i = 0; i < jalview.io.FormatProperties.getFormats().size(); i++) { formatChoice.addItem((String)jalview.io.FormatProperties.getFormats().elementAt(i)); } if(forImport) { formatLabel.setVisible(false); formatChoice.setVisible(false); textarea.setBounds(new Rectangle(9, 6, 383, 284)); } } // this method is called once the user has selected an output format public void formatForOutput() { textarea.setFont(new Font("Monospaced", Font.PLAIN, 12)); setLayout(new BorderLayout()); add(scrollPane, BorderLayout.CENTER); remove(formatLabel); remove(formatChoice); } public String getFormat() { return formatChoice.getSelectedItem().toString(); } public String getText() { return textarea.getText(); } public void setText(String text) { textarea.setText(text); } }