int py1 = startVertex.getY(); int py2 = endVertex.getY();
int py1 = startVertex.getRy(); int py2 = endVertex.getRy();
public VisibleObject intersects(int px, int py) {	// first check on small sub-objects like connectors	VisibleObject spotted = hiliteComponentsCheck(px, py);  	if (spotted == null) {  		final int DIST = 10;  		  		int rx = getRx();  		int ry = getRy();  		int rw = getRwidth();  		int rh = getRheight();  		boolean insideOuter = ((rx-DIST)<=px) &&							  ((ry-DIST)<=py) && 							  ((rx+rw+DIST)>=px) && 							  ((ry+rh+DIST)>=py);  		if (insideOuter)  		{ 			// square check passed... now limit only to arrow 			 			// vertical check			int px1 = startVertex.getX();			int px2 = endVertex.getX(); 			if (px1 == px2) 				spotted = this; 			else 			{ 				int py1 = startVertex.getY(); 				int py2 = endVertex.getY(); 				double tan = (py2-py1)/(double)(px2-px1); 				if (Math.abs(tan) > DIST) 					spotted = this; 				else 				{	 				double expectedY = (px-px1)*tan + py1;	 				if (Math.abs(py-expectedY) <= DIST)		 					spotted = this; 				}	 		}  		}  		  	}  	  	return spotted;}