private int getMx() {
		int mx = 0;
		if (pFrom.x >= pTo.x) {
			if (pMid.x < eFrom.getX() - gap
					&& pMid.x > eTo.getX() + eTo.getOWidth() + gap)
				mx = pMid.x;
			else
				mx = Math.max(pFrom.x + eFrom.getOWidth() / 2 + gap, pTo.x
						+ eTo.getOWidth() / 2 + gap);
		} else {
			if (pMid.x > eFrom.getX() + eFrom.getOWidth() + gap
					&& pMid.x < eTo.getX() - gap)
				mx = pMid.x;
			else

				mx = Math.min(pFrom.x - (eFrom.getOWidth() / 2 + gap), pTo.x
						- (eTo.getOWidth() / 2 + gap));
		}
		return mx;
	}