private void updateCellDimensions(Font font) {

		if (font == null) {
			return; // UI is being updated
		}

		ListCellRenderer<? super File> renderer = getCellRenderer();
		if (!(renderer instanceof FileListCellRenderer cellRenderer)) {
			return; // initializing
		}

		// Enable the list to calculate the width of the cells on its own, but manually specify the
		// height to ensure some padding between rows.
		//
		// Use 1/3 of the line height of the font to ensure visually consistent padding between
		// rows.  (Historically, 5px was used as the padding between the default 12pt (15px line
		// height) rows, so 15px line height/5px padding equals .333 ratio.)
		FontMetrics metrics = cellRenderer.getFontMetrics(font);
		setFixedCellHeight(Math.max(metrics.getHeight(), DEFAULT_ICON_SIZE) +
			Math.max(metrics.getHeight() / 3, MIN_HEIGHT_PADDING));
		setFixedCellWidth(-1);
	}
Create a new DirectoryList instance.

@param chooser the {@link GhidraFileChooser} this instance is nested in
@param model the {@link DirectoryListModel}
Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/DirectoryList.java