Jalview Imported Sources
[jalview.git] / src / jalview / jbgui / GCutAndPasteTransfer.java
1 /********************
2  * 2004 Jalview Reengineered
3  * Barton Group
4  * Dundee University
5  *
6  * AM Waterhouse
7  *******************/
8
9 package jalview.jbgui;
10
11 import javax.swing.*;
12 import java.awt.*;
13 import java.awt.event.*;
14
15
16 public class GCutAndPasteTransfer extends JPanel
17 {
18   protected JTextArea textarea = new JTextArea();
19   protected JComboBox formatChoice = new JComboBox();
20   protected JLabel formatLabel = new JLabel();
21   protected JScrollPane scrollPane = new JScrollPane();
22   public GCutAndPasteTransfer()
23   {
24     try
25     {
26       jbInit();
27     }
28     catch(Exception e)
29     {
30       e.printStackTrace();
31     }
32
33   }
34   private void jbInit() throws Exception
35   {
36     textarea.setFont(new java.awt.Font("Verdana", 0, 12));
37     textarea.setBorder(BorderFactory.createLineBorder(Color.black));
38     textarea.setText("Paste your alignment file here");
39     textarea.addMouseListener(new java.awt.event.MouseAdapter()
40     {
41       public void mousePressed(MouseEvent e)
42       {
43         textarea_mousePressed(e);
44       }
45     });
46     formatChoice.setFont(new java.awt.Font("Verdana", 0, 12));
47     formatChoice.setBounds(new Rectangle(194, 269, 159, 22));
48     formatChoice.addActionListener(new java.awt.event.ActionListener()
49     {
50       public void actionPerformed(ActionEvent e)
51       {
52         formatChoice_actionPerformed(e);
53       }
54     });
55     formatLabel.setFont(new java.awt.Font("Verdana", 0, 12));
56     formatLabel.setHorizontalAlignment(SwingConstants.TRAILING);
57     formatLabel.setText("Alignment Format");
58     formatLabel.setBounds(new Rectangle(76, 272, 110, 16));
59     this.setLayout(null);
60     this.setPreferredSize(new Dimension(400, 300));
61     scrollPane.setBounds(new Rectangle(5, 5, 389, 256));
62     this.add(formatLabel, null);
63     this.add(formatChoice, null);
64     this.add(scrollPane, null);
65     scrollPane.getViewport().add(textarea, null);
66
67   }
68
69
70
71   protected void formatChoice_actionPerformed(ActionEvent e)
72   {
73
74   }
75
76   void textarea_mousePressed(MouseEvent e)
77   {
78     if(textarea.getText().equals("Paste your alignment file here"))
79       textarea.setText("");
80   }
81
82 }