Examples of Stroke


Examples of java.awt.Stroke

        this.editor.setValue(null);
        this.samplePanel.setSampleValue(null);
      }
      else
      {
        final Stroke stroke = borderStyle.createStroke(width);
        this.editor.setValue(stroke);
        this.samplePanel.setSampleValue(stroke);
      }
    }
View Full Code Here

Examples of java.awt.Stroke

    {
      super.paintComponent(g);
      if (sampleValue != null)
      {
        Graphics2D g2d = (Graphics2D) g;
        Stroke origStroke = g2d.getStroke();
        Color origColor = g2d.getColor();
        Shape origClip = g2d.getClip();

        g2d.setStroke(sampleValue);
View Full Code Here

Examples of java.awt.Stroke

  }

  public void testClassification ()
  {
    {
      Stroke stroke = StrokeUtility.createStroke(4, 1);
      int recognizedType = StrokeUtility.getStrokeType(stroke);
      assertEquals("Stroke Type", 4, recognizedType);
    }

    for (int type = 0; type < 5; type += 1)
    {
      Stroke stroke = StrokeUtility.createStroke(type, 1);
      int recognizedType = StrokeUtility.getStrokeType(stroke);
      assertEquals("Stroke Type", type, recognizedType);
    }
  }
View Full Code Here

Examples of java.awt.Stroke

        if (locPoints == null) {
            return null;
        }

        Stroke stroke = line.getStroke();
        float lineWidth = 1f;
        if (stroke instanceof BasicStroke) {
            lineWidth = ((BasicStroke) stroke).getLineWidth();
            wingTip += lineWidth;
            wingLength += lineWidth * 2;
 
View Full Code Here

Examples of java.awt.Stroke

        int cap = BasicStroke.CAP_SQUARE;
        int join = BasicStroke.JOIN_MITER;
        float miterLimit = 10f;
        float dashPhase = 0f;
        Stroke stroke = null;
        float[] dash = null;

        String strokeCode = "stroke" + lineWidth + strokeString;

        stroke = (Stroke) renderAttributesCache.get(strokeCode);
View Full Code Here

Examples of java.awt.Stroke

    /**
     * Set the Stroke to use for the edge of a graphic.
     */
    public void setStroke(Stroke stroke) {
        Stroke oldStroke = this.stroke;
        this.stroke = stroke;

        // We don't want to call getBasicStrokeEditor, that creates
        // the editor if it doesn't exist, which may be problematic
        // for cases where there is no Graphics Display.
View Full Code Here

Examples of java.awt.Stroke

        props.put(prefix + PointOvalProperty, new Boolean(pointOval).toString());

        props.put(prefix + fillPatternProperty, (fPattern == null ? ""
                : fPattern));

        Stroke bs = getStroke();

        if (bs == null) {
            bs = new BasicStroke();
        }
View Full Code Here

Examples of java.awt.Stroke

      return;
    }
    final Color cssColor = (Color) layoutContext.getStyleProperty(ElementStyleKeys.PAINT);
    g2.setColor(cssColor);

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

Examples of java.awt.Stroke

      return;
    }

    final double y = area.getCenterY();

    final Stroke outlineStroke = getOutlineStroke();
    final Shape defaultShape = getDefaultShape();

    g2.setPaint(getFillPaint());
    for (int i = 0; i < values.length; i++)
    {
View Full Code Here

Examples of java.awt.Stroke

     * @param thickness the thickness of the line
     * @param dashed true if the line should be dashed
     */
    public void setLinkDrawingParameters(OMLine link, Paint paint,
                                         float thickness, boolean dashed) {
        Stroke stroke;
        if (dashed) {
            // create a basic default dash
            float[] dash = { 8.0f, 8.0f };
            stroke = new BasicStroke(thickness, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, dash, 0.0f);
        } else {
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.