private JPanel buildSelectionScopePanel() {

		JPanel panel = new JPanel();
		panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
		panel.setBorder(new TitledBorder("Selection Scope"));

		searchSelectionRB = new GRadioButton("Search Selection");
		searchSelectionRB.getAccessibleContext().setAccessibleName("Search Selection");
		searchAllRB = new GRadioButton("Search All");
		searchAllRB.getAccessibleContext().setAccessibleName("Search All");

		ButtonGroup buttonGroup = new ButtonGroup();
		buttonGroup.add(searchSelectionRB);
		buttonGroup.add(searchAllRB);

		searchAllRB.setSelected(true);
		searchSelectionRB.setSelected(hasSelection());
		panel.add(searchAllRB);
		panel.add(searchSelectionRB);

		// Disable the selection radio button if there is no selection.
		searchSelectionRB.setEnabled(hasSelection());

		JPanel selectionPanel = new JPanel();
		selectionPanel.setLayout(new BorderLayout());
		selectionPanel.add(panel, BorderLayout.NORTH);
		selectionPanel.getAccessibleContext().setAccessibleName("Selections Scope");
		return selectionPanel;
	}
Returns a panel containing the options for choosing the selection scope for the search.
<li>Search All</li>
<li>Search Selection</li>
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/string/SearchStringDialog.java