src/main/java/com/mxgraph/analysis/mxGraphStructure.java
public static boolean areConnected(mxAnalysisGraph aGraph, Object sourceVertex, Object targetVertex)
	{
		Object currEdges[] = aGraph.getEdges(sourceVertex, aGraph.getGraph().getDefaultParent(), true, true, false, true);
		List<Object> neighborList = Arrays.asList(aGraph.getOpposites(currEdges, sourceVertex, true, true));
		return neighborList.contains(targetVertex);
	}
/**
	 * @param graph
	 * @param sourceVertex
	 * @param targetVertex
	 * @return Returns true if the two vertices are connected directly by an edge. If directed, the result is true if they are connected by an edge that points from source to target, if false direction isn't takein into account, just connectivity.
	 */
@param graph
@param sourceVertex
@param targetVertex
@return Returns true if the two vertices are connected directly by an edge. If directed, the result is true if they are connected by an edge that points from source to target, if false direction isn't takein into account, just connectivity.
@param graph @param sourceVertex @param targetVertex @return Returns true if the two vertices are connected directly by an edge . If directed the result is true if they are connected by an edge that points from source to target if false direction isn ' t takein into account just connectivity .
public static boolean areConnected(mxAnalysisGraph aGraph, Object sourceVertex, Object targetVertex)
	{
		Object currEdges[] = aGraph.getEdges(sourceVertex, aGraph.getGraph().getDefaultParent(), true, true, false, true);
		List<Object> neighborList = Arrays.asList(aGraph.getOpposites(currEdges, sourceVertex, true, true));
		return neighborList.contains(targetVertex);
	}
public static boolean areConnected ( mxAnalysisGraph aGraph , Object sourceVertex , Object targetVertex ) { Object currEdges [ ] = aGraph . getEdges ( sourceVertex , aGraph . getGraph ( ) . getDefaultParent ( ) , true , true , false , true ) ; List < Object > neighborList = Arrays . asList ( aGraph . getOpposites ( currEdges , sourceVertex , true , true ) ) ; return neighborList . contains ( targetVertex ) ; }
@param graph
 @param sourceVertex
 @param targetVertex
 @return Returns true if the two vertices are connected directly by an edge.
@param graph @param sourceVertex @param targetVertex @return Returns true if the two vertices are connected directly by an edge .