JAL-1165 allow progress indicators on the web service window
[jalview.git] / src / jalview / jbgui / GWebserviceInfo.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  * 
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  */
18 package jalview.jbgui;
19
20 import java.awt.*;
21 import java.awt.event.*;
22 import javax.swing.*;
23
24 /**
25  * DOCUMENT ME!
26  * 
27  * @author $author$
28  * @version $Revision$
29  */
30 public class GWebserviceInfo extends JPanel
31 {
32   protected JTextArea infoText = new JTextArea();
33
34   JScrollPane jScrollPane1 = new JScrollPane();
35
36   JPanel jPanel1 = new JPanel();
37
38   BorderLayout borderLayout1 = new BorderLayout();
39
40   BorderLayout borderLayout2 = new BorderLayout();
41
42   protected JPanel titlePanel = new JPanel();
43
44   BorderLayout borderLayout3 = new BorderLayout();
45
46   protected JPanel buttonPanel = new JPanel();
47
48   public JButton cancel = new JButton();
49
50   public JButton showResultsNewFrame = new JButton();
51
52   public JButton mergeResults = new JButton();
53
54   GridBagLayout gridBagLayout1 = new GridBagLayout();
55   
56   public JPanel statusPanel = new JPanel(new GridLayout());
57   public JLabel statusBar = new JLabel();
58
59   /**
60    * Creates a new GWebserviceInfo object.
61    */
62   public GWebserviceInfo()
63   {
64     try
65     {
66       jbInit();
67     } catch (Exception e)
68     {
69       e.printStackTrace();
70     }
71   }
72
73   /**
74    * DOCUMENT ME!
75    * 
76    * @throws Exception
77    *           DOCUMENT ME!
78    */
79   private void jbInit() throws Exception
80   {
81     infoText.setFont(new java.awt.Font("Verdana", 0, 10));
82     infoText.setBorder(null);
83     infoText.setEditable(false);
84     infoText.setText("");
85     infoText.setLineWrap(true);
86     infoText.setWrapStyleWord(true);
87     this.setLayout(borderLayout1);
88     jPanel1.setLayout(borderLayout2);
89     titlePanel.setBackground(Color.white);
90     titlePanel.setPreferredSize(new Dimension(0, 60));
91     titlePanel.setLayout(borderLayout3);
92     jScrollPane1.setBorder(null);
93     jScrollPane1.setPreferredSize(new Dimension(400, 70));
94     cancel.setFont(new java.awt.Font("Verdana", 0, 11));
95     cancel.setText("Cancel");
96     cancel.addActionListener(new java.awt.event.ActionListener()
97     {
98       public void actionPerformed(ActionEvent e)
99       {
100         cancel_actionPerformed(e);
101       }
102     });
103     buttonPanel.setLayout(gridBagLayout1);
104     buttonPanel.setOpaque(false);
105     showResultsNewFrame.setText("New Window");
106     mergeResults.setText("Merge Results");
107     this.setBackground(Color.white);
108     this.add(jPanel1, BorderLayout.NORTH);
109     jPanel1.add(jScrollPane1, BorderLayout.CENTER);
110     jScrollPane1.getViewport().add(infoText, null);
111     jPanel1.add(titlePanel, BorderLayout.NORTH);
112     titlePanel.add(buttonPanel, BorderLayout.EAST);
113     buttonPanel.add(cancel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
114             GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
115                     19, 6, 16, 4), 0, 0));
116     this.add(statusPanel, java.awt.BorderLayout.SOUTH);
117     statusPanel.add(statusBar, null);
118   }
119
120   /**
121    * DOCUMENT ME!
122    * 
123    * @param e
124    *          DOCUMENT ME!
125    */
126   protected void cancel_actionPerformed(ActionEvent e)
127   {
128   }
129 }