/** * */ 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; }
/** * * 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); }
/** * */ 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; }
@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); }
@Override public void setRotation(RotationEnum rotationValue) { Object old = this.rotationValue; this.rotationValue = rotationValue; getEventSupport().firePropertyChange(JRBaseStyle.PROPERTY_ROTATION, old, this.rotationValue); }
@Override public void setRotation(RotationEnum rotationValue) { Object old = this.rotationValue; this.rotationValue = rotationValue; getEventSupport().firePropertyChange(PROPERTY_ROTATION, old, this.rotationValue); }
/** * */ 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; }
/** * */ 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()); }
/** * */ 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 ); }
/** * */ 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); }
/** * */ 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; }
/** * */ 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(); }
/** * */ 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; }
@Override protected boolean canOverflow() { return isStretchWithOverflow() && getRotationValue().equals(RotationEnum.NONE) && isEvaluateNow() && filler.isBandOverFlowAllowed(); }
@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()); }
@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); }
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); }
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; }
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); }
@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; }
@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; }
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); } }
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"); } }
@Override public RotationEnum getRotationValue() { return getStyleResolver().getRotationValue(this); }
@Override public RotationEnum getOwnRotationValue() { return this.rotationValue; }
@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; } }
@Override public RotationEnum getOwnRotationValue() { return rotationValue; }
@Override public void setRotation(RotationEnum rotationValue) { this.rotationValue = rotationValue; }
@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; } }
@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; } }
@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; }
/** * */ public static RotationEnum getRotationValue(JRCommonText element) { return styleResolver.getRotationValue(element); }
/** * */ public static RotationEnum getRotationValue(JRStyle style) { return styleResolver.getRotationValue(style); }
/** * */ 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(); }