Changeset 8036


Ignore:
Timestamp:
2004-08-24T15:14:52+12:00 (20 years ago)
Author:
mdewsnip
Message:

Moved some code around in preparation for removing the msm package.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r8035 r8036  
    7474import org.greenstone.gatherer.help.HelpFrame;
    7575import org.greenstone.gatherer.mem.MetadataEditorManager;
    76 import org.greenstone.gatherer.msm.MDSFileFilter;
    7776import org.greenstone.gatherer.shell.GShell;
    7877import org.greenstone.gatherer.util.StaticStrings;
     
    314313    else if (esrc == menu_bar.metadata_import) {
    315314        JFileChooser chooser = new JFileChooser(new File(Utility.METADATA_DIR));
    316         FileFilter filter = new MDSFileFilter();
     315        MDSFileFilter filter = new MDSFileFilter();
    317316        chooser.setFileFilter(filter);
    318317        int returnVal = chooser.showDialog(Gatherer.g_man, Dictionary.get("MSMPrompt.File_Import"));
     
    969968    }
    970969    }
     970
     971
     972    private class MDSFileFilter
     973    extends FileFilter
     974    {
     975    /** Override this method to return <i>true</i> only if the file extension is .mds.
     976     * @param f A possible mds <strong>File</strong>.
     977     * @return <i>true</i> if we should show this file, <i>false</i> otherwise.
     978     */
     979    public boolean accept(File f)
     980    {
     981        String file_name = f.getName().toLowerCase();
     982        if (file_name.endsWith(".mds") || file_name.indexOf(".") == -1) {
     983        return true;
     984        }
     985        return false;
     986    }
     987
     988    /** Retrieve the description for this filter.
     989     * @return The description as a <strong>String</strong>.
     990     */
     991    public String getDescription()
     992    {
     993        return Dictionary.get("MSMPrompt.File_Filter_Description");
     994    }
     995    }
     996
     997
    971998    /** Listens to actions upon the menu bar, and if it detects a click over the help menu brings the help window to the front if it has become hidden.
    972999     */
Note: See TracChangeset for help on using the changeset viewer.