private void selectAtomOnDropPlane(char direction, int x, int y) {
		int iselected = viewer.findNearestAtomIndexOnDropPlane(direction, x, y);
		if (iselected < 0) {
			selectAtom(-1);
			setRotationEnabled(true);
		}
		else {
			selectAtom(iselected);
			if (selectedComponent instanceof Atom) {
				setRotationEnabled(false);
				if (clickedAtomPosition == null)
					clickedAtomPosition = new Point3f();
				Atom at = (Atom) selectedComponent;
				clickedAtomPosition.x = at.getRx();
				clickedAtomPosition.y = at.getRy();
				clickedAtomPosition.z = at.getRz();
				Point3i p = viewer.getAtomScreen(at.getIndex());
				if (p != null)
					clickPoint.setLocation(x - p.x, y - p.y);
			}
		}
	}