Package org.pentaho.reporting.engine.classic.core.modules.output.table.base.layout.model

Examples of org.pentaho.reporting.engine.classic.core.modules.output.table.base.layout.model.ResultCell


    this.column = column;
  }

  protected void startParsing(final Attributes atts) throws SAXException
  {
    final ResultCell resultCell = new ResultCell();
    resultCell.setName(atts.getValue(getUri(), "content-idref"));

    final String attr = atts.getValue(getUri(), "background-color");
    resultCell.setBackgroundColor(ReportParserUtil.parseColor(attr, null));

    final String borderColorTopText = atts.getValue(getUri(), "border-top-color");
    final Color borderColorTop = ReportParserUtil.parseColor(borderColorTopText, null);
    final String borderColorLeftText = atts.getValue(getUri(), "border-left-color");
    final Color borderColorLeft = ReportParserUtil.parseColor(borderColorLeftText, null);
    final String borderColorBottomText = atts.getValue(getUri(), "border-bottom-color");
    final Color borderColorBottom = ReportParserUtil.parseColor(borderColorBottomText, null);
    final String borderColorRightText = atts.getValue(getUri(), "border-right-color");
    final Color borderColorRight = ReportParserUtil.parseColor(borderColorRightText, null);

    final String borderWidthTopText = atts.getValue(getUri(), "border-top-width");
    final Float borderWidthTop = ReportParserUtil.parseFloat(borderWidthTopText, getLocator());
    final String borderWidthLeftText = atts.getValue(getUri(), "border-left-width");
    final Float borderWidthLeft = ReportParserUtil.parseFloat(borderWidthLeftText, getLocator());
    final String borderWidthBottomText = atts.getValue(getUri(), "border-bottom-width");
    final Float borderWidthBottom = ReportParserUtil.parseFloat(borderWidthBottomText, getLocator());
    final String borderWidthRightText = atts.getValue(getUri(), "border-right-width");
    final Float borderWidthRight = ReportParserUtil.parseFloat(borderWidthRightText, getLocator());

    final String borderStyleTopText = atts.getValue(getUri(), "border-top-style");
    final BorderStyle borderStyleTop = parseBorderStyle(borderStyleTopText);
    final String borderStyleLeftText = atts.getValue(getUri(), "border-left-style");
    final BorderStyle borderStyleLeft = parseBorderStyle(borderStyleLeftText);
    final String borderStyleBottomText = atts.getValue(getUri(), "border-bottom-style");
    final BorderStyle borderStyleBottom = parseBorderStyle(borderStyleBottomText);
    final String borderStyleRightText = atts.getValue(getUri(), "border-right-style");
    final BorderStyle borderStyleRight = parseBorderStyle(borderStyleRightText);

    if (borderWidthTop != null)
    {
      resultCell.setTop(new BorderEdge(borderStyleTop, borderColorTop, StrictGeomUtility.toInternalValue(
          borderWidthTop.floatValue())));
    }
    if (borderWidthLeft != null)
    {
      resultCell.setLeft(new BorderEdge(borderStyleLeft, borderColorLeft, StrictGeomUtility.toInternalValue(
          borderWidthLeft.floatValue())));
    }
    if (borderWidthBottom != null)
    {
      resultCell.setBottom(new BorderEdge(borderStyleBottom, borderColorBottom, StrictGeomUtility.toInternalValue(
          borderWidthBottom.floatValue())));
    }
    if (borderWidthRight != null)
    {
      resultCell.setRight(new BorderEdge(borderStyleRight, borderColorRight, StrictGeomUtility.toInternalValue(
          borderWidthRight.floatValue())));
    }

    resultCell.setTopLeft(parseCornerRadius("border-top-left", atts));
    resultCell.setTopRight(parseCornerRadius("border-top-right", atts));
    resultCell.setBottomLeft(parseCornerRadius("border-bottom-left", atts));
    resultCell.setBottomRight(parseCornerRadius("border-bottom-right", atts));

    final int rowSpan = ParserUtil.parseInt(atts.getValue(getUri(), "rowspan"), 1);
    final int colSpan = ParserUtil.parseInt(atts.getValue(getUri(), "colspan"), 1);
    for (int r = row; r < row + rowSpan; r++)
    {
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.modules.output.table.base.layout.model.ResultCell

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.