@Override
		public int compare(Object o1, Object o2) {
			if (o1 instanceof File && o2 instanceof String) {
				File file = (File) o1;
				return file.getName().compareToIgnoreCase(((String) o2));
			}
			throw new AssertException("FileCompartor used to compare files against a String key!");
		}
A model that allows the {@link DropDownSelectionTextField} to work with File objects.
Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/FileDropDownSelectionDataModel.java