/** @deprecated Replaced by {@link #setRotation(RotationEnum)}. */
 public void setRotation(Byte rotation) {
   setRotation(RotationEnum.getByValue(rotation));
 }
Example #2
0
  private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2) {
      modeValue = ModeEnum.getByValue(mode);
      horizontalAlignmentValue = HorizontalAlignEnum.getByValue(horizontalAlignment);
      verticalAlignmentValue = VerticalAlignEnum.getByValue(verticalAlignment);
      rotationValue = RotationEnum.getByValue(rotation);
      lineSpacingValue = LineSpacingEnum.getByValue(lineSpacing);
      scaleImageValue = ScaleImageEnum.getByValue(scaleImage);
      fillValue = FillEnum.getByValue(fill);

      mode = null;
      horizontalAlignment = null;
      verticalAlignment = null;
      rotation = null;
      lineSpacing = null;
      scaleImage = null;
      fill = null;
    }

    if (linePen == null) {
      linePen = new JRBasePen(this);
      JRPenUtil.setLinePenFromPen(pen, linePen);
      pen = null;
    }

    if (lineBox == null) {
      lineBox = new JRBaseLineBox(this);
      JRBoxUtil.setToBox(
          border,
          topBorder,
          leftBorder,
          bottomBorder,
          rightBorder,
          borderColor,
          topBorderColor,
          leftBorderColor,
          bottomBorderColor,
          rightBorderColor,
          padding,
          topPadding,
          leftPadding,
          bottomPadding,
          rightPadding,
          lineBox);
      border = null;
      topBorder = null;
      leftBorder = null;
      bottomBorder = null;
      rightBorder = null;
      borderColor = null;
      topBorderColor = null;
      leftBorderColor = null;
      bottomBorderColor = null;
      rightBorderColor = null;
      padding = null;
      topPadding = null;
      leftPadding = null;
      bottomPadding = null;
      rightPadding = null;
    }

    if (isStyledText != null) {
      markup =
          isStyledText.booleanValue() ? JRCommonText.MARKUP_STYLED_TEXT : JRCommonText.MARKUP_NONE;
      isStyledText = null;
    }

    if (paragraph == null) {
      paragraph = new JRBaseParagraph(this);
      paragraph.setLineSpacing(lineSpacingValue);
      lineSpacingValue = null;
    }
  }
  private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2) {
      horizontalAlignmentValue = HorizontalAlignEnum.getByValue(horizontalAlignment);
      verticalAlignmentValue = VerticalAlignEnum.getByValue(verticalAlignment);
      rotationValue = RotationEnum.getByValue(rotation);
      lineSpacingValue = LineSpacingEnum.getByValue(lineSpacing);

      horizontalAlignment = null;
      verticalAlignment = null;
      rotation = null;
      lineSpacing = null;
    }

    if (lineBox == null) {
      lineBox = new JRBaseLineBox(this);
      JRBoxUtil.setToBox(
          border,
          topBorder,
          leftBorder,
          bottomBorder,
          rightBorder,
          borderColor,
          topBorderColor,
          leftBorderColor,
          bottomBorderColor,
          rightBorderColor,
          padding,
          topPadding,
          leftPadding,
          bottomPadding,
          rightPadding,
          lineBox);
      border = null;
      topBorder = null;
      leftBorder = null;
      bottomBorder = null;
      rightBorder = null;
      borderColor = null;
      topBorderColor = null;
      leftBorderColor = null;
      bottomBorderColor = null;
      rightBorderColor = null;
      padding = null;
      topPadding = null;
      leftPadding = null;
      bottomPadding = null;
      rightPadding = null;
    }

    if (isStyledText != null) {
      markup =
          isStyledText.booleanValue() ? JRCommonText.MARKUP_STYLED_TEXT : JRCommonText.MARKUP_NONE;
      isStyledText = null;
    }

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

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