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

项目:jasperreports    文件:LegendSettings.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        positionValue = EdgeEnum.getByValue(position);

        position = null;

    }

    if (blockFrame != null && frame == null)// check version?
    {
        frame = new BlockFrameWrapper(blockFrame);
        blockFrame = null;
    }
}
项目:jasperreports    文件:JRBaseMeterPlot.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
        {
            shapeValue = MeterShapeEnum.getByValue(shape);
            meterAngleInteger = Integer.valueOf(meterAngle);
            tickIntervalDouble = Double.valueOf(tickInterval);
        }
        else
        {
            shapeValue = MeterShapeEnum.getByValue(shapeByte);
            shapeByte = null;
        }
    }
}
项目:jasperreports    文件:JRBasePiePlot.java   
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    // this fixes a problem with JFreeChart that changed the default value of isCircular at some point.
    // look into Git history for details
    ObjectInputStream.GetField fields = in.readFields();
    //the following lines are required because above we called readFields(), not defaultReadObject()
    labelFormat = (String) fields.get("labelFormat", null);
    legendLabelFormat = (String) fields.get("legendLabelFormat", null);
    itemLabel = (JRItemLabel) fields.get("itemLabel", null);
    showLabels = (Boolean) fields.get("showLabels", null);

    PSEUDO_SERIAL_VERSION_UID = fields.get("PSEUDO_SERIAL_VERSION_UID", 0);
    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
    {
        boolean circularField = fields.get("isCircular", true);
        circular = Boolean.valueOf(circularField);
    }
    else
    {
        circular = (Boolean) fields.get("circular", null);
    }
}
项目:jasperreports    文件:JRBaseReport.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    styleResolver = StyleResolver.getInstance();

    if (detail != null)
    {
        detailSection = new JRBaseSection(detail);
        detail = null;
    }

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        whenNoDataTypeValue = WhenNoDataTypeEnum.getByValue(whenNoDataType);
        printOrderValue = PrintOrderEnum.getByValue(printOrder);
        orientationValue = OrientationEnum.getByValue(orientation);
    }
}
项目:jasperreports    文件:JRBaseChartPlot.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();
    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
    {
        backgroundAlphaFloat = new Float(backgroundAlpha);
        foregroundAlphaFloat = new Float(foregroundAlpha);
        labelRotationDouble = new Double(labelRotation);
    }
    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_4_1_3)
    {
        orientationValue = PlotOrientationEnum.getByValue(orientation);

        orientation = null;
    }
}
项目:jasperreports    文件:JRBaseTextField.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (linkType == null)
    {
         linkType = JRHyperlinkHelper.getLinkType(HyperlinkTypeEnum.getByValue(hyperlinkType));
    }

    if (linkTarget == null)
    {
         linkTarget = JRHyperlinkHelper.getLinkTarget(HyperlinkTargetEnum.getByValue(hyperlinkTarget));
    }

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        evaluationTimeValue = EvaluationTimeEnum.getByValue(evaluationTime);
    }
}
项目:jasperreports    文件:JRXmlTemplateWriter.java   
/**
 * Writes the template to the output writer.
 * 
 * @throws IOException
 */
public void write() throws IOException
{
    writer.writeProlog(encoding);

    XmlNamespace namespace;
    if (isNewerVersionOrEqual(JRConstants.VERSION_6_3_0))
    {
        namespace = JASPERTEMPLATE_NAMESPACE;
    }
    else
    {
        writer.writePublicDoctype(JRXmlConstants.TEMPLATE_ELEMENT_ROOT, 
                JRXmlConstants.JASPERTEMPLATE_PUBLIC_ID, JRXmlConstants.JASPERTEMPLATE_SYSTEM_ID);
        namespace = null;
    }

    writer.startElement(JRXmlConstants.TEMPLATE_ELEMENT_ROOT, namespace);
    writeIncludedTemplates();
    writeStyles();
    writer.closeElement();
}
项目:jasperreports    文件:JRXmlWriter.java   
/**
 *
 */
private void writeScriptlet(JRScriptlet scriptlet) throws IOException
{
    if(isNewerVersionOrEqual(JRConstants.VERSION_3_1_4))
    {
        writer.startElement(JRXmlConstants.ELEMENT_scriptlet);
        writer.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_name, scriptlet.getName());
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_class, scriptlet.getValueClassName());

        writeProperties(scriptlet);

        writer.writeCDATAElement(JRXmlConstants.ELEMENT_scriptletDescription, scriptlet.getDescription());

        writer.closeElement();
    }
}
项目:jasperreports    文件:JRXmlWriter.java   
/**
 *
 */
private void writeParameter(JRParameter parameter) throws IOException
{
    writer.startElement(JRXmlConstants.ELEMENT_parameter);
    writer.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_name, parameter.getName());
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_class, parameter.getValueClassName());
    if(isNewerVersionOrEqual(JRConstants.VERSION_3_1_4))
    {
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_nestedType, parameter.getNestedTypeName());
    }
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_isForPrompting, parameter.isForPrompting(), true);
    if(isNewerVersionOrEqual(JRConstants.VERSION_6_3_1))
    {
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_evaluationTime, parameter.getEvaluationTime());
    }

    writeProperties(parameter);

    writer.writeCDATAElement(JRXmlConstants.ELEMENT_parameterDescription, parameter.getDescription());
    writeExpression(JRXmlConstants.ELEMENT_defaultValueExpression, parameter.getDefaultValueExpression(), false);

    writer.closeElement();
}
项目:jasperreports    文件:JRXmlWriter.java   
/**
 *
 */
private void writeTextElement(JRTextElement textElement) throws IOException
{
    writer.startElement(JRXmlConstants.ELEMENT_textElement);
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_textAlignment, textElement.getOwnHorizontalTextAlign());
    VerticalTextAlignEnum vTextAlign = textElement.getOwnVerticalTextAlign();
    if (isOlderVersionThan(JRConstants.VERSION_6_2_1))
    {
        vTextAlign = vTextAlign == VerticalTextAlignEnum.JUSTIFIED ? VerticalTextAlignEnum.TOP : vTextAlign;
    }
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_verticalAlignment, vTextAlign);
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_rotation, textElement.getOwnRotationValue());
    if (isOlderVersionThan(JRConstants.VERSION_4_0_2))
    {
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_lineSpacing, textElement.getParagraph().getLineSpacing());
    }
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_markup, textElement.getOwnMarkup());

    writeFont(textElement);
    writeParagraph(textElement.getParagraph());

    writer.closeElement(true);
}
项目:jasperreports    文件:ComponentsXmlWriter.java   
protected void writeTableCell(JRComponentElement componentElement, Cell cell, String name, 
        JRXmlWriter reportWriter) throws IOException
{
    if (cell != null)
    {
        JRXmlWriteHelper writer = reportWriter.getXmlWriteHelper();
        writer.startElement(name);
        reportWriter.writeStyleReferenceAttr(cell);
        writer.addAttribute("height", cell.getHeight());
        writer.addAttribute("rowSpan", cell.getRowSpan());

        if (isNewerVersionOrEqual(componentElement, reportWriter, JRConstants.VERSION_4_8_0))
        {
            reportWriter.writeProperties(cell);
        }
        reportWriter.writeBox(cell.getLineBox(), JRXmlWriter.JASPERREPORTS_NAMESPACE);
        reportWriter.writeChildElements(cell);

        writer.closeElement();//cell
    }
}
项目:jasperreports    文件:JRXmlWriter.java   
/**
 *
 */
public void writePieChart(JRChart chart) throws IOException
{
    writer.startElement(JRXmlConstants.ELEMENT_pieChart, getNamespace());
    writeChart(chart);
    writePieDataset((JRPieDataset) chart.getDataset());

    // write plot
    JRPiePlot plot = (JRPiePlot) chart.getPlot();
    writer.startElement(JRXmlConstants.ELEMENT_piePlot);
    if(isNewerVersionOrEqual(JRConstants.VERSION_3_7_5))
    {
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_isShowLabels, plot.getShowLabels());
    }
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_isCircular, plot.getCircular());
    if(isNewerVersionOrEqual(JRConstants.VERSION_3_1_0))
    {
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_labelFormat, plot.getLabelFormat());
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_legendLabelFormat, plot.getLegendLabelFormat());
    }
    writePlot(chart.getPlot());
    writeItemLabel(plot.getItemLabel());
    writer.closeElement();

    writer.closeElement();
}
项目:jasperreports    文件:JRXmlWriter.java   
private void writeTimeSeriesPlot(JRTimeSeriesPlot plot) throws IOException
{
    writer.startElement(JRXmlConstants.ELEMENT_timeSeriesPlot);
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_isShowLines, plot.getShowLines());
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_isShowShapes, plot.getShowShapes());

    writePlot( plot );

    writeExpression(JRXmlConstants.ELEMENT_timeAxisLabelExpression, plot.getTimeAxisLabelExpression(), false);
    writeAxisFormat(JRXmlConstants.ELEMENT_timeAxisFormat, plot.getTimeAxisLabelFont(), plot.getOwnTimeAxisLabelColor(),
            plot.getTimeAxisTickLabelFont(), plot.getOwnTimeAxisTickLabelColor(),
            plot.getTimeAxisTickLabelMask(), plot.getTimeAxisVerticalTickLabels(), plot.getOwnTimeAxisLineColor());
    writeExpression(JRXmlConstants.ELEMENT_valueAxisLabelExpression, plot.getValueAxisLabelExpression(), false);
    writeAxisFormat(JRXmlConstants.ELEMENT_valueAxisFormat, plot.getValueAxisLabelFont(), plot.getOwnValueAxisLabelColor(),
            plot.getValueAxisTickLabelFont(), plot.getOwnValueAxisTickLabelColor(),
            plot.getValueAxisTickLabelMask(), plot.getValueAxisVerticalTickLabels(), plot.getOwnValueAxisLineColor());
    if(isNewerVersionOrEqual(JRConstants.VERSION_3_5_0))
    {
        writeExpression(JRXmlConstants.ELEMENT_domainAxisMinValueExpression, plot.getDomainAxisMinValueExpression(), false);
        writeExpression(JRXmlConstants.ELEMENT_domainAxisMaxValueExpression, plot.getDomainAxisMaxValueExpression(), false);
        writeExpression(JRXmlConstants.ELEMENT_rangeAxisMinValueExpression, plot.getRangeAxisMinValueExpression(), false);
        writeExpression(JRXmlConstants.ELEMENT_rangeAxisMaxValueExpression, plot.getRangeAxisMaxValueExpression(), false);
    }

    writer.closeElement();
}
项目:jasperreports    文件:JRXmlWriter.java   
/**
 *
 */

private void writeAreaPlot(JRAreaPlot plot) throws IOException
{
    writer.startElement(JRXmlConstants.ELEMENT_areaPlot);
    writePlot(plot);

    writeExpression(JRXmlConstants.ELEMENT_categoryAxisLabelExpression, plot.getCategoryAxisLabelExpression(), false);
    writeCategoryAxisFormat(plot.getCategoryAxisLabelFont(), plot.getOwnCategoryAxisLabelColor(),
            plot.getCategoryAxisTickLabelFont(), plot.getOwnCategoryAxisTickLabelColor(),
            plot.getCategoryAxisTickLabelMask(), plot.getCategoryAxisVerticalTickLabels(), 
            plot.getCategoryAxisTickLabelRotation(), plot.getOwnCategoryAxisLineColor());
    writeExpression(JRXmlConstants.ELEMENT_valueAxisLabelExpression, plot.getValueAxisLabelExpression(), false);
    writeAxisFormat(JRXmlConstants.ELEMENT_valueAxisFormat, plot.getValueAxisLabelFont(), plot.getOwnValueAxisLabelColor(),
            plot.getValueAxisTickLabelFont(), plot.getOwnValueAxisTickLabelColor(),
            plot.getValueAxisTickLabelMask(), plot.getValueAxisVerticalTickLabels(), plot.getOwnValueAxisLineColor());
    if(isNewerVersionOrEqual(JRConstants.VERSION_3_5_0))
    {
        writeExpression(JRXmlConstants.ELEMENT_domainAxisMinValueExpression, plot.getDomainAxisMinValueExpression(), false);
        writeExpression(JRXmlConstants.ELEMENT_domainAxisMaxValueExpression, plot.getDomainAxisMaxValueExpression(), false);
        writeExpression(JRXmlConstants.ELEMENT_rangeAxisMinValueExpression, plot.getRangeAxisMinValueExpression(), false);
        writeExpression(JRXmlConstants.ELEMENT_rangeAxisMaxValueExpression, plot.getRangeAxisMaxValueExpression(), false);
    }

    writer.closeElement();
}
项目:jasperreports    文件:JRXmlWriter.java   
protected void writeCrosstabRowGroup(JRCrosstabRowGroup group) throws IOException
{
    writer.startElement(JRCrosstabRowGroupFactory.ELEMENT_rowGroup);
    writer.addEncodedAttribute(JRCrosstabGroupFactory.ATTRIBUTE_name, group.getName());
    writer.addAttribute(JRCrosstabRowGroupFactory.ATTRIBUTE_width, group.getWidth());
    writer.addAttribute(JRCrosstabGroupFactory.ATTRIBUTE_totalPosition, group.getTotalPositionValue(), CrosstabTotalPositionEnum.NONE);
    writer.addAttribute(JRCrosstabRowGroupFactory.ATTRIBUTE_headerPosition, group.getPositionValue(), CrosstabRowPositionEnum.TOP);
    if (isNewerVersionOrEqual(JRConstants.VERSION_6_2_0))
    {
        writer.addAttribute(JRCrosstabGroupFactory.ATTRIBUTE_mergeHeaderCells, group.getMergeHeaderCells());
    }

    writeBucket(group.getBucket());

    JRCellContents header = group.getHeader();
    writer.startElement(JRCrosstabRowGroupFactory.ELEMENT_crosstabRowHeader);
    writeCellContents(header);
    writer.closeElement();

    JRCellContents totalHeader = group.getTotalHeader();
    writer.startElement(JRCrosstabRowGroupFactory.ELEMENT_crosstabTotalRowHeader);
    writeCellContents(totalHeader);
    writer.closeElement();

    writer.closeElement();
}
项目:jasperreports    文件:BarcodeComponent.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    GetField fields = in.readFields();
    this.PSEUDO_SERIAL_VERSION_UID = fields.get("PSEUDO_SERIAL_VERSION_UID", 0);
    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        byte evaluationTime = fields.get("evaluationTime", (byte) 0);
        this.evaluationTimeValue = EvaluationTimeEnum.getByValue(evaluationTime);
    }
    else
    {
        this.evaluationTimeValue = (EvaluationTimeEnum) fields.get("evaluationTimeValue", null);
    }
    this.evaluationGroup = (String) fields.get("evaluationGroup", null);
    this.codeExpression = (JRExpression) fields.get("codeExpression", null);

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_6_0_2
            && this instanceof Barcode4jComponent)
    {
        //up to 6.0.0 this class had several fields that were moved to Barcode4jComponent in 6.0.2.
        //copying the values to the Barcode4jComponent fields.
        Barcode4jComponent barcode4jComponent = (Barcode4jComponent) this;
        barcode4jComponent.copyBarcodeComponentFields(fields);
    }
}
项目:jasperreports    文件:JRXmlWriter.java   
protected void writeCellContents(JRCellContents contents) throws IOException
{
    if (contents != null)
    {
        writer.startElement(JRCellContentsFactory.ELEMENT_cellContents);
        writer.addAttribute(JRCellContentsFactory.ATTRIBUTE_backcolor, contents.getBackcolor());
        writer.addAttribute(JRCellContentsFactory.ATTRIBUTE_mode, contents.getModeValue());
        writeStyleReferenceAttr(contents);

        if(isNewerVersionOrEqual(JRConstants.VERSION_4_8_0))
        {
            writeProperties(contents);
        }
        writeBox(contents.getLineBox());

        writeChildElements(contents);

        writer.closeElement();
    }
}
项目:jasperreports    文件:JRXmlWriter.java   
public void writeDataset(JRDataset dataset) throws IOException
{
    writer.startElement(JRXmlConstants.ELEMENT_subDataset, getNamespace());
    writer.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_name, dataset.getName());
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_scriptletClass, dataset.getScriptletClass());
    writer.addEncodedAttribute(JRXmlConstants.ATTRIBUTE_resourceBundle, dataset.getResourceBundle());
    writer.addAttribute(JRXmlConstants.ATTRIBUTE_whenResourceMissingType, dataset.getWhenResourceMissingTypeValue(), WhenResourceMissingTypeEnum.NULL);
    if (
        isNewerVersionOrEqual(JRConstants.VERSION_4_6_0)
        && !isExcludeUuids() 
        )
    {
        writer.addAttribute(JRXmlConstants.ATTRIBUTE_uuid, dataset.getUUID().toString());
    }

    writeProperties(dataset);

    if (isNewerVersionOrEqual(JRConstants.VERSION_6_3_1))
    {
        writePropertyExpressions(dataset.getPropertyExpressions());
    }

    writeDatasetContents(dataset);

    writer.closeElement();
}
项目:jasperreports    文件:JRXmlWriter.java   
protected void writeDataLevelBucket(DataLevelBucket bucket) throws IOException
{
    writer.startElement(JRXmlConstants.ELEMENT_axisLevelBucket);
    writer.addAttribute(JRCrosstabBucketFactory.ATTRIBUTE_order, bucket.getOrder(), BucketOrder.ASCENDING);
    writer.addAttribute(JRCrosstabMeasureFactory.ATTRIBUTE_class, bucket.getValueClassName());
    writer.writeExpression(JRCrosstabBucketFactory.ELEMENT_bucketExpression, bucket.getExpression());
    if(isNewerVersionOrEqual(JRConstants.VERSION_6_4_3))
    {
        writer.writeExpression(JRXmlConstants.ELEMENT_MULTI_AXIS_BUCKET_LABEL_EXPRESSION, bucket.getLabelExpression());
    }
    writer.writeExpression(JRCrosstabBucketFactory.ELEMENT_comparatorExpression, bucket.getComparatorExpression());

    List<DataLevelBucketProperty> bucketProperties = bucket.getBucketProperties();
    if (bucketProperties != null)
    {
        for (DataLevelBucketProperty bucketProperty : bucketProperties)
        {
            JRExpression valueExpression = bucketProperty.getExpression();
            String expressionText = valueExpression == null ? "" : valueExpression.getText();
            writer.writeCDATAElement(JRXmlConstants.ELEMENT_bucketProperty, getNamespace(), expressionText, 
                    JRXmlConstants.ATTRIBUTE_name, bucketProperty.getName());
        }
    }

    writer.closeElement();//JRXmlConstants.ELEMENT_axisLevelBucket
}
项目:jasperreports    文件:JRDesignTextField.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (linkType == null)
    {
         linkType = JRHyperlinkHelper.getLinkType(HyperlinkTypeEnum.getByValue(hyperlinkType));
    }

    if (linkTarget == null)
    {
         linkTarget = JRHyperlinkHelper.getLinkTarget(HyperlinkTargetEnum.getByValue(hyperlinkTarget));
    }

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        evaluationTimeValue = EvaluationTimeEnum.getByValue(evaluationTime);
    }
}
项目:jasperreports    文件:BarcodeXmlWriter.java   
@SuppressWarnings("deprecation")
protected void writeExpression(String name, JRExpression expression, boolean writeClass)  throws IOException
{
    if(versionComparator.compare(version, JRConstants.VERSION_4_1_1) >= 0 )
    {
        xmlWriteHelper.writeExpression(name, expression);
    }
    else
    {
        xmlWriteHelper.writeExpression(name, expression, writeClass);
    }
}
项目:jasperreports    文件:HtmlComponent.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_6_0_2)
    {
        horizontalImageAlign = net.sf.jasperreports.engine.type.HorizontalAlignEnum.getHorizontalImageAlignEnum(horizontalAlign);
        verticalImageAlign = net.sf.jasperreports.engine.type.VerticalAlignEnum.getVerticalImageAlignEnum(verticalAlign);

        horizontalAlign = null;
        verticalAlign = null;
    }
}
项目:jasperreports    文件:JRBasePie3DPlot.java   
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
    {
        depthFactorDouble = new Double(depthFactor);
        circular = Boolean.valueOf(isCircular);
    }
}
项目:jasperreports    文件:JRBaseThermometerPlot.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
    {
        valueLocationObject = ValueLocationEnum.getByValue(valueLocation);
    }
    else if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        valueLocationObject = ValueLocationEnum.getByValue(valueLocationByte);
        valueLocationByte = null;
    }
}
项目:jasperreports    文件:JRBaseHighLowPlot.java   
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
    {
        showOpenTicks = Boolean.valueOf(isShowOpenTicks);
        showCloseTicks = Boolean.valueOf(isShowCloseTicks);
    }
}
项目:jasperreports    文件:JRBaseCandlestickPlot.java   
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
    {
        showVolume = Boolean.valueOf(isShowVolume);
    }
}
项目:jasperreports    文件:JRBaseCrosstabMeasure.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        percentageType = CrosstabPercentageEnum.getByValue(percentageOfType);
        calculationValue = CalculationEnum.getByValue(calculation);
    }
}
项目:jasperreports    文件:JRBaseTimeSeriesPlot.java   
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
    {
        showShapes = Boolean.valueOf(isShowShapes);
        showLines = Boolean.valueOf(isShowLines);
    }
}
项目:jasperreports    文件:JRBaseScatterPlot.java   
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
    {
        showShapes = Boolean.valueOf(isShowShapes);
        showLines = Boolean.valueOf(isShowLines);
    }
}
项目:jasperreports    文件:JRBaseLinePlot.java   
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
    {
        showShapes = Boolean.valueOf(isShowShapes);
        showLines = Boolean.valueOf(isShowLines);
    }
}
项目:jasperreports    文件:JRBaseBar3DPlot.java   
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_0)
    {
        xOffsetDouble = new Double(xOffset);
        yOffsetDouble = new Double(yOffset);
        showLabels = Boolean.valueOf(isShowLabels);
    }
}
项目:jasperreports    文件:JRMeterInterval.java   
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
    {
        alphaDouble = new Double(alpha);
    }
}
项目:jasperreports    文件:ComponentsXmlWriter.java   
@Override
public boolean isToWrite(JRComponentElement componentElement, JRXmlWriter reportWriter) 
{
    ComponentKey componentKey = componentElement.getComponentKey();
    if (ComponentsExtensionsRegistryFactory.NAMESPACE.equals(componentKey.getNamespace()))
    {
        if(ComponentsExtensionsRegistryFactory.SORT_COMPONENT_NAME.equals(componentKey.getName())
                || ComponentsExtensionsRegistryFactory.MAP_COMPONENT_NAME.equals(componentKey.getName()))
        {
            return isNewerVersionOrEqual(componentElement, reportWriter, JRConstants.VERSION_4_1_1);
        }
        else if(ComponentsExtensionsRegistryFactory.SPIDERCHART_COMPONENT_NAME.equals(componentKey.getName()))
        {
            return isNewerVersionOrEqual(componentElement, reportWriter, JRConstants.VERSION_3_7_4);
        }
        else if(ComponentsExtensionsRegistryFactory.TABLE_COMPONENT_NAME.equals(componentKey.getName()))
        {
            return isNewerVersionOrEqual(componentElement, reportWriter, JRConstants.VERSION_3_7_2);
        }
        else if(ComponentsExtensionsRegistryFactory.LIST_COMPONENT_NAME.equals(componentKey.getName()))
        {
            return isNewerVersionOrEqual(componentElement, reportWriter, JRConstants.VERSION_3_5_1);
        }
        else if(ComponentsExtensionsRegistryFactory.BARBECUE_COMPONENT_NAME.equals(componentKey.getName())
                || isBarcode4jName(componentKey.getName()))
        {
            return isNewerVersionOrEqual(componentElement, reportWriter, JRConstants.VERSION_3_5_2);
        }
    }

    return true;
}
项目:jasperreports    文件:JRBaseChart.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (linkType == null)
    {
         linkType = JRHyperlinkHelper.getLinkType(HyperlinkTypeEnum.getByValue(hyperlinkType));
    }

    if (linkTarget == null)
    {
         linkTarget = JRHyperlinkHelper.getLinkTarget(HyperlinkTargetEnum.getByValue(hyperlinkTarget));
    }

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        evaluationTimeValue = EvaluationTimeEnum.getByValue(evaluationTime);

        if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
        {
            legendPositionValue = EdgeEnum.getByValue(legendPosition);
            titlePositionValue = EdgeEnum.getByValue(titlePosition);
            showLegend = Boolean.valueOf(isShowLegend);
        }
        else
        {
            legendPositionValue = EdgeEnum.getByValue(legendPositionByte);
            titlePositionValue = EdgeEnum.getByValue(titlePositionByte);

            legendPositionByte = null;
            titlePositionByte = null;
        }

    }
}
项目:jasperreports    文件:JRBasePen.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        lineStyleValue = LineStyleEnum.getByValue(lineStyle);

        lineStyle = null;
    }
}
项目:jasperreports    文件:JRBaseCrosstabColumnGroup.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        positionValue = CrosstabColumnPositionEnum.getByValue(position);
    }
}
项目:jasperreports    文件:JRBaseGenericElement.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        evaluationTimeValue = EvaluationTimeEnum.getByValue(evaluationTime);
    }
}
项目:jasperreports    文件:JRTemplateImage.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        horizontalAlignmentValue = net.sf.jasperreports.engine.type.HorizontalAlignEnum.getByValue(horizontalAlignment);
        verticalAlignmentValue = net.sf.jasperreports.engine.type.VerticalAlignEnum.getByValue(verticalAlignment);
        scaleImageValue = ScaleImageEnum.getByValue(scaleImage);
        onErrorTypeValue = OnErrorTypeEnum.getByValue(onErrorType);

        horizontalAlignment = null;
        verticalAlignment = null;
        scaleImage = null;
    }

    if (linkType == null)
    {
         linkType = JRHyperlinkHelper.getLinkType(HyperlinkTypeEnum.getByValue(hyperlinkType));
    }

    if (linkTarget == null)
    {
         linkTarget = JRHyperlinkHelper.getLinkTarget(HyperlinkTargetEnum.getByValue(hyperlinkTarget));
    }

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_6_0_2)
    {
        horizontalImageAlign = net.sf.jasperreports.engine.type.HorizontalAlignEnum.getHorizontalImageAlignEnum(horizontalAlignmentValue);
        verticalImageAlign = net.sf.jasperreports.engine.type.VerticalAlignEnum.getVerticalImageAlignEnum(verticalAlignmentValue);

        horizontalAlignmentValue = null;
        verticalAlignmentValue = null;
    }
}
项目:jasperreports    文件:JRBaseDataset.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        whenResourceMissingTypeValue = WhenResourceMissingTypeEnum.getByValue(whenResourceMissingType);
    }
}
项目:jasperreports    文件:JRBaseFont.java   
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_5_5_2)
    {
        fontsize = fontSize == null ? null : fontSize.floatValue();

        fontSize = null;
    }
}