/** * Extracts the location relative to the entire page from the coordinates * (e.g. as opposed to viewport) * * @param coordinates The coordinates from which location is extracted. * @return The location relative to the entire page */ public static Location getPageLocation(Coordinates coordinates) { if (coordinates == null) { return null; } Point p = coordinates.onPage(); return new Location(p.getX(), p.getY()); }