Package org.pentaho.reporting.engine.classic.core.layout.model

Examples of org.pentaho.reporting.engine.classic.core.layout.model.BorderEdge


    box.setPaddingBottom(Math.max(0, StrictGeomUtility.toInternalValue
        (style.getDoubleStyleProperty(ElementStyleKeys.PADDING_BOTTOM, 0))));
    box.setPaddingRight(Math.max(0, StrictGeomUtility.toInternalValue
        (style.getDoubleStyleProperty(ElementStyleKeys.PADDING_RIGHT, 0))));

    final BorderEdge edgeTop = createEdge(style, ElementStyleKeys.BORDER_TOP_STYLE,
        ElementStyleKeys.BORDER_TOP_COLOR, ElementStyleKeys.BORDER_TOP_WIDTH);
    final BorderEdge edgeLeft = createEdge(style, ElementStyleKeys.BORDER_LEFT_STYLE,
        ElementStyleKeys.BORDER_LEFT_COLOR, ElementStyleKeys.BORDER_LEFT_WIDTH);
    final BorderEdge edgeBottom = createEdge(style, ElementStyleKeys.BORDER_BOTTOM_STYLE,
        ElementStyleKeys.BORDER_BOTTOM_COLOR, ElementStyleKeys.BORDER_BOTTOM_WIDTH);
    final BorderEdge edgeRight = createEdge(style, ElementStyleKeys.BORDER_RIGHT_STYLE,
        ElementStyleKeys.BORDER_RIGHT_COLOR, ElementStyleKeys.BORDER_RIGHT_WIDTH);
    final BorderEdge edgeBreak = createEdge(style, ElementStyleKeys.BORDER_BREAK_STYLE,
        ElementStyleKeys.BORDER_BREAK_COLOR, ElementStyleKeys.BORDER_BREAK_WIDTH);

    if (BorderEdge.EMPTY.equals(edgeBottom) &&
        BorderEdge.EMPTY.equals(edgeLeft) &&
        BorderEdge.EMPTY.equals(edgeBreak) &&
View Full Code Here


    if (color == null || width <= 0)
    {
      return BorderEdge.EMPTY;
    }

    return new BorderEdge(styleRight, color, StrictGeomUtility.toInternalValue(width));
  }
View Full Code Here

//          if (bg.getVerticalAlignment() != null)
//          {
//            attList.setAttribute(null, "vertical-alignment", String.valueOf(bg.getVerticalAlignment()));
//          }
//
          final BorderEdge top = bg.getTop();
          if (top != null)
          {
            attList.setAttribute(null, "border-top-color",
                ColorValueConverter.colorToString(top.getColor()));
            attList.setAttribute(null, "border-top-width",
                String.valueOf(StrictGeomUtility.toExternalValue(top.getWidth())));
            attList.setAttribute(null, "border-top-style",
                String.valueOf(top.getBorderStyle()));
          }

          final BorderEdge left = bg.getLeft();
          if (left != null)
          {
            attList.setAttribute(null, "border-left-color",
                ColorValueConverter.colorToString(left.getColor()));
            attList.setAttribute(null, "border-left-width",
                String.valueOf(StrictGeomUtility.toExternalValue(left.getWidth())));
            attList.setAttribute(null, "border-left-style",
                String.valueOf(left.getBorderStyle()));
          }

          final BorderEdge bottom = bg.getBottom();
          if (bottom != null)
          {
            attList.setAttribute(null, "border-bottom-color",
                ColorValueConverter.colorToString(bottom.getColor()));
            attList.setAttribute(null, "border-bottom-width",
                String.valueOf(StrictGeomUtility.toExternalValue(bottom.getWidth())));
            attList.setAttribute(null, "border-bottom-style",
                String.valueOf(bottom.getBorderStyle()));
          }

          final BorderEdge right = bg.getRight();
          if (right != null)
          {
            attList.setAttribute(null, "border-right-color",
                ColorValueConverter.colorToString(right.getColor()));
            attList.setAttribute(null, "border-right-width",
                String.valueOf(StrictGeomUtility.toExternalValue(right.getWidth())));
            attList.setAttribute(null, "border-right-style",
                String.valueOf(right.getBorderStyle()));
          }

          final BorderCorner topLeft = bg.getTopLeft();
          if (topLeft != null)
          {
View Full Code Here

    if (rawObject instanceof Rectangle2D ||
        (ellipseAsRectangle && rawObject instanceof Ellipse2D))
    {
      if (draw)
      {
        final BorderEdge edge = ProcessUtility.produceBorderEdge(box.getStyleSheet());
        if (edge != null)
        {
          return MARKER_DEFINITION;
        }
      }
      if (styleSheet.getBooleanStyleProperty(ElementStyleKeys.FILL_SHAPE))
      {
        return MARKER_DEFINITION;
      }

      return null;
    }

    if (rawObject instanceof RoundRectangle2D)
    {
      if (draw)
      {
        // the beast has a border ..
        final BorderEdge edge = ProcessUtility.produceBorderEdge(box.getStyleSheet());
        if (edge != null)
        {
          return MARKER_DEFINITION;
        }
      }
View Full Code Here

      {
        styleBuilder.append("background-color", HtmlColors.getColorString(colorValue));
      }


      final BorderEdge topEdge = background.getTop();
      final BorderEdge leftEdge = background.getLeft();
      final BorderEdge bottomEdge = background.getBottom();
      final BorderEdge rightEdge = background.getRight();
      if (topEdge.equals(leftEdge) &&
          topEdge.equals(rightEdge) && topEdge.equals(bottomEdge))
      {
        styleBuilder.appendRaw("border", styleBuilder.printEdgeAsCSS(topEdge));
      }
View Full Code Here

    if (isTableRowBorderDefinition())
    {
      styleBuilder.clear();

      final Color commonBackgroundColor = getCommonBackgroundColor(logicalPageBox, sheetLayout, row, tableContentProducer);
      final BorderEdge top = getCommonTopBorderEdge(logicalPageBox, sheetLayout, row, tableContentProducer);
      final BorderEdge bottom = getCommonBottomBorderEdge(logicalPageBox, sheetLayout, row, tableContentProducer);
      if (commonBackgroundColor != null)
      {
        styleBuilder.append("background-color", HtmlColors.getColorString(commonBackgroundColor));
      }
      styleBuilder.appendRaw("border-top", styleBuilder.printEdgeAsCSS(top));
View Full Code Here

  private BorderEdge getCommonTopBorderEdge(final LogicalPageBox logicalPageBox,
                                            final SheetLayout sheetLayout, final int row,
                                            final TableContentProducer tableContentProducer)
  {
    BorderEdge bg = BorderEdge.EMPTY;
    final int columnCount = sheetLayout.getColumnCount();
    for (int col = 0; col < columnCount; col += 1)
    {
      final int sectionType = tableContentProducer.getSectionType(row, col);
      final CellBackground backgroundAt =
View Full Code Here

  private BorderEdge getCommonBottomBorderEdge(final LogicalPageBox logicalPageBox,
                                               final SheetLayout sheetLayout, final int row,
                                               final TableContentProducer tableContentProducer)
  {
    BorderEdge bg = BorderEdge.EMPTY;
    final int columnCount = sheetLayout.getColumnCount();
    for (int col = 0; col < columnCount; col += 1)
    {
      final int sectionType = tableContentProducer.getSectionType(row, col);
View Full Code Here

        styleBuilder.append("background-color", HtmlColors.getColorString(backgroundColor));
      }

      final BoxDefinition boxDefinition = box.getBoxDefinition();
      final Border border = boxDefinition.getBorder();
      final BorderEdge top = border.getTop();
      if (top != null)
      {
        styleBuilder.appendRaw("border-top", styleBuilder.printEdgeAsCSS(top));
      }
      final BorderEdge left = border.getLeft();
      if (left != null)
      {
        styleBuilder.appendRaw("border-left", styleBuilder.printEdgeAsCSS(left));
      }
      final BorderEdge bottom = border.getBottom();
      if (bottom != null)
      {
        styleBuilder.appendRaw("border-bottom", styleBuilder.printEdgeAsCSS(bottom));
      }
      final BorderEdge right = border.getRight();
      if (right != null)
      {
        styleBuilder.appendRaw("border-right", styleBuilder.printEdgeAsCSS(right));
      }
View Full Code Here

    {
      return null;
    }

    final Color c = (Color) style.getStyleProperty(ElementStyleKeys.PAINT);
    return new BorderEdge(borderStyle, c, StrictGeomUtility.toInternalValue(bs.getLineWidth()));
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.layout.model.BorderEdge

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.