@Test
	public void testOffsetFieldsEnabled() {

		Component[] offsetButtons = new Component[] { disassemble, makeTable };
		Component[] infoFields = new Component[] { autoLabel, offset };
		Component[] offsetPanelFields =
			new Component[] { disassemble, makeTable, autoLabel, offset };

		checkOffsetFieldsEnabledState(offsetPanelFields, false);

		// now search for data
		pressButton(search);
		AutoTableDisassemblerModel model = plugin.getModel();
		waitForCondition(() -> !model.isBusy(), "Table model never finished");

		// select a row
		table.getSelectionModel().setSelectionInterval(0, 0);

		// make sure the buttons are enabled
		checkOffsetFieldsEnabledState(offsetPanelFields, true);

		// clear the selections
		table.clearSelection();

		// make sure the buttons are disabled
		checkOffsetFieldsEnabledState(offsetPanelFields, false);

		// now check that an invalid entry into the offset field does not
		// improperly disable the fields
		table.getSelectionModel().setSelectionInterval(0, 0);

		// set the text to an invalid value, which will trigger an exception
		// and an error message
		setOffset(offset, "f");
		checkOffsetFieldsEnabledState(infoFields, true);
		checkOffsetFieldsEnabledState(offsetButtons, false);

		// make sure a selection with an invalid length is caught
		// for a single selection

		// get the selection and test
		int[] selectedRows = table.getSelectedRows();

		// make sure that only one row is selected in this test case
		assertEquals("There should be one row selected.", 1, selectedRows.length);

		// ensure that an invalid length disables the buttons
		int shortestRowsLength = getShortestRowsLength(selectedRows, model);
		setOffset(offset, Integer.toString(shortestRowsLength));
		checkOffsetFieldsEnabledState(offsetButtons, false);

		// now make sure that a valid value enables the buttons
		setOffset(offset, Integer.toString(shortestRowsLength - 1));
		checkOffsetFieldsEnabledState(offsetButtons, true);

		// now make sure that a valid value enables the buttons
		setOffset(offset, Integer.toString(0));
		checkOffsetFieldsEnabledState(offsetButtons, true);

		// make sure a selection with an invalid length is caught
		// for a multiple selection
		table.getSelectionModel().setSelectionInterval(1, 2);

		// get the selection and test
		selectedRows = table.getSelectedRows();

		// make sure that multiple rows are selected in this test case
		assertEquals("There should be one row selected.", 2, selectedRows.length);

		// ensure that an invalid length disables the buttons
		shortestRowsLength = getShortestRowsLength(selectedRows, model);
		setOffset(offset, Integer.toString(shortestRowsLength));
		checkOffsetFieldsEnabledState(offsetButtons, false);

		// now make sure that a valid value enables the buttons
		setOffset(offset, Integer.toString(shortestRowsLength - 1));
		checkOffsetFieldsEnabledState(offsetButtons, true);

		// now make sure that a valid value enables the buttons
		setOffset(offset, Integer.toString(0));
		checkOffsetFieldsEnabledState(offsetButtons, true);
	}
Tests that the offset fields in the AddressTableDialog are enabled
when they should be.
<p>
This class ensures that:
<ul>
    <li>the offset text field is enabled when there is a selection,
    <li>the auto label checkbox is enabled when there is a selection, and
    <li>the minimum offset is that of the lowest length of all the
        selected rows when there is a multiple selection.
</ul>

@since Tracker Id 488, 489, 490
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/disassembler/AutoTableDisassemblerTest.java