private boolean computeIsLast(Data data) {
		Data parent = data.getParent();
		if (parent != null) {
			Data d2 = parent.getComponent(parent.getNumComponents() - 1);
			if (d2 == data) {
				return true;
			}
		}
		return false;
	}
Computes if the given data is the last component at its level.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/OpenCloseFieldFactory.java