Package java.awt

Examples of java.awt.Stroke


      return;
    }


    final Color oldColor = g2d.getColor();
    final Stroke oldStroke = g2d.getStroke();

    if (isSameForAllSides())
    {
      final Shape borderShape = getBorderShape();
View Full Code Here


    {
      Graphics2D g2d = (Graphics2D) g;
      Color origColor = g2d.getColor();
      Object hint = g2d.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
      g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
      Stroke origStroke = g2d.getStroke();

      g2d.translate(x, y);

      g2d.setColor(Color.BLACK);
      g2d.setStroke(basicStroke);
View Full Code Here

  protected void configureChart(final JFreeChart chart)
  {
    super.configureChart(chart);

    //Create the stroke for the primary (= real) data series...
    final Stroke thick = new BasicStroke(thicknessprimaryseries);

    //...and apply that stroke to the series
    final SpiderWebPlot webPlot = (SpiderWebPlot) chart.getPlot();

    if (StringUtils.isEmpty(getTooltipFormula()) == false)
View Full Code Here

          continue;
        }
        final String label = key.toString();
        final Paint paint = getSeriesPaint(series);
        final Paint outlinePaint = getSeriesOutlinePaint(series);
        final Stroke stroke = getSeriesOutlineStroke(series);
        final LegendItem item = new LegendItem(label, label,
            null, null, shape, paint, stroke, outlinePaint);
        item.setDataset(getDataset());
        item.setSeriesKey(key);
        item.setSeriesIndex(series);
View Full Code Here

        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

        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

    {
      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

  }

  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

        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

        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

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.