Java 类org.jfree.chart.axis.PeriodAxis 实例源码

项目:parabuild-ci    文件:PeriodAxisTests.java   
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
public void testEquals() {
    PeriodAxis a1 = new PeriodAxis("Test");
    PeriodAxis a2 = new PeriodAxis("Test");
    assertTrue(a1.equals(a2));
    assertTrue(a2.equals(a1));

    a1.setFirst(new Year(2000));
    assertFalse(a1.equals(a2));
    a2.setFirst(new Year(2000));
    assertTrue(a1.equals(a2));

    a1.setLast(new Year(2004));
    assertFalse(a1.equals(a2));
    a2.setLast(new Year(2004));
    assertTrue(a1.equals(a2));

    a1.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
    assertFalse(a1.equals(a2));
    a2.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
    assertTrue(a1.equals(a2));

    a1.setAutoRangeTimePeriodClass(Quarter.class);
    assertFalse(a1.equals(a2));
    a2.setAutoRangeTimePeriodClass(Quarter.class);
    assertTrue(a1.equals(a2));

    PeriodAxisLabelInfo info[] = new PeriodAxisLabelInfo[1];
    info[0] = new PeriodAxisLabelInfo(Month.class, "MMM");

    a1.setLabelInfo(info);
    assertFalse(a1.equals(a2));
    a2.setLabelInfo(info);
    assertTrue(a1.equals(a2));
}
项目:parabuild-ci    文件:PeriodAxisTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashCode() {
    PeriodAxis a1 = new PeriodAxis("Test");
    PeriodAxis a2 = new PeriodAxis("Test");
    assertTrue(a1.equals(a2));
    int h1 = a1.hashCode();
    int h2 = a2.hashCode();
    assertEquals(h1, h2);
}
项目:ccu-historian    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:ccu-historian    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:jfreechart    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis ({@code null} not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:jfreechart    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis ({@code null} not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:aya-lang    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:aya-lang    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:HTML5_WebSite    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:HTML5_WebSite    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:populus    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:populus    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:PI    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:PI    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:nabs    文件:PeriodAxisTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashCode() {
    PeriodAxis a1 = new PeriodAxis("Test");
    PeriodAxis a2 = new PeriodAxis("Test");
    assertTrue(a1.equals(a2));
    int h1 = a1.hashCode();
    int h2 = a2.hashCode();
    assertEquals(h1, h2);
}
项目:ECG-Viewer    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:ECG-Viewer    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:astor    文件:PeriodAxisTests.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
public void testHashCode() {
    PeriodAxis a1 = new PeriodAxis("Test");
    PeriodAxis a2 = new PeriodAxis("Test");
    assertTrue(a1.equals(a2));
    int h1 = a1.hashCode();
    int h2 = a2.hashCode();
    assertEquals(h1, h2);
}
项目:astor    文件:PeriodAxisTests.java   
/**
 * A test for bug 1932146.
 */
public void test1932146() {
    PeriodAxis axis = new PeriodAxis("TestAxis");
    axis.addChangeListener(this);
    this.lastEvent = null;
    axis.setRange(new DateRange(0L, 1000L));
    assertTrue(this.lastEvent != null);
}
项目:astor    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:astor    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:group-five    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:group-five    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:manydesigns.cn    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:manydesigns.cn    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:buffer_bci    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:buffer_bci    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:buffer_bci    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:buffer_bci    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:proyecto-teoria-control-utn-frro    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:proyecto-teoria-control-utn-frro    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:Memetic-Algorithm-for-TSP    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link ValueAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToValueAxis(ValueAxis axis) {
    axis.setLabelFont(this.largeFont);
    axis.setLabelPaint(this.axisLabelPaint);
    axis.setTickLabelFont(this.regularFont);
    axis.setTickLabelPaint(this.tickLabelPaint);
    if (axis instanceof SymbolAxis) {
        applyToSymbolAxis((SymbolAxis) axis);
    }
    if (axis instanceof PeriodAxis) {
        applyToPeriodAxis((PeriodAxis) axis);
    }
}
项目:Memetic-Algorithm-for-TSP    文件:StandardChartTheme.java   
/**
 * Applies the attributes for this theme to a {@link PeriodAxis}.
 *
 * @param axis  the axis (<code>null</code> not permitted).
 */
protected void applyToPeriodAxis(PeriodAxis axis) {
    PeriodAxisLabelInfo[] info = axis.getLabelInfo();
    for (int i = 0; i < info.length; i++) {
        PeriodAxisLabelInfo e = info[i];
        PeriodAxisLabelInfo n = new PeriodAxisLabelInfo(e.getPeriodClass(),
                e.getDateFormat(), e.getPadding(), this.regularFont,
                this.tickLabelPaint, e.getDrawDividers(),
                e.getDividerStroke(), e.getDividerPaint());
        info[i] = n;
    }
    axis.setLabelInfo(info);
}
项目:parabuild-ci    文件:PeriodAxisTests.java   
/**
 * Confirm that the equals() method can distinguish all the required fields.
 */
public void testEquals() {

    PeriodAxis a1 = new PeriodAxis("Test");
    PeriodAxis a2 = new PeriodAxis("Test");
    assertTrue(a1.equals(a2));
    assertTrue(a2.equals(a1));

    a1.setFirst(new Year(2000));
    assertFalse(a1.equals(a2));
    a2.setFirst(new Year(2000));
    assertTrue(a1.equals(a2));

    a1.setLast(new Year(2004));
    assertFalse(a1.equals(a2));
    a2.setLast(new Year(2004));
    assertTrue(a1.equals(a2));

    a1.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
    assertFalse(a1.equals(a2));
    a2.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
    assertTrue(a1.equals(a2));

    a1.setAutoRangeTimePeriodClass(Quarter.class);
    assertFalse(a1.equals(a2));
    a2.setAutoRangeTimePeriodClass(Quarter.class);
    assertTrue(a1.equals(a2));

    PeriodAxisLabelInfo info[] = new PeriodAxisLabelInfo[1];
    info[0] = new PeriodAxisLabelInfo(
        Month.class, new SimpleDateFormat("MMM")
    );

    a1.setLabelInfo(info);
    assertFalse(a1.equals(a2));
    a2.setLabelInfo(info);
    assertTrue(a1.equals(a2));

    a1.setMajorTickTimePeriodClass(Minute.class);
    assertFalse(a1.equals(a2));
    a2.setMajorTickTimePeriodClass(Minute.class);
    assertTrue(a1.equals(a2));

    a1.setMinorTickMarksVisible(!a1.isMinorTickMarksVisible());
    assertFalse(a1.equals(a2));
    a2.setMinorTickMarksVisible(a1.isMinorTickMarksVisible());
    assertTrue(a1.equals(a2));

    a1.setMinorTickTimePeriodClass(Minute.class);
    assertFalse(a1.equals(a2));
    a2.setMinorTickTimePeriodClass(Minute.class);
    assertTrue(a1.equals(a2));

    Stroke s = new BasicStroke(1.23f);
    a1.setMinorTickMarkStroke(s);
    assertFalse(a1.equals(a2));
    a2.setMinorTickMarkStroke(s);
    assertTrue(a1.equals(a2));

    a1.setMinorTickMarkPaint(Color.blue);
    assertFalse(a1.equals(a2));
    a2.setMinorTickMarkPaint(Color.blue);
    assertTrue(a1.equals(a2));

}
项目:nabs    文件:PeriodAxisTests.java   
/**
 * Confirm that the equals() method can distinguish all the required fields.
 */
public void testEquals() {

    PeriodAxis a1 = new PeriodAxis("Test");
    PeriodAxis a2 = new PeriodAxis("Test");
    assertTrue(a1.equals(a2));
    assertTrue(a2.equals(a1));

    a1.setFirst(new Year(2000));
    assertFalse(a1.equals(a2));
    a2.setFirst(new Year(2000));
    assertTrue(a1.equals(a2));

    a1.setLast(new Year(2004));
    assertFalse(a1.equals(a2));
    a2.setLast(new Year(2004));
    assertTrue(a1.equals(a2));

    a1.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
    assertFalse(a1.equals(a2));
    a2.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
    assertTrue(a1.equals(a2));

    a1.setAutoRangeTimePeriodClass(Quarter.class);
    assertFalse(a1.equals(a2));
    a2.setAutoRangeTimePeriodClass(Quarter.class);
    assertTrue(a1.equals(a2));

    PeriodAxisLabelInfo info[] = new PeriodAxisLabelInfo[1];
    info[0] = new PeriodAxisLabelInfo(
        Month.class, new SimpleDateFormat("MMM")
    );

    a1.setLabelInfo(info);
    assertFalse(a1.equals(a2));
    a2.setLabelInfo(info);
    assertTrue(a1.equals(a2));

    a1.setMajorTickTimePeriodClass(Minute.class);
    assertFalse(a1.equals(a2));
    a2.setMajorTickTimePeriodClass(Minute.class);
    assertTrue(a1.equals(a2));

    a1.setMinorTickMarksVisible(!a1.isMinorTickMarksVisible());
    assertFalse(a1.equals(a2));
    a2.setMinorTickMarksVisible(a1.isMinorTickMarksVisible());
    assertTrue(a1.equals(a2));

    a1.setMinorTickTimePeriodClass(Minute.class);
    assertFalse(a1.equals(a2));
    a2.setMinorTickTimePeriodClass(Minute.class);
    assertTrue(a1.equals(a2));

    Stroke s = new BasicStroke(1.23f);
    a1.setMinorTickMarkStroke(s);
    assertFalse(a1.equals(a2));
    a2.setMinorTickMarkStroke(s);
    assertTrue(a1.equals(a2));

    a1.setMinorTickMarkPaint(Color.blue);
    assertFalse(a1.equals(a2));
    a2.setMinorTickMarkPaint(Color.blue);
    assertTrue(a1.equals(a2));

}
项目:astor    文件:PeriodAxisTests.java   
/**
 * Confirm that the equals() method can distinguish all the required fields.
 */
public void testEquals() {

    PeriodAxis a1 = new PeriodAxis("Test");
    PeriodAxis a2 = new PeriodAxis("Test");
    assertTrue(a1.equals(a2));
    assertTrue(a2.equals(a1));

    a1.setFirst(new Year(2000));
    assertFalse(a1.equals(a2));
    a2.setFirst(new Year(2000));
    assertTrue(a1.equals(a2));

    a1.setLast(new Year(2004));
    assertFalse(a1.equals(a2));
    a2.setLast(new Year(2004));
    assertTrue(a1.equals(a2));

    a1.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
    assertFalse(a1.equals(a2));
    a2.setTimeZone(TimeZone.getTimeZone("Pacific/Auckland"));
    assertTrue(a1.equals(a2));

    a1.setAutoRangeTimePeriodClass(Quarter.class);
    assertFalse(a1.equals(a2));
    a2.setAutoRangeTimePeriodClass(Quarter.class);
    assertTrue(a1.equals(a2));

    PeriodAxisLabelInfo info[] = new PeriodAxisLabelInfo[1];
    info[0] = new PeriodAxisLabelInfo(Month.class,
            new SimpleDateFormat("MMM"));

    a1.setLabelInfo(info);
    assertFalse(a1.equals(a2));
    a2.setLabelInfo(info);
    assertTrue(a1.equals(a2));

    a1.setMajorTickTimePeriodClass(Minute.class);
    assertFalse(a1.equals(a2));
    a2.setMajorTickTimePeriodClass(Minute.class);
    assertTrue(a1.equals(a2));

    a1.setMinorTickMarksVisible(!a1.isMinorTickMarksVisible());
    assertFalse(a1.equals(a2));
    a2.setMinorTickMarksVisible(a1.isMinorTickMarksVisible());
    assertTrue(a1.equals(a2));

    a1.setMinorTickTimePeriodClass(Minute.class);
    assertFalse(a1.equals(a2));
    a2.setMinorTickTimePeriodClass(Minute.class);
    assertTrue(a1.equals(a2));

    Stroke s = new BasicStroke(1.23f);
    a1.setMinorTickMarkStroke(s);
    assertFalse(a1.equals(a2));
    a2.setMinorTickMarkStroke(s);
    assertTrue(a1.equals(a2));

    a1.setMinorTickMarkPaint(Color.blue);
    assertFalse(a1.equals(a2));
    a2.setMinorTickMarkPaint(Color.blue);
    assertTrue(a1.equals(a2));

}