public void restoreSelection() {

		// Get the byte position (start/end) of the first and last row in the visible table.
		if (model.getNumChunks() <= 0) {
			return;
		}
		Chunk firstRowChunk = model.get(0);
		Chunk lastRowChunk = model.get(model.getNumChunks() - 1);
		if (firstRowChunk == null || lastRowChunk == null) {
			return;
		}
		long firstRowStart = firstRowChunk.start;
		long lastRowEnd = lastRowChunk.end;

		// CASE 1: Selection encompasses all of the table. 
		if (model.selectedByteStart <= firstRowStart && model.selectedByteEnd >= lastRowEnd) {
			setRowSelectionInterval(0, getRowCount() - 1);
		}

		// CASE 2: Selection start is in the table, but the end is beyond it.
		else if ((model.selectedByteStart >= firstRowStart &&
			model.selectedByteStart <= lastRowEnd) && (model.selectedByteEnd > lastRowEnd)) {
			int rowStart = model.getRowForBytePos(model.selectedByteStart);
			int rowEnd = getRowCount() - 1;
			if (checkBounds(rowStart, rowEnd)) {
				setRowSelectionInterval(rowStart, rowEnd);
			}
		}

		// CASE 3: Selection start is in the table, and so is the end.
		else if ((model.selectedByteStart >= firstRowStart &&
			model.selectedByteStart <= lastRowEnd) &&
			(model.selectedByteEnd >= firstRowStart && model.selectedByteEnd <= lastRowEnd)) {
			int rowStart = model.getRowForBytePos(model.selectedByteStart);
			int rowEnd = model.getRowForBytePos(model.selectedByteEnd);
			if (checkBounds(rowStart, rowEnd)) {
				setRowSelectionInterval(rowStart, rowEnd);
			}
		}

		// CASE 4: Selection start is not in the table, but the end is.
		else if ((model.selectedByteStart < firstRowStart) &&
			(model.selectedByteEnd >= firstRowStart && model.selectedByteEnd <= lastRowEnd)) {
			int rowEnd = model.getRowForBytePos(model.selectedByteEnd);
			if (checkBounds(0, rowEnd)) {
				setRowSelectionInterval(0, rowEnd);
			}
		}
	}
Set any previously selected table rows to a selected state. This should be called any 
time a chunk is read into the table. 

Note: This is critically important when the user has selected a row, then scrolled such that 
the selected row is in a chunk that has been swapped out and is no longer in the table. When
that chunk is scrolled back into view, this will restore the selection.

Note2: If there is a range of selected values and the table is somewhere in the middle of
that range, just select the entire table.
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/logviewer/ui/FVTable.java