本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例12: AbstractRendererLegendShapeSetter
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
public AbstractRendererLegendShapeSetter(AbstractRenderer renderer)
{
this.renderer = renderer;
}
示例13: AbstractRendererSeriesShapeSetter
import org.jfree.chart.renderer.AbstractRenderer; //导入依赖的package包/类
public AbstractRendererSeriesShapeSetter(AbstractRenderer renderer)
{
this.renderer = renderer;
}
示例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);
}
}
}
示例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);
}
}