Java 类net.sf.jasperreports.engine.type.RotationEnum 实例源码

项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public RotationEnum getRotationValue(JRCommonText element)
{
    RotationEnum ownRotation = element.getOwnRotationValue();
    if (ownRotation != null)
    {
        return ownRotation;
    }
    JRStyle style = getBaseStyle(element);
    if (style != null)
    {
        RotationEnum rotation = style.getRotationValue();
        if (rotation != null)
        {
            return rotation;
        }
    }
    return RotationEnum.NONE;
}
项目:jasperreports    文件:XlsxCellHelper.java   
/**
 * 
 *
public XlsxBorderHelper getBorderHelper() 
{
    return borderHelper;
}

/**
 *
 */
public void exportHeader(
        JRExporterGridCell gridCell,
        int rowIndex,
        int colIndex, 
        int maxColIndex,
        JRXlsAbstractExporter.SheetInfo sheetInfo
        ) 
{
    exportHeader(
            gridCell,
            rowIndex, 
            colIndex, 
            maxColIndex, 
            null, 
            null, 
            null, 
            true, 
            false, 
            false, 
            false, 
            false, 
            RotationEnum.NONE, 
            sheetInfo);
}
项目:jasperreports    文件:BarbecueStyleResolver.java   
/**
 * 
 */
public static RotationEnum getRotationValue(JRComponentElement element)
{
    RotationEnum ownRotation = ((BarbecueComponent)element.getComponent()).getOwnRotation();
    if (ownRotation != null) {
        return ownRotation;
    }
    JRStyle style = getStyleResolver(element).getBaseStyle(element);
    if (style != null) {
        RotationEnum rotation = style.getRotationValue();
        if (rotation != null) {
            return rotation;
        }
    }
    return RotationEnum.NONE;
}
项目:PDFReporter-Studio    文件:MTextElement.java   
@Override
public void setPropertyValue(Object id, Object value) {
    JRDesignTextElement jrElement = (JRDesignTextElement) getValue();
    if (id.equals(JRBaseStyle.PROPERTY_MARKUP))
        jrElement.setMarkup((String) value);

    else if (id.equals(JRBaseStyle.PROPERTY_HORIZONTAL_ALIGNMENT))
        jrElement.setHorizontalAlignment((HorizontalAlignEnum) hAlignD.getEnumValue(value));
    else if (id.equals(JRBaseStyle.PROPERTY_VERTICAL_ALIGNMENT)) {
        VerticalAlignEnum va = (VerticalAlignEnum) EnumHelper.getSetValue(VerticalAlignEnum.values(), value, 1, true);
        if (va != null && va.equals(VerticalAlignEnum.JUSTIFIED))
            va = VerticalAlignEnum.MIDDLE;
        jrElement.setVerticalAlignment(va);
    } else if (id.equals(JRBaseStyle.PROPERTY_ROTATION))
        jrElement.setRotation((RotationEnum) rotationD.getEnumValue(value));

    getMFont().setPropertyValue(id, value);

    super.setPropertyValue(id, value);
}
项目:jasperreports    文件:JRBaseTextElement.java   
@Override
public void setRotation(RotationEnum rotationValue)
{
    Object old = this.rotationValue;
    this.rotationValue = rotationValue;
    getEventSupport().firePropertyChange(JRBaseStyle.PROPERTY_ROTATION, old, this.rotationValue);
}
项目:jasperreports    文件:JRBaseStyle.java   
@Override
public void setRotation(RotationEnum rotationValue)
{
    Object old = this.rotationValue;
    this.rotationValue = rotationValue;
    getEventSupport().firePropertyChange(PROPERTY_ROTATION, old, this.rotationValue);
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public RotationEnum getRotationValue(JRStyle style)
{
    RotationEnum ownRotation = style.getOwnRotationValue();
    if (ownRotation != null)
    {
        return ownRotation;
    }
    JRStyle baseStyle = getBaseStyle(style);
    if (baseStyle != null)
    {
        return baseStyle.getRotationValue();
    }
    return null;
}
项目:jasperreports    文件:JRDesignTextElement.java   
@Override
public void setRotation(RotationEnum rotationValue)
{
    Object old = this.rotationValue;
    this.rotationValue = rotationValue;
    getEventSupport().firePropertyChange(JRBaseStyle.PROPERTY_ROTATION, old, this.rotationValue);
}
项目:jasperreports    文件:CellStyle.java   
/**
 *
 */
public CellStyle(WriterHelper styleWriter, JRExporterGridCell gridCell, boolean shrinkToFit, boolean wrapText)
{
    super(styleWriter);

    JRPrintElement element = gridCell.getElement();

    if (element != null && element.getModeValue() == ModeEnum.OPAQUE)
    {
        //fill = "solid";
        backcolor = JRColorUtil.getColorHexa(element.getBackcolor());
    }
    else
    {
        //fill = "none";
        if (gridCell.getBackcolor() != null)
        {
            backcolor = JRColorUtil.getColorHexa(gridCell.getBackcolor());
        }
    }

    RotationEnum rotation = element instanceof JRPrintText ? ((JRPrintText)element).getRotationValue() : RotationEnum.NONE;
    VerticalTextAlignEnum vAlign = VerticalTextAlignEnum.TOP;
    HorizontalTextAlignEnum hAlign = HorizontalTextAlignEnum.LEFT;

    JRTextAlignment alignment = element instanceof JRTextAlignment ? (JRTextAlignment)element : null;
    if (alignment != null)
    {
        vAlign = alignment.getVerticalTextAlign();
        hAlign = alignment.getHorizontalTextAlign();
    }

    horizontalAlignment = ParagraphStyle.getHorizontalAlignment(hAlign, vAlign, rotation);
    verticalAlignment = ParagraphStyle.getVerticalAlignment(hAlign, vAlign, rotation);
    this.shrinkToFit = shrinkToFit;
    this.wrapText = wrapText;
    setBox(gridCell.getBox());
}
项目:jasperreports    文件:XlsxCellHelper.java   
/**
 *
 */
public void exportHeader(
        JRExporterGridCell gridCell,
        int rowIndex,
        int colIndex, 
        int maxColIndex, 
        TextValue textValue,
        String pattern,
        Locale locale,
        boolean isWrapText,
        boolean isHidden,
        boolean isLocked,
        boolean isShrinkToFit,
        boolean isIgnoreTextFormatting, 
        RotationEnum rotation,
        JRXlsAbstractExporter.SheetInfo sheetInfo
        ) 
{
    exportHeader(
            gridCell,
            rowIndex,
            colIndex, 
            maxColIndex, 
            textValue,
            pattern,
            locale,
            isWrapText,
            isHidden,
            isLocked,
            isShrinkToFit,
            isIgnoreTextFormatting, 
            rotation,
            sheetInfo,
            null
            );
}
项目:jasperreports    文件:XlsxCellHelper.java   
/**
 *
 */
public void exportHeader(
    JRExporterGridCell gridCell,
    int rowIndex,
    int colIndex, 
    int maxColIndex,
    JRXlsAbstractExporter.SheetInfo sheetInfo,
    LineDirectionEnum direction
    ) 
{
    exportHeader(
            gridCell,
            rowIndex, 
            colIndex, 
            maxColIndex, 
            null, 
            null, 
            null, 
            true, 
            false, 
            false, 
            false, 
            false, 
            RotationEnum.NONE, 
            sheetInfo,
            direction);
}
项目:jasperreports    文件:DocxCellHelper.java   
/**
 *
 */
private static String getTextDirection(RotationEnum rotation)
{
    String textDirection = null;

    if (rotation != null)
    {
        switch(rotation)
        {
            case LEFT:
            {
                textDirection = "btLr";
                break;
            }
            case RIGHT:
            {
                textDirection = "tbRl";
                break;
            }
            case UPSIDE_DOWN://FIXMEDOCX possible?
            case NONE:
            default:
            {
            }
        }
    }

    return textDirection;
}
项目:jasperreports    文件:XlsxStyleHelper.java   
/**
 * 
 */
public int getCellStyle(
    JRExporterGridCell gridCell, 
    String pattern, 
    Locale locale,
    boolean isWrapText, 
    boolean isHidden, 
    boolean isLocked,
    boolean  isShrinkToFit,
    boolean isIgnoreTextFormatting,
    RotationEnum rotation,
    JRXlsAbstractExporter.SheetInfo sheetInfo,
    LineDirectionEnum direction
    )
{
    XlsxStyleInfo styleInfo = 
        new XlsxStyleInfo(
            formatHelper.getFormat(pattern) + 1,
            fontHelper.getFont(gridCell, locale) + 1,
            borderHelper.getBorder(gridCell, sheetInfo, direction) + 1,
            gridCell,
            isWrapText,
            isHidden,
            isLocked,
            isShrinkToFit,
            isIgnoreTextFormatting, 
            getRotation(rotation),
            sheetInfo,
            direction
            );
    Integer styleIndex = styleCache.get(styleInfo.getId());
    if (styleIndex == null)
    {
        styleIndex = Integer.valueOf(styleCache.size() + 1);
        exportCellStyle(gridCell, styleInfo, styleIndex, sheetInfo);
        styleCache.put(styleInfo.getId(), styleIndex);
    }
    return styleIndex.intValue();
}
项目:jasperreports    文件:XlsxStyleHelper.java   
/**
 *
 */
protected int getRotation(RotationEnum rotation)
{
    int result = 0;

    if (rotation != null)
    {
        switch(rotation)
        {
            case LEFT:
            {
                result = 90;
                break;
            }
            case RIGHT:
            {
                result = 180;
                break;
            }
            case UPSIDE_DOWN:
            case NONE:
            default:
            {
            }
        }
    }

    return result;
}
项目:jasperreports    文件:JRFillTextField.java   
@Override
protected boolean canOverflow()
{
    return isStretchWithOverflow()
            && getRotationValue().equals(RotationEnum.NONE)
            && isEvaluateNow()
            && filler.isBandOverFlowAllowed();
}
项目:jasperreports    文件:ComponentsXmlDigesterConfigurer.java   
@SuppressWarnings("deprecation")
protected void addBarbecueRules(Digester digester)
{
    String barcodePattern = "*/componentElement/barbecue";
    digester.addObjectCreate(barcodePattern, StandardBarbecueComponent.class);
    digester.addSetProperties(barcodePattern,
            //properties to be ignored by this rule
            new String[]{JRXmlConstants.ATTRIBUTE_evaluationTime, StandardBarbecueComponent.PROPERTY_ROTATION}, 
            new String[0]);
    digester.addRule(barcodePattern, 
            new XmlConstantPropertyRule(
                    JRXmlConstants.ATTRIBUTE_evaluationTime, "evaluationTimeValue",
                    EvaluationTimeEnum.values()));
    digester.addRule(barcodePattern, 
            new XmlConstantPropertyRule(
                    StandardBarbecueComponent.PROPERTY_ROTATION,
                    RotationEnum.values()));

    String barcodeExpressionPattern = barcodePattern + "/codeExpression";
    digester.addFactoryCreate(barcodeExpressionPattern, 
            JRExpressionFactory.StringExpressionFactory.class.getName());
    digester.addCallMethod(barcodeExpressionPattern, "setText", 0);
    digester.addSetNext(barcodeExpressionPattern, "setCodeExpression", 
            JRExpression.class.getName());

    String applicationIdentifierExpressionPattern = barcodePattern 
            + "/applicationIdentifierExpression";
    digester.addFactoryCreate(applicationIdentifierExpressionPattern, 
            JRExpressionFactory.StringExpressionFactory.class.getName());
    digester.addCallMethod(applicationIdentifierExpressionPattern, "setText", 0);
    digester.addSetNext(applicationIdentifierExpressionPattern, 
            "setApplicationIdentifierExpression", 
            JRExpression.class.getName());
}
项目:PDFReporter-Studio    文件:MBarcodeBarbecue.java   
@Override
public void setPropertyValue(Object id, Object value) {
    JRDesignComponentElement jrElement = (JRDesignComponentElement) getValue();
    StandardBarbecueComponent jrList = (StandardBarbecueComponent) jrElement
            .getComponent();

    if (id.equals(StandardBarbecueComponent.PROPERTY_EVALUATION_TIME))
        jrList.setEvaluationTimeValue((EvaluationTimeEnum) evaluationTimeD
                .getEnumValue(value));
    else if (id.equals(StandardBarbecueComponent.PROPERTY_EVALUATION_GROUP))
        jrList.setEvaluationGroup((String) value);
    else if (id
            .equals(StandardBarbecueComponent.PROPERTY_CHECKSUM_REQUIRED))
        jrList.setChecksumRequired(((Boolean) value).booleanValue());
    else if (id.equals(StandardBarbecueComponent.PROPERTY_DRAW_TEXT))
        jrList.setDrawText(((Boolean) value).booleanValue());
    else if (id.equals(StandardBarbecueComponent.PROPERTY_TYPE))
        jrList.setType((String) value);
    else if (id.equals(StandardBarbecueComponent.PROPERTY_ROTATION))
        jrList.setRotation((RotationEnum) rotationD.getEnumValue(value));

    else if (id.equals(StandardBarbecueComponent.PROPERTY_BAR_HEIGTH))
        jrList.setBarHeight((Integer) value);
    else if (id.equals(StandardBarbecueComponent.PROPERTY_BAR_WIDTH))
        jrList.setBarWidth((Integer) value);
    else if (id.equals(StandardBarbecueComponent.PROPERTY_CODE_EXPRESSION)) {
        jrList.setCodeExpression(ExprUtil.setValues(
                jrList.getCodeExpression(), value, null));
    } else if (id
            .equals(StandardBarbecueComponent.PROPERTY_APPLICATION_IDENTIFIER_EXPRESSION)) {
        jrList.setApplicationIdentifierExpression(ExprUtil.setValues(
                jrList.getApplicationIdentifierExpression(), value, null));
    } else
        super.setPropertyValue(id, value);
}
项目:PDFReporter-Studio    文件:TextStyleWizardPage.java   
private void setRotation(){
    RotationEnum align = element.getRotation();
    if (RotationEnum.LEFT.equals(align)) rotationLeft.setSelection(true);
    else if (RotationEnum.RIGHT.equals(align)) rotationRight.setSelection(true);
    else if (RotationEnum.UPSIDE_DOWN.equals(align)) rotationUpsideDown.setSelection(true);
    else rotationNone.setSelection(true);
}
项目:PDFReporter-Studio    文件:TextStyleWizardPage.java   
private TextStyle createDefaultElement(){
    TextStyle defaultTextStyle = new TextStyle();
    defaultTextStyle.setBackGround(AlfaRGB.getFullyOpaque(new RGB(255,255,255)));
    defaultTextStyle.setForeGround(AlfaRGB.getFullyOpaque(new RGB(0,0,0)));
    defaultTextStyle.setHorizontalAlignmen(HorizontalAlignEnum.LEFT);
    defaultTextStyle.setVerticalAlignmen(VerticalAlignEnum.TOP);
    defaultTextStyle.setTransparent(true);
    defaultTextStyle.setRotation(RotationEnum.NONE);

    JRBaseFont font = new JRBaseFont();
    font.setFontName("Arial"); //$NON-NLS-1$
    font.setFontSize(8f);
    font.setBold(false);
    font.setItalic(false);
    font.setUnderline(false);
    font.setStrikeThrough(false);
    defaultTextStyle.setFont(font);


    JRBaseLineBox box = new JRBaseLineBox(null);
    box.setPadding(null);
    box.setTopPadding(0);
    box.setBottomPadding(0);
    box.setLeftPadding(0);
    box.setRightPadding(0);

    defaultTextStyle.setBorders(box);
    defaultTextStyle.setDescription(Messages.TextStyleView_sampleText);

    return defaultTextStyle;
}
项目:PDFReporter-Studio    文件:TextStyle.java   
public TextStyle(JRStyle style){
    super(null,null);
    setTransparent(style.getOwnModeValue() != null ? ModeEnum.TRANSPARENT.equals(style.getOwnModeValue()) : true);
    setBackGround(style.getOwnBackcolor());
    setForeGround(style.getOwnForecolor());
    setVerticalAlignmen(style.getOwnVerticalAlignmentValue() != null ? style.getOwnVerticalAlignmentValue() : VerticalAlignEnum.TOP);
    setHorizontalAlignmen(style.getOwnHorizontalAlignmentValue() != null ? style.getOwnHorizontalAlignmentValue() : HorizontalAlignEnum.LEFT);
    setRotation(style.getOwnRotationValue() != null ? style.getOwnRotationValue() : RotationEnum.NONE);

    JRFont font = new JRBaseFont();
    font.setBold(style.isOwnBold() != null ? style.isOwnBold() : false);
    font.setItalic(new Boolean(style.isOwnItalic() != null ? style.isOwnItalic() : false));
    style.isItalic();
    font.setUnderline(new Boolean(style.isOwnUnderline() != null ? style.isOwnUnderline() : false));
    font.setStrikeThrough(new Boolean(style.isOwnStrikeThrough() != null ? style.isOwnStrikeThrough() : false));
    font.setFontName(new String(style.getOwnFontName()));
    font.setFontSize(new Float(style.getOwnFontsize()));
    setFont(font);

    JRLineBox originBox = style.getLineBox();
    JRBaseLineBox copyBox = new JRBaseLineBox(null);
    copyBox.setPadding(originBox.getOwnPadding() != null ? new Integer(originBox.getOwnPadding()): null);
    copyBox.setTopPadding(originBox.getOwnTopPadding() != null ? new Integer(originBox.getOwnTopPadding()): null);
    copyBox.setBottomPadding(originBox.getOwnBottomPadding() != null ? new Integer(originBox.getOwnBottomPadding()): null);
    copyBox.setLeftPadding(originBox.getOwnLeftPadding() != null ? new Integer(originBox.getOwnLeftPadding()): null);
    copyBox.setRightPadding(originBox.getOwnRightPadding() != null ? new Integer(originBox.getOwnRightPadding()): null);
    copyLinePen(originBox.getPen(), copyBox.getPen());
    copyLinePen(originBox.getLeftPen(), copyBox.getLeftPen());
    copyLinePen(originBox.getRightPen(), copyBox.getRightPen());
    copyLinePen(originBox.getBottomPen(), copyBox.getBottomPen());
    copyLinePen(originBox.getTopPen(), copyBox.getTopPen());
    setBorders(copyBox);

    String name = style.getName();
    if (name != null && !name.isEmpty()) setDescription(name);
}
项目:ireport-fork    文件:RotationProperty.java   
@Override
public List getTagList() 
{
    List tags = new java.util.ArrayList();
    tags.add(new Tag(RotationEnum.NONE, I18n.getString("Global.Property.None")));
    tags.add(new Tag(RotationEnum.LEFT, I18n.getString("Global.Property.Left")));
    tags.add(new Tag(RotationEnum.RIGHT, I18n.getString("Global.Property.Right")));
    tags.add(new Tag(RotationEnum.UPSIDE_DOWN, I18n.getString("Global.Property.UpsideDown")));
    return tags;
}
项目:ireport-fork    文件:RotationProperty.java   
@Override
@SuppressWarnings(value = "unchecked")
public PropertyEditor getPropertyEditor() {
    if (editor == null) {
        ArrayList l = new ArrayList();
        l.add(new Tag(null, "<Default>"));
        l.add(new Tag(RotationEnum.NONE, I18n.getString("AbstractStyleNode.Property.None")));
        l.add(new Tag(RotationEnum.LEFT, I18n.getString("AbstractStyleNode.Property.Left")));
        l.add(new Tag(RotationEnum.RIGHT, I18n.getString("AbstractStyleNode.Property.Right")));
        l.add(new Tag(RotationEnum.UPSIDE_DOWN, I18n.getString("AbstractStyleNode.Property.Upside_Down")));
        editor = new ComboBoxPropertyEditor(false, l);
    }
    return editor;
}
项目:ireport-fork    文件:RotationProperty.java   
private void setPropertyValue(Object val) {
    if (val == null || val instanceof RotationEnum) {
        RotationEnum oldValue = style.getOwnRotationValue();
        RotationEnum newValue = (RotationEnum) val;
        style.setRotation(newValue);
        ObjectPropertyUndoableEdit urob = new ObjectPropertyUndoableEdit(style, "Rotation", RotationEnum.class, oldValue, newValue);
        IReportManager.getInstance().addUndoableEdit(urob);
    }
}
项目:dynamicreports-jasper    文件:ConstantTransform.java   
public static RotationEnum barbecueRotation(BarcodeOrientation orientation) {
    switch (orientation) {
    case NONE:
        return RotationEnum.NONE;
    case LEFT:
        return RotationEnum.LEFT;
    case RIGHT:
        return RotationEnum.RIGHT;
    case UPSIDE_DOWN:
        return RotationEnum.UPSIDE_DOWN;
    default:
        throw new JasperDesignException("BarcodeOrientation " + orientation.name() + " not supported");
    }
}
项目:jasperreports    文件:JRBaseTextElement.java   
@Override
public RotationEnum getRotationValue()
{
    return getStyleResolver().getRotationValue(this);
}
项目:jasperreports    文件:JRBaseTextElement.java   
@Override
public RotationEnum getOwnRotationValue()
{
    return this.rotationValue;
}
项目:jasperreports    文件:JRBaseTextElement.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);
        rotationValue = RotationEnum.getByValue(rotation);
        lineSpacingValue = LineSpacingEnum.getByValue(lineSpacing);

        horizontalAlignment = null;
        verticalAlignment = null;
        rotation = null;
        lineSpacing = 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;
    }

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

        fontSize = null;
    }

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_6_0_2)
    {
        horizontalTextAlign = net.sf.jasperreports.engine.type.HorizontalAlignEnum.getHorizontalTextAlignEnum(horizontalAlignmentValue);
        verticalTextAlign = net.sf.jasperreports.engine.type.VerticalAlignEnum.getVerticalTextAlignEnum(verticalAlignmentValue);

        horizontalAlignmentValue = null;
        verticalAlignmentValue = null;
    }
}
项目:jasperreports    文件:JRBasePrintText.java   
@Override
public RotationEnum getRotationValue()
{
    return getStyleResolver().getRotationValue(this);
}
项目:jasperreports    文件:JRBasePrintText.java   
@Override
public RotationEnum getOwnRotationValue()
{
    return rotationValue;
}
项目:jasperreports    文件:JRBasePrintText.java   
@Override
public void setRotation(RotationEnum rotationValue)
{
    this.rotationValue = rotationValue;
}
项目:jasperreports    文件:JRBasePrintText.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);
        rotationValue = RotationEnum.getByValue(rotation);
        runDirectionValue = RunDirectionEnum.getByValue(runDirection);
        lineSpacingValue = LineSpacingEnum.getByValue(lineSpacing);

        horizontalAlignment = null;
        verticalAlignment = null;
        rotation = null;
        lineSpacing = 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));
    }

    if (paragraph == null)
    {
        paragraph = new JRBaseParagraph(this);
        paragraph.setLineSpacing(lineSpacingValue);
        lineSpacingValue = null;
    }

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

        fontSize = null;
    }

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_6_0_2)
    {
        horizontalTextAlign = net.sf.jasperreports.engine.type.HorizontalAlignEnum.getHorizontalTextAlignEnum(horizontalAlignmentValue);
        verticalTextAlign = net.sf.jasperreports.engine.type.VerticalAlignEnum.getVerticalTextAlignEnum(verticalAlignmentValue);

        horizontalAlignmentValue = null;
        verticalAlignmentValue = null;
    }
}
项目:jasperreports    文件:JRBaseStyle.java   
@Override
public RotationEnum getRotationValue()
{
    return getStyleResolver().getRotationValue(this);
}
项目:jasperreports    文件:JRBaseStyle.java   
@Override
public RotationEnum getOwnRotationValue()
{
    return this.rotationValue;
}
项目:jasperreports    文件:JRBaseStyle.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)
    {
        modeValue = ModeEnum.getByValue(mode);
        horizontalAlignmentValue = net.sf.jasperreports.engine.type.HorizontalAlignEnum.getByValue(horizontalAlignment);
        verticalAlignmentValue = net.sf.jasperreports.engine.type.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 (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;
    }

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

        fontSize = null;
    }

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_6_0_2)
    {
        horizontalTextAlign = net.sf.jasperreports.engine.type.HorizontalAlignEnum.getHorizontalTextAlignEnum(horizontalAlignmentValue);
        verticalTextAlign = net.sf.jasperreports.engine.type.VerticalAlignEnum.getVerticalTextAlignEnum(verticalAlignmentValue);

        horizontalImageAlign = net.sf.jasperreports.engine.type.HorizontalAlignEnum.getHorizontalImageAlignEnum(horizontalAlignmentValue);
        verticalImageAlign = net.sf.jasperreports.engine.type.VerticalAlignEnum.getVerticalImageAlignEnum(verticalAlignmentValue);

        horizontalAlignmentValue = null;
        verticalAlignmentValue = null;
    }
}
项目:jasperreports    文件:JRTextElementFactory.java   
@Override
public Object createObject(Attributes atts)
{
    JRDesignTextElement textElement = (JRDesignTextElement)digester.peek();

    HorizontalTextAlignEnum horizontalTextAlign = HorizontalTextAlignEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_textAlignment));
    if (horizontalTextAlign != null)
    {
        textElement.setHorizontalTextAlign(horizontalTextAlign);
    }

    VerticalTextAlignEnum verticalTextAlign = VerticalTextAlignEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_verticalAlignment));
    if (verticalTextAlign != null)
    {
        textElement.setVerticalTextAlign(verticalTextAlign);
    }

    RotationEnum rotation = RotationEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_rotation));
    if (rotation != null)
    {
        textElement.setRotation(rotation);
    }

    LineSpacingEnum lineSpacing = LineSpacingEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_lineSpacing));
    if (lineSpacing != null)
    {
        if (log.isWarnEnabled())
        {
            log.warn("The 'lineSpacing' attribute is deprecated. Use the <paragraph> tag instead.");
        }
        textElement.getParagraph().setLineSpacing(lineSpacing);
    }

    textElement.setMarkup(atts.getValue(JRXmlConstants.ATTRIBUTE_markup));

    String isStyledText = atts.getValue(JRXmlConstants.ATTRIBUTE_isStyledText);
    if (isStyledText != null && isStyledText.length() > 0)
    {
        if (log.isWarnEnabled())
        {
            log.warn("The 'isStyledText' attribute is deprecated. Use the 'markup' attribute instead.");
        }

        textElement.setMarkup(Boolean.valueOf(isStyledText) ? JRCommonText.MARKUP_STYLED_TEXT : JRCommonText.MARKUP_NONE);
    }

    return textElement;
}
项目:jasperreports    文件:JRStyleResolver.java   
/**
 *
 */
public static RotationEnum getRotationValue(JRCommonText element)
{
    return styleResolver.getRotationValue(element);
}
项目:jasperreports    文件:JRStyleResolver.java   
/**
 *
 */
public static RotationEnum getRotationValue(JRStyle style)
{
    return styleResolver.getRotationValue(style);
}
项目:jasperreports    文件:JRDesignTextElement.java   
@Override
public RotationEnum getRotationValue()
{
    return getStyleResolver().getRotationValue(this);
}
项目:jasperreports    文件:JRDesignTextElement.java   
@Override
public RotationEnum getOwnRotationValue()
{
    return this.rotationValue;
}
项目:jasperreports    文件:ParagraphStyle.java   
/**
 *
 */
public ParagraphStyle(WriterHelper styleWriter, JRPrintText text, boolean isIgnoreTextFormatting)
{
    super(styleWriter);

    horizontalAlignment = getHorizontalAlignment(
            text.getHorizontalTextAlign(), 
            text.getVerticalTextAlign(), 
            (isIgnoreTextFormatting ? RotationEnum.NONE : text.getRotationValue()));
    verticalAlignment = getVerticalAlignment(
            text.getHorizontalTextAlign(), 
            text.getVerticalTextAlign(), 
            (isIgnoreTextFormatting ? RotationEnum.NONE : text.getRotationValue()));

    if(isIgnoreTextFormatting)
    {
        textRotation = "0";
    }
    else 
    {
        switch(text.getRotationValue())
        {
            case LEFT:
            {
                textRotation = "90";
                break;
            }
            case RIGHT:
            {
                textRotation = "270";
                break;
            }
            case UPSIDE_DOWN://FIXMEODT possible?
            case NONE:
            default:
            {
                textRotation = "0";
            }
        }
    }

    runDirection = null;
    if (text.getRunDirectionValue() == RunDirectionEnum.RTL)
    {
        runDirection = "rl";
    }

    paragraph = text.getParagraph();
}