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


Java DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE属性代码示例

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


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

示例1: createDeviationRenderer

/**
 * Creates a DeviationRenderer to use for the trial average plots
 * @return a DeviationRenderer
 */
protected DeviationRenderer createDeviationRenderer(){
	DeviationRenderer renderer = new DeviationRenderer(true, false);
	
	for(int i = 0; i < DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length; i++){
		Color c = (Color)DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE[i];
		Color nc = new Color(c.getRed(), c.getGreen(), c.getBlue(), 100);
		renderer.setSeriesFillPaint(i, nc);
	}
	
	return renderer;
}
 
开发者ID:f-leno,项目名称:DOO-Q_BRACIS2016,代码行数:15,代码来源:MultiAgentPerformancePlotter.java

示例2: addSeries

/**
 * add a new series to the graph
 *
 * @param series The new series to be added
 */
public synchronized void addSeries(TimeSeries series)
{

	if (oneRangePerSeries)
	{
		// get paint for current axis/range/...
		Paint currPaint =
			DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE[
				raIndex % DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length];

		XYPlot plot = (XYPlot) chart.getPlot();
		// set dataset
		plot.setDataset(raIndex, new TimeSeriesCollection(series));
		// ** set axis
		NumberAxis axis = new NumberAxis();
		axis.setTickLabelFont(legendFont);
		axis.setAxisLinePaint(currPaint);
		axis.setTickLabelPaint(currPaint);
		axis.setTickMarkPaint(currPaint);
		// ** set axis in plot
		plot.setRangeAxis(raIndex, axis);
		plot.setRangeAxisLocation(raIndex, raIndex % 2 == 0 ? AxisLocation.TOP_OR_LEFT : AxisLocation.BOTTOM_OR_RIGHT);
		plot.mapDatasetToRangeAxis(raIndex, raIndex);
		// ** create renderer
		XYItemRenderer renderer = new XYLineAndShapeRenderer(true, false);
		renderer.setBaseToolTipGenerator(toolTipGen);
		renderer.setSeriesPaint(0, currPaint);
		// ** set renderer in plot
		plot.setRenderer(raIndex, renderer);

		raIndex++;
	}
	dataset.addSeries(series);
}
 
开发者ID:fr3ts0n,项目名称:AndrOBD,代码行数:39,代码来源:ObdDataPlotter.java

示例3: drawingSupplier

private static DrawingSupplier drawingSupplier() {
  Stroke[] strokes = new Stroke[] { stroke(), stroke(5,5),
      stroke(20,5,5,5), stroke(10,10), stroke(20,5,5,5,5,5)};
  return new DefaultDrawingSupplier(
      DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE,
      DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE,
      DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
      strokes,
      DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
      DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
}
 
开发者ID:uq-eresearch,项目名称:aorra,代码行数:11,代码来源:MarineTrends.java

示例4: setPlotDrawingDefaults

protected void setPlotDrawingDefaults(Plot p, JRChartPlot jrPlot)
{
	@SuppressWarnings("unchecked")
	List<Paint> defaultSeriesColors = (List<Paint>)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.SERIES_COLORS);
	Paint[] defaultPlotOutlinePaintSequence = 
		getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_PAINT_SEQUENCE) != null ?
		(Paint[])getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_PAINT_SEQUENCE) :
		DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE;
		
	Stroke[] defaultPlotStrokeSequence = 
		getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_STROKE_SEQUENCE) != null ?
		(Stroke[])getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_STROKE_SEQUENCE) :
		DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE;
		
	Stroke[] defaultPlotOutlineStrokeSequence = 
		getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_STROKE_SEQUENCE) != null ?
		(Stroke[])getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_STROKE_SEQUENCE) :
		DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE;
		
	Shape[] defaultPlotShapeSequence = 
		getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_SHAPE_SEQUENCE) != null ?
		(Shape[])getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_SHAPE_SEQUENCE) :
		DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE;
	// Set color series
	Paint[] colors = null;
	SortedSet<JRSeriesColor> seriesColors = jrPlot.getSeriesColors();
	Paint[] colorSequence = null;
	if (seriesColors != null && seriesColors.size() > 0)
	{
		int seriesColorsSize = seriesColors.size();
		
		colors = new Paint[DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length + seriesColorsSize];

		JRSeriesColor[] jrColorSequence = new JRSeriesColor[seriesColorsSize];
		seriesColors.toArray(jrColorSequence);
		colorSequence = new Paint[seriesColorsSize];
		
		for (int i = 0; i < seriesColorsSize; i++)
		{
			colorSequence[i] = jrColorSequence[i].getColor();
		}
		populateSeriesColors(colors, colorSequence);
	}
	else if (defaultSeriesColors != null && defaultSeriesColors.size() > 0)
	{
		colors = new Paint[DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length + defaultSeriesColors.size()];
		colorSequence = new Paint[defaultSeriesColors.size()];
		defaultSeriesColors.toArray(colorSequence);
		populateSeriesColors(colors, colorSequence);
	}
	else
	{
		colors = DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE;
	}
	
	p.setDrawingSupplier(new DefaultDrawingSupplier(
			colors,
			defaultPlotOutlinePaintSequence,
			defaultPlotStrokeSequence,
			defaultPlotOutlineStrokeSequence,
			defaultPlotShapeSequence
			)
		);
	
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:65,代码来源:GenericChartTheme.java

示例5: getPaintSequence

protected Paint[] getPaintSequence(PlotSettings plotSettings, JRChartPlot jrPlot)
{
	Paint[] colors = null;
	SortedSet<JRSeriesColor> seriesColors = jrPlot.getSeriesColors();
	Paint[] colorSequence = null;
	
	//The series gradient paint setting is considered first
	List<PaintProvider> themeSeriesPaintProvider = getChartThemeSettings().getPlotSettings().getSeriesGradientPaintSequence() != null 
			? getChartThemeSettings().getPlotSettings().getSeriesGradientPaintSequence()
			: getChartThemeSettings().getPlotSettings().getSeriesColorSequence();
			
	if (seriesColors != null && seriesColors.size() > 0)
	{
		int seriesColorsSize = seriesColors.size();
		
		colors = new Paint[DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length + seriesColorsSize];

		JRSeriesColor[] jrColorSequence = new JRSeriesColor[seriesColorsSize];
		seriesColors.toArray(jrColorSequence);
		colorSequence = new Paint[seriesColorsSize];
		
		for (int i = 0; i < seriesColorsSize; i++)
		{
			colorSequence[i] = jrColorSequence[i].getColor();
		}
		populateSeriesColors(colors, colorSequence);
	}
	else if (themeSeriesPaintProvider != null && !themeSeriesPaintProvider.isEmpty())
	{
		colors = new Paint[DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length + themeSeriesPaintProvider.size()];
		colorSequence = new Paint[themeSeriesPaintProvider.size()];
		List<Paint> themeSeriesColors = new ArrayList<Paint>();
		for (int i=0; i< themeSeriesPaintProvider.size(); i++)
		{
			themeSeriesColors.add(themeSeriesPaintProvider.get(i).getPaint());
		}
		themeSeriesColors.toArray(colorSequence);
		populateSeriesColors(colors, colorSequence);
	}
	else
	{
		colors = DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE;
	}
	return colors;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:45,代码来源:SimpleChartTheme.java

示例6: init

public void init(){
	CLEAR_BUTTON = false;
	LEGEND_SWITCH= false;
	//DefaultDrawingSupplier supplier = new DefaultDrawingSupplier();
	DrawingSupplier supplier = new DefaultDrawingSupplier(
            DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE
        );
	//series_shapes = supplier.createStandardSeriesShapes();
	
	//color_mainGroup = supplier.getNextPaint(); //moved to EM
	for (int i=0; i<10; i++){
		//color_kernels[i] = supplier.getNextPaint();
		//series_strokes[i] = supplier.getNextStroke();
		series_shapes[i] = supplier.getNextShape();
	}
	
	series_strokes[0] =new BasicStroke(1.0f, BasicStroke.CAP_SQUARE, 
			                    BasicStroke.JOIN_BEVEL);
	
	series_strokes[1] =new BasicStroke(2.0f, BasicStroke.CAP_SQUARE, 
               BasicStroke.JOIN_BEVEL);
	
	series_strokes[2] =new BasicStroke(3.0f, BasicStroke.CAP_SQUARE, 
               BasicStroke.JOIN_BEVEL);
	
	series_strokes[3] = new BasicStroke(
               1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 
               1.0f, new float[] {10.0f, 6.0f}, 0.0f
           );
	series_strokes[4] = new BasicStroke(
               2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 
               1.0f, new float[] {10.0f, 6.0f}, 0.0f
           );
	
	series_strokes[5] = new BasicStroke(
               3.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 
               1.0f, new float[] {10.0f, 6.0f}, 0.0f
           );
	series_strokes[6]= new BasicStroke(
               1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
               1.0f, new float[] {6.0f, 6.0f}, 0.0f
           );
	series_strokes[7]= new BasicStroke(
               2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
               1.0f, new float[] {6.0f, 6.0f}, 0.0f
           );
	series_strokes[8]= new BasicStroke(
               3.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
               1.0f, new float[] {6.0f, 6.0f}, 0.0f
           );
	
	series_strokes[9]= new BasicStroke(
               2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
               1.0f, new float[] {2.0f, 6.0f}, 0.0f
           );
		
	controlPanel = new JPanel();
	modelAllSelected = TOGETHER; 
	num_series=1;
	mEMexperiment  = new MixtureEMExperiment[num_series];
	mEMexperiment[0] = new MixtureEMExperiment();
	resultsTables= new CustomJTable[num_series];
	resultsTables[0] = mEMexperiment[0].getResultsTable();
	
	initControlPanel();
	//initResutlsTable();
	SHOW_STATUS_TEXTAREA = false;

	super.init();

	indLabel = new JLabel("X");
	depLabel = new JLabel("Y");
	
	mEMexperiment[0].resetSize();
	
	packControlArea();
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:81,代码来源:SOCR_EM_MixtureModelChartDemo.java

示例7: createLegend

protected JFreeChart createLegend(CategoryDataset dataset) {
  JFreeChart chart = ChartFactory.createLineChart(
            chartTitle,      // chart title
            domainLabel,                   // domain axis label
            rangeLabel,                  // range axis label
            dataset,                  // data
            PlotOrientation.VERTICAL, // orientation
            true,                     // include legend
            true,                     // tooltips
            false                     // urls
        );

        chart.setBackgroundPaint(Color.white);

        Shape[] shapes = new Shape[3];
        int[] xpoints;
        int[] ypoints;

        // right-pointing triangle
        xpoints = new int[] {-3, 3, -3};
        ypoints = new int[] {-3, 0, 3};
        shapes[0] = new Polygon(xpoints, ypoints, 3);

        // vertical rectangle
        shapes[1] = new Rectangle2D.Double(-2, -3, 3, 6);

        // left-pointing triangle
        xpoints = new int[] {-3, 3, 3};
        ypoints = new int[] {0, -3, 3};
        shapes[2] = new Polygon(xpoints, ypoints, 3);

        DrawingSupplier supplier = new DefaultDrawingSupplier(
            DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
            shapes
        );
        CategoryPlot plot = chart.getCategoryPlot();
        plot.setOrientation(PlotOrientation.HORIZONTAL);
        plot.setBackgroundPaint(Color.lightGray);
        plot.setDomainGridlinePaint(Color.white);
        plot.setRangeGridlinePaint(Color.white);
        plot.setDrawingSupplier(supplier);

        // set the stroke for each series...
        plot.getRenderer().setSeriesStroke(
            0, 
            new BasicStroke(
                2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 
                1.0f, new float[] {10.0f, 6.0f}, 0.0f
            )
        );
        plot.getRenderer().setSeriesStroke(
            1, 
            new BasicStroke(
                2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
                1.0f, new float[] {6.0f, 6.0f}, 0.0f
            )
        );
        plot.getRenderer().setSeriesStroke(
            2, 
            new BasicStroke(
                2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
                1.0f, new float[] {2.0f, 6.0f}, 0.0f
            )
        );

        // customise the renderer...
        LineAndShapeRenderer renderer 
            = (LineAndShapeRenderer) plot.getRenderer();
        renderer.setBaseShapesVisible(true);
        renderer.setBaseItemLabelsVisible(true);
        renderer.setBaseItemLabelGenerator(
            new StandardCategoryItemLabelGenerator()
        );
		renderer.setLegendItemLabelGenerator(new SOCRCategorySeriesLabelGenerator());
    return chart;
    
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:80,代码来源:LineChartDemo5.java


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