main/plugins/org.talend.libraries.jfreechart.jars/lib_src/jfreechart-1.0.12/source/org/jfree/chart/plot/PieLabelDistributor.java
/**
     * Adjusts the y-coordinate for the labels in towards the center in an
     * attempt to fix overlapping.
     */
Adjusts the y-coordinate for the labels in towards the center in an
attempt to fix overlapping.
Adjusts the y - coordinate for the labels in towards the center in an attempt to fix overlapping .
protected void adjustInwards() {
        int lower = 0;
        int upper = this.labels.size() - 1;
        while (upper > lower) {
            if (lower < upper - 1) {
                PieLabelRecord r0 = getPieLabelRecord(lower);
                PieLabelRecord r1 = getPieLabelRecord(lower + 1);
                if (r1.getLowerY() < r0.getUpperY()) {
                    double adjust = r0.getUpperY() - r1.getLowerY()
                                    + this.minGap;
                    r1.setAllocatedY(r1.getAllocatedY() + adjust);
                }
            }
            PieLabelRecord r2 = getPieLabelRecord(upper - 1);
            PieLabelRecord r3 = getPieLabelRecord(upper);
            if (r2.getUpperY() > r3.getLowerY()) {
                double adjust = (r2.getUpperY() - r3.getLowerY()) + this.minGap;
                r3.setAllocatedY(r3.getAllocatedY() + adjust);
            }
            lower++;
            upper--;
        }
    }
protected void adjustInwards ( ) { int lower = 0 ; int upper = this . labels . size ( ) - 1 ; while ( upper > lower ) { if ( lower < upper - 1 ) { PieLabelRecord r0 = getPieLabelRecord ( lower ) ; PieLabelRecord r1 = getPieLabelRecord ( lower + 1 ) ; if ( r1 . getLowerY ( ) < r0 . getUpperY ( ) ) { double adjust = r0 . getUpperY ( ) - r1 . getLowerY ( ) + this . minGap ; r1 . setAllocatedY ( r1 . getAllocatedY ( ) + adjust ) ; } } PieLabelRecord r2 = getPieLabelRecord ( upper - 1 ) ; PieLabelRecord r3 = getPieLabelRecord ( upper ) ; if ( r2 . getUpperY ( ) > r3 . getLowerY ( ) ) { double adjust = ( r2 . getUpperY ( ) - r3 . getLowerY ( ) ) + this . minGap ; r3 . setAllocatedY ( r3 . getAllocatedY ( ) + adjust ) ; } lower ++ ; upper -- ; } }
Adjusts the y-coordinate for the labels in towards the center in an
 attempt to fix overlapping.
Adjusts the y - coordinate for the labels in towards the center in an attempt to fix overlapping .