Java 类net.sf.jasperreports.engine.JRChartPlot 实例源码

项目:jasperreports    文件:EyeCandySixtiesChartTheme.java   
@Override
protected void configureChart(JFreeChart jfreeChart, JRChartPlot jrPlot) throws JRException
{
    super.configureChart(jfreeChart, jrPlot);

    TextTitle title = jfreeChart.getTitle();
    if (title != null)
    {
        RectangleInsets padding = title.getPadding();
        double bottomPadding = Math.max(padding.getBottom(), 15d);
        title.setPadding(padding.getTop(), padding.getLeft(), bottomPadding, padding.getRight());
    }

    GradientPaint gp = (GradientPaint)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.BACKGROUND_PAINT);

    jfreeChart.setBackgroundPaint(new GradientPaint(0f, 0f, gp.getColor1(), 0f, getChart().getHeight() * 0.7f, gp.getColor2(), false));
}
项目:jasperreports    文件:GenericChartTheme.java   
/**
 *
 */
protected void configureChart(JFreeChart jfreeChart, JRChartPlot jrPlot) throws JRException
{   
    Integer defaultBaseFontSize = (Integer)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.BASEFONT_SIZE);

    setChartBackground(jfreeChart);
    setChartTitle(jfreeChart, defaultBaseFontSize);
    setChartSubtitles(jfreeChart, defaultBaseFontSize);
    setChartLegend(jfreeChart, defaultBaseFontSize);
    setChartBorder(jfreeChart);

    Boolean isAntiAlias = (Boolean)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.CHART_ANTI_ALIAS);
    if (isAntiAlias != null)
        jfreeChart.setAntiAlias(isAntiAlias.booleanValue());

    Double padding = (Double)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.CHART_PADDING);
    UnitType unitType = (UnitType)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.UNIT_TYPE);
    if (padding != null && unitType != null)
    {
        double chartPadding = padding.doubleValue();
        jfreeChart.setPadding(new RectangleInsets(unitType, chartPadding, chartPadding, chartPadding, chartPadding));
    }
    configurePlot(jfreeChart.getPlot(), jrPlot);
}
项目:jasperreports    文件:SimpleChartTheme.java   
/**
 *
 */
protected void configureChart(JFreeChart jfreeChart, JRChartPlot jrPlot) throws JRException
{   
    ChartSettings chartSettings = getChartSettings();
    setChartBackground(jfreeChart);
    setChartTitle(jfreeChart);
    setChartSubtitles(jfreeChart);
    setChartLegend(jfreeChart);
    setChartBorder(jfreeChart);

    Boolean chartAntiAlias = chartSettings.getAntiAlias();
    if (chartAntiAlias != null)
        jfreeChart.setAntiAlias(chartAntiAlias.booleanValue());

    Boolean textAntiAlias = chartSettings.getTextAntiAlias();
    if (textAntiAlias != null)
        jfreeChart.setTextAntiAlias(textAntiAlias.booleanValue());

    RectangleInsets padding = chartSettings.getPadding();
    if (padding != null)
    {
        jfreeChart.setPadding(padding);//FIXMETHEME consider using linebox
    }
    configurePlot(jfreeChart.getPlot(), jrPlot);
}
项目:jasperreports    文件:SimpleChartTheme.java   
protected void setPlotDrawingDefaults(Plot p, JRChartPlot jrPlot)
    {
        PlotSettings plotSettings = getPlotSettings();
        Paint[] paintSequence = getPaintSequence(plotSettings, jrPlot); 
        Paint[] outlinePaintSequence = getOutlinePaintSequence(plotSettings);   
        Stroke[] strokeSequence = getStrokeSequence(plotSettings);
        Stroke[] outlineStrokeSequence = getOutlineStrokeSequence(plotSettings);

//      Shape[] defaultPlotShapeSequence = 
//          getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_SHAPE_SEQUENCE) != null ?
//          (Shape[])getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_SHAPE_SEQUENCE) :
//          DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE;

        p.setDrawingSupplier(new DefaultDrawingSupplier(
                paintSequence,
                outlinePaintSequence,
                strokeSequence,
                outlineStrokeSequence,
                DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE
                )
            );
    }
项目:jasperreports    文件:JRBaseBarPlot.java   
protected JRBaseBarPlot(JRChartPlot plot, JRChart chart, ChartCopyObjectFactory copyObjectFactory)
{
    super(plot, chart);

    JRBarPlot barPlot = plot instanceof JRBarPlot ? (JRBarPlot)plot : null;
    if (barPlot == null)
    {
        itemLabel = copyObjectFactory.copyItemLabel(null, chart);
    }
    else
    {
        categoryAxisLabelFont = barPlot.getCategoryAxisLabelFont();
        categoryAxisTickLabelFont = barPlot.getCategoryAxisTickLabelFont();
        valueAxisLabelFont = barPlot.getValueAxisLabelFont();
        valueAxisTickLabelFont = barPlot.getValueAxisTickLabelFont();
        itemLabel = copyObjectFactory.copyItemLabel(barPlot.getItemLabel(), chart);
    }
}
项目:jasperreports    文件:JRBaseMeterPlot.java   
/**
 * Constructs a copy of an existing meter.
 *
 * @param plot the plot to copy
 */
public JRBaseMeterPlot(JRChartPlot plot, JRChart chart)
{
    super(plot, chart);

    JRMeterPlot meterPlot = plot instanceof JRMeterPlot ? (JRMeterPlot)plot : null;
    if (meterPlot == null)
    {
        valueDisplay = new JRBaseValueDisplay(null, chart);
    }
    else
    {
        valueDisplay = new JRBaseValueDisplay(meterPlot.getValueDisplay(), chart);
        tickLabelFont = meterPlot.getTickLabelFont();
    }
}
项目:jasperreports    文件:JRBaseBar3DPlot.java   
protected JRBaseBar3DPlot(JRChartPlot plot, JRChart chart, ChartCopyObjectFactory copyObjectFactory)
{
    super(plot, chart);

    JRBar3DPlot barPlot = plot instanceof JRBar3DPlot ? (JRBar3DPlot)plot : null;
    if (barPlot == null)
    {
        itemLabel = copyObjectFactory.copyItemLabel(null, chart);
    }
    else
    {
        categoryAxisLabelFont = barPlot.getCategoryAxisLabelFont();
        categoryAxisTickLabelFont = getCategoryAxisTickLabelFont();
        valueAxisLabelFont = barPlot.getValueAxisLabelFont();
        valueAxisTickLabelFont = barPlot.getValueAxisTickLabelFont();
        itemLabel = copyObjectFactory.copyItemLabel(barPlot.getItemLabel(), chart);
    }
}
项目:jasperreports    文件:JRItemLabelFactory.java   
@Override
    public Object createObject(Attributes atts)
    {
        JRDesignItemLabel itemLabel = new JRDesignItemLabel(null, ((JRChartPlot)digester.peek()).getChart());

        String color = atts.getValue(ATTRIBUTE_color);
        if (color != null && color.length() > 0)
        {
            itemLabel.setColor(JRColorUtil.getColor(color, null));
        }

        String backgroundColor = atts.getValue(ATTRIBUTE_backgroundColor);
        if (backgroundColor != null && backgroundColor.length() > 0)
        {
            itemLabel.setBackgroundColor(JRColorUtil.getColor(backgroundColor, null));
        }

//      String mask = atts.getValue(ATTRIBUTE_mask);
//      if (mask != null && mask.length() > 0)
//      {
//          itemLabel.setMask(mask);
//      }
        return itemLabel;
    }
项目:jasperreports    文件:JRValueDisplayFactory.java   
@Override
public Object createObject(Attributes atts)
{
    JRDesignValueDisplay valueDisplay = new JRDesignValueDisplay(null, ((JRChartPlot)digester.peek()).getChart());

    String color = atts.getValue(ATTRIBUTE_color);
    if (color != null && color.length() > 0)
    {
        valueDisplay.setColor(JRColorUtil.getColor(color, null));
    }

    String mask = atts.getValue(ATTRIBUTE_mask);
    if (mask != null && mask.length() > 0)
    {
        valueDisplay.setMask(mask);
    }

    return valueDisplay;
}
项目:jasperreports    文件:JRBaseChartPlot.java   
/**
 *
 */
@SuppressWarnings("deprecation")
protected JRBaseChartPlot(JRChartPlot plot, JRChart chart)
{
    this.chart = chart;

    if (plot != null) 
    {
        backcolor = plot.getOwnBackcolor();
        orientationValue = plot.getOrientationValue();
        backgroundAlphaFloat = plot.getBackgroundAlphaFloat();
        foregroundAlphaFloat = plot.getForegroundAlphaFloat();
        labelRotationDouble = plot.getLabelRotationDouble();
        seriesColors = new TreeSet<JRSeriesColor>(plot.getSeriesColors());
    }
    else
    {
        seriesColors = new TreeSet<JRSeriesColor>();
    }
}
项目:jasperreports    文件:JRApiWriter.java   
/**
 *
 *
 */
private void writePlot( JRChartPlot plot, String plotName)
{
    if(plot != null)
    {
        write( plotName + ".setBackcolor({0});\n", plot.getOwnBackcolor());

        if (plot.getOrientationValue() != null && plot.getOrientationValue().getOrientation() != PlotOrientation.VERTICAL)
        {
            write( plotName + ".setOrientation(PlotOrientation.{0});\n", plot.getOrientationValue());
        }

        write( plotName + ".setBackgroundAlpha({0});\n", plot.getBackgroundAlphaFloat());
        write( plotName + ".setForegroundAlpha({0});\n", plot.getForegroundAlphaFloat());
        //write( plotName + ".setLabelRotation({0});\n", plot.getLabelRotationDouble());//FIXMECHART check the deprecation of this method; looks incomplete
        writeSeriesColors( plot.getSeriesColors(), plotName);
        flush();
    }
}
项目:ireport-fork    文件:SeriesColorsPanel.java   
@SuppressWarnings("unchecked")
public void setSeriescolors(List seriesColors) {

    setInit(true);
    try {
        this.seriescolors = new ArrayList();
        for(Iterator it = seriesColors.iterator(); it.hasNext();)
        {
            this.seriescolors.add(((JRChartPlot.JRSeriesColor) it.next()).clone());
        }


        DefaultListModel dlm = (DefaultListModel)jList1.getModel();
        dlm.removeAllElements();

        for(Iterator it = this.seriescolors.iterator(); it.hasNext();)
        {
            JRChartPlot.JRSeriesColor c =(JRChartPlot.JRSeriesColor)it.next();
            dlm.addElement(c.getColor());
        }

    } finally {
       setInit(false); 
    }
}
项目:jasperreports    文件:GenericChartTheme.java   
/**
 *
 */
protected void configurePlot(Plot p, JRChartPlot jrPlot)
{
    RectangleInsets defaultPlotInsets = (RectangleInsets)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_INSETS);
    Paint defaultPlotOutlinePaint = (Paint)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_PAINT);
    Stroke defaultPlotOutlineStroke = (Stroke)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_STROKE);
    Boolean defaultPlotOutlineVisible = (Boolean)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_VISIBLE);
    if (defaultPlotInsets != null) 
        p.setInsets(defaultPlotInsets);

    if (defaultPlotOutlineVisible != null) 
    {
        if (defaultPlotOutlineVisible.booleanValue())
        {
            if (defaultPlotOutlinePaint != null)
                p.setOutlinePaint(defaultPlotOutlinePaint);

            if (defaultPlotOutlineStroke != null)
                p.setOutlineStroke(defaultPlotOutlineStroke);

            p.setOutlineVisible(true);
        }
        else
        {
            p.setOutlineVisible(false);
        }
    }

    setPlotBackground(p, jrPlot);
    if (p instanceof CategoryPlot)
    {
        handleCategoryPlotSettings((CategoryPlot)p, jrPlot);
    }

    setPlotDrawingDefaults(p, jrPlot);
}
项目:jasperreports    文件:GenericChartTheme.java   
protected void handleCategoryPlotSettings(CategoryPlot p, JRChartPlot jrPlot)
{
    Double defaultPlotLabelRotation = (Double)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_LABEL_ROTATION);
    PlotOrientation defaultPlotOrientation = (PlotOrientation)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_ORIENTATION);
    // Handle rotation of the category labels.
    CategoryAxis axis = p.getDomainAxis();
    boolean hasRotation = jrPlot.getLabelRotationDouble() != null || defaultPlotLabelRotation != null;
    if(hasRotation)
    {
        double labelRotation = jrPlot.getLabelRotationDouble() != null ? 
                jrPlot.getLabelRotationDouble().doubleValue() :
                defaultPlotLabelRotation.doubleValue();

        if (labelRotation == 90)
        {
            axis.setCategoryLabelPositions(CategoryLabelPositions.DOWN_90);
        }
        else if (labelRotation == -90) {
            axis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
        }
        else if (labelRotation < 0)
        {
            axis.setCategoryLabelPositions(
                    CategoryLabelPositions.createUpRotationLabelPositions( (-labelRotation / 180.0) * Math.PI));
        }
        else if (labelRotation > 0)
        {
            axis.setCategoryLabelPositions(
                    CategoryLabelPositions.createDownRotationLabelPositions((labelRotation / 180.0) * Math.PI));
        }
    }

    if (defaultPlotOrientation != null)
    {
        p.setOrientation(defaultPlotOrientation);
    }
}
项目:jasperreports    文件:AegeanChartTheme.java   
@Override
protected void configureChart(JFreeChart jfreeChart, JRChartPlot jrPlot) throws JRException
{

    super.configureChart(jfreeChart, jrPlot);
    TextTitle title = jfreeChart.getTitle();

    if(title != null)
    {

        RectangleInsets padding = title.getPadding();
        double bottomPadding = Math.max(padding.getBottom(), 15d);
        title.setPadding(padding.getTop(), padding.getLeft(), bottomPadding, padding.getRight());
    }
}
项目:jasperreports    文件:SimpleChartTheme.java   
/**
 *
 */
protected void configurePlot(Plot plot, JRChartPlot jrPlot)
{
    RectangleInsets padding = getPlotSettings().getPadding();
    if (padding != null) 
        plot.setInsets(padding);

    Boolean plotOutlineVisible = getPlotSettings().getOutlineVisible();
    if (plotOutlineVisible == null || plotOutlineVisible.booleanValue()) 
    {
        Paint outlinePaint = getPlotSettings().getOutlinePaint() == null ? null : getPlotSettings().getOutlinePaint().getPaint();
        if (outlinePaint != null)
            plot.setOutlinePaint(outlinePaint);

        Stroke plotOutlineStroke = getPlotSettings().getOutlineStroke();
        if (plotOutlineStroke != null)
            plot.setOutlineStroke(plotOutlineStroke);

        plot.setOutlineVisible(true);
    }
    else
    {
        plot.setOutlineVisible(false);
    }

    setPlotBackground(plot, jrPlot);
    setPlotDrawingDefaults(plot, jrPlot);

    if (plot instanceof CategoryPlot)
    {
        handleCategoryPlotSettings((CategoryPlot)plot, jrPlot);
    }

    if (plot instanceof XYPlot)
    {
        handleXYPlotSettings((XYPlot)plot, jrPlot);
    }

}
项目:jasperreports    文件:JRBasePie3DPlot.java   
protected JRBasePie3DPlot(JRChartPlot chartPlot, JRChart chart, ChartCopyObjectFactory copyObjectFactory)
{
    super(chartPlot, chart);

    JRPie3DPlot pie3DPlot = chartPlot instanceof JRPie3DPlot ? (JRPie3DPlot)chartPlot : null;

    if (pie3DPlot == null)
    {
        itemLabel = copyObjectFactory.copyItemLabel(null, chart);
    }
    else
    {
        itemLabel = copyObjectFactory.copyItemLabel(pie3DPlot.getItemLabel(), chart);
    }
}
项目:jasperreports    文件:JRBaseThermometerPlot.java   
/**
 * Constructs a new thermometer plot that is a copy of an existing one.
 *
 * @param plot the plot to copy
 * @param chart the parent chart
 */
public JRBaseThermometerPlot(JRChartPlot plot, JRChart chart)
{
    super(plot, chart);

    JRThermometerPlot thermoPlot = plot instanceof JRThermometerPlot ? (JRThermometerPlot)plot : null;
    if (thermoPlot == null)
    {
        valueDisplay = new JRBaseValueDisplay(null, chart);
    }
    else
    {
        valueDisplay = new JRBaseValueDisplay(thermoPlot.getValueDisplay(), chart);
    }
}
项目:jasperreports    文件:JRBaseBubblePlot.java   
/**
 * 
 */
public JRBaseBubblePlot(JRChartPlot plot, JRChart chart)
{
    super(plot, chart);

    JRBubblePlot bubblePlot = plot instanceof JRBubblePlot ? (JRBubblePlot)plot : null;
    if (bubblePlot != null)
    {
        xAxisLabelFont = bubblePlot.getXAxisLabelFont();
        xAxisTickLabelFont = bubblePlot.getXAxisTickLabelFont();
        yAxisLabelFont = bubblePlot.getYAxisLabelFont();
        yAxisTickLabelFont = bubblePlot.getYAxisTickLabelFont();
    }
}
项目:jasperreports    文件:JRBaseHighLowPlot.java   
/**
 *
 */
public JRBaseHighLowPlot(JRChartPlot plot, JRChart chart)
{
    super(plot, chart);

    JRHighLowPlot highLowPlot = plot instanceof JRHighLowPlot ? (JRHighLowPlot)plot : null;
    if (highLowPlot != null)
    {
        timeAxisLabelFont = highLowPlot.getTimeAxisLabelFont();
        timeAxisTickLabelFont = highLowPlot.getTimeAxisTickLabelFont();
        valueAxisLabelFont = highLowPlot.getValueAxisLabelFont();
        valueAxisTickLabelFont = highLowPlot.getValueAxisTickLabelFont();
    }
}
项目:jasperreports    文件:JRBaseAreaPlot.java   
/**
 * 
 */
public JRBaseAreaPlot(JRChartPlot plot, JRChart chart)
{
    super(plot, chart);

    JRAreaPlot areaPlot = plot instanceof JRAreaPlot ? (JRAreaPlot)plot : null;
    if (areaPlot != null)//FIXMECHART make a common interface and try copy props that are common to different plots
    {
        categoryAxisLabelFont = areaPlot.getCategoryAxisLabelFont(); 
        categoryAxisTickLabelFont = areaPlot.getCategoryAxisTickLabelFont();
        valueAxisLabelFont = areaPlot.getValueAxisLabelFont();
        valueAxisTickLabelFont = areaPlot.getValueAxisTickLabelFont();
    }
}
项目:jasperreports    文件:JRBaseCandlestickPlot.java   
/**
 *
 */
protected JRBaseCandlestickPlot(JRChartPlot plot, JRChart chart)
{
    super(plot, chart);

    JRCandlestickPlot candlestickPlot = plot instanceof JRCandlestickPlot ? (JRCandlestickPlot)plot : null;
    if (candlestickPlot != null)
    {
        timeAxisLabelFont = candlestickPlot.getTimeAxisLabelFont();
        timeAxisTickLabelFont = candlestickPlot.getTimeAxisTickLabelFont();
        valueAxisLabelFont = candlestickPlot.getValueAxisLabelFont();
        valueAxisTickLabelFont = candlestickPlot.getValueAxisTickLabelFont();
    }
}
项目:jasperreports    文件:JRBasePiePlot.java   
protected JRBasePiePlot(JRChartPlot chartPlot, JRChart chart, ChartCopyObjectFactory copyObjectFactory)
{
    super(chartPlot, chart);

    JRPiePlot piePlot = chartPlot instanceof JRPiePlot ? (JRPiePlot)chartPlot : null;

    if (piePlot == null)
    {
        itemLabel = copyObjectFactory.copyItemLabel(null, chart);
    }
    else
    {
        itemLabel = copyObjectFactory.copyItemLabel(piePlot.getItemLabel(), chart);
    }
}
项目:jasperreports    文件:JRBaseTimeSeriesPlot.java   
/**
 * 
 */
protected JRBaseTimeSeriesPlot(JRChartPlot plot, JRChart chart)
{
    super(plot, chart);

    JRTimeSeriesPlot timeSeriesPlot = plot instanceof JRTimeSeriesPlot ? (JRTimeSeriesPlot)plot : null;
    if (timeSeriesPlot != null)
    {//FIXMETHEME you could copy more things
        timeAxisLabelFont = timeSeriesPlot.getTimeAxisLabelFont();
        timeAxisTickLabelFont = timeSeriesPlot.getTimeAxisTickLabelFont();
        valueAxisLabelFont = timeSeriesPlot.getValueAxisLabelFont();
        valueAxisTickLabelFont = timeSeriesPlot.getValueAxisTickLabelFont();
    }
}
项目:jasperreports    文件:JRBaseScatterPlot.java   
/**
 * 
 */
public JRBaseScatterPlot(JRChartPlot plot, JRChart chart)
{
    super(plot, chart);

    JRScatterPlot scatterPlot = plot instanceof JRScatterPlot ? (JRScatterPlot)plot : null;
    if (scatterPlot != null)
    {
        xAxisLabelFont = scatterPlot.getXAxisLabelFont();
        xAxisTickLabelFont = scatterPlot.getXAxisTickLabelFont();
        yAxisLabelFont = scatterPlot.getYAxisLabelFont();
        yAxisTickLabelFont = scatterPlot.getYAxisTickLabelFont();
    }
}
项目:jasperreports    文件:JRBaseLinePlot.java   
/**
 * 
 */
public JRBaseLinePlot(JRChartPlot plot, JRChart chart)
{
    super(plot, chart);

    JRLinePlot linePlot = plot instanceof JRLinePlot ? (JRLinePlot)plot : null;
    if (linePlot != null)
    {
        categoryAxisLabelFont = linePlot.getCategoryAxisLabelFont(); 
        categoryAxisTickLabelFont = linePlot.getCategoryAxisTickLabelFont();
        valueAxisLabelFont = linePlot.getValueAxisLabelFont();
        valueAxisTickLabelFont = linePlot.getValueAxisTickLabelFont();
    }
}
项目:jasperreports    文件:JRBaseChartPlot.java   
/**
 *
 */
@SuppressWarnings("deprecation")
protected JRBaseChartPlot(JRChartPlot plot, JRBaseObjectFactory factory)
{
    factory.put(plot, this);

    chart = (JRChart)factory.getVisitResult(plot.getChart());

    backcolor = plot.getOwnBackcolor();
    orientationValue = plot.getOrientationValue();
    backgroundAlphaFloat = plot.getBackgroundAlphaFloat();
    foregroundAlphaFloat = plot.getForegroundAlphaFloat();
    labelRotationDouble = plot.getLabelRotationDouble();
    seriesColors = new TreeSet<JRSeriesColor>(plot.getSeriesColors());
}
项目:jasperreports    文件:JRChartPlotFactory.java   
@Override
@SuppressWarnings("deprecation")
public Object createObject(Attributes atts)
{
    JRChartPlot plot = (JRChartPlot) digester.peek();

    Color color = JRColorUtil.getColor(atts.getValue(JRXmlConstants.ATTRIBUTE_backcolor), Color.black);
    if (color != null)
    {
        plot.setBackcolor(color);
    }

    PlotOrientationEnum orientation = PlotOrientationEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_orientation));
    if (orientation != null)
    {
        plot.setOrientation(orientation);
    }
    String foregroundAlpha = atts.getValue(JRXmlConstants.ATTRIBUTE_foregroundAlpha);
    if (foregroundAlpha != null && foregroundAlpha.length() > 0)
    {
        plot.setForegroundAlpha(Float.valueOf(foregroundAlpha));
    }
    String backgroundAlpha = atts.getValue(JRXmlConstants.ATTRIBUTE_backgroundAlpha);
    if (backgroundAlpha != null && backgroundAlpha.length() > 0)
    {
        plot.setBackgroundAlpha(Float.valueOf(backgroundAlpha));
    }
    String labelRotation = atts.getValue(JRXmlConstants.ATTRIBUTE_labelRotation);
    if (labelRotation != null && labelRotation.length() > 0)
    {
        plot.setLabelRotation(Double.valueOf(labelRotation));
    }
    return plot;
}
项目:jasperreports    文件:JRXmlWriter.java   
/**
 *
 *
 */
@SuppressWarnings("deprecation")
private void writePlot(JRChartPlot plot) throws IOException
{
    writer.startElement(JRXmlConstants.ELEMENT_plot);
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_backcolor, plot.getOwnBackcolor());
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_orientation, plot.getOrientationValue(), PlotOrientationEnum.VERTICAL);
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_backgroundAlpha, plot.getBackgroundAlphaFloat());
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_foregroundAlpha, plot.getForegroundAlphaFloat());
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_labelRotation, plot.getLabelRotationDouble());
    writeSeriesColors(plot.getSeriesColors());

    writer.closeElement();
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public Color getForecolor(JRChartPlot plot)
{
    JRChart chart = plot.getChart();
    if (chart != null)
    {
        return getForecolor(chart);
    }
    return Color.black;
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public Color getBackcolor(JRChartPlot plot)
{
    Color ownBackcolor = plot.getOwnBackcolor();
    if (ownBackcolor != null)
    {
        return ownBackcolor;
    }
    JRChart chart = plot.getChart();
    if (chart != null)
    {
        return getBackcolor(chart);
    }
    return Color.white;
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public Color getCategoryAxisLabelColor(JRCategoryAxisFormat axisFormat, JRChartPlot plot)
{
    Color ownCategoryAxisLabelColor = axisFormat.getOwnCategoryAxisLabelColor();
    if (ownCategoryAxisLabelColor != null) 
    {
        return ownCategoryAxisLabelColor;
    }
    return getForecolor(plot);
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public Color getCategoryAxisTickLabelColor(JRCategoryAxisFormat axisFormat, JRChartPlot plot)
{
    Color ownCategoryAxisTickLabelColor = axisFormat.getOwnCategoryAxisTickLabelColor();
    if (ownCategoryAxisTickLabelColor != null)
    {
        return ownCategoryAxisTickLabelColor;
    }
    return getForecolor(plot);
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public Color getCategoryAxisLineColor(JRCategoryAxisFormat axisFormat, JRChartPlot plot)
{
    Color ownCategoryAxisLineColor = axisFormat.getOwnCategoryAxisLineColor();
    if (ownCategoryAxisLineColor != null)
    {
        return ownCategoryAxisLineColor;
    }
    return getForecolor(plot);
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public Color getValueAxisLabelColor(JRValueAxisFormat axisFormat, JRChartPlot plot)
{
    Color ownValueAxisLabelColor = axisFormat.getOwnValueAxisLabelColor();
    if (ownValueAxisLabelColor != null)
    {
        return ownValueAxisLabelColor;
    }
    return getForecolor(plot);
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public Color getValueAxisTickLabelColor(JRValueAxisFormat axisFormat, JRChartPlot plot)
{
    Color ownValueAxisTickLabelColor = axisFormat.getOwnValueAxisTickLabelColor();
    if (ownValueAxisTickLabelColor != null) 
    {
        return ownValueAxisTickLabelColor;
    }
    return getForecolor(plot);
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public Color getValueAxisLineColor(JRValueAxisFormat axisFormat, JRChartPlot plot)
{
    Color ownValueAxisLineColor = axisFormat.getOwnValueAxisLineColor();
    if (ownValueAxisLineColor != null) 
    {
        return ownValueAxisLineColor;
    }
    return getForecolor(plot);
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public Color getXAxisLabelColor(JRXAxisFormat axisFormat, JRChartPlot plot)
{
    Color ownXAxisLabelColor = axisFormat.getOwnXAxisLabelColor();
    if (ownXAxisLabelColor != null) 
    {
        return ownXAxisLabelColor;
    }
    return getForecolor(plot);
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public Color getXAxisTickLabelColor(JRXAxisFormat axisFormat, JRChartPlot plot)
{
    Color ownXAxisTickLabelColor = axisFormat.getOwnXAxisTickLabelColor();
    if (ownXAxisTickLabelColor != null) 
    {
        return ownXAxisTickLabelColor;
    }
    return getForecolor(plot);
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public Color getXAxisLineColor(JRXAxisFormat axisFormat, JRChartPlot plot)
{
    Color ownXAxisLineColor = axisFormat.getOwnXAxisLineColor();
    if (ownXAxisLineColor != null) 
    {
        return ownXAxisLineColor;
    }
    return getForecolor(plot);
}