private void manageVertexDisplay() {
		boolean hideSelected = hideSelectedAction.isSelected();
		boolean hideUnselected = hideUnselectedAction.isSelected();
		MutableSelectedState<AttributedVertex> selectedVertexState =
			viewer.getSelectedVertexState();
		if (hideSelected && hideUnselected) {
			viewer.getRenderContext().setVertexIncludePredicate(v -> false);
		}
		else if (hideSelected) {
			viewer.getRenderContext()
					.setVertexIncludePredicate(Predicate.not(selectedVertexState::isSelected));
		}
		else if (hideUnselected) {
			viewer.getRenderContext().setVertexIncludePredicate(selectedVertexState::isSelected);
		}
		else {
			viewer.getRenderContext().setVertexIncludePredicate(v -> true);
		}
		viewer.repaint();
	}
Use the hide selected action states to determine what vertices are shown:
<ul>
    <li>unselected vertices only</li>
    <li>selected vertices only</li>
    <li>both selected and unselected vertices are shown</li>
    <li>neither selected nor unselected vertices are shown</li>
</ul>
Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java