source: trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java@ 8236

Last change on this file since 8236 was 8236, checked in by mdewsnip, 20 years ago

Replaced all Gatherer.print* with DebugStream.print*.

  • Property svn:keywords set to Author Date Id Revision
File size: 23.8 KB
Line 
1/**
2 *#########################################################################
3 *
4 * A component of the Gatherer application, part of the Greenstone digital
5 * library suite from the New Zealand Digital Library Project at the
6 * University of Waikato, New Zealand.
7 *
8 * Author: John Thompson, Greenstone Digital Library, University of Waikato
9 *
10 * Copyright (C) 1999 New Zealand Digital Library Project
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 *########################################################################
26 */
27package org.greenstone.gatherer.cdm;
28
29/**************************************************************************************
30 * Written: ??/??/02
31 * Revised: 04/07/03 - DOM support
32 **************************************************************************************/
33import java.awt.*;
34import java.awt.event.*;
35import java.util.*;
36import javax.swing.*;
37import javax.swing.event.*;
38import org.greenstone.gatherer.Configuration;
39import org.greenstone.gatherer.DebugStream;
40import org.greenstone.gatherer.Dictionary;
41import org.greenstone.gatherer.Gatherer;
42import org.greenstone.gatherer.cdm.CollectionConfiguration;
43import org.greenstone.gatherer.cdm.CollectionDesignManager;
44import org.greenstone.gatherer.cdm.Control;
45import org.greenstone.gatherer.cdm.DOMProxyListModel;
46import org.greenstone.gatherer.cdm.Subcollection;
47import org.greenstone.gatherer.gui.GLIButton;
48import org.greenstone.gatherer.gui.NonWhitespaceField;
49import org.greenstone.gatherer.msm.ElementWrapper;
50import org.greenstone.gatherer.util.ExclusiveListSelectionListener;
51import org.greenstone.gatherer.util.StaticStrings;
52import org.greenstone.gatherer.util.Utility;
53import org.w3c.dom.*;
54
55/** This class maintains a list of subcollections within our collection.
56 * @author John Thompson, Greenstone Digital Library, University of Waikato
57 * @version 2.4
58 */
59public class SubcollectionManager
60 extends DOMProxyListModel {
61
62 static final private String DISABLED_CONTROLS = "Disabled";
63 static final private String ENABLED_CONTROLS = "Normal";
64 static final private String CLASS_DICTIONARY_NAME = "CDM.SubcollectionManager.";
65
66 /** The controls used to edit the settings of this manager. */
67 private Control controls = null;
68
69 private DOMProxyListModel model;
70
71 /** Constructor.
72 * @see org.greenstone.gatherer.Gatherer
73 * @see org.greenstone.gatherer.cdm.CollectionConfiguration
74 * @see org.greenstone.gatherer.cdm.CollectionDesignManager
75 * @see org.greenstone.gatherer.cdm.DOMProxyListModel
76 * @see org.greenstone.gatherer.cdm.Subcollection
77 */
78 public SubcollectionManager() {
79 super(CollectionDesignManager.collect_config.getDocumentElement(), StaticStrings.SUBCOLLECTION_ELEMENT, new Subcollection());
80 DebugStream.println("SubcollectionManager: " + getSize() + " subcollections parsed.");
81 this.model = this;
82 }
83
84 /** Method to add a new subcollection.
85 * @param subcollection the Subcollection to add
86 * @see org.greenstone.gatherer.Gatherer
87 * @see org.greenstone.gatherer.cdm.CollectionConfiguration
88 * @see org.greenstone.gatherer.cdm.DOMProxyListModel
89 * @see org.greenstone.gatherer.collection.CollectionManager
90 */
91 private void addSubcollection(Subcollection subcollection) {
92 if(!contains(subcollection)) {
93 Element element = subcollection.getElement();
94 // Locate where we should insert this new subcollection.
95 Node target_node = CollectionConfiguration.findInsertionPoint(element);
96 // Failing that we insert immediately after a language string
97 add(root, subcollection, target_node);
98 Gatherer.c_man.configurationChanged();
99 }
100 }
101
102 public void destroy() {
103 if(controls != null) {
104 controls.destroy();
105 controls = null;
106 }
107 }
108
109 /** Method to retrieve the controls for this manager.
110 * @return the Control used to edit the subcollection data
111 */
112 public Control getControls() {
113 if(controls == null) {
114 controls = new SubcollectionControl();
115 }
116 return controls;
117 }
118
119 /** Method to retrieve a certain subcollection by its name.
120 * @param name a String which is used as the key for finding the matching subcollection
121 * @return the requested Subcollection or null if no such subcollection exists.
122 */
123 private Subcollection getSubcollection(String name) {
124 Subcollection result = null;
125 int size = getSize();
126 for(int i = 0; i < size; i++) {
127 Subcollection subcollection = (Subcollection) getElementAt(i);
128 if(subcollection.getName().equals(name)) {
129 result = subcollection;
130 }
131 }
132 return result;
133 }
134
135
136 /** Called when the detail mode has changed which in turn may cause several design elements to be available/hidden
137 * @param mode the new mode as an int
138 */
139 public void modeChanged(int mode) {
140 if(controls != null) {
141 ((SubcollectionControl)controls).modeChanged(mode);
142 }
143 }
144
145 /** Method to remove the given subcollection.
146 * @param subcollection the Subcollection you want to remove
147 * @see org.greenstone.gatherer.Gatherer
148 * @see org.greenstone.gatherer.collection.CollectionManager
149 */
150 private void removeSubcollection(Subcollection subcollection) {
151 remove(subcollection);
152 Gatherer.c_man.configurationChanged();
153 }
154
155 private void updateSubcollection(Subcollection subcollection, String name, boolean include, String source, String pattern, String flags) {
156 subcollection.setFlags(flags);
157 subcollection.setInclusive(include);
158 subcollection.setName(name);
159 subcollection.setPattern(pattern);
160 subcollection.setSource(source);
161 refresh(subcollection);
162 Gatherer.c_man.configurationChanged();
163 }
164
165 /** This class creates a JPanel containing serveral more controls used for editing subcollection information. */
166 private class SubcollectionControl
167 extends JPanel
168 implements Control {
169
170 private CardLayout card_layout;
171 private JButton add_button;
172 private JButton remove_button;
173 private JButton update_button;
174 private JComboBox source_combobox;
175 private JList subcollection_list;
176 private JPanel border_pane;
177 private JTabbedPane tabbed_pane;
178 private JTextArea instructions_area;
179 private JTextField flags_field;
180 private JTextField match_field;
181 private JTextField name_field;
182 private JRadioButton exclude_button;
183 private JRadioButton include_button;
184
185 /** Constructor */
186 public SubcollectionControl() {
187 // Create
188 JPanel header_pane = new JPanel();
189 instructions_area = new JTextArea();
190 instructions_area.setEditable(false);
191 instructions_area.setLineWrap(true);
192 instructions_area.setRows(6);
193 instructions_area.setWrapStyleWord(true);
194 Dictionary.registerText(instructions_area, "CDM.SubcollectionManager.Instructions");
195
196 border_pane = new JPanel();
197 card_layout = new CardLayout();
198
199 tabbed_pane = new JTabbedPane();
200 JLabel title = new JLabel();
201 title.setHorizontalAlignment(JLabel.CENTER);
202 Dictionary.registerText(title, "CDM.SubcollectionManager.Title");
203
204 JPanel button_pane_3 = new JPanel();
205 add_button = new GLIButton();
206 add_button.setMnemonic(KeyEvent.VK_A);
207 add_button.setEnabled(false);
208 Dictionary.registerBoth(add_button, "CDM.SubcollectionManager.Add", "CDM.SubcollectionManager.Add_Tooltip");
209 remove_button = new GLIButton();
210 remove_button.setMnemonic(KeyEvent.VK_R);
211 remove_button.setEnabled(false);
212 Dictionary.registerBoth(remove_button, "CDM.SubcollectionManager.Remove", "CDM.SubcollectionManager.Remove_Tooltip");
213 update_button = new GLIButton();
214 update_button.setMnemonic(KeyEvent.VK_C);
215 update_button.setEnabled(false);
216 Dictionary.registerBoth(update_button, "CDM.SubcollectionManager.Replace", "CDM.SubcollectionManager.Replace_Tooltip");
217
218 JPanel button_pane = new JPanel();
219 JPanel button_pane_1 = new JPanel();
220 include_button = new JRadioButton();
221 include_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
222 include_button.setMnemonic(KeyEvent.VK_I);
223 include_button.setOpaque(false);
224 Dictionary.registerText(include_button, "CDM.SubcollectionManager.Include");
225 exclude_button = new JRadioButton();
226 exclude_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
227 exclude_button.setMnemonic(KeyEvent.VK_X);
228 exclude_button.setOpaque(false);
229 Dictionary.registerText(exclude_button, "CDM.SubcollectionManager.Exclude");
230
231 JLabel flags_label = new JLabel();
232 Dictionary.registerText(flags_label, "CDM.SubcollectionManager.Flags");
233 flags_field = new NonWhitespaceField();
234 Dictionary.registerTooltip(flags_field, "CDM.SubcollectionManager.Flags_Tooltip");
235
236 JPanel inclusive_pane = new JPanel();
237 JLabel inclusive_label = new JLabel();
238 Dictionary.registerText(inclusive_label, "CDM.SubcollectionManager.Inclusive");
239
240 JLabel match_label = new JLabel();
241 Dictionary.registerText(match_label, "CDM.SubcollectionManager.Match");
242 match_field = new JTextField();
243 Dictionary.registerTooltip(match_field, "CDM.SubcollectionManager.Match_Tooltip");
244
245 JLabel name_label = new JLabel();
246 Dictionary.registerText(name_label, "CDM.SubcollectionManager.Name");
247 name_field = new NonWhitespaceField();
248 Dictionary.registerTooltip(name_field, "CDM.SubcollectionManager.Name_Tooltip");
249
250 JLabel source_label = new JLabel();
251 Dictionary.registerText(source_label, "CDM.SubcollectionManager.Source");
252 Vector source_model = Gatherer.c_man.getCollection().msm.getAssignedElements();
253 source_model.add(0, StaticStrings.FILENAME_STR);
254 source_combobox = new JComboBox(source_model);
255 Dictionary.registerTooltip(source_combobox, "CDM.SubcollectionManager.Source_Tooltip");
256
257 subcollection_list = new JList(model);
258 subcollection_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
259 JPanel subcollection_pane = new JPanel();
260 ButtonGroup bg = new ButtonGroup();
261 bg.add(include_button);
262 bg.add(exclude_button);
263 include_button.setSelected(true);
264 JPanel subcollection_list_pane = new JPanel();
265 JLabel subcollection_list_label = new JLabel();
266 Dictionary.registerText(subcollection_list_label, "CDM.SubcollectionManager.Assigned");
267
268 // Create a message pane which explains why these controls are not currently active
269 JPanel message_pane = new JPanel();
270 String args[] = new String[3];
271 args[0] = Configuration.getModeAsString();
272 args[1] = Dictionary.get("Preferences.Mode.Systems");
273 args[2] = Dictionary.get("Preferences.Mode.Expert");
274 JTextArea message_textarea = new JTextArea();
275 Dictionary.registerText(message_textarea, "CDM.SubcollectionManager.Partitions_Disabled", args);
276 message_textarea.setEditable(false);
277 message_textarea.setHighlighter(null); // Prevent highlighting
278 message_textarea.setLineWrap(true);
279 message_textarea.setOpaque(false); // Make it transparent
280 message_textarea.setWrapStyleWord(true);
281
282 // Add listeners
283 SubCollectionChangeListener cl = new SubCollectionChangeListener();
284 add_button.addActionListener(new AddSubCollectionListener());
285 remove_button.addActionListener(new RemoveSubCollectionListener());
286 update_button.addActionListener(new UpdateSubCollectionListener());
287 exclude_button.addActionListener(cl);
288 include_button.addActionListener(cl);
289 source_combobox.addActionListener(cl);
290 flags_field.getDocument().addDocumentListener(cl);
291 match_field.getDocument().addDocumentListener(cl);
292 name_field.getDocument().addDocumentListener(cl);
293 subcollection_list.addListSelectionListener(new SubCollectionListListener());
294
295 // Layout
296 instructions_area.setBorder(BorderFactory.createEmptyBorder(2,5,2,5));
297
298 header_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
299 header_pane.setLayout(new BorderLayout());
300 header_pane.add(title, BorderLayout.NORTH);
301 header_pane.add(new JScrollPane(instructions_area), BorderLayout.CENTER);
302
303 inclusive_pane.setLayout(new GridLayout());
304 inclusive_pane.add(include_button);
305 inclusive_pane.add(exclude_button);
306
307 button_pane_1.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
308 button_pane_1.setLayout(new GridLayout(5, 2));
309 button_pane_1.add(name_label);
310 button_pane_1.add(name_field);
311 button_pane_1.add(source_label);
312 button_pane_1.add(source_combobox);
313 button_pane_1.add(match_label);
314 button_pane_1.add(match_field);
315 button_pane_1.add(inclusive_label);
316 button_pane_1.add(inclusive_pane);
317 button_pane_1.add(flags_label);
318 button_pane_1.add(flags_field);
319
320 button_pane_3.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
321 button_pane_3.setLayout(new GridLayout(1,3));
322 button_pane_3.add(add_button);
323 button_pane_3.add(update_button);
324 button_pane_3.add(remove_button);
325
326 button_pane.setLayout(new BorderLayout());
327 button_pane.add(button_pane_1, BorderLayout.CENTER);
328 button_pane.add(button_pane_3, BorderLayout.SOUTH);
329
330 subcollection_list_pane.setLayout(new BorderLayout());
331 subcollection_list_pane.add(subcollection_list_label, BorderLayout.NORTH);
332 subcollection_list_pane.add(new JScrollPane(subcollection_list), BorderLayout.CENTER);
333 subcollection_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
334 subcollection_pane.setLayout(new BorderLayout());
335 subcollection_pane.add(subcollection_list_pane, BorderLayout.CENTER);
336 subcollection_pane.add(button_pane, BorderLayout.SOUTH);
337
338 tabbed_pane.addTab(Dictionary.get("CDM.SubcollectionManager.Subcollection_Controls"), subcollection_pane);
339 tabbed_pane.addTab(Dictionary.get("CDM.SubcollectionManager.Subindex_Controls"), (JPanel) CollectionDesignManager.subcollectionindex_manager.getControls());
340 tabbed_pane.addTab(Dictionary.get("CDM.SubcollectionManager.Language_Controls"), (JPanel) CollectionDesignManager.language_manager.getControls());
341
342 message_pane.setBorder(BorderFactory.createEmptyBorder(0,5,5,5));
343 message_pane.setLayout(new GridLayout(3,1,0,0));
344 message_pane.add(new JPanel());
345 message_pane.add(message_textarea);
346 message_pane.add(new JPanel());
347
348 border_pane.setBorder(BorderFactory.createEmptyBorder(0,5,5,5));
349 border_pane.setLayout(card_layout);
350 if(Configuration.getMode() > Configuration.LIBRARIAN_MODE) {
351 border_pane.add(tabbed_pane, ENABLED_CONTROLS);
352 border_pane.add(message_pane, DISABLED_CONTROLS);
353 }
354 else {
355 border_pane.add(message_pane, DISABLED_CONTROLS);
356 border_pane.add(tabbed_pane, ENABLED_CONTROLS);
357 }
358
359 setLayout(new BorderLayout());
360 add(header_pane, BorderLayout.NORTH);
361 add(border_pane, BorderLayout.CENTER);
362 }
363
364 /** Method to unregister any listeners to avoid memory leaks.
365 */
366 public void destroy() {
367 }
368
369 public void gainFocus() {
370 // Rebuild the sources combobox
371 Vector source_model = Gatherer.c_man.getCollection().msm.getAssignedElements();
372 source_model.add(0, "Filename"); // Add filename as a possible source.
373 source_combobox.setModel(new DefaultComboBoxModel(source_model));
374 }
375
376 public void loseFocus() {
377 }
378
379 /** Called when the detail mode has changed which in turn controls if any of the partition controls are visible, or if they are instead replaced with a message explaining why they are not.
380 * @param mode the new mode as an int
381 */
382 public void modeChanged(int mode) {
383 if(mode > Configuration.LIBRARIAN_MODE) {
384 card_layout.show(border_pane, ENABLED_CONTROLS);
385 }
386 else {
387 card_layout.show(border_pane, DISABLED_CONTROLS);
388 }
389 }
390
391 /** Listens for actions apon the 'add' button in the SubcollectionManager controls, and if detected calls the addSubcollection method of the manager with a newly created subcollection. */
392 private class AddSubCollectionListener
393 implements ActionListener {
394 /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we wish to retrieve information from the various edit controls, and if we have sufficient data to build a new subcollection do so.
395 * @param event An <strong>ActionEvent</strong> containing information about the event.
396 * @see org.greenstone.gatherer.cdm.Subcollection
397 */
398 public void actionPerformed(ActionEvent event) {
399 String name = name_field.getText();
400 String source = null;
401 Object object = source_combobox.getSelectedItem();
402 if(object instanceof ElementWrapper) {
403 ElementWrapper element_wrapper = (ElementWrapper)object;
404 source = element_wrapper.getName();
405 if(source.indexOf(StaticStrings.NS_SEP) == -1) {
406 source = StaticStrings.EXTRACTED_NAMESPACE + source;
407 }
408 }
409 else {
410 source = object.toString();
411 }
412 String pattern = match_field.getText();
413 String flags = flags_field.getText();
414 if(name.length() > 0 && (source == null || source.length() > 0) && pattern.length() > 0) {
415 Subcollection subcollection = new Subcollection(name, include_button.isSelected(), source, pattern, flags);
416 addSubcollection(subcollection);
417 // Change the selection to the new subcollection
418 subcollection_list.setSelectedValue(subcollection, true);
419 }
420 add_button.setEnabled(false);
421 }
422 }
423
424 /** This class listens for any key entry in a text field, selection change in a combobox or button click, and updates a subcollection as appropriate. Its also convenient to use this class to test if the add button should be active yet. */
425 private class SubCollectionChangeListener
426 implements DocumentListener, ActionListener {
427 /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to record that somethings changed, then validate the controls.
428 * @param event An <strong>ActionEvent</strong> containing information about the event.
429 */
430 public void actionPerformed(ActionEvent event) {
431 validateAdd();
432 }
433
434 public void changedUpdate(DocumentEvent event) {
435 validateAdd();
436 }
437
438 public void insertUpdate(DocumentEvent event) {
439 validateAdd();
440
441 }
442
443 public void removeUpdate(DocumentEvent event) {
444 validateAdd();
445 }
446
447 /** Method to validate the current subcollection editor values, and enable or disable controls (add button) based on said values. */
448 private void validateAdd() {
449 if(name_field.getText().length() > 0 && match_field.getText().length() > 0) {
450 if (getSubcollection(name_field.getText()) == null) {
451 add_button.setEnabled(true);
452 } else {
453 add_button.setEnabled(false);
454 }
455 }
456 else {
457 add_button.setEnabled(false);
458 }
459 }
460 }
461
462 /** Listens for actions apon the 'remove' button in the SubcollectionManager controls, and if detected calls the remove method of the manager with the SubIndex selected for removal. */
463 private class RemoveSubCollectionListener
464 implements ActionListener {
465 /** Any implementation of ActionListener must include this method so we can be informed when an action has been performed on one of our target controls. In this case we want to check if they have a subcolleciton selected, and if so remove both it and any subindexes based on it.
466 * @param event An <strong>ActionEvent</strong> containing information about the event.
467 * @see org.greenstone.gatherer.cdm.Subcollection
468 */
469 public void actionPerformed(ActionEvent event) {
470 if(!subcollection_list.isSelectionEmpty()) {
471 Subcollection subcollection = (Subcollection)subcollection_list.getSelectedValue();
472 removeSubcollection(subcollection);
473 // And remove subcollection indexes dependant on this subcollection
474 CollectionDesignManager.subcollectionindex_manager.removeSubcollectionIndexes(subcollection);
475 }
476 remove_button.setEnabled(false);
477 }
478 }
479
480 private class UpdateSubCollectionListener
481 implements ActionListener {
482 public void actionPerformed(ActionEvent event) {
483 if(!subcollection_list.isSelectionEmpty()) {
484 Subcollection subcollection = (Subcollection)subcollection_list.getSelectedValue();
485 String name = name_field.getText();
486 String source = null;
487 Object object = source_combobox.getSelectedItem();
488 if(object instanceof ElementWrapper) {
489 ElementWrapper element_wrapper = (ElementWrapper)object;
490 source = element_wrapper.getName();
491 if(source.indexOf(StaticStrings.NS_SEP) == -1) {
492 source = StaticStrings.EXTRACTED_NAMESPACE + source;
493 }
494 }
495 else {
496 source = object.toString();
497 }
498 String pattern = match_field.getText();
499 String flags = flags_field.getText();
500 if(name.length() > 0 && (source == null || source.length() > 0) && pattern.length() > 0) {
501 updateSubcollection(subcollection, name, include_button.isSelected(), source, pattern, flags);
502 }
503 }
504 }
505 }
506
507 /** This class listens for selections in the list on the subcollections pane of the SubcollectionManager, and updates the controls as necessary to reflect selection. */
508 private class SubCollectionListListener
509 implements ListSelectionListener {
510 /** Any implementation of ListSelectionListener must include this method so we can be informed when the selection changes. In this case we want to execute any changes the users made to the entry, then update the controls with details of the new selection.
511 * @param event A <strong>ListSelectionEvent</strong> containing information related to this event.
512 * @see org.greenstone.gatherer.cdm.Subcollection
513 */
514 public void valueChanged(ListSelectionEvent event) {
515 // Now the entry
516 if(!subcollection_list.isSelectionEmpty()) {
517 Subcollection subcollection = (Subcollection) subcollection_list.getSelectedValue();
518 flags_field.setText(subcollection.getFlags());
519 include_button.setSelected(subcollection.isInclusive());
520 exclude_button.setSelected(!subcollection.isInclusive());
521 match_field.setText(subcollection.getPattern());
522 name_field.setText(subcollection.getName());
523 String s = subcollection.getSource();
524 int pos = 0;
525 Object value = source_combobox.getItemAt(pos);
526 //ystem.err.println("Search for: " + s);
527 while(value != null) {
528 if(value instanceof ElementWrapper) {
529 ElementWrapper e = (ElementWrapper) value;
530 String e_name = e.getName();
531 if(e_name.indexOf(StaticStrings.NS_SEP) == -1) {
532 e_name = StaticStrings.EXTRACTED_NAMESPACE + e_name;
533 }
534 //ystem.err.print("Compare to: " + e_name);
535 if(e_name.equals(s)) {
536 source_combobox.setSelectedIndex(pos);
537 value = null;
538 //ystem.err.println(" - Match");
539 }
540 else {
541 pos++;
542 value = source_combobox.getItemAt(pos);
543 //ystem.err.println(" - Fail");
544 }
545 }
546 else if(value.toString().equals(s)) {
547 source_combobox.setSelectedIndex(pos);
548 value = null;
549 }
550 else {
551 pos++;
552 value = source_combobox.getItemAt(pos);
553 }
554 }
555 // Can't add one thats already there.
556 add_button.setEnabled(false);
557 // You can update or remove it though...
558 remove_button.setEnabled(true);
559 update_button.setEnabled(true);
560 }
561 else {
562 flags_field.setText("");
563 include_button.setSelected(true);
564 match_field.setText("");
565 name_field.setText("");
566 source_combobox.setSelectedIndex(0);
567 remove_button.setEnabled(false);
568 update_button.setEnabled(false);
569 }
570 }
571 }
572 }
573}
Note: See TracBrowser for help on using the repository browser.