5 import java.awt.event.*;
6 import javax.swing.border.*;
8 public class GGroupEditor extends JPanel
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();
47 private void jbInit() throws Exception
49 titledBorder1 = new TitledBorder("Unassigned Sequences");
50 titledBorder2 = new TitledBorder("Current Groups");
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()
58 public void actionPerformed(ActionEvent e)
60 add_actionPerformed(e);
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()
67 public void actionPerformed(ActionEvent e)
69 addAll_actionPerformed(e);
72 remove.setFont(new java.awt.Font("Verdana", 0, 10));
73 remove.setText("Remove from group");
74 remove.addActionListener(new java.awt.event.ActionListener()
76 public void actionPerformed(ActionEvent e)
78 remove_actionPerformed(e);
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()
86 public void actionPerformed(ActionEvent e)
88 removeAll_actionPerformed(e);
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()
103 public void actionPerformed(ActionEvent e)
105 addGroup_actionPerformed(e);
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()
113 public void actionPerformed(ActionEvent e)
115 deleteGroup_actionPerformed(e);
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()
123 public void actionPerformed(ActionEvent e)
125 addSelectedIds_actionPerformed(e);
128 textCheck.setFont(new java.awt.Font("Verdana", 0, 10));
129 textCheck.setText("Display text");
130 textCheck.addActionListener(new java.awt.event.ActionListener()
132 public void actionPerformed(ActionEvent e)
134 textCheck_actionPerformed(e);
137 colourTextCheck.setFont(new java.awt.Font("Verdana", 0, 10));
138 colourTextCheck.setText("Colour text");
139 colourTextCheck.addActionListener(new java.awt.event.ActionListener()
141 public void actionPerformed(ActionEvent e)
143 colourTextCheck_actionPerformed(e);
146 boxesCheck.setFont(new java.awt.Font("Verdana", 0, 10));
147 boxesCheck.setText("Display boxes");
148 boxesCheck.addActionListener(new java.awt.event.ActionListener()
150 public void actionPerformed(ActionEvent e)
152 boxesCheck_actionPerformed(e);
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()
160 public void actionPerformed(ActionEvent e)
162 colourCombo_actionPerformed(e);
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()
169 public void actionPerformed(ActionEvent e)
171 groupsCombo_actionPerformed(e);
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()
182 public void actionPerformed(ActionEvent e)
184 groupName_actionPerformed(e);
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);
209 protected void add_actionPerformed(ActionEvent e)
214 protected void groupsCombo_actionPerformed(ActionEvent e)
219 protected void colourCombo_actionPerformed(ActionEvent e)
224 protected void boxesCheck_actionPerformed(ActionEvent e)
229 protected void textCheck_actionPerformed(ActionEvent e)
234 protected void colourTextCheck_actionPerformed(ActionEvent e)
239 protected void addSelectedIds_actionPerformed(ActionEvent e)
244 protected void addAll_actionPerformed(ActionEvent e)
249 protected void remove_actionPerformed(ActionEvent e)
254 protected void removeAll_actionPerformed(ActionEvent e)
259 protected void addGroup_actionPerformed(ActionEvent e)
264 protected void deleteGroup_actionPerformed(ActionEvent e)
270 protected void groupName_actionPerformed(ActionEvent e)