@SuppressWarnings("unchecked")
	// we know the cast is safe because we put the items in the list
	protected void setTextFromList() {
		Object selectedItem = list.getSelectedValue();
		if (selectedItem != null) {
			storeSelectedValue((T) selectedItem);
			setText(dataModel.getDisplayText(selectedValue));
			hideMatchingWindow();
			fireUserChoiceMade((T) selectedItem);
		}
	}
Removes the given listener from this class if it has previously been added.
@param listener The listener to remove.
Ghidra/Framework/Docking/src/main/java/docking/widgets/DropDownTextField.java