public void setAttachment(byte type, int i, boolean b, Class c) {
		if (modelManager.frame == null)
			return;
		switch (type) {
		case Attachment.ATOM_HOST:
			Atom[] atoms = modelManager.frame.atoms;
			if (i >= 0 && i < modelManager.frame.atomCount) {
				if (SiteAnnotation.class == c)
					atoms[i].annotationKey = b;
				else if (InteractionCenter.class == c)
					atoms[i].interactionKey = b;
			}
			break;
		case Attachment.BOND_HOST:
			Bond[] bonds = modelManager.frame.bonds;
			if (i >= 0 && i < modelManager.frame.bondCount) {
				if (SiteAnnotation.class == c)
					bonds[i].annotationKey = b;
				else if (InteractionCenter.class == c)
					bonds[i].interactionKey = b;
			}
			break;
		}
	}