Changeset 5804


Ignore:
Timestamp:
2003-11-07T13:16:14+13:00 (20 years ago)
Author:
jmt12
Message:

Added extra checks for when plugins can be added, removed and moved.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java

    r5753 r5804  
    5050import org.w3c.dom.*;
    5151import org.xml.sax.*;
    52 /** This class is resposible for maintaining a list of known plug-ins, and importing new plugins using the parser. */
    53 public class PlugInManager 
     52/** This class is for maintaining a list of known plug-ins, and importing new plugins using the parser. */
     53public class PlugInManager
    5454    extends DOMProxyListModel {
    5555    /** The library 'reserve' of base plugins. */
     
    5959    private DOMProxyListModel model;
    6060    private JPanel separator;
    61     private PlugIn separator_plugin; 
     61    private PlugIn separator_plugin;
    6262    /** The default size for a label. */
    6363    static final private Dimension LABEL_SIZE = new Dimension(125, 25);
     
    170170            // Add the moving plugin before the separator
    171171            addBefore(plugin, separator_plugin);
    172             Gatherer.c_man.configurationChanged();     
     172            Gatherer.c_man.configurationChanged();
    173173        }
    174174        // Otherwise we aren't moving anywhere!
     
    190190        remove(plugin);
    191191        add(index, plugin);
    192         Gatherer.c_man.configurationChanged(); 
     192        Gatherer.c_man.configurationChanged();
    193193        }
    194194        else {
     
    428428    PlugIn plugin = new PlugIn();
    429429    String node_name = null;
    430     for(Node node = root.getFirstChild(); node != null; 
     430    for(Node node = root.getFirstChild(); node != null;
    431431        node = node.getNextSibling()) {
    432432        node_name = node.getNodeName();
     
    505505        }
    506506        }
    507     } 
     507    }
    508508    if(plugin.getName() != null) {
    509509        addPlugIn(plugin);
     
    515515    /** A class which provodes controls for assigned and editing plugins. */
    516516    private class PlugInControl
    517     extends JPanel 
     517    extends JPanel
    518518    implements Control {
    519519    /** Button for adding plugins. */
     
    781781    private class ClickListener
    782782        extends MouseAdapter {
    783         /** Called whenever the mouse is clicked over a registered component, we use this to chain through to the configure prompt. 
     783        /** Called whenever the mouse is clicked over a registered component, we use this to chain through to the configure prompt.
    784784         * @param event A <strong>MouseEvent</strong> containing information about the mouse click.
    785785        */
     
    829829
    830830        public void valueChanged(ListSelectionEvent e) {
    831         if (!e.getValueIsAdjusting()) { // we get two events for one change in list selection - use the false one (the second one) 
     831        if (!e.getValueIsAdjusting()) { // we get two events for one change in list selection - use the false one (the second one)
    832832            if (plugin_list.isSelectionEmpty()) {
    833833            move_top_button.setEnabled(false);
Note: See TracChangeset for help on using the changeset viewer.