Changeset 8036
- Timestamp:
- 2004-08-24T15:14:52+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r8035 r8036 74 74 import org.greenstone.gatherer.help.HelpFrame; 75 75 import org.greenstone.gatherer.mem.MetadataEditorManager; 76 import org.greenstone.gatherer.msm.MDSFileFilter;77 76 import org.greenstone.gatherer.shell.GShell; 78 77 import org.greenstone.gatherer.util.StaticStrings; … … 314 313 else if (esrc == menu_bar.metadata_import) { 315 314 JFileChooser chooser = new JFileChooser(new File(Utility.METADATA_DIR)); 316 FileFilter filter = new MDSFileFilter();315 MDSFileFilter filter = new MDSFileFilter(); 317 316 chooser.setFileFilter(filter); 318 317 int returnVal = chooser.showDialog(Gatherer.g_man, Dictionary.get("MSMPrompt.File_Import")); … … 969 968 } 970 969 } 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 971 998 /** 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. 972 999 */
Note:
See TracChangeset
for help on using the changeset viewer.