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


Java StandardGradientPaintTransformer类代码示例

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


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

示例1: testEquals

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
public void testEquals() {
    DialBackground b1 = new DialBackground();
    DialBackground b2 = new DialBackground();
    assertTrue(b1.equals(b2));
    
    // paint
    b1.setPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, 
            Color.yellow));
    assertFalse(b1.equals(b2));
    b2.setPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, 
            Color.yellow));
    assertTrue(b1.equals(b2));
    
    // gradient paint transformer
    b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(
            GradientPaintTransformType.CENTER_VERTICAL));
    assertFalse(b1.equals(b2));
    b2.setGradientPaintTransformer(new StandardGradientPaintTransformer(
            GradientPaintTransformType.CENTER_VERTICAL));
    assertTrue(b1.equals(b2));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:25,代码来源:DialBackgroundTests.java

示例2: LegendGraphic

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
/**
 * Creates a new legend graphic.
 * 
 * @param shape  the shape (<code>null</code> not permitted).
 * @param fillPaint  the fill paint (<code>null</code> not permitted).
 */
public LegendGraphic(Shape shape, Paint fillPaint) {
    if (shape == null) {
        throw new IllegalArgumentException("Null 'shape' argument.");
    }
    if (fillPaint == null) {
        throw new IllegalArgumentException("Null 'fillPaint' argument.");
    }
    this.shapeVisible = true;
    this.shape = shape;
    this.shapeAnchor = RectangleAnchor.CENTER;
    this.shapeLocation = RectangleAnchor.CENTER;
    this.shapeFilled = true;
    this.fillPaint = fillPaint;
    this.fillPaintTransformer = new StandardGradientPaintTransformer();
    setPadding(2.0, 2.0, 2.0, 2.0);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:23,代码来源:LegendGraphic.java

示例3: testSerialization

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    // test a default instance
    DialBackground b1 = new DialBackground();
    DialBackground b2 = (DialBackground) TestUtilities.serialised(b1);
    assertEquals(b1, b2);

    // test a customised instance
    b1 = new DialBackground();
    b1.setPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f,
            Color.green));
    b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(
            GradientPaintTransformType.CENTER_VERTICAL));

    b2 = (DialBackground) TestUtilities.serialised(b1);
    assertEquals(b1, b2);
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:21,代码来源:DialBackgroundTest.java

示例4: WaterfallBarRenderer

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
/**
 * Constructs a new waterfall renderer.
 *
 * @param firstBarPaint  the color of the first bar (<code>null</code> not
 *                       permitted).
 * @param positiveBarPaint  the color for bars with positive values
 *                          (<code>null</code> not permitted).
 * @param negativeBarPaint  the color for bars with negative values
 *                          (<code>null</code> not permitted).
 * @param lastBarPaint  the color of the last bar (<code>null</code> not
 *                      permitted).
 */
public WaterfallBarRenderer(Paint firstBarPaint, Paint positiveBarPaint,
        Paint negativeBarPaint, Paint lastBarPaint) {
    super();
    ParamChecks.nullNotPermitted(firstBarPaint, "firstBarPaint");
    ParamChecks.nullNotPermitted(positiveBarPaint, "positiveBarPaint");
    ParamChecks.nullNotPermitted(negativeBarPaint, "negativeBarPaint");
    ParamChecks.nullNotPermitted(lastBarPaint, "lastBarPaint");
    this.firstBarPaint = firstBarPaint;
    this.lastBarPaint = lastBarPaint;
    this.positiveBarPaint = positiveBarPaint;
    this.negativeBarPaint = negativeBarPaint;
    setGradientPaintTransformer(new StandardGradientPaintTransformer(
            GradientPaintTransformType.CENTER_VERTICAL));
    setMinimumBarLength(1.0);
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:28,代码来源:WaterfallBarRenderer.java

示例5: BarRenderer

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
/**
 * Creates a new bar renderer with default settings.
 */
public BarRenderer() {
    super();
    this.base = 0.0;
    this.includeBaseInRange = true;
    this.itemMargin = DEFAULT_ITEM_MARGIN;
    this.drawBarOutline = false;
    this.maximumBarWidth = 1.0;
        // 100 percent, so it will not apply unless changed
    this.positiveItemLabelPositionFallback = null;
    this.negativeItemLabelPositionFallback = null;
    this.gradientPaintTransformer = new StandardGradientPaintTransformer();
    this.minimumBarLength = 0.0;
    setBaseLegendShape(new Rectangle2D.Double(-4.0, -4.0, 8.0, 8.0));
    this.barPainter = getDefaultBarPainter();
    this.shadowsVisible = getDefaultShadowsVisible();
    this.shadowPaint = Color.gray;
    this.shadowXOffset = 4.0;
    this.shadowYOffset = 4.0;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:23,代码来源:BarRenderer.java

示例6: createBarChart

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
@Override
protected JFreeChart createBarChart() throws JRException
{
	JFreeChart jfreeChart = super.createBarChart();

	CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
	//categoryPlot.setOrientation(PlotOrientation.HORIZONTAL);
	BarRenderer barRenderer = (BarRenderer)categoryPlot.getRenderer();
	barRenderer.setItemMargin(0);
	barRenderer.setGradientPaintTransformer(
		new StandardGradientPaintTransformer(GradientPaintTransformType.HORIZONTAL)
		);
	CategoryDataset categoryDataset = categoryPlot.getDataset();
	if (categoryDataset != null)
	{
		for (int i = 0; i < categoryDataset.getRowCount(); i++)
		{
			barRenderer.setSeriesPaint(i, ChartThemesConstants.EYE_CANDY_SIXTIES_GRADIENT_PAINTS.get(i));
		}
	}
	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:EyeCandySixtiesChartTheme.java

示例7: createStackedBarChart

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
@Override
protected JFreeChart createStackedBarChart() throws JRException
{
	JFreeChart jfreeChart = super.createStackedBarChart();

	CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
	//categoryPlot.setOrientation(PlotOrientation.HORIZONTAL);
	BarRenderer barRenderer = (BarRenderer)categoryPlot.getRenderer();
	barRenderer.setItemMargin(0);
	barRenderer.setGradientPaintTransformer(
		new StandardGradientPaintTransformer(GradientPaintTransformType.HORIZONTAL)
		);

	CategoryDataset categoryDataset = categoryPlot.getDataset();
	if (categoryDataset != null)
	{
		for (int i = 0; i < categoryDataset.getRowCount(); i++)
		{
			barRenderer.setSeriesPaint(i, ChartThemesConstants.EYE_CANDY_SIXTIES_GRADIENT_PAINTS.get(i));
		}
	}
	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:24,代码来源:EyeCandySixtiesChartTheme.java

示例8: createXYBarChart

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
@Override
protected JFreeChart createXYBarChart() throws JRException
{
	JFreeChart jfreeChart = super.createXYBarChart();
	XYPlot xyPlot = (XYPlot)jfreeChart.getPlot();
	XYBarRenderer renderer = (XYBarRenderer)xyPlot.getRenderer();
	renderer.setMargin(0.1);
	renderer.setGradientPaintTransformer(
			new StandardGradientPaintTransformer(GradientPaintTransformType.HORIZONTAL)
			);
	XYDataset xyDataset = xyPlot.getDataset();
	if (xyDataset != null)
	{
		for (int i = 0; i < xyDataset.getSeriesCount(); i++)
		{
			renderer.setSeriesPaint(i, ChartThemesConstants.EYE_CANDY_SIXTIES_GRADIENT_PAINTS.get(i));
		}
	}
	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:EyeCandySixtiesChartTheme.java

示例9: buildChart1

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
public void buildChart1() {
    setColorLimits();
    dataset = new DefaultValueDataset(10D);
    JFreeChart jfreechart = createStandardDialChart(chartTitle, variableName, dataset, chartBottonLimit, chartTopLimit, majorDivisions, minorDivisions);
    DialPlot dialplot = (DialPlot) jfreechart.getPlot();
    StandardDialRange standarddialrange = new StandardDialRange(redBottomLimit, redTopLimit, Color.red);
    standarddialrange.setInnerRadius(0.522D);
    standarddialrange.setOuterRadius(0.554D);
    dialplot.addLayer(standarddialrange);
    StandardDialRange standarddialrange1 = new StandardDialRange(yellowBottomLimit, yellowTopLimit, Color.orange);
    standarddialrange1.setInnerRadius(0.522D);
    standarddialrange1.setOuterRadius(0.554D);
    dialplot.addLayer(standarddialrange1);
    StandardDialRange standarddialrange2 = new StandardDialRange(greenBottomLimit, greenTopLimit, Color.green);
    standarddialrange2.setInnerRadius(0.522D);
    standarddialrange2.setOuterRadius(0.554D);
    dialplot.addLayer(standarddialrange2);
    GradientPaint gradientpaint = new GradientPaint(new Point(), new Color(255, 255, 255), new Point(), new Color(170, 170, 220));
    DialBackground dialbackground = new DialBackground(gradientpaint);
    dialbackground.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.VERTICAL));
    dialplot.setBackground(dialbackground);
    dialplot.removePointer(0);
    org.jfree.chart.plot.dial.DialPointer.Pointer pointer = new org.jfree.chart.plot.dial.DialPointer.Pointer();
    dialplot.addPointer(pointer);
    add(new ChartPanel(jfreechart));
}
 
开发者ID:PanamaHitek,项目名称:PanamaHitek_Arduino,代码行数:27,代码来源:PanamaHitek_SingleDialChart.java

示例10: buildChart2

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
public void buildChart2() {
    dataset = new DefaultValueDataset(0);
    DialPlot dialplot = new DialPlot();
    dialplot.setView(0.20D, 0.0D, 0.6D, 0.3D);
    dialplot.setDataset(dataset);
    ArcDialFrame arcdialframe = new ArcDialFrame(60D, 60D);
    arcdialframe.setInnerRadius(0.6D);
    arcdialframe.setOuterRadius(0.9D);
    arcdialframe.setForegroundPaint(Color.darkGray);
    arcdialframe.setStroke(new BasicStroke(3F));
    dialplot.setDialFrame(arcdialframe);
    GradientPaint gradientpaint = new GradientPaint(new Point(), new Color(255, 255, 255), new Point(), new Color(240, 240, 240));
    DialBackground dialbackground = new DialBackground(gradientpaint);
    dialbackground.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.VERTICAL));
    dialplot.addLayer(dialbackground);
    StandardDialScale standarddialscale = new StandardDialScale(chartBottonLimit, chartTopLimit, 115D, -50D, majorDivisions, minorDivisions);
    standarddialscale.setTickRadius(0.88D);
    standarddialscale.setTickLabelOffset(0.07D);
    dialplot.addScale(0, standarddialscale);
    org.jfree.chart.plot.dial.DialPointer.Pin pin = new org.jfree.chart.plot.dial.DialPointer.Pin();
    pin.setRadius(0.8D);
    dialplot.addLayer(pin);
    JFreeChart jfreechart = new JFreeChart(dialplot);
    jfreechart.setTitle(chartTitle);
    add(new ChartPanel(jfreechart));
}
 
开发者ID:PanamaHitek,项目名称:PanamaHitek_Arduino,代码行数:27,代码来源:PanamaHitek_SingleDialChart.java

示例11: initSubPubCountChart

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
public void initSubPubCountChart(){
	subpubCountChart = ChartFactory.createBarChart(
			SUB_PUB_COUNT_CATEGORY, 
			"category", 
			SUB_PUB_COUNT_CATEGORY, 
			subpubCountSet);
    CategoryPlot localCategoryPlot = (CategoryPlot)subpubCountChart.getPlot();
    localCategoryPlot.setOrientation(PlotOrientation.HORIZONTAL);
    localCategoryPlot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
    NumberAxis localNumberAxis = (NumberAxis)localCategoryPlot.getRangeAxis();
    localNumberAxis.setRange(0.0D, 100.0D);
    localNumberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    BarRenderer localBarRenderer = (BarRenderer)localCategoryPlot.getRenderer();

    localBarRenderer.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.HORIZONTAL));
    localBarRenderer.setDrawBarOutline(false);
    localBarRenderer.setLegendItemToolTipGenerator(new StandardCategorySeriesLabelGenerator("Tooltip: {0}"));
}
 
开发者ID:HoratiusTang,项目名称:EsperDist,代码行数:19,代码来源:StatComposite.java

示例12: initOprCountChart

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
public void initOprCountChart(){
	oprCountChart = ChartFactory.createBarChart(
			OPR_COUNT_CATEGORY, 
			"category", 
			OPR_COUNT_CATEGORY, 
			oprCountSet);
    CategoryPlot localCategoryPlot = (CategoryPlot)oprCountChart.getPlot();
    localCategoryPlot.setOrientation(PlotOrientation.HORIZONTAL);
    localCategoryPlot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
    NumberAxis localNumberAxis = (NumberAxis)localCategoryPlot.getRangeAxis();
    localNumberAxis.setRange(0.0D, 100.0D);
    localNumberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    BarRenderer localBarRenderer = (BarRenderer)localCategoryPlot.getRenderer();

    localBarRenderer.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.HORIZONTAL));
    localBarRenderer.setDrawBarOutline(false);
    localBarRenderer.setLegendItemToolTipGenerator(new StandardCategorySeriesLabelGenerator("Tooltip: {0}"));
}
 
开发者ID:HoratiusTang,项目名称:EsperDist,代码行数:19,代码来源:StatComposite.java

示例13: initTimeChart

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
public void initTimeChart(){
	timeChart = ChartFactory.createBarChart(
			TIME_CATEGORY, 
			"category", 
			TIME_CATEGORY, 
			timeSet);
    CategoryPlot localCategoryPlot = (CategoryPlot)timeChart.getPlot();
    localCategoryPlot.setOrientation(PlotOrientation.HORIZONTAL);
    localCategoryPlot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
    NumberAxis localNumberAxis = (NumberAxis)localCategoryPlot.getRangeAxis();
    localNumberAxis.setRange(0.0D, 100.0D);
    localNumberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    BarRenderer localBarRenderer = (BarRenderer)localCategoryPlot.getRenderer();

    localBarRenderer.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.HORIZONTAL));
    localBarRenderer.setDrawBarOutline(false);
    localBarRenderer.setLegendItemToolTipGenerator(new StandardCategorySeriesLabelGenerator("Tooltip: {0}"));
}
 
开发者ID:HoratiusTang,项目名称:EsperDist,代码行数:19,代码来源:StatComposite.java

示例14: initSubPubCountChart

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
public void initSubPubCountChart(){
	subpubCountChart = ChartFactory.createBarChart(
			SUB_PUB_COUNT_CATEGORY, 
			"category", 
			SUB_PUB_COUNT_CATEGORY, 
			subpubCountSet);
    CategoryPlot localCategoryPlot = (CategoryPlot)subpubCountChart.getPlot();
    localCategoryPlot.setOrientation(PlotOrientation.HORIZONTAL);
    localCategoryPlot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
    NumberAxis localNumberAxis = (NumberAxis)localCategoryPlot.getRangeAxis();
    //localNumberAxis.setRange(0.0D, 100.0D);
    localNumberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    BarRenderer localBarRenderer = (BarRenderer)localCategoryPlot.getRenderer();

    localBarRenderer.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.HORIZONTAL));
    localBarRenderer.setDrawBarOutline(false);
    localBarRenderer.setLegendItemToolTipGenerator(new StandardCategorySeriesLabelGenerator("Tooltip: {0}"));
}
 
开发者ID:HoratiusTang,项目名称:EsperDist,代码行数:19,代码来源:WorkerStatData.java

示例15: initOprCountChart

import org.jfree.ui.StandardGradientPaintTransformer; //导入依赖的package包/类
public void initOprCountChart(){
	oprCountChart = ChartFactory.createBarChart(
			OPR_COUNT_CATEGORY, 
			"category", 
			OPR_COUNT_CATEGORY, 
			oprCountSet);
    CategoryPlot localCategoryPlot = (CategoryPlot)oprCountChart.getPlot();
    localCategoryPlot.setOrientation(PlotOrientation.HORIZONTAL);
    localCategoryPlot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
    NumberAxis localNumberAxis = (NumberAxis)localCategoryPlot.getRangeAxis();
    //localNumberAxis.setRange(0.0D, 100.0D);
    localNumberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    BarRenderer localBarRenderer = (BarRenderer)localCategoryPlot.getRenderer();

    localBarRenderer.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.HORIZONTAL));
    localBarRenderer.setDrawBarOutline(false);
    localBarRenderer.setLegendItemToolTipGenerator(new StandardCategorySeriesLabelGenerator("Tooltip: {0}"));
}
 
开发者ID:HoratiusTang,项目名称:EsperDist,代码行数:19,代码来源:WorkerStatData.java


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