Package java.awt

Examples of java.awt.Stroke


        test = Settings.propKeyboardSelectedColor.getColor();
      }
      grp.setColor(test);
      grp.fillRect(0, 0, width - 1, height - 1);

      Stroke str = grp.getStroke();
      Color col = grp.getColor();
      float[] dash = { 2.0f };
      int lineWidth = 1;
      BasicStroke dashed = new BasicStroke(lineWidth, BasicStroke.CAP_BUTT,
          BasicStroke.JOIN_MITER, 10.0f, dash, 0.0f);
View Full Code Here


    if (keepAspectRatio != null)
    {
      styleSheet.setBooleanStyleProperty(ElementStyleKeys.KEEP_ASPECT_RATIO, "true".equals(keepAspectRatio));
    }

    final Stroke stroke = readStroke(attrs);
    if (stroke != null)
    {
      styleSheet.setStyleProperty(ElementStyleKeys.STROKE, stroke);
    }
View Full Code Here

    {
      weight = ParserUtil.parseFloat
          (weightAttr, "Weight is given, but no number.", getLocator());
    }

    final Stroke stroke = ReportParserUtil.parseStroke(strokeStyle, weight);

    if (stroke != null)
    {
      final AbstractContentElementFactory elementFactory = (AbstractContentElementFactory) getElementFactory();
      elementFactory.setStroke(stroke);
View Full Code Here

//    return true;
  }

  protected void configureStroke(final StyleSheet layoutContext, final Graphics2D g2)
  {
    final Stroke styleProperty = (Stroke) layoutContext.getStyleProperty(ElementStyleKeys.STROKE);
    if (styleProperty != null)
    {
      g2.setStroke(styleProperty);
    }
    else
View Full Code Here

    return false;
  }

  public static boolean hasBorderEdge(final StyleSheet style)
  {
    final Stroke s = (Stroke) style.getStyleProperty(ElementStyleKeys.STROKE);
    if (s instanceof BasicStroke == false)
    {
      return false;
    }
    final BorderStyle borderStyle = StrokeUtility.translateStrokeStyle(s);
View Full Code Here

    return true;
  }

  public static BorderEdge produceBorderEdge(final StyleSheet style)
  {
    final Stroke s = (Stroke) style.getStyleProperty(ElementStyleKeys.STROKE);
    if (s instanceof BasicStroke == false)
    {
      return null;
    }
    final BasicStroke bs = (BasicStroke) s;
View Full Code Here

      final boolean value = style.getBooleanStyleProperty(ElementStyleKeys.ANTI_ALIASING);
      bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "anti-aliasing", String.valueOf(value));
    }
    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());
    }
View Full Code Here

    if (x1 == x2 && y1 == y2)
    {
      LineReadHandler.logger.warn("creating a horizontal line with 'x1 == x2 && y1 == y2' is deprecated. " +
          "Use relative coordinates instead.");
      final Stroke stroke = readStroke(atts);
      final String name = atts.getValue(getUri(), LineReadHandler.NAME_ATT);
      final Color c = ReportParserUtil.parseColor(atts.getValue(getUri(), LineReadHandler.COLOR_ATT));

      final HorizontalLineElementFactory elementFactory = new HorizontalLineElementFactory();
      elementFactory.setName(name);
View Full Code Here

                                  final float y1,
                                  final float x2,
                                  final float y2)
      throws SAXException
  {
    final Stroke stroke = readStroke(atts);
    final String name = atts.getValue(getUri(), LineReadHandler.NAME_ATT);
    final Color c = ReportParserUtil.parseColor
        (atts.getValue(getUri(), LineReadHandler.COLOR_ATT), null);

    final String widthValue = atts.getValue(getUri(), "width");
View Full Code Here

                                final float y1,
                                final float x2,
                                final float y2)
      throws SAXException
  {
    final Stroke stroke = readStroke(atts);
    final String name = atts.getValue(getUri(), LineReadHandler.NAME_ATT);
    final Color c = ReportParserUtil.parseColor(atts.getValue(getUri(), LineReadHandler.COLOR_ATT), null);
    final String widthValue = atts.getValue(getUri(), "width");
    final float width;
    if (widthValue != null)
View Full Code Here

TOP

Related Classes of java.awt.Stroke

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.