private void refreshSelection(ConstraintView hitOne, boolean allowDeselect) { if (allowDeselect) { hitOne.setSelected(!hitOne.isSelected()); } else if (false == hitOne.isSelected()) { hitOne.setSelected(true); } Vector<GraphComponent> graphComponents = _desktopPane.getGraphComponents(); for (int i = 0; i < graphComponents.size(); i++) { if (false == graphComponents.elementAt(i) instanceof ConstraintView) { continue; } ConstraintView constraintView = (ConstraintView) graphComponents.elementAt(i); if (false == constraintView.equals(hitOne)) { constraintView.setSelected(false); } } }