本文整理汇总了Java中org.jfree.chart.renderer.xy.XYItemRenderer.setSeriesOutlinePaint方法的典型用法代码示例。如果您正苦于以下问题:Java XYItemRenderer.setSeriesOutlinePaint方法的具体用法?Java XYItemRenderer.setSeriesOutlinePaint怎么用?Java XYItemRenderer.setSeriesOutlinePaint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.renderer.xy.XYItemRenderer
的用法示例。
在下文中一共展示了XYItemRenderer.setSeriesOutlinePaint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configurePlot
import org.jfree.chart.renderer.xy.XYItemRenderer; //导入方法依赖的package包/类
@Override
protected void configurePlot(Plot plot, JRChartPlot jrPlot)
{
super.configurePlot(plot, jrPlot);
if (plot instanceof CategoryPlot)
{
CategoryPlot categoryPlot = (CategoryPlot)plot;
CategoryItemRenderer categoryRenderer = categoryPlot.getRenderer();
CategoryDataset categoryDataset = categoryPlot.getDataset();
if (categoryDataset != null)
{
for (int i = 0; i < categoryDataset.getRowCount(); i++)
{
categoryRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT);
}
}
categoryPlot.setRangeGridlinePaint(ChartThemesConstants.GRAY_PAINT_134);
categoryPlot.setRangeGridlineStroke(new BasicStroke(1f));
categoryPlot.setDomainGridlinesVisible(false);
}
else if (plot instanceof XYPlot)
{
XYPlot xyPlot = (XYPlot)plot;
XYDataset xyDataset = xyPlot.getDataset();
if (xyDataset != null)
{
XYItemRenderer xyItemRenderer = xyPlot.getRenderer();
for (int i = 0; i < xyDataset.getSeriesCount(); i++)
{
xyItemRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT);
}
}
xyPlot.setRangeGridlinePaint(ChartThemesConstants.GRAY_PAINT_134);
xyPlot.setRangeGridlineStroke(new BasicStroke(1f));
xyPlot.setDomainGridlinesVisible(false);
xyPlot.setRangeZeroBaselineVisible(true);
}
}
示例2: configurePlot
import org.jfree.chart.renderer.xy.XYItemRenderer; //导入方法依赖的package包/类
@Override
protected void configurePlot(Plot plot, JRChartPlot jrPlot)
{
super.configurePlot(plot, jrPlot);
if(plot instanceof CategoryPlot)
{
CategoryPlot categoryPlot = (CategoryPlot)plot;
CategoryItemRenderer categoryRenderer = categoryPlot.getRenderer();
CategoryDataset categoryDataset = categoryPlot.getDataset();
if(categoryDataset != null)
{
for(int i = 0; i < categoryDataset.getRowCount(); i++)
{
categoryRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT);
}
}
categoryPlot.setRangeGridlinePaint(ChartThemesConstants.GRAY_PAINT_217);
categoryPlot.setRangeGridlineStroke(new BasicStroke(0.5f));
categoryPlot.setDomainGridlinesVisible(false);
categoryPlot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.UP_45);
}
else if(plot instanceof XYPlot)
{
XYPlot xyPlot = (XYPlot)plot;
XYItemRenderer xyItemRenderer = xyPlot.getRenderer();
XYDataset xyDataset = xyPlot.getDataset();
if(xyDataset != null)
{
for(int i = 0; i < xyDataset.getSeriesCount(); i++)
{
xyItemRenderer.setSeriesOutlinePaint(i, ChartThemesConstants.TRANSPARENT_PAINT);
}
}
xyPlot.setRangeGridlinePaint(ChartThemesConstants.GRAY_PAINT_217);
xyPlot.setRangeGridlineStroke(new BasicStroke(0.5f));
xyPlot.setDomainGridlinesVisible(false);
xyPlot.setRangeZeroBaselineVisible(true);
}
}
示例3: handleXYPlotSettings
import org.jfree.chart.renderer.xy.XYItemRenderer; //导入方法依赖的package包/类
protected void handleXYPlotSettings(XYPlot p, JRChartPlot jrPlot)
{
PlotSettings plotSettings = getPlotSettings();
XYItemRenderer xyItemRenderer = p.getRenderer();
Paint[] paintSequence = getPaintSequence(plotSettings, jrPlot);
if (paintSequence != null)
{
for (int i = 0; i < paintSequence.length; i++)
{
xyItemRenderer.setSeriesPaint(i, paintSequence[i]);
}
}
Paint[] outlinePaintSequence = getOutlinePaintSequence(plotSettings);
if (outlinePaintSequence != null)
{
for (int i = 0; i < outlinePaintSequence.length; i++)
{
xyItemRenderer.setSeriesOutlinePaint(i, outlinePaintSequence[i]);
}
}
Stroke[] strokeSequence = getStrokeSequence(plotSettings);
if (strokeSequence != null)
{
for (int i = 0; i < strokeSequence.length; i++)
{
xyItemRenderer.setSeriesStroke(i, strokeSequence[i]);
}
}
Stroke[] outlineStrokeSequence = getOutlineStrokeSequence(plotSettings);
if (outlineStrokeSequence != null)
{
for (int i = 0; i < outlineStrokeSequence.length; i++)
{
xyItemRenderer.setSeriesOutlineStroke(i, outlineStrokeSequence[i]);
}
}
Boolean domainGridlineVisible = plotSettings.getDomainGridlineVisible();
if (domainGridlineVisible == null || domainGridlineVisible.booleanValue())
{
PaintProvider domainGridlinePaint = plotSettings.getDomainGridlinePaint();
if (domainGridlinePaint != null)
{
p.setDomainGridlinePaint(domainGridlinePaint.getPaint());
}
Stroke domainGridlineStroke = plotSettings.getDomainGridlineStroke();
if (domainGridlineStroke != null)
{
p.setDomainGridlineStroke(domainGridlineStroke);
}
}
Boolean rangeGridlineVisible = plotSettings.getRangeGridlineVisible();
if (rangeGridlineVisible == null || rangeGridlineVisible.booleanValue())
{
PaintProvider rangeGridlinePaint = plotSettings.getRangeGridlinePaint();
if (rangeGridlinePaint != null)
{
p.setRangeGridlinePaint(rangeGridlinePaint.getPaint());
}
Stroke rangeGridlineStroke = plotSettings.getRangeGridlineStroke();
if (rangeGridlineStroke != null)
{
p.setRangeGridlineStroke(rangeGridlineStroke);
}
}
// p.setRangeZeroBaselineVisible(true);
}