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


Java StandardXYItemRenderer.setBaseShapesVisible方法代碼示例

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


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

示例1: init

import org.jfree.chart.renderer.xy.StandardXYItemRenderer; //導入方法依賴的package包/類
protected void init()
{
    seriesColors = new Color[SERIES_COLORS.length];
    System.arraycopy(SERIES_COLORS, 0, seriesColors, 0, SERIES_COLORS.length);
    dataset = new XYSeriesCollection();
    renderer = new StandardXYItemRenderer();
    renderer.setPlotLines(false);
    renderer.setBaseShapesVisible(true);
    renderer.setShapesFilled(true);
    //set all possible series to the default shape
    for (int i=0; i<10; i++)
        renderer.setSeriesShape(i, defaultShape);

    XYPlot scatterPlot = new XYPlot(dataset, xAxis, yAxis, renderer);
    init(scatterPlot);
}
 
開發者ID:dhmay,項目名稱:msInspect,代碼行數:17,代碼來源:PanelWithScatterPlot.java

示例2: updateChart

import org.jfree.chart.renderer.xy.StandardXYItemRenderer; //導入方法依賴的package包/類
private void updateChart() {
String x_label = "m/z ratio";
String y_label = (theDocument.isShowRelativeIntensities()) ?"Intensity %" :"Intensity";
theDataset = new DefaultXYDataset();

if( theDocument.getPeakData()!=null ) {
    theChart = org.jfree.chart.ChartFactory.createScatterPlot(null, x_label, y_label, theDataset, org.jfree.chart.plot.PlotOrientation.VERTICAL, false, false, false);
    thePlot = (XYPlot)theChart.getPlot();    
    thePlot.setRenderer(new StandardXYItemRenderer(StandardXYItemRenderer.LINES));
}
else {
    theChart = org.jfree.chart.ChartFactory.createScatterPlot(null, x_label, y_label, new XYBarDataset(theDataset,0.001), org.jfree.chart.plot.PlotOrientation.VERTICAL, false, false, false);
    thePlot = (XYPlot)theChart.getPlot();    
    thePlot.setRenderer(new XYBarRenderer());
}


if( theDocument.isShowRelativeIntensities() && theOptions.SHOW_MAX_INTENSITY ) {
    // set second axis
    ValueAxis second_axis = new NumberAxis("");
    thePlot.setRangeAxis(1, second_axis);
    
    // set dataset
    maxIntensityDataset = new DefaultXYDataset();       
    thePlot.setDataset(1, maxIntensityDataset);
    thePlot.mapDatasetToRangeAxis(1, 1);
    
    // set invisible renderer
    StandardXYItemRenderer r = new StandardXYItemRenderer(StandardXYItemRenderer.SHAPES);
    r.setBaseShapesVisible(false);
    thePlot.setRenderer(1,r);        
}        

theChart.setBackgroundPaint(Color.white);
theChart.setBorderVisible(false);
thePlot.getRenderer().setPaint(theOptions.SPECTRUM_COLOR);
thePlot.setOutlinePaint(null);
thePlot.setDomainGridlinesVisible(false);
thePlot.setRangeGridlinesVisible(false);
}
 
開發者ID:glycoinfo,項目名稱:eurocarbdb,代碼行數:41,代碼來源:AnnotationReportCanvas.java

示例3: addAdditionalDatasets

import org.jfree.chart.renderer.xy.StandardXYItemRenderer; //導入方法依賴的package包/類
/**
 * Add additional data sets to chart.
 */
private void addAdditionalDatasets(JFreeChart chart) {

	// return if there are no further data sets.
	if (datasets.size() < 2) {
		return;
	}

	XYPlot xyplot = chart.getXYPlot();

	for (int i = 1; i < datasets.size(); i++) {

		DatasetDescriptor descriptor = datasets.get(i);

		NumberAxis axis = new NumberAxis(descriptor.getAxisLabel());
		axis.setAutoRangeIncludesZero(descriptor.isIncludeZero());
		xyplot.setRangeAxis(i, axis);

		XYDataset xydataset = createDataset(i);
		xyplot.setDataset(i, xydataset);
		xyplot.mapDatasetToRangeAxis(i, i);

		StandardXYItemRenderer renderer = new StandardXYItemRenderer();
		renderer.setBaseShapesVisible(true);
		renderer.setBaseShapesFilled(true);

		xyplot.setRenderer(i, renderer);
	}
}
 
開發者ID:vimaier,項目名稱:conqat,代碼行數:32,代碼來源:MultiRangeSeriesCreator.java

示例4: testEquals

import org.jfree.chart.renderer.xy.StandardXYItemRenderer; //導入方法依賴的package包/類
/**
 * Test that the equals() method distinguishes all fields.
 */
public void testEquals() {
    StandardXYItemRenderer r1 = new StandardXYItemRenderer();
    StandardXYItemRenderer r2 = new StandardXYItemRenderer();
    assertEquals(r1, r2);
    
    r1.setBaseShapesVisible(true);
    assertFalse(r1.equals(r2));
    r2.setBaseShapesVisible(true);
    assertTrue(r1.equals(r2));
    
    r1.setPlotLines(false);
    assertFalse(r1.equals(r2));
    r2.setPlotLines(false);
    assertTrue(r1.equals(r2));

    r1.setPlotImages(true);
    assertFalse(r1.equals(r2));
    r2.setPlotImages(true);
    assertTrue(r1.equals(r2));

    r1.setPlotDiscontinuous(true);
    assertFalse(r1.equals(r2));
    r2.setPlotDiscontinuous(true);
    assertTrue(r1.equals(r2));
    
    r1.setGapThresholdType(UnitType.ABSOLUTE);
    assertFalse(r1.equals(r2));
    r2.setGapThresholdType(UnitType.ABSOLUTE);
    assertTrue(r1.equals(r2));
    
    r1.setGapThreshold(1.23);
    assertFalse(r1.equals(r2));
    r2.setGapThreshold(1.23);
    assertTrue(r1.equals(r2));
    
    r1.setLegendLine(new Line2D.Double(1.0, 2.0, 3.0, 4.0));
    assertFalse(r1.equals(r2));
    r2.setLegendLine(new Line2D.Double(1.0, 2.0, 3.0, 4.0));
    assertTrue(r1.equals(r2));

    r1.setShapesFilled(false);
    assertFalse(r1.equals(r2));
    r2.setShapesFilled(false);
    assertTrue(r1.equals(r2));
    
    r1.setSeriesShapesFilled(1, Boolean.TRUE);
    assertFalse(r1.equals(r2));
    r2.setSeriesShapesFilled(1, Boolean.TRUE);
    assertTrue(r1.equals(r2));
    
    r1.setBaseShapesFilled(false);
    assertFalse(r1.equals(r2));
    r2.setBaseShapesFilled(false);
    assertTrue(r1.equals(r2));
    
    r1.setDrawSeriesLineAsPath(true);
    assertFalse(r1.equals(r2));
    r2.setDrawSeriesLineAsPath(true);
    assertTrue(r1.equals(r2));
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:64,代碼來源:StandardXYItemRendererTests.java

示例5: testEquals

import org.jfree.chart.renderer.xy.StandardXYItemRenderer; //導入方法依賴的package包/類
/**
 * Test that the equals() method distinguishes all fields.
 */
public void testEquals() {
    StandardXYItemRenderer r1 = new StandardXYItemRenderer();
    StandardXYItemRenderer r2 = new StandardXYItemRenderer();
    assertEquals(r1, r2);

    r1.setBaseShapesVisible(true);
    assertFalse(r1.equals(r2));
    r2.setBaseShapesVisible(true);
    assertTrue(r1.equals(r2));

    r1.setPlotLines(false);
    assertFalse(r1.equals(r2));
    r2.setPlotLines(false);
    assertTrue(r1.equals(r2));

    r1.setPlotImages(true);
    assertFalse(r1.equals(r2));
    r2.setPlotImages(true);
    assertTrue(r1.equals(r2));

    r1.setPlotDiscontinuous(true);
    assertFalse(r1.equals(r2));
    r2.setPlotDiscontinuous(true);
    assertTrue(r1.equals(r2));

    r1.setGapThresholdType(UnitType.ABSOLUTE);
    assertFalse(r1.equals(r2));
    r2.setGapThresholdType(UnitType.ABSOLUTE);
    assertTrue(r1.equals(r2));

    r1.setGapThreshold(1.23);
    assertFalse(r1.equals(r2));
    r2.setGapThreshold(1.23);
    assertTrue(r1.equals(r2));

    r1.setLegendLine(new Line2D.Double(1.0, 2.0, 3.0, 4.0));
    assertFalse(r1.equals(r2));
    r2.setLegendLine(new Line2D.Double(1.0, 2.0, 3.0, 4.0));
    assertTrue(r1.equals(r2));

    r1.setSeriesShapesFilled(1, Boolean.TRUE);
    assertFalse(r1.equals(r2));
    r2.setSeriesShapesFilled(1, Boolean.TRUE);
    assertTrue(r1.equals(r2));

    r1.setBaseShapesFilled(false);
    assertFalse(r1.equals(r2));
    r2.setBaseShapesFilled(false);
    assertTrue(r1.equals(r2));

    r1.setDrawSeriesLineAsPath(true);
    assertFalse(r1.equals(r2));
    r2.setDrawSeriesLineAsPath(true);
    assertTrue(r1.equals(r2));
}
 
開發者ID:SpoonLabs,項目名稱:astor,代碼行數:59,代碼來源:StandardXYItemRendererTests.java


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