if resIndex > 19 return color.white
[jalview.git] / src / jalview / jbgui / GGroupEditor.java
1 package jalview.jbgui;
2
3 import java.awt.*;
4 import javax.swing.*;
5 import java.awt.event.*;
6 import javax.swing.border.*;
7
8 public class GGroupEditor extends JPanel
9 {
10   protected JList assignedList = new JList();
11   protected JComboBox groupsCombo = new JComboBox();
12   protected JList unassignedList = new JList();
13   JButton add = new JButton();
14   JButton addAll = new JButton();
15   JButton remove = new JButton();
16   JButton removeAll = new JButton();
17   JPanel jPanel1 = new JPanel();
18   GridLayout gridLayout1 = new GridLayout();
19   TitledBorder titledBorder1;
20   TitledBorder titledBorder2;
21   JPanel jPanel2 = new JPanel();
22   BorderLayout borderLayout1 = new BorderLayout();
23   JButton addGroup = new JButton();
24   JButton deleteGroup = new JButton();
25   JButton addSelectedIds = new JButton();
26   protected JCheckBox textCheck = new JCheckBox();
27   protected JCheckBox colourTextCheck = new JCheckBox();
28   protected JCheckBox boxesCheck = new JCheckBox();
29   protected JComboBox colourCombo = new JComboBox();
30   JPanel jPanel3 = new JPanel();
31   GridLayout gridLayout2 = new GridLayout();
32   JScrollPane jScrollPane1 = new JScrollPane();
33   JScrollPane jScrollPane2 = new JScrollPane();
34   JButton groupName = new JButton();
35
36   public GGroupEditor()
37   {
38     try
39     {
40       jbInit();
41     }
42     catch(Exception e)
43     {
44       e.printStackTrace();
45     }
46   }
47   private void jbInit() throws Exception
48   {
49     titledBorder1 = new TitledBorder("Unassigned Sequences");
50     titledBorder2 = new TitledBorder("Current Groups");
51     this.setLayout(null);
52     unassignedList.setFont(new java.awt.Font("Verdana", 0, 10));
53     unassignedList.setBorder(titledBorder1);
54     add.setFont(new java.awt.Font("Verdana", 0, 10));
55     add.setText("Add to group");
56     add.addActionListener(new java.awt.event.ActionListener()
57     {
58       public void actionPerformed(ActionEvent e)
59       {
60         add_actionPerformed(e);
61       }
62     });
63     addAll.setFont(new java.awt.Font("Verdana", 0, 10));
64     addAll.setText("Add all to group");
65     addAll.addActionListener(new java.awt.event.ActionListener()
66     {
67       public void actionPerformed(ActionEvent e)
68       {
69         addAll_actionPerformed(e);
70       }
71     });
72     remove.setFont(new java.awt.Font("Verdana", 0, 10));
73     remove.setText("Remove from group");
74     remove.addActionListener(new java.awt.event.ActionListener()
75     {
76       public void actionPerformed(ActionEvent e)
77       {
78         remove_actionPerformed(e);
79       }
80     });
81     removeAll.setFont(new java.awt.Font("Verdana", 0, 10));
82     removeAll.setMargin(new Insets(0, 0, 0, 0));
83     removeAll.setText("Remove all from group");
84     removeAll.addActionListener(new java.awt.event.ActionListener()
85     {
86       public void actionPerformed(ActionEvent e)
87       {
88         removeAll_actionPerformed(e);
89       }
90     });
91     jPanel1.setBounds(new Rectangle(265, 82, 169, 108));
92     jPanel1.setLayout(gridLayout1);
93     gridLayout1.setRows(4);
94     jPanel2.setFont(new java.awt.Font("Verdana", 0, 10));
95     jPanel2.setBorder(titledBorder2);
96     jPanel2.setBounds(new Rectangle(4, 3, 257, 369));
97     jPanel2.setLayout(borderLayout1);
98     addGroup.setBounds(new Rectangle(265, 259, 166, 25));
99     addGroup.setFont(new java.awt.Font("Verdana", 0, 10));
100     addGroup.setText("Add new group");
101     addGroup.addActionListener(new java.awt.event.ActionListener()
102     {
103       public void actionPerformed(ActionEvent e)
104       {
105         addGroup_actionPerformed(e);
106       }
107     });
108     deleteGroup.setBounds(new Rectangle(266, 285, 163, 25));
109     deleteGroup.setFont(new java.awt.Font("Verdana", 0, 10));
110     deleteGroup.setText("Delete selected group");
111     deleteGroup.addActionListener(new java.awt.event.ActionListener()
112     {
113       public void actionPerformed(ActionEvent e)
114       {
115         deleteGroup_actionPerformed(e);
116       }
117     });
118     addSelectedIds.setBounds(new Rectangle(268, 37, 160, 25));
119     addSelectedIds.setFont(new java.awt.Font("Verdana", 0, 10));
120     addSelectedIds.setText("Add selected ids");
121     addSelectedIds.addActionListener(new java.awt.event.ActionListener()
122     {
123       public void actionPerformed(ActionEvent e)
124       {
125         addSelectedIds_actionPerformed(e);
126       }
127     });
128     textCheck.setFont(new java.awt.Font("Verdana", 0, 10));
129     textCheck.setText("Display text");
130     textCheck.addActionListener(new java.awt.event.ActionListener()
131     {
132       public void actionPerformed(ActionEvent e)
133       {
134         textCheck_actionPerformed(e);
135       }
136     });
137     colourTextCheck.setFont(new java.awt.Font("Verdana", 0, 10));
138     colourTextCheck.setText("Colour text");
139     colourTextCheck.addActionListener(new java.awt.event.ActionListener()
140     {
141       public void actionPerformed(ActionEvent e)
142       {
143         colourTextCheck_actionPerformed(e);
144       }
145     });
146     boxesCheck.setFont(new java.awt.Font("Verdana", 0, 10));
147     boxesCheck.setText("Display boxes");
148     boxesCheck.addActionListener(new java.awt.event.ActionListener()
149     {
150       public void actionPerformed(ActionEvent e)
151       {
152         boxesCheck_actionPerformed(e);
153       }
154     });
155     jPanel3.setLayout(gridLayout2);
156     gridLayout2.setRows(4);
157     colourCombo.setFont(new java.awt.Font("Verdana", 0, 10));
158     colourCombo.addActionListener(new java.awt.event.ActionListener()
159     {
160       public void actionPerformed(ActionEvent e)
161       {
162         colourCombo_actionPerformed(e);
163       }
164     });
165     assignedList.setFont(new java.awt.Font("Verdana", 0, 10));
166     groupsCombo.setFont(new java.awt.Font("Verdana", 0, 10));
167     groupsCombo.addActionListener(new java.awt.event.ActionListener()
168     {
169       public void actionPerformed(ActionEvent e)
170       {
171         groupsCombo_actionPerformed(e);
172       }
173     });
174     this.setBackground(Color.lightGray);
175     jScrollPane1.setBounds(new Rectangle(437, 6, 257, 367));
176     groupName.setBounds(new Rectangle(266, 232, 166, 25));
177     groupName.setFont(new java.awt.Font("Verdana", 0, 10));
178     groupName.setVerifyInputWhenFocusTarget(true);
179     groupName.setText("Edit group name");
180     groupName.addActionListener(new java.awt.event.ActionListener()
181     {
182       public void actionPerformed(ActionEvent e)
183       {
184         groupName_actionPerformed(e);
185       }
186     });
187     jPanel1.add(add, null);
188     jPanel1.add(addAll, null);
189     jPanel1.add(remove, null);
190     jPanel1.add(removeAll, null);
191     this.add(addSelectedIds, null);
192     this.add(jPanel1, null);
193     this.add(jPanel2, null);
194     jPanel3.add(colourCombo, null);
195     jPanel3.add(boxesCheck, null);
196     jPanel3.add(textCheck, null);
197     jPanel3.add(colourTextCheck, null);
198     this.add(jScrollPane1, null);
199     this.add(addGroup, null);
200     this.add(deleteGroup, null);
201     this.add(groupName, null);
202     jScrollPane1.getViewport().add(unassignedList, null);
203     jPanel2.add(jScrollPane2, BorderLayout.CENTER);
204     jPanel2.add(groupsCombo, BorderLayout.NORTH);
205     jPanel2.add(jPanel3, BorderLayout.SOUTH);
206     jScrollPane2.getViewport().add(assignedList, null);
207   }
208
209   protected void add_actionPerformed(ActionEvent e)
210   {
211
212   }
213
214   protected void groupsCombo_actionPerformed(ActionEvent e)
215   {
216
217   }
218
219   protected void colourCombo_actionPerformed(ActionEvent e)
220   {
221
222   }
223
224   protected void boxesCheck_actionPerformed(ActionEvent e)
225   {
226
227   }
228
229   protected void textCheck_actionPerformed(ActionEvent e)
230   {
231
232   }
233
234   protected void colourTextCheck_actionPerformed(ActionEvent e)
235   {
236
237   }
238
239   protected void addSelectedIds_actionPerformed(ActionEvent e)
240   {
241
242   }
243
244   protected void addAll_actionPerformed(ActionEvent e)
245   {
246
247   }
248
249   protected void remove_actionPerformed(ActionEvent e)
250   {
251
252   }
253
254   protected void removeAll_actionPerformed(ActionEvent e)
255   {
256
257   }
258
259   protected void addGroup_actionPerformed(ActionEvent e)
260   {
261
262   }
263
264   protected void deleteGroup_actionPerformed(ActionEvent e)
265   {
266
267   }
268
269
270   protected void groupName_actionPerformed(ActionEvent e)
271   {
272
273   }
274 }