protected void updateShapeIntersection() { AirspaceEntry selected = this.getSelectedEntry(); if (selected != null) { boolean hasIntersection = false; for (AirspaceEntry entry : this.getModel().getEntries()) { if (entry != selected) { boolean intersecting = this.areShapesIntersecting(entry.getAirspace(), selected.getAirspace()); if (intersecting) hasIntersection = true; entry.setIntersecting(intersecting); } } selected.setIntersecting(hasIntersection); } else { for (AirspaceEntry entry : this.getModel().getEntries()) { entry.setIntersecting(false); } } }