@Override
	public String getDescription(File file) {
		boolean isDir = file.isDirectory();
		return "<html><table>" + "<tr><td>" + (isDir ? "Directory: " : "File: ") + "</td><td>" +
			"<b>" + HTMLUtilities.escapeHTML(file.getName()) + "</b>" + "</td></tr>" +
			"<tr><td>Size:</td><td>" + (isDir ? "0" : file.length()) + " bytes" + "</td></tr>" +
			"<tr><td>Last modified:</td><td>" +
			DateUtils.formatDateTimestamp(new Date(file.lastModified())) + "</td></tr>" +
			"</table>";
	}
A model that allows the {@link DropDownSelectionTextField} to work with File objects.
Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/FileDropDownSelectionDataModel.java