public Object getObjectPosition(int x, int y) {
		for (int i = 0; i < getNumPlace(); i++) {
			PlaceUI p = (PlaceUI) getPlace(i);
			if (p.inPlace(x, y)) {
				selectedPlace = i;
				return p;
			}
		}

		for (int i = 0; i < getNumTransition(); i++) {
			TransitionUI t = (TransitionUI) getTransition(i);
			if (t.inTransition(x, y)) {
				selectedTrans = i;
				return t;
			}
		}

		for (int i = 0; i < getNumArc(); i++) {
			ArcUI a = (ArcUI) getArc(i);
			if (a.inArc(x, y)) {
				selectedArc = i;
				return a;
			}
		}

		for (int i = 0; i < getNumMarker(); i++) {
			Marker l = getMarker(i);
			if (l.inLabel(x, y)) {
				selectedLabel = i;
				return l;
			}
		}

		return null;
	}