本文整理汇总了Java中org.jfree.chart.renderer.AbstractRenderer类的典型用法代码示例。如果您正苦于以下问题:Java AbstractRenderer类的具体用法?Java AbstractRenderer怎么用?Java AbstractRenderer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractRenderer类属于org.jfree.chart.renderer包,在下文中一共展示了AbstractRenderer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: applyToXYItemRenderer
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
/**
* Applies the settings of this theme to the specified renderer.
*
* @param renderer the renderer (<code>null</code> not permitted).
*/
protected void applyToXYItemRenderer(XYItemRenderer renderer) {
if (renderer == null) {
throw new IllegalArgumentException("Null 'renderer' argument.");
}
if (renderer instanceof AbstractRenderer) {
applyToAbstractRenderer((AbstractRenderer) renderer);
}
renderer.setBaseItemLabelFont(this.regularFont);
renderer.setBaseItemLabelPaint(this.itemLabelPaint);
if (renderer instanceof XYBarRenderer) {
XYBarRenderer br = (XYBarRenderer) renderer;
br.setBarPainter(this.xyBarPainter);
br.setShadowVisible(this.shadowVisible);
}
}
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:21,代码来源:StandardChartTheme.java
示例2: setColours
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
protected void setColours(final AbstractRenderer renderer, final KeyedValues2D dataset) {
final int tmpRowDim = dataset.getRowCount();
for (int i = 0; i < tmpRowDim; i++) {
final Comparable<?> tmpKey = dataset.getRowKey(i);
final Paint tmpPaint = this.getColour(tmpKey);
renderer.setSeriesPaint(i, tmpPaint);
}
}
开发者ID:optimatika,项目名称:ojAlgo-extensions,代码行数:9,代码来源:AbstractData2D.java
示例3: applyToAbstractRenderer
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
/**
* Applies the attributes for this theme to an {@link AbstractRenderer}.
*
* @param renderer the renderer (<code>null</code> not permitted).
*/
protected void applyToAbstractRenderer(AbstractRenderer renderer) {
if (renderer.getAutoPopulateSeriesPaint()) {
renderer.clearSeriesPaints(false);
}
if (renderer.getAutoPopulateSeriesStroke()) {
renderer.clearSeriesStrokes(false);
}
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:14,代码来源:StandardChartTheme.java
示例4: applyToXYItemRenderer
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
/**
* Applies the settings of this theme to the specified renderer.
*
* @param renderer the renderer (<code>null</code> not permitted).
*/
protected void applyToXYItemRenderer(XYItemRenderer renderer) {
ParamChecks.nullNotPermitted(renderer, "renderer");
if (renderer instanceof AbstractRenderer) {
applyToAbstractRenderer((AbstractRenderer) renderer);
}
renderer.setBaseItemLabelFont(this.regularFont);
renderer.setBaseItemLabelPaint(this.itemLabelPaint);
if (renderer instanceof XYBarRenderer) {
XYBarRenderer br = (XYBarRenderer) renderer;
br.setBarPainter(this.xyBarPainter);
br.setShadowVisible(this.shadowVisible);
}
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:19,代码来源:StandardChartTheme.java
示例5: applyToAbstractRenderer
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
/**
* Applies the attributes for this theme to an {@link AbstractRenderer}.
*
* @param renderer the renderer ({@code null} not permitted).
*/
protected void applyToAbstractRenderer(AbstractRenderer renderer) {
if (renderer.getAutoPopulateSeriesPaint()) {
renderer.clearSeriesPaints(false);
}
if (renderer.getAutoPopulateSeriesStroke()) {
renderer.clearSeriesStrokes(false);
}
}
开发者ID:jfree,项目名称:jfreechart,代码行数:14,代码来源:StandardChartTheme.java
示例6: applyToCategoryItemRenderer
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
/**
* Applies the settings of this theme to the specified renderer.
*
* @param renderer the renderer ({@code null} not permitted).
*/
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer) {
Args.nullNotPermitted(renderer, "renderer");
if (renderer instanceof AbstractRenderer) {
applyToAbstractRenderer((AbstractRenderer) renderer);
}
renderer.setDefaultItemLabelFont(this.regularFont);
renderer.setDefaultItemLabelPaint(this.itemLabelPaint);
// now we handle some special cases - yes, UGLY code alert!
// BarRenderer
if (renderer instanceof BarRenderer) {
BarRenderer br = (BarRenderer) renderer;
br.setBarPainter(this.barPainter);
br.setShadowVisible(this.shadowVisible);
br.setShadowPaint(this.shadowPaint);
}
// StatisticalBarRenderer
if (renderer instanceof StatisticalBarRenderer) {
StatisticalBarRenderer sbr = (StatisticalBarRenderer) renderer;
sbr.setErrorIndicatorPaint(this.errorIndicatorPaint);
}
// MinMaxCategoryRenderer
if (renderer instanceof MinMaxCategoryRenderer) {
MinMaxCategoryRenderer mmcr = (MinMaxCategoryRenderer) renderer;
mmcr.setGroupPaint(this.errorIndicatorPaint);
}
}
开发者ID:jfree,项目名称:jfreechart,代码行数:39,代码来源:StandardChartTheme.java
示例7: applyToXYItemRenderer
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
/**
* Applies the settings of this theme to the specified renderer.
*
* @param renderer the renderer ({@code null} not permitted).
*/
protected void applyToXYItemRenderer(XYItemRenderer renderer) {
Args.nullNotPermitted(renderer, "renderer");
if (renderer instanceof AbstractRenderer) {
applyToAbstractRenderer((AbstractRenderer) renderer);
}
renderer.setDefaultItemLabelFont(this.regularFont);
renderer.setDefaultItemLabelPaint(this.itemLabelPaint);
if (renderer instanceof XYBarRenderer) {
XYBarRenderer br = (XYBarRenderer) renderer;
br.setBarPainter(this.xyBarPainter);
br.setShadowVisible(this.shadowVisible);
}
}
开发者ID:jfree,项目名称:jfreechart,代码行数:19,代码来源:StandardChartTheme.java
示例8: customize
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
@Override
public void customize(JFreeChart jfc, JRChart jrc)
{
Plot plot = jfc.getPlot();
ItemsCounter itemsCounter = new LegendItemsCounter(plot);
SeriesNameProvider seriesNameProvider = null;
Object renderer = null;
if (plot instanceof XYPlot)
{
XYPlot xyPlot = jfc.getXYPlot();
renderer = xyPlot.getRenderer();
seriesNameProvider = new XYPlotSeriesNameProvider(xyPlot);
}
else if (plot instanceof CategoryPlot)
{
CategoryPlot categoryPlot = jfc.getCategoryPlot();
renderer = categoryPlot.getRenderer();
seriesNameProvider = new CategorySeriesNameProvider(categoryPlot);
}
Integer legendItemIndex = CustomizerUtil.resolveIndex(this, itemsCounter, seriesNameProvider);
if (
legendItemIndex != null
&& renderer instanceof AbstractRenderer
)
{
ShapeSetter shapeSetter = new AbstractRendererLegendShapeSetter((AbstractRenderer)renderer);
if (legendItemIndex == -1)
{
updateItems(itemsCounter, shapeSetter);
}
else
{
updateItem(itemsCounter, shapeSetter, legendItemIndex);
}
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:40,代码来源:LegendShapeCustomizer.java
示例9: setNiceSeriesColors
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
public static void setNiceSeriesColors(CategoryDataset paramCategoryDataset, AbstractRenderer paramAbstractRenderer) {
Color[] arrayOfColor = ColorUtil.getDarkColors(ColorUtil.getPastelColors(), 0.35D);
for (int i = 0; i < paramCategoryDataset.getRowCount(); i++) {
Color localColor = arrayOfColor[(i % arrayOfColor.length)];
paramAbstractRenderer.setSeriesPaint(i, localColor);
}
}
开发者ID:markkohdev,项目名称:oStorybook,代码行数:8,代码来源:ChartUtil.java
示例10: getOrCreateRenderer
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
AbstractRenderer getOrCreateRenderer(final IScope scope, final String serieid) {
if (RendererSet.containsKey(serieid)) { return RendererSet.get(serieid); }
final AbstractRenderer newrenderer = createRenderer(scope, serieid);
RendererSet.put(serieid, newrenderer);
return newrenderer;
}
开发者ID:gama-platform,项目名称:gama,代码行数:8,代码来源:ChartJFreeChartOutput.java
示例11: applyToCategoryItemRenderer
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
/**
* Applies the settings of this theme to the specified renderer.
*
* @param renderer the renderer (<code>null</code> not permitted).
*/
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer) {
ParamChecks.nullNotPermitted(renderer, "renderer");
if (renderer instanceof AbstractRenderer) {
applyToAbstractRenderer((AbstractRenderer) renderer);
}
renderer.setBaseItemLabelFont(this.regularFont);
renderer.setBaseItemLabelPaint(this.itemLabelPaint);
// now we handle some special cases - yes, UGLY code alert!
// BarRenderer
if (renderer instanceof BarRenderer) {
BarRenderer br = (BarRenderer) renderer;
br.setBarPainter(this.barPainter);
br.setShadowVisible(this.shadowVisible);
br.setShadowPaint(this.shadowPaint);
}
// BarRenderer3D
if (renderer instanceof BarRenderer3D) {
BarRenderer3D br3d = (BarRenderer3D) renderer;
br3d.setWallPaint(this.wallPaint);
}
// LineRenderer3D
if (renderer instanceof LineRenderer3D) {
LineRenderer3D lr3d = (LineRenderer3D) renderer;
lr3d.setWallPaint(this.wallPaint);
}
// StatisticalBarRenderer
if (renderer instanceof StatisticalBarRenderer) {
StatisticalBarRenderer sbr = (StatisticalBarRenderer) renderer;
sbr.setErrorIndicatorPaint(this.errorIndicatorPaint);
}
// MinMaxCategoryRenderer
if (renderer instanceof MinMaxCategoryRenderer) {
MinMaxCategoryRenderer mmcr = (MinMaxCategoryRenderer) renderer;
mmcr.setGroupPaint(this.errorIndicatorPaint);
}
}
开发者ID:mdzio,项目名称:ccu-historian,代码行数:50,代码来源:StandardChartTheme.java
示例12: AbstractRendererLegendShapeSetter
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
public AbstractRendererLegendShapeSetter(AbstractRenderer renderer)
{
this.renderer = renderer;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:5,代码来源:LegendShapeCustomizer.java
示例13: AbstractRendererSeriesShapeSetter
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
public AbstractRendererSeriesShapeSetter(AbstractRenderer renderer)
{
this.renderer = renderer;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:5,代码来源:LineDotShapeCustomizer.java
示例14: customize
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
@Override
public void customize(JFreeChart jfc, JRChart jrc)
{
Plot plot = jfc.getPlot();
ItemsCounter itemsCounter = null;
SeriesNameProvider seriesNameProvider = null;
Object renderer = null;
if (plot instanceof XYPlot)
{
XYPlot xyPlot = jfc.getXYPlot();
renderer = xyPlot.getRenderer();
itemsCounter = new XYPlotSeriesCounter(xyPlot);
seriesNameProvider = new XYPlotSeriesNameProvider(xyPlot);
}
else if (plot instanceof CategoryPlot)
{
CategoryPlot categoryPlot = jfc.getCategoryPlot();
renderer = categoryPlot.getRenderer();
itemsCounter = new CategoryCounter(categoryPlot);
seriesNameProvider = new CategorySeriesNameProvider(categoryPlot);
}
Integer seriesItemIndex = CustomizerUtil.resolveIndex(this, itemsCounter, seriesNameProvider);
if (
seriesItemIndex != null
&& renderer instanceof AbstractRenderer
)
{
ShapeSetter shapeSetter = new AbstractRendererSeriesShapeSetter((AbstractRenderer)renderer);
if (seriesItemIndex == -1)
{
updateItems(itemsCounter, shapeSetter);
}
else
{
updateItem(itemsCounter, shapeSetter, seriesItemIndex);
}
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:42,代码来源:LineDotShapeCustomizer.java
示例15: applyToCategoryItemRenderer
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
/**
* Applies the settings of this theme to the specified renderer.
*
* @param renderer the renderer (<code>null</code> not permitted).
*/
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer) {
if (renderer == null) {
throw new IllegalArgumentException("Null 'renderer' argument.");
}
if (renderer instanceof AbstractRenderer) {
applyToAbstractRenderer((AbstractRenderer) renderer);
}
renderer.setBaseItemLabelFont(this.regularFont);
renderer.setBaseItemLabelPaint(this.itemLabelPaint);
// now we handle some special cases - yes, UGLY code alert!
// BarRenderer
if (renderer instanceof BarRenderer) {
BarRenderer br = (BarRenderer) renderer;
br.setBarPainter(this.barPainter);
br.setShadowVisible(this.shadowVisible);
br.setShadowPaint(this.shadowPaint);
}
// BarRenderer3D
if (renderer instanceof BarRenderer3D) {
BarRenderer3D br3d = (BarRenderer3D) renderer;
br3d.setWallPaint(this.wallPaint);
}
// LineRenderer3D
if (renderer instanceof LineRenderer3D) {
LineRenderer3D lr3d = (LineRenderer3D) renderer;
lr3d.setWallPaint(this.wallPaint);
}
// StatisticalBarRenderer
if (renderer instanceof StatisticalBarRenderer) {
StatisticalBarRenderer sbr = (StatisticalBarRenderer) renderer;
sbr.setErrorIndicatorPaint(this.errorIndicatorPaint);
}
// MinMaxCategoryRenderer
if (renderer instanceof MinMaxCategoryRenderer) {
MinMaxCategoryRenderer mmcr = (MinMaxCategoryRenderer) renderer;
mmcr.setGroupPaint(this.errorIndicatorPaint);
}
}
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:52,代码来源:StandardChartTheme.java
注:本文中的org.jfree.chart.renderer.AbstractRenderer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论