public Rectangle getSitesBounds() {
        if (_sorted == false) {
            Site.sortSites(_sites);
            _currentIndex = 0;
            _sorted = true;
        }
        double xmin, xmax, ymin, ymax;
        if (_sites.isEmpty()) {
            return new Rectangle(0, 0, 0, 0);
        }
        xmin = Double.MAX_VALUE;
        xmax = Double.MIN_VALUE;
        for (Site site : _sites) {
            if (site.get_x() < xmin) {
                xmin = site.get_x();
            }
            if (site.get_x() > xmax) {
                xmax = site.get_x();
            }
        }
        // here's where we assume that the sites have been sorted on y:
        ymin = _sites.get(0).get_y();
        ymax = _sites.get(_sites.size() - 1).get_y();

        return new Rectangle(xmin, ymin, xmax - xmin, ymax - ymin);
    }