当前位置: 首页>>代码示例>>Java>>正文


Java DefaultDrawingSupplier类代码示例

本文整理汇总了Java中org.jfree.chart.plot.DefaultDrawingSupplier的典型用法代码示例。如果您正苦于以下问题:Java DefaultDrawingSupplier类的具体用法?Java DefaultDrawingSupplier怎么用?Java DefaultDrawingSupplier使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DefaultDrawingSupplier类属于org.jfree.chart.plot包,在下文中一共展示了DefaultDrawingSupplier类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testPaintLookup

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
/**
 * Some checks for the paint lookup mechanism.
 */
@Test
public void testPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.blue, r.getBasePaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesPaint(false);
    assertEquals(Color.blue, r.lookupSeriesPaint(0));
    assertNull(r.getSeriesPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE[0],
            r.lookupSeriesPaint(0));
    assertNotNull(r.getSeriesPaint(0));
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:22,代码来源:AbstractRendererTest.java

示例2: testFillPaintLookup

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
/**
 * Some checks for the fill paint lookup mechanism.
 */
@Test
public void testFillPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.white, r.getBaseFillPaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesFillPaint(false);
    assertEquals(Color.white, r.lookupSeriesFillPaint(0));
    assertNull(r.getSeriesFillPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesFillPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE[0],
            r.lookupSeriesFillPaint(0));
    assertNotNull(r.getSeriesFillPaint(0));
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:22,代码来源:AbstractRendererTest.java

示例3: testOutlinePaintLookup

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
/**
 * Some checks for the outline paint lookup mechanism.
 */
@Test
public void testOutlinePaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.gray, r.getBaseOutlinePaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesOutlinePaint(false);
    assertEquals(Color.gray, r.lookupSeriesOutlinePaint(0));
    assertNull(r.getSeriesOutlinePaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesOutlinePaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE[0],
            r.lookupSeriesOutlinePaint(0));
    assertNotNull(r.getSeriesOutlinePaint(0));
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:22,代码来源:AbstractRendererTest.java

示例4: testPaintLookup

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
/**
 * Some checks for the paint lookup mechanism.
 */
@Test
public void testPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.BLUE, r.getDefaultPaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesPaint(false);
    assertEquals(Color.BLUE, r.lookupSeriesPaint(0));
    assertNull(r.getSeriesPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE[0],
            r.lookupSeriesPaint(0));
    assertNotNull(r.getSeriesPaint(0));
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:22,代码来源:AbstractRendererTest.java

示例5: testFillPaintLookup

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
/**
 * Some checks for the fill paint lookup mechanism.
 */
@Test
public void testFillPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.WHITE, r.getDefaultFillPaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesFillPaint(false);
    assertEquals(Color.WHITE, r.lookupSeriesFillPaint(0));
    assertNull(r.getSeriesFillPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesFillPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE[0],
            r.lookupSeriesFillPaint(0));
    assertNotNull(r.getSeriesFillPaint(0));
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:22,代码来源:AbstractRendererTest.java

示例6: testOutlinePaintLookup

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
/**
 * Some checks for the outline paint lookup mechanism.
 */
@Test
public void testOutlinePaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.GRAY, r.getDefaultOutlinePaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesOutlinePaint(false);
    assertEquals(Color.GRAY, r.lookupSeriesOutlinePaint(0));
    assertNull(r.getSeriesOutlinePaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesOutlinePaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE[0],
            r.lookupSeriesOutlinePaint(0));
    assertNotNull(r.getSeriesOutlinePaint(0));
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:22,代码来源:AbstractRendererTest.java

示例7: setPlotDrawingDefaults

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
protected void setPlotDrawingDefaults(Plot p, JRChartPlot jrPlot)
	{
		PlotSettings plotSettings = getPlotSettings();
		Paint[] paintSequence = getPaintSequence(plotSettings, jrPlot);	
		Paint[] outlinePaintSequence = getOutlinePaintSequence(plotSettings);	
		Stroke[] strokeSequence = getStrokeSequence(plotSettings);
		Stroke[] outlineStrokeSequence = getOutlineStrokeSequence(plotSettings);
			
//		Shape[] defaultPlotShapeSequence = 
//			getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_SHAPE_SEQUENCE) != null ?
//			(Shape[])getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_SHAPE_SEQUENCE) :
//			DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE;

		p.setDrawingSupplier(new DefaultDrawingSupplier(
				paintSequence,
				outlinePaintSequence,
				strokeSequence,
				outlineStrokeSequence,
				DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE
				)
			);
	}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:SimpleChartTheme.java

示例8: getOutlinePaintSequence

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
protected Paint[] getOutlinePaintSequence(PlotSettings plotSettings)
{
	List<PaintProvider> outlinePaintSequenceProvider = plotSettings.getSeriesOutlinePaintSequence();
	Paint[] outlinePaintSequence = null;
	if (outlinePaintSequenceProvider != null && !outlinePaintSequenceProvider.isEmpty())
	{
		outlinePaintSequence = new Paint[outlinePaintSequenceProvider.size()];
		for (int i=0; i< outlinePaintSequenceProvider.size(); i++)
		{
			outlinePaintSequence[i] = outlinePaintSequenceProvider.get(i).getPaint();
		}
	}
	else
	{
		outlinePaintSequence = DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE;
	}
	return outlinePaintSequence;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:19,代码来源:SimpleChartTheme.java

示例9: init

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
public void init(double x, double y, double sx, double sy) {
  	xSize = x;
  	ySize =y;
  	xStart = sx;
  	yStart = sy;
  	//System.out.println("MixtureEMExperiment init "+x+" ,"+y+" sx="+sx+" sy="+sy);
      //getContentPane().setLayout(new BorderLayout());
      DB = new Database(xSize, ySize,sx,sy);
      
      CGMix = new CurvedGaussMixture(xSize, ySize, DB);
      GLMix = new GaussLineMixture(xSize, ySize, DB);
      initResutlsTable();
      
      DefaultDrawingSupplier supplier = new DefaultDrawingSupplier();
      color_mainGroup = supplier.getNextPaint();
      for (int i=0; i<10; i++){
	color_kernels[i] = supplier.getNextPaint();
}
  }
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:20,代码来源:MixtureEMExperiment.java

示例10: setGeneralChart

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
private void setGeneralChart() {
	DefaultPieDataset dataset = new DefaultPieDataset();
	int different = HandlerProxy.getRepositoryHandler().getDifferentSongsPlayed();
	int total = HandlerProxy.getRepositoryHandler().getSongs().size();
	dataset.setValue(LanguageTool.getString("SONGS_PLAYED"), different);
	dataset.setValue(LanguageTool.getString("SONGS_NEVER_PLAYED"), total - different);
	JFreeChart chart = ChartFactory.createPieChart3D(LanguageTool.getString("SONGS_PLAYED"), dataset, false, false, false);
	chart.getTitle().setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 11));
	chart.setBackgroundPaint(new GradientPaint(0, 0, ColorDefinitions.GENERAL_NON_PANEL_TOP_GRADIENT_COLOR, 0, 200, ColorDefinitions.GENERAL_NON_PANEL_BOTTOM_GRADIENT_COLOR));
	chart.setPadding(new RectangleInsets(5,0,0,0));
	chart.getPlot().setBackgroundPaint(new GradientPaint(0, 0, ColorDefinitions.GENERAL_NON_PANEL_TOP_GRADIENT_COLOR, 0, 200, ColorDefinitions.GENERAL_NON_PANEL_BOTTOM_GRADIENT_COLOR));
	DefaultDrawingSupplier drawingSupplier = new DefaultDrawingSupplier(new Paint[] {new Color(0,1,0,0.6f), new Color(1,0,0,0.6f)}, new Paint[] {new Color(0,1,0,0.4f), new Color(1,0,0,0.4f)}, 
			DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
	chart.getPlot().setDrawingSupplier(drawingSupplier);
	((StatsDialog)frameControlled).getGeneralChart().setIcon(new ImageIcon(chart.createBufferedImage(710, 250)));
}
 
开发者ID:michellemulkey,项目名称:aTunes,代码行数:17,代码来源:StatsDialogController.java

示例11: testPaintLookup

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
/**
 * Some checks for the paint lookup mechanism.
 */
public void testPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.blue, r.getBasePaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesPaint(false);
    assertEquals(Color.blue, r.lookupSeriesPaint(0));
    assertNull(r.getSeriesPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE[0],
            r.lookupSeriesPaint(0));
    assertNotNull(r.getSeriesPaint(0));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:21,代码来源:AbstractRendererTests.java

示例12: testFillPaintLookup

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
/**
 * Some checks for the fill paint lookup mechanism.
 */
public void testFillPaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.white, r.getBaseFillPaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesFillPaint(false);
    assertEquals(Color.white, r.lookupSeriesFillPaint(0));
    assertNull(r.getSeriesFillPaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesFillPaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE[0],
            r.lookupSeriesFillPaint(0));
    assertNotNull(r.getSeriesFillPaint(0));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:21,代码来源:AbstractRendererTests.java

示例13: testOutlinePaintLookup

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
/**
 * Some checks for the outline paint lookup mechanism.
 */
public void testOutlinePaintLookup() {
    BarRenderer r = new BarRenderer();
    assertEquals(Color.gray, r.getBaseOutlinePaint());

    // first check that autoPopulate==false works as expected
    r.setAutoPopulateSeriesOutlinePaint(false);
    assertEquals(Color.gray, r.lookupSeriesOutlinePaint(0));
    assertNull(r.getSeriesOutlinePaint(0));

    // now check autoPopulate==true
    r.setAutoPopulateSeriesOutlinePaint(true);
    /*CategoryPlot plot =*/ new CategoryPlot(null, new CategoryAxis(
            "Category"), new NumberAxis("Value"), r);
    assertEquals(DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE[0],
            r.lookupSeriesOutlinePaint(0));
    assertNotNull(r.getSeriesOutlinePaint(0));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:21,代码来源:AbstractRendererTests.java

示例14: setChartTheme

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
public static void setChartTheme() {
    StandardChartTheme chartTheme = new StandardChartTheme("CN");
    chartTheme.setExtraLargeFont(FONT);
    chartTheme.setRegularFont(FONT);
    chartTheme.setLargeFont(FONT);
    chartTheme.setSmallFont(FONT);
    chartTheme.setTitlePaint(new Color(51, 51, 51));
    chartTheme.setSubtitlePaint(new Color(85, 85, 85));

    chartTheme.setLegendBackgroundPaint(Color.WHITE);
    chartTheme.setLegendItemPaint(Color.BLACK);//
    chartTheme.setChartBackgroundPaint(Color.WHITE);

    Paint[] OUTLINE_PAINT_SEQUENCE = new Paint[]{Color.WHITE};
    DefaultDrawingSupplier drawingSupplier = new DefaultDrawingSupplier(CHART_COLORS, CHART_COLORS, OUTLINE_PAINT_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
    chartTheme.setDrawingSupplier(drawingSupplier);

    chartTheme.setPlotBackgroundPaint(Color.WHITE);
    chartTheme.setPlotOutlinePaint(Color.WHITE);
    chartTheme.setLabelLinkPaint(new Color(8, 55, 114));
    chartTheme.setLabelLinkStyle(PieLabelLinkStyle.CUBIC_CURVE);

    chartTheme.setAxisOffset(new RectangleInsets(5, 12, 5, 12));
    chartTheme.setDomainGridlinePaint(new Color(192, 208, 224));
    chartTheme.setRangeGridlinePaint(new Color(192, 192, 192));

    chartTheme.setBaselinePaint(Color.WHITE);
    chartTheme.setCrosshairPaint(Color.BLUE);
    chartTheme.setAxisLabelPaint(new Color(51, 51, 51));
    chartTheme.setTickLabelPaint(new Color(67, 67, 72));
    chartTheme.setBarPainter(new StandardBarPainter());
    chartTheme.setXYBarPainter(new StandardXYBarPainter());

    chartTheme.setItemLabelPaint(Color.black);
    chartTheme.setThermometerPaint(Color.white);

    ChartFactory.setChartTheme(chartTheme);
}
 
开发者ID:Fanping,项目名称:iveely.ml,代码行数:41,代码来源:ChartUtils.java

示例15: createDarknessTheme

import org.jfree.chart.plot.DefaultDrawingSupplier; //导入依赖的package包/类
/**
 * Creates and returns a theme called "Darkness".  In this theme, the
 * charts have a black background.
 *
 * @return The "Darkness" theme.
 */
public static ChartTheme createDarknessTheme() {
    StandardChartTheme theme = new StandardChartTheme("Darkness");
    theme.titlePaint = Color.white;
    theme.subtitlePaint = Color.white;
    theme.legendBackgroundPaint = Color.black;
    theme.legendItemPaint = Color.white;
    theme.chartBackgroundPaint = Color.black;
    theme.plotBackgroundPaint = Color.black;
    theme.plotOutlinePaint = Color.yellow;
    theme.baselinePaint = Color.white;
    theme.crosshairPaint = Color.red;
    theme.labelLinkPaint = Color.lightGray;
    theme.tickLabelPaint = Color.white;
    theme.axisLabelPaint = Color.white;
    theme.shadowPaint = Color.darkGray;
    theme.itemLabelPaint = Color.white;
    theme.drawingSupplier = new DefaultDrawingSupplier(
            new Paint[] {Color.decode("0xFFFF00"),
                    Color.decode("0x0036CC"), Color.decode("0xFF0000"),
                    Color.decode("0xFFFF7F"), Color.decode("0x6681CC"),
                    Color.decode("0xFF7F7F"), Color.decode("0xFFFFBF"),
                    Color.decode("0x99A6CC"), Color.decode("0xFFBFBF"),
                    Color.decode("0xA9A938"), Color.decode("0x2D4587")},
            new Paint[] {Color.decode("0xFFFF00"),
                    Color.decode("0x0036CC")},
            new Stroke[] {new BasicStroke(2.0f)},
            new Stroke[] {new BasicStroke(0.5f)},
            DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
    theme.wallPaint = Color.darkGray;
    theme.errorIndicatorPaint = Color.lightGray;
    theme.gridBandPaint = new Color(255, 255, 255, 20);
    theme.gridBandAlternatePaint = new Color(255, 255, 255, 40);
    theme.shadowGenerator = null;
    return theme;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:42,代码来源:StandardChartTheme.java


注:本文中的org.jfree.chart.plot.DefaultDrawingSupplier类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。