private void handleEnterKey() {

		int[] selectedIndices = getSelectedIndices();
		if (selectedIndices.length == 0) {
			chooser.okCallback();
			// this implies the user has somehow put focus into the table, but has not
			// made a selection...just let the chooser decide what to do
			return;
		}

		if (selectedIndices.length > 1) {
			// let the chooser decide what to do with multiple rows selected
			chooser.okCallback();
			return;
		}

		File file = model.getFile(selectedIndices[0]);
		if (chooser.getModel().isDirectory(file)) {
			chooser.setCurrentDirectory(file);
		}
		else {
			chooser.userChoseFile(file);
		}
	}
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