Formatting changes
[jalview.git] / src / jalview / jbgui / GUserDefinedColours.java
1 /*\r
2 * Jalview - A Sequence Alignment Editor and Viewer\r
3 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
4 *\r
5 * This program is free software; you can redistribute it and/or\r
6 * modify it under the terms of the GNU General Public License\r
7 * as published by the Free Software Foundation; either version 2\r
8 * of the License, or (at your option) any later version.\r
9 *\r
10 * This program is distributed in the hope that it will be useful,\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13 * GNU General Public License for more details.\r
14 *\r
15 * You should have received a copy of the GNU General Public License\r
16 * along with this program; if not, write to the Free Software\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
18 */\r
19 package jalview.jbgui;\r
20 \r
21 import java.awt.*;\r
22 import java.awt.event.*;\r
23 \r
24 import javax.swing.*;\r
25 \r
26 \r
27 /**\r
28  * DOCUMENT ME!\r
29  *\r
30  * @author $author$\r
31  * @version $Revision$\r
32  */\r
33 public class GUserDefinedColours extends JPanel\r
34 {\r
35     protected JColorChooser colorChooser = new JColorChooser();\r
36     protected JPanel buttonPanel = new JPanel();\r
37     protected GridLayout gridLayout = new GridLayout();\r
38     JPanel jPanel2 = new JPanel();\r
39     protected JButton okButton = new JButton();\r
40     protected JButton applyButton = new JButton();\r
41     protected JButton loadbutton = new JButton();\r
42     protected JButton savebutton = new JButton();\r
43     protected JButton cancelButton = new JButton();\r
44     FlowLayout flowLayout1 = new FlowLayout();\r
45 \r
46     /**\r
47      * Creates a new GUserDefinedColours object.\r
48      */\r
49     public GUserDefinedColours()\r
50     {\r
51         try\r
52         {\r
53             jbInit();\r
54         }\r
55         catch (Exception e)\r
56         {\r
57             e.printStackTrace();\r
58         }\r
59     }\r
60 \r
61     /**\r
62      * DOCUMENT ME!\r
63      *\r
64      * @throws Exception DOCUMENT ME!\r
65      */\r
66     private void jbInit() throws Exception\r
67     {\r
68         this.setLayout(flowLayout1);\r
69         buttonPanel.setLayout(gridLayout);\r
70         gridLayout.setColumns(6);\r
71         gridLayout.setRows(4);\r
72         okButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
73         okButton.setText("OK");\r
74         okButton.addActionListener(new java.awt.event.ActionListener()\r
75             {\r
76                 public void actionPerformed(ActionEvent e)\r
77                 {\r
78                     okButton_actionPerformed(e);\r
79                 }\r
80             });\r
81         applyButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
82         applyButton.setText("Apply");\r
83         applyButton.addActionListener(new java.awt.event.ActionListener()\r
84             {\r
85                 public void actionPerformed(ActionEvent e)\r
86                 {\r
87                     applyButton_actionPerformed(e);\r
88                 }\r
89             });\r
90         loadbutton.setFont(new java.awt.Font("Verdana", 0, 11));\r
91         loadbutton.setText("Load scheme");\r
92         loadbutton.addActionListener(new java.awt.event.ActionListener()\r
93             {\r
94                 public void actionPerformed(ActionEvent e)\r
95                 {\r
96                     loadbutton_actionPerformed(e);\r
97                 }\r
98             });\r
99         savebutton.setFont(new java.awt.Font("Verdana", 0, 11));\r
100         savebutton.setText("Save scheme");\r
101         savebutton.addActionListener(new java.awt.event.ActionListener()\r
102             {\r
103                 public void actionPerformed(ActionEvent e)\r
104                 {\r
105                     savebutton_actionPerformed(e);\r
106                 }\r
107             });\r
108         cancelButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
109         cancelButton.setText("Cancel");\r
110         cancelButton.addActionListener(new java.awt.event.ActionListener()\r
111             {\r
112                 public void actionPerformed(ActionEvent e)\r
113                 {\r
114                     cancelButton_actionPerformed(e);\r
115                 }\r
116             });\r
117         this.setBackground(new Color(212, 208, 223));\r
118         jPanel2.setOpaque(false);\r
119         colorChooser.setOpaque(false);\r
120         this.add(colorChooser, null);\r
121         this.add(buttonPanel, null);\r
122         this.add(jPanel2, null);\r
123         jPanel2.add(okButton, null);\r
124         jPanel2.add(applyButton, null);\r
125         jPanel2.add(loadbutton, null);\r
126         jPanel2.add(savebutton, null);\r
127         jPanel2.add(cancelButton, null);\r
128     }\r
129 \r
130     /**\r
131      * DOCUMENT ME!\r
132      *\r
133      * @param e DOCUMENT ME!\r
134      */\r
135     protected void okButton_actionPerformed(ActionEvent e)\r
136     {\r
137     }\r
138 \r
139     /**\r
140      * DOCUMENT ME!\r
141      *\r
142      * @param e DOCUMENT ME!\r
143      */\r
144     protected void applyButton_actionPerformed(ActionEvent e)\r
145     {\r
146     }\r
147 \r
148     /**\r
149      * DOCUMENT ME!\r
150      *\r
151      * @param e DOCUMENT ME!\r
152      */\r
153     protected void loadbutton_actionPerformed(ActionEvent e)\r
154     {\r
155     }\r
156 \r
157     /**\r
158      * DOCUMENT ME!\r
159      *\r
160      * @param e DOCUMENT ME!\r
161      */\r
162     protected void savebutton_actionPerformed(ActionEvent e)\r
163     {\r
164     }\r
165 \r
166     /**\r
167      * DOCUMENT ME!\r
168      *\r
169      * @param e DOCUMENT ME!\r
170      */\r
171     protected void cancelButton_actionPerformed(ActionEvent e)\r
172     {\r
173     }\r
174 }\r