Examples of BorderStyle


Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

    if (s instanceof BasicStroke == false)
    {
      return null;
    }
    final BasicStroke bs = (BasicStroke) s;
    final BorderStyle borderStyle = StrokeUtility.translateStrokeStyle(s);
    if (BorderStyle.NONE.equals(borderStyle))
    {
      return null;
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

    }
    if (style.isLocalKey(ElementStyleKeys.STROKE))
    {
      final Stroke s = (Stroke) style.getStyleProperty(ElementStyleKeys.STROKE);
      final float strokeWidth = StrokeUtility.getStrokeWidth(s);
      final BorderStyle strokeType = StrokeUtility.translateStrokeStyle(s);
      bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "stroke-weight", absoluteLengthFormat.format(strokeWidth));
      bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "stroke-style", strokeType.toString());
    }
    if (bandStyleAtts.isEmpty() == false)
    {
      writer.writeTag(BundleNamespaces.STYLE, "content-styles", bandStyleAtts, XmlWriterSupport.CLOSE);
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

  }


  public String printEdgeAsCSS(final BorderEdge edge)
  {
    final BorderStyle borderStyle = edge.getBorderStyle();
    final long width = edge.getWidth();
    if (BorderStyle.NONE.equals(borderStyle) || width <= 0)
    {
      return "none";
    }

    final Object cached = cachedBorderStyle.get(edge);
    if (cached != null)
    {
      return cached.toString();
    }

    final String value =
        (pointConverter.format(HtmlPrinter.fixLengthForSafari(StrictGeomUtility.toExternalValue(width),
        safariLengthFix)) +
        "pt " + borderStyle.toString() + ' ' + HtmlColors.getColorString(edge.getColor()));
    cachedBorderStyle.put(edge, value);
    return value;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

    }

    final String borderStyle = atts.getValue(getUri(), "border-style");
    if (borderStyle != null)
    {
      final BorderStyle value = parseBorderStyle(borderStyle);
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_STYLE, value);
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_LEFT_STYLE, value);
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_STYLE, value);
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_RIGHT_STYLE, value);
    }
    final String borderStyleTop = atts.getValue(getUri(), "border-top-style");
    if (borderStyleTop != null)
    {
      final BorderStyle value = parseBorderStyle(borderStyleTop);
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_STYLE, value);
    }
    final String borderStyleLeft = atts.getValue(getUri(), "border-left-style");
    if (borderStyleLeft != null)
    {
      final BorderStyle value = parseBorderStyle(borderStyleLeft);
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_LEFT_STYLE, value);
    }
    final String borderStyleBottom = atts.getValue(getUri(), "border-bottom-style");
    if (borderStyleBottom != null)
    {
      final BorderStyle value = parseBorderStyle(borderStyleBottom);
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BOTTOM_STYLE, value);
    }
    final String borderStyleRight = atts.getValue(getUri(), "border-right-style");
    if (borderStyleRight != null)
    {
      final BorderStyle value = parseBorderStyle(borderStyleRight);
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_RIGHT_STYLE, value);
    }
    final String borderStyleBreak = atts.getValue(getUri(), "border-break-style");
    if (borderStyleBreak != null)
    {
      final BorderStyle value = parseBorderStyle(borderStyleBreak);
      styleSheet.setStyleProperty(ElementStyleKeys.BORDER_BREAK_STYLE, value);
    }

    final String borderRadiusWidth = atts.getValue(getUri(), "border-radius-width");
    if (borderRadiusWidth != null)
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

        maybeBorderWidth instanceof Number == false)
    {
      return;
    }

    final BorderStyle style = (BorderStyle) maybeBorderStyle;
    final Color color = (Color) maybeBorderColor;
    final Number number = (Number) maybeBorderWidth;
    final Float width = new Float(number.floatValue());

    styleSheet.setStyleProperty(ElementStyleKeys.BORDER_TOP_WIDTH, width);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

  /* (non-Javadoc)
   * @see java.beans.PropertyEditor#getAsText()
   */
  public String getAsText()
  {
    final BorderStyle borderStyle = StrokeUtility.translateStrokeStyle(value);
    final float width = value.getLineWidth();
    return borderStyle + ", " + width;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

    if (width < 0)
    {
      setValue(null);
      return;
    }
    BorderStyle style = BorderStyle.getBorderStyle(strings[0].trim());
    if (style == null)
    {
      style = BorderStyle.getBorderStyle(strings[1].trim());
    }
    if (style == null)
    {
      setValue(null);
    }
    else
    {
      setValue(style.createStroke(width));
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

                                                  boolean cellHasFocus)
    {
      JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
      if (value instanceof BorderStyle)
      {
        final BorderStyle style = (BorderStyle) value;
        StrokeIcon strokeIcon = new StrokeIcon(style.createStroke(2));
        label.setIcon(strokeIcon);
      }
      else
      {
        label.setIcon(null);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

    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);

    resultCell.setTop(new BorderEdge(borderStyleTop, borderColorTop, StrictGeomUtility.toInternalValue(borderWidthTop.floatValue())));
    resultCell.setLeft(new BorderEdge(borderStyleLeft, borderColorLeft, StrictGeomUtility.toInternalValue(borderWidthLeft.floatValue())));
    resultCell.setBottom(new BorderEdge(borderStyleBottom, borderColorBottom, StrictGeomUtility.toInternalValue(borderWidthBottom.floatValue())));
    resultCell.setRight(new BorderEdge(borderStyleRight, borderColorRight, StrictGeomUtility.toInternalValue(borderWidthRight.floatValue())));
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.BorderStyle

          (ElementStyleKeys.BACKGROUND_COLOR, sheet.stringToColor(String.valueOf(backgroundColor)));
    }
    final Object borderStyleText = attr.getAttribute(CSS.Attribute.BORDER_STYLE);
    if (borderStyleText != null)
    {
      final BorderStyle borderStyle = BorderStyle.getBorderStyle(String.valueOf(borderStyleText));
      if (borderStyle != null)
      {
        result.getStyle().setStyleProperty
            (ElementStyleKeys.BORDER_BOTTOM_STYLE, borderStyle);
        result.getStyle().setStyleProperty
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.