當前位置: 首頁>>代碼示例>>Java>>正文


Java LineAndShapeRenderer.equals方法代碼示例

本文整理匯總了Java中org.jfree.chart.renderer.category.LineAndShapeRenderer.equals方法的典型用法代碼示例。如果您正苦於以下問題:Java LineAndShapeRenderer.equals方法的具體用法?Java LineAndShapeRenderer.equals怎麽用?Java LineAndShapeRenderer.equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jfree.chart.renderer.category.LineAndShapeRenderer的用法示例。


在下文中一共展示了LineAndShapeRenderer.equals方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: checkIndependence

import org.jfree.chart.renderer.category.LineAndShapeRenderer; //導入方法依賴的package包/類
/**
 * Checks that the two renderers are equal but independent of one another.
 * 
 * @param r1  renderer 1.
 * @param r2  renderer 2.
 * 
 * @return A boolean.
 */
private boolean checkIndependence(LineAndShapeRenderer r1, LineAndShapeRenderer r2) {

    // should be equal...
    boolean b0 = r1.equals(r2);
    
    // and independent...
    r1.setDrawShapes(!r1.isDrawShapes());
    boolean b1 = !r1.equals(r2);
    r2.setDrawShapes(r1.isDrawShapes());
    boolean b2 = r1.equals(r2);
    
    r1.setDrawLines(!r1.isDrawLines());
    boolean b3 = !r1.equals(r2);
    r2.setDrawLines(r1.isDrawLines());
    boolean b4 = r1.equals(r2);
            
    boolean flag = true;
    Boolean existing = r1.getShapesFilled();
    if (existing != null) {
        flag = !existing.booleanValue();
    }
    r1.setShapesFilled(flag);
    boolean b5 = !r1.equals(r2);
    r2.setShapesFilled(flag);
    boolean b6 = r1.equals(r2);

    r1.setShapesFilled(false);
    r2.setShapesFilled(false);
    r1.setSeriesShapesFilled(0, false);
    r2.setSeriesShapesFilled(0, true);
    boolean b7 = !r1.equals(r2);
    r2.setSeriesShapesFilled(0, false);
    boolean b8 = (r1.equals(r2));
    
    r1.setDefaultShapesFilled(false);
    r2.setDefaultShapesFilled(true);
    boolean b9 = !r1.equals(r2);
    r2.setDefaultShapesFilled(false);
    boolean b10 = (r1.equals(r2));
    
    return b0 && b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10;

}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:52,代碼來源:LineAndShapeRendererTests.java

示例2: checkIndependence

import org.jfree.chart.renderer.category.LineAndShapeRenderer; //導入方法依賴的package包/類
/**
 * Checks that the two renderers are equal but independent of one another.
 *
 * @param r1  renderer 1.
 * @param r2  renderer 2.
 *
 * @return A boolean.
 */
private boolean checkIndependence(LineAndShapeRenderer r1,
                                  LineAndShapeRenderer r2) {

    // should be equal...
    if (!r1.equals(r2)) {
        return false;
    }

    // and independent...
    r1.setBaseLinesVisible(!r1.getBaseLinesVisible());
    if (r1.equals(r2)) {
        return false;
    }
    r2.setBaseLinesVisible(r1.getBaseLinesVisible());
    if (!r1.equals(r2)) {
        return false;
    }

    r1.setSeriesLinesVisible(1, true);
    if (r1.equals(r2)) {
        return false;
    }
    r2.setSeriesLinesVisible(1, true);
    if (!r1.equals(r2)) {
        return false;
    }

    r1.setBaseShapesVisible(!r1.getBaseShapesVisible());
    if (r1.equals(r2)) {
        return false;
    }
    r2.setBaseShapesVisible(r1.getBaseShapesVisible());
    if (!r1.equals(r2)) {
        return false;
    }

    r1.setSeriesShapesVisible(1, true);
    if (r1.equals(r2)) {
        return false;
    }
    r2.setSeriesShapesVisible(1, true);
    if (!r1.equals(r2)) {
        return false;
    }

    r1.setSeriesShapesFilled(0, false);
    r2.setSeriesShapesFilled(0, true);
    if (r1.equals(r2)) {
        return false;
    }
    r2.setSeriesShapesFilled(0, false);
    if (!r1.equals(r2)) {
        return false;
    }

    r1.setBaseShapesFilled(false);
    r2.setBaseShapesFilled(true);
    if (r1.equals(r2)) {
        return false;
    }
    r2.setBaseShapesFilled(false);
    if (!r1.equals(r2)) {
        return false;
    }
    return true;

}
 
開發者ID:SpoonLabs,項目名稱:astor,代碼行數:76,代碼來源:LineAndShapeRendererTests.java


注:本文中的org.jfree.chart.renderer.category.LineAndShapeRenderer.equals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。