public ProgramSelection getProgramSelection() {
		ProgramTableModel programTableModel = getProgramTableModel(dataModel);
		if (programTableModel == null) {
			return null;
		}

		int[] viewRows = getSelectedRows();
		int[] modelRows = new int[viewRows.length];
		for (int i = 0; i < viewRows.length; i++) {
			modelRows[i] = getModelRow(viewRows[i]);
		}
		return programTableModel.getProgramSelection(modelRows);
	}
Returns the program selection equivalent to the rows currently selected in the table.
<p>
This method is only valid when the underlying table model implements
{@link ProgramTableModel}.
<P>
Returns null if no rows are selected or the underlying model does not implement
<code>ProgramTableModel</code>.

@return the program selection or null.
Ghidra/Features/Base/src/main/java/ghidra/util/table/GhidraTable.java