Examples of BorderCorner


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

  private BorderCorner parseCornerRadius(final String keyPrefix, final Attributes attributes) throws SAXException
  {
    final String borderRadiusX = attributes.getValue(getUri(), keyPrefix + "-x");
    if (borderRadiusX == null)
    {
      return new BorderCorner(0, 0);
    }
    final String borderRadiusY = attributes.getValue(getUri(), keyPrefix + "-y");
    if (borderRadiusY == null)
    {
      return new BorderCorner(0, 0);
    }

    final Float radiusX = ReportParserUtil.parseFloat(borderRadiusX, getLocator());
    final Float radiusY = ReportParserUtil.parseFloat(borderRadiusY, getLocator());
    if (radiusX == null || radiusX.floatValue() <= 0 || radiusY == null || radiusY.floatValue() <= 0)
    {
      return new BorderCorner(0, 0);
    }
    return new BorderCorner(StrictGeomUtility.toInternalValue(radiusX.floatValue()),
        StrictGeomUtility.toInternalValue(radiusY.floatValue()));
  }
View Full Code Here

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

          String.valueOf(StrictGeomUtility.toExternalValue(right.getWidth())));
      attList.setAttribute(null, "border-right-style",
          String.valueOf(right.getBorderStyle()));
    }

    final BorderCorner topLeft = bg.getTopLeft();
    if (topLeft != null && BorderCorner.EMPTY.equals(topLeft) == false)
    {
      attList.setAttribute(null, "border-top-left-x",
          String.valueOf(StrictGeomUtility.toExternalValue(topLeft.getWidth())));
      attList.setAttribute(null, "border-top-left-y",
          String.valueOf(StrictGeomUtility.toExternalValue(topLeft.getHeight())));
    }


    final BorderCorner topRight = bg.getTopRight();
    if (topRight != null && BorderCorner.EMPTY.equals(topRight) == false)
    {
      attList.setAttribute(null, "border-top-right-x",
          String.valueOf(StrictGeomUtility.toExternalValue(topRight.getWidth())));
      attList.setAttribute(null, "border-top-right-y",
          String.valueOf(StrictGeomUtility.toExternalValue(topRight.getHeight())));
    }


    final BorderCorner bottomLeft = bg.getBottomLeft();
    if (bottomLeft != null && BorderCorner.EMPTY.equals(bottomLeft) == false)
    {
      attList.setAttribute(null, "border-bottom-left-x",
          String.valueOf(StrictGeomUtility.toExternalValue(bottomLeft.getWidth())));
      attList.setAttribute(null, "border-bottom-left-y",
          String.valueOf(StrictGeomUtility.toExternalValue(bottomLeft.getHeight())));
    }


    final BorderCorner bottomRight = bg.getBottomRight();
    if (bottomRight != null && BorderCorner.EMPTY.equals(bottomRight) == false)
    {
      attList.setAttribute(null, "border-bottom-right-x",
          String.valueOf(StrictGeomUtility.toExternalValue(bottomRight.getWidth())));
      attList.setAttribute(null, "border-bottom-right-y",
          String.valueOf(StrictGeomUtility.toExternalValue(bottomRight.getHeight())));
    }
    return attList;
  }
View Full Code Here

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

    {
      box.setBorder(Border.EMPTY_BORDER);
    }
    else
    {
      final BorderCorner topLeftCorner = createCorner
          (style, ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_WIDTH, ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_HEIGHT);
      final BorderCorner topRightCorner = createCorner
          (style, ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_WIDTH, ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_HEIGHT);
      final BorderCorner bottmLeftCorner = createCorner
          (style, ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_WIDTH, ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_HEIGHT);
      final BorderCorner bottomRightCorner = createCorner
          (style, ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_WIDTH,
              ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_HEIGHT);
      box.setBorder(new Border(edgeTop, edgeLeft, edgeBottom, edgeRight, edgeBreak,
          topLeftCorner, topRightCorner, bottmLeftCorner, bottomRightCorner));
    }
View Full Code Here

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

    final float dimY = (float) style.getDoubleStyleProperty(radiusKeyY, 0);
    if (dimX <= 0 || dimY <= 0)
    {
      return BorderCorner.EMPTY;
    }
    return new BorderCorner(StrictGeomUtility.toInternalValue(dimX), StrictGeomUtility.toInternalValue(dimY));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.