private double computeSizes()
private void computeSizes()
    private double computeSizes()    {        double factor = 0;        if (sizeX == -1 && sizeY == -1) {            sizeX = THUMB_MAX_WIDTH;            sizeY = THUMB_MAX_HEIGHT;            double x = sizeX/(double) getMaxX();            double y =  sizeY/(double) getMaxY();            if (x > y) factor = x;            else factor = y;            double ratio =  (double) getMaxX()/getMaxY();            if (ratio < 1) sizeX *= ratio;            else if (ratio > 1 && ratio != 0) sizeY *= 1/ratio;        }        return factor;    }