Changeset 8055


Ignore:
Timestamp:
2004-08-25T10:43:26+12:00 (20 years ago)
Author:
mdewsnip
Message:

Removed some long dead "search and replace" code.

Location:
trunk/gli/src/org/greenstone/gatherer/cdm
Files:
2 edited

Legend:

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

    r8002 r8055  
    249249   }
    250250
    251 //     /** Ensures that the collection is now public. Useful for collections that are based on another, or that are about to be exported */
    252 //     public void setCollectionAsPublic() {
    253 //         CollectionMeta public_collectionmeta = new CollectionMeta(CollectionDesignManager.collect_config.getPublic());
    254 //         if(public_collectionmeta != null) {
    255 //              public_collectionmeta.setValue(CollectionConfiguration.TRUE_STR);
    256 //              public_collectionmeta = null;
    257 //         }
    258 //     }
    259 
    260     /** Method used during a global search and replace to highlight the appropriate record within the Collection Design Managers version of the Metadata Set Manager (view only).
    261      * @param element The name of the desired element as a <strong>String</strong>.
    262      * @see org.greenstone.gatherer.cdm.GeneralManager
    263      * @see org.greenstone.gatherer.cdm.MetadataSetView
    264      */
    265     public Rectangle setSelectedElement(String element) {
    266     // First ensure that the metadata set controls are visible.
    267     general_manager.setSelectedView("CDM.GUI.MetadataSets");
    268     // Then tell them to select the given element.
    269     return metadataset_view.setSelectedElement(element);
    270     }
    271251
    272252    private class CDMChangeListener
  • trunk/gli/src/org/greenstone/gatherer/cdm/MetadataSetView.java

    r7996 r8055  
    111111    }
    112112
    113     /** Select the selected element, given its name, and return the bounds of the selection. Used during search and replace.
    114      * @param element The elements fully qualified name as a <strong>String</strong>.
    115      * @return The bounds of the selection as a <strong>Rectangle</strong>.
    116      * @see org.greenstone.gatherer.cdm.MetadataSetView.MetadataSetControl
    117      */
    118     public Rectangle setSelectedElement(String element) {
    119     return ((MetadataSetControl)controls).setSelectedElement(element);
    120     }
    121113
    122114    /** Prints out the contents of this manager, as they would appear in the collection configuration file.
     
    298290        element_list.updateUI();
    299291    }
    300     /** Select the selected element, given its name, and return the bounds of the selection. Used during search and replace.
    301      * @param element The elements fully qualified name as a <strong>String</strong>.
    302      * @return The bounds of the selection as a <strong>Rectangle</strong>.
    303      * @see org.greenstone.gatherer.cdm.MetadataSetView.MetadataSetControl
    304      */
    305     public Rectangle setSelectedElement(String element) {
    306         Rectangle bounds = null;
    307         // Parse off namespace
    308         String namespace = element.substring(0, element.indexOf("."));
    309         // Force the set list to show the correct entry.
    310         ListModel s_model = set_list.getModel();
    311         for(int i = 0; i < s_model.getSize(); i++) {
    312         SetWrapper sw = (SetWrapper) s_model.getElementAt(i);
    313         if(sw.getSet().getNamespace().equals(namespace)) {
    314             set_list.setSelectedValue(sw, true);
    315         }
    316         }
    317         // Force the element list to show that name.
    318         ListModel e_model = element_list.getModel();
    319         for(int i = 0; i < e_model.getSize(); i++) {
    320         ElementWrapper ew = (ElementWrapper) e_model.getElementAt(i);
    321         if(ew.name().equals(element)) {
    322             element_list.setSelectedValue(ew, true);
    323             bounds = element_list.getCellBounds(i, i);
    324         }
    325         }
    326         // Return the bounds of the selected row.
    327         return bounds;
    328     }
    329292
    330293    /** Overriden to ensure the instruction area is scrolled to top.
Note: See TracChangeset for help on using the changeset viewer.