Example usage for java.awt BasicStroke JOIN_BEVEL

List of usage examples for java.awt BasicStroke JOIN_BEVEL

Introduction

In this page you can find the example usage for java.awt BasicStroke JOIN_BEVEL.

Prototype

int JOIN_BEVEL

To view the source code for java.awt BasicStroke JOIN_BEVEL.

Click Source Link

Document

Joins path segments by connecting the outer corners of their wide outlines with a straight segment.

Usage

From source file:AtomPanel.java

private void initJFreeChart() {
    this.numOfStream = numOfStream;

    datasets = new TimeSeriesCollection();
    trend = new TimeSeriesCollection();
    projpcs = new TimeSeriesCollection();
    spe = new TimeSeriesCollection();

    for (int i = 0; i < MaxNumOfStream; i++) {
        //add streams
        TimeSeries timeseries = new TimeSeries("Stream " + i, Millisecond.class);
        datasets.addSeries(timeseries);/*from   w w  w .ja va  2s.c  om*/
        timeseries.setHistoryCount(historyRange);
        //add trend variables
        TimeSeries trendSeries = new TimeSeries("Trend " + i, Millisecond.class);
        trend.addSeries(trendSeries);
        trendSeries.setHistoryCount(historyRange);
        //add proj onto PCs variables
        TimeSeries PC = new TimeSeries("Projpcs " + i, Millisecond.class);
        projpcs.addSeries(PC);
        PC.setHistoryCount(historyRange);
        //add spe streams
        TimeSeries speSeries = new TimeSeries("Spe " + i, Millisecond.class);
        spe.addSeries(speSeries);
        speSeries.setHistoryCount(historyRange);
    }
    combineddomainxyplot = new CombinedDomainXYPlot(new DateAxis("Time"));
    //data stream  plot
    DateAxis domain = new DateAxis("Time");
    NumberAxis range = new NumberAxis("Streams");
    domain.setTickLabelFont(new Font("SansSerif", Font.PLAIN, 12));
    range.setTickLabelFont(new Font("SansSerif", Font.PLAIN, 12));
    domain.setLabelFont(new Font("SansSerif", Font.PLAIN, 14));
    range.setLabelFont(new Font("SansSerif", Font.PLAIN, 14));

    XYItemRenderer renderer = new DefaultXYItemRenderer();
    renderer.setItemLabelsVisible(false);
    renderer.setStroke(new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
    XYPlot plot = new XYPlot(datasets, domain, range, renderer);
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setRangeGridlinePaint(Color.white);
    plot.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));
    domain.setAutoRange(true);
    domain.setLowerMargin(0.0);
    domain.setUpperMargin(0.0);
    domain.setTickLabelsVisible(true);

    range.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    combineddomainxyplot.add(plot);

    //Trend captured by pca
    DateAxis domain0 = new DateAxis("Time");
    NumberAxis range0 = new NumberAxis("PCA Trend");
    domain0.setTickLabelFont(new Font("SansSerif", Font.PLAIN, 12));
    range0.setTickLabelFont(new Font("SansSerif", Font.PLAIN, 12));
    domain0.setLabelFont(new Font("SansSerif", Font.PLAIN, 14));
    range0.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));

    XYItemRenderer renderer0 = new DefaultXYItemRenderer();
    renderer0.setItemLabelsVisible(false);
    renderer0.setStroke(new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
    renderer0.setSeriesPaint(0, Color.blue);
    renderer0.setSeriesPaint(1, Color.red);
    renderer0.setSeriesPaint(2, Color.magenta);
    XYPlot plot0 = new XYPlot(trend, domain0, range0, renderer0);
    plot0.setBackgroundPaint(Color.lightGray);
    plot0.setDomainGridlinePaint(Color.white);
    plot0.setRangeGridlinePaint(Color.white);
    plot0.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));
    domain0.setAutoRange(true);
    domain0.setLowerMargin(0.0);
    domain0.setUpperMargin(0.0);
    domain0.setTickLabelsVisible(false);

    range0.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    combineddomainxyplot.add(plot0);

    //proj on PCs plot
    DateAxis domain1 = new DateAxis("Time");
    NumberAxis range1 = new NumberAxis("Proj on PCs");
    domain1.setTickLabelFont(new Font("SansSerif", Font.PLAIN, 12));
    range1.setTickLabelFont(new Font("SansSerif", Font.PLAIN, 12));
    domain1.setLabelFont(new Font("SansSerif", Font.PLAIN, 14));
    range1.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));

    XYItemRenderer renderer1 = new DefaultXYItemRenderer();
    renderer1.setItemLabelsVisible(false);
    renderer1.setStroke(new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
    renderer1.setSeriesPaint(0, Color.blue);
    renderer1.setSeriesPaint(1, Color.red);
    renderer1.setSeriesPaint(2, Color.magenta);
    plot1 = new XYPlot(projpcs, domain1, range1, renderer1);
    plot1.setBackgroundPaint(Color.lightGray);
    plot1.setDomainGridlinePaint(Color.white);
    plot1.setRangeGridlinePaint(Color.white);
    plot1.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));
    domain1.setAutoRange(true);
    domain1.setLowerMargin(0.0);
    domain1.setUpperMargin(0.0);
    domain1.setTickLabelsVisible(false);

    range1.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    combineddomainxyplot.add(plot1);

    //spe  plot
    DateAxis domain2 = new DateAxis("Time");
    NumberAxis range2 = new NumberAxis("SPE");
    domain2.setTickLabelFont(new Font("SansSerif", Font.PLAIN, 12));
    range2.setTickLabelFont(new Font("SansSerif", Font.PLAIN, 12));
    domain2.setLabelFont(new Font("SansSerif", Font.PLAIN, 14));
    range2.setLabelFont(new Font("SansSerif", Font.PLAIN, 14));

    XYItemRenderer renderer2 = new DefaultXYItemRenderer();
    renderer2.setItemLabelsVisible(false);
    renderer2.setStroke(new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
    XYPlot plot2 = new XYPlot(spe, domain2, range2, renderer);
    plot2.setBackgroundPaint(Color.lightGray);
    plot2.setDomainGridlinePaint(Color.white);
    plot2.setRangeGridlinePaint(Color.white);
    plot2.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 5.0, 5.0, 5.0, 5.0));
    domain2.setAutoRange(true);
    domain2.setLowerMargin(0.0);
    domain2.setUpperMargin(0.0);
    domain2.setTickLabelsVisible(true);

    range2.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    combineddomainxyplot.add(plot2);

    ValueAxis axis = plot.getDomainAxis();
    axis.setAutoRange(true);
    axis.setFixedAutoRange(historyRange); // 60 seconds
    JFreeChart chart;
    if (this.pcaType == AtomUtils.PCAType.pca)
        chart = new JFreeChart("CloudWatch-ATOM with Exact Data", new Font("SansSerif", Font.BOLD, 18),
                combineddomainxyplot, false);
    else if (this.pcaType == AtomUtils.PCAType.pcaTrack)
        chart = new JFreeChart("CloudWatch-ATOM with Fixed Tracking Threshold",
                new Font("SansSerif", Font.BOLD, 18), combineddomainxyplot, false);
    else
        chart = new JFreeChart("CloudWatch-ATOM with Dynamic Tracking Threshold",
                new Font("SansSerif", Font.BOLD, 18), combineddomainxyplot, false);
    chart.setBackgroundPaint(Color.white);
    ChartPanel chartPanel = new ChartPanel(chart);
    chartPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4),
            BorderFactory.createLineBorder(Color.black)));
    AtomPanel.this.add(chartPanel, BorderLayout.CENTER);
}

From source file:org.jstockchart.plot.TimeseriesPlot.java

private XYPlot createVolumePlot() {
    Font axisFont = new Font("Arial", 0, 12);
    Stroke stroke = new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.CAP_SQUARE, 0.0f,
            new float[] { 1.0f, 1.0f }, 1.0f);
    VolumeArea volumeArea = timeseriesArea.getVolumeArea();
    LogicNumberAxis logicVolumeAxis = volumeArea.getLogicVolumeAxis();
    Color volumeColor = new Color(86, 126, 160);
    volumeArea.setVolumeColor(volumeColor);
    CFXNumberAxis volumeAxis = new CFXNumberAxis(logicVolumeAxis.getLogicTicks());
    volumeAxis.setAxisLineVisible(false);
    volumeAxis.setCustomTickCount(2);//from   w w w .  ja v  a2  s  . c  om
    volumeAxis.setTickLabelPaint(volumeColor);
    volumeAxis.setUpperBound(logicVolumeAxis.getUpperBound());
    volumeAxis.setTickLabelFont(axisFont);
    volumeAxis.setTickMarkStroke(stroke);
    volumeAxis.setLowerBound(logicVolumeAxis.getLowerBound());
    volumeAxis.setAutoRangeIncludesZero(true);
    XYAreaRenderer2 volumeRenderer = new XYAreaRenderer2();
    volumeRenderer.setSeriesPaint(0, volumeArea.getVolumeColor());
    //volumeRenderer.setShadowVisible(false);
    volumeRenderer.setSeriesStroke(0, stroke);
    volumeRenderer.setBaseStroke(stroke);
    XYPlot plot = new XYPlot(new TimeSeriesCollection(dataset.getVolumeTimeSeries()), null, volumeAxis,
            volumeRenderer);
    plot.setBackgroundPaint(volumeArea.getBackgroudColor());
    plot.setOrientation(volumeArea.getOrientation());
    plot.setRangeAxisLocation(volumeArea.getVolumeAxisLocation());
    plot.setRangeMinorGridlinesVisible(false);

    Stroke outLineStroke = new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.CAP_SQUARE, 0.0f,
            new float[] { 1.0f, 1.0f }, 1.0f);
    Stroke gridLineStroke = new BasicStroke(0.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0.0f,
            new float[] { 2.0f, 2.0f }, 1.0f);
    // plot.setBackgroundPaint(Color.RED);
    plot.setRangeGridlineStroke(gridLineStroke);
    plot.setDomainGridlineStroke(gridLineStroke);
    plot.setRangeGridlinesVisible(true);
    plot.setDomainGridlinesVisible(true);
    plot.setOutlineVisible(true);
    plot.setOutlineStroke(outLineStroke);
    plot.setOutlinePaint(Color.black);
    plot.setRangeZeroBaselineVisible(true);
    return plot;
}

From source file:org.tsho.dmc2.core.chart.Bifurcation2DRenderer.java

public LegendItemCollection getLegendItems() {

    Stroke stroke = new BasicStroke(1.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL);
    Shape shape = new Rectangle2D.Double(-3, -3, 6, 6);

    LegendItemCollection legendItems = new LegendItemCollection();

    for (int i = 0; i < period; i++) {
        legendItems.add(new LegendItem(Integer.toString(i + 1), "", shape, true,
                (DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE[i]), stroke, Color.yellow, stroke));
    }/*  www.j  a  v a 2 s  .c om*/

    legendItems.add(new LegendItem(">" + period, "", shape, true, Color.white, stroke, Color.yellow, stroke));

    legendItems.add(new LegendItem("infinity", "", shape, true, Color.black, stroke, Color.yellow, stroke));

    return legendItems;
}

From source file:SWTGraphics2D.java

/**
 * Sets the stroke for this graphics context.  For now, this implementation
 * only recognises the {@link BasicStroke} class.
 *
 * @param stroke  the stroke (<code>null</code> not permitted).
 *
 * @see #getStroke()//  w  w w .j  a va  2 s.c om
 */
public void setStroke(Stroke stroke) {
    if (stroke instanceof BasicStroke) {
        BasicStroke bs = (BasicStroke) stroke;
        // linewidth
        this.gc.setLineWidth((int) bs.getLineWidth());

        // line join
        switch (bs.getLineJoin()) {
        case BasicStroke.JOIN_BEVEL:
            this.gc.setLineJoin(SWT.JOIN_BEVEL);
            break;
        case BasicStroke.JOIN_MITER:
            this.gc.setLineJoin(SWT.JOIN_MITER);
            break;
        case BasicStroke.JOIN_ROUND:
            this.gc.setLineJoin(SWT.JOIN_ROUND);
            break;
        }

        // line cap
        switch (bs.getEndCap()) {
        case BasicStroke.CAP_BUTT:
            this.gc.setLineCap(SWT.CAP_FLAT);
            break;
        case BasicStroke.CAP_ROUND:
            this.gc.setLineCap(SWT.CAP_ROUND);
            break;
        case BasicStroke.CAP_SQUARE:
            this.gc.setLineCap(SWT.CAP_SQUARE);
            break;
        }

        // set the line style to solid by default
        this.gc.setLineStyle(SWT.LINE_SOLID);

        // apply dash style if any
        float[] dashes = bs.getDashArray();
        if (dashes != null) {
            int[] swtDashes = new int[dashes.length];
            for (int i = 0; i < swtDashes.length; i++) {
                swtDashes[i] = (int) dashes[i];
            }
            this.gc.setLineDash(swtDashes);
        }
    } else {
        throw new RuntimeException("Can only handle 'Basic Stroke' at present.");
    }
}

From source file:com.anrisoftware.prefdialog.miscswing.multichart.freechart.FreechartXYChart.java

private XYLineAndShapeRenderer createLineShapeRenderer() {
    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(true, true);
    renderer.setBaseStroke(new BasicStroke(2f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
    renderer.setBaseShapesVisible(true);
    renderer.setBaseShapesFilled(true);// w w  w.  j  a v  a2s  .  c o  m
    renderer.setDrawOutlines(true);
    int columns = model == null ? 1 : model.getColumnCount();
    if (blackWhite) {
        for (int i = 0; i < columns; i++) {
            renderer.setSeriesPaint(i, Color.black, false);
        }
    } else {
        Iterator<Color> it = paletteFactory.createBright().iterator();
        for (int i = 0; i < columns; i++, it.hasNext()) {
            renderer.setSeriesPaint(i, it.next(), false);
        }
    }
    if (!showShapes) {
        for (int i = 0; i < columns; i++) {
            renderer.setSeriesShapesVisible(i, false);
        }
    }
    renderer.notifyListeners(new RendererChangeEvent(renderer));
    return renderer;
}

From source file:it.eng.spagobi.engines.chart.bo.charttypes.targetcharts.SparkLine.java

private void addMarker(int index, double value, final Color color, float stoke, XYPlot plot) {
    logger.debug("IN");
    TimeSeries markerSeries = new TimeSeries("Marker" + index, Month.class);
    for (Iterator iterator = yearsDefined.iterator(); iterator.hasNext();) {
        String currentYear = (String) iterator.next();
        boolean stop = false;
        for (int i = 1; i < 13 && stop == false; i++) {
            if (!(currentYear.equalsIgnoreCase(yearsDefined.first()) && i < firstMonth.getMonth())) {
                markerSeries.add(new Month(i, Integer.valueOf(currentYear).intValue()), value);
            }/*from   w w w.  ja  v a  2s  .co m*/
            if (currentYear.equalsIgnoreCase(lastYear) && i >= lastMonth.getMonth()) {
                stop = true;
            }
        }
    }

    final TimeSeriesCollection dataset = new TimeSeriesCollection(markerSeries);

    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(true, false) {
        public boolean getItemShapeVisible(int _series, int item) {
            return (false);
        }

        public Paint getItemPaint(int row, int column) {
            return color;
        }
    };

    renderer.setBaseStroke(new BasicStroke(stoke, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));

    renderer.setBaseShapesVisible(true);
    renderer.setBaseShapesFilled(true);
    renderer.setDrawOutlines(true);
    renderer.setUseFillPaint(true);
    renderer.setBaseFillPaint(Color.GRAY);
    renderer.setBaseOutlinePaint(Color.BLACK);
    renderer.setUseOutlinePaint(true);

    plot.setDataset(index, dataset);
    plot.setRenderer(index, renderer);
    logger.debug("OUT");
}

From source file:org.tsho.dmc2.core.chart.DmcLyapunovPlot.java

public LegendItemCollection getLegendItems() {
    if (type != AREA)
        return null;

    Stroke stroke = new BasicStroke(1.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL);
    Shape shape = new Rectangle2D.Double(-3, -3, 6, 6);

    LegendItemCollection legendItems = new LegendItemCollection();
    legendItems.add(new LegendItem("both zero", "", shape, true, Color.black, stroke, Color.yellow, stroke));

    legendItems.add(new LegendItem("zero, positive", "", shape, true, Color.red, stroke, Color.yellow, stroke));

    legendItems//from w  w  w .  j av a  2  s.  c o m
            .add(new LegendItem("zero, negative", "", shape, true, Color.blue, stroke, Color.yellow, stroke));

    legendItems.add(
            new LegendItem("positive, negative", "", shape, true, Color.green, stroke, Color.yellow, stroke));

    legendItems
            .add(new LegendItem("both positive", "", shape, true, Color.orange, stroke, Color.yellow, stroke));

    legendItems.add(new LegendItem("both negative", "", shape, true, Color.pink, stroke, Color.yellow, stroke));

    return legendItems;
}

From source file:com.diversityarrays.kdxplore.scatterplot.ScatterPlotPanel.java

private void drawRectangle() {
    if (mouseDownPoint != null && mouseUpPoint != null) {

        double dn = mouseDownPoint.getX();
        double up = mouseUpPoint.getX();

        double x0 = Math.min(dn, up);
        double x1 = Math.max(dn, up);

        dn = mouseDownPoint.getY();//from w w w  . j  av a 2s .  c om
        up = mouseUpPoint.getY();

        double y0 = Math.min(dn, up);
        double y1 = Math.max(dn, up);

        removeAnnotations();
        Stroke stroke = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, new float[] { 3 },
                0);
        Paint paint = Color.BLACK;

        Rectangle2D rect = new Rectangle2D.Double(x0, y0, x1 - x0, y1 - y0);
        intervalAnnotation = new XYShapeAnnotation(rect, stroke, paint);

        addRangeMarker(intervalAnnotation);
        getChartPanel().repaint();
    }
}

From source file:sim.app.sugarscape.util.ResultsGrapher.java

JFreeChart createChart1(XYSeries[] series) {
    JFreeChart chart3 = ChartFactory.createXYLineChart("Results", x_axis_fieldname, y_axis_fieldname, null, //new XYSeriesCollection(series[2]),
            PlotOrientation.VERTICAL, true, true, false);
    //System.out.println("Series count = " +series[0].getItemCount());
    XYPlot plot = chart3.getXYPlot();//from  w ww  .jav a 2s  .c  o  m

    ValueAxis yAxis = plot.getRangeAxis();
    //xAxis.setFixedDimension(100);
    //yAxis.setFixedDimension(1.0);
    //yAxis.setRange(0,1);
    ValueAxis xAxis = plot.getDomainAxis();
    //xAxis.setFixedDimension(50);

    StandardXYItemRenderer renderer = (StandardXYItemRenderer) plot.getRenderer();
    renderer.setSeriesPaint(0, Color.black);
    renderer.setStroke(new BasicStroke(2f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));

    renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 20));
    renderer.setItemLabelsVisible(true);

    renderer.setSeriesItemLabelsVisible(1, true);
    renderer.setBaseShapesVisible(true);
    //XYLabelGenerator generator = new StandardXYLabelGenerator();

    //"{2}", new DecimalFormat("0.00") );
    //renderer.setLabelGenerator(generator);
    //NumberAxis axis2 = new NumberAxis("Average Agent Vision");
    //renderer.setItemLabelsVisible(true);
    //axis2.setAutoRangeIncludesZero(false);
    //axis2.setRange(0,12);
    //plot.setRangeAxis(1, axis2);
    plot.setRangeAxisLocation(1, AxisLocation.BOTTOM_OR_RIGHT);
    //XYSeriesCollection vision = new XYSeriesCollection(lorenz_agent_vision);
    //plot.setDataset(1, vision);
    //String first_letter = x_param_fieldname.substring(0,1)+"=";
    XYSeriesCollection xys = new XYSeriesCollection();
    for (int a = 0; a < series.length; a++) {
        xys.addSeries(series[a]);
        //xys.
        //xys.getSeriesName(4);
        System.out.println(xys.getSeries(a).getDescription());
    }
    plot.setDataset(0, xys);
    return chart3;

}

From source file:org.openmeetings.app.data.record.BatikMethods.java

public void drawArrow(SVGGraphics2D g2d, GeomPoint start, GeomPoint end, float thickness, float alpha,
        Color linecoler, Color fillColor) {

    if (start.equals(end))
        return;/*from w  w  w.ja v  a  2  s.com*/

    //      (double edgeControlPosition, double edgeControlSize,
    //            double headLength, double headWidth, double shaftControlPosition,
    //            double shaftControlSize, float shaftPosition, double shaftThickness)
    ArrowStyle arrowStyle = new ArrowStyle(0.5, 0.5, thickness * 5, thickness * 5, 0.5, 0.5, 0, thickness);

    GeomPoint fullVect = end.subtract(start);
    double halfWidth = (arrowStyle.headWidth != -1) ? arrowStyle.headWidth / 2 : arrowStyle.headLength / 2;

    //Figure out the line start/end points
    GeomPoint startNorm = new GeomPoint();
    startNorm.setLocation(fullVect.getY(), -fullVect.getX());
    startNorm.normalize(arrowStyle.shaftThickness / 2);
    GeomPoint start1 = start.add(startNorm);
    GeomPoint start2 = start.subtract(startNorm);
    GeomPoint end1 = end.add(startNorm);
    GeomPoint end2 = end.subtract(startNorm);

    //log.debug("startNorm: "+startNorm.toString());
    //log.debug("start1: "+start1.toString());
    //log.debug("start2: "+start2.toString());
    //log.debug("end1: "+end1.toString());
    //log.debug("end2: "+end2.toString());

    //figure out where the arrow head starts
    GeomPoint headPnt = fullVect.clone();
    //log.debug("headPnt 1: "+headPnt.toString());
    //log.debug("headPnt.length 1: "+headPnt.length());
    //log.debug("arrowStyle.headLength 1: "+arrowStyle.headLength);
    headPnt.normalize(headPnt.length() - arrowStyle.headLength);
    //log.debug("headPnt 2: "+headPnt.toString());
    headPnt = headPnt.add(start);
    //log.debug("headPnt 3: "+headPnt.toString());

    //calculate the arrowhead corners
    GeomPoint headPntNorm = startNorm.clone();
    //log.debug("headPntNorm ^^: "+headPntNorm.toString());
    //log.debug("halfWidth ^^: "+halfWidth);
    headPntNorm.normalize(halfWidth);
    //log.debug("headPntNorm: "+headPntNorm.toString());
    GeomPoint edge1 = headPnt.add(headPntNorm);
    GeomPoint edge2 = headPnt.subtract(headPntNorm);

    //log.debug("edge1: "+edge1.toString());
    //log.debug("edge2: "+edge2.toString());

    //Figure out where the arrow connects the the shaft, then calc the intersections
    GeomPoint shaftCenter = GeomPoint.interpolate(end, headPnt, arrowStyle.shaftPosition);
    //log.debug("end"+end.toString());
    //log.debug("headPnt: "+headPnt.toString());
    //log.debug("arrowStyle.shaftPosition: "+arrowStyle.shaftPosition);
    //log.debug("shaftCenter: "+shaftCenter);
    //log.debug("edge1: "+edge1);
    //shaftCenter.setLocation(185.857864376269, 185.857864376269);
    GeomPoint inter1 = GeomPoint.getLineIntersection(start1, end1, shaftCenter, edge1);
    GeomPoint inter2 = GeomPoint.getLineIntersection(start2, end2, shaftCenter, edge2);

    //log.debug("inter1: "+inter1.toString());
    //log.debug("inter2: "+inter2.toString());

    //Figure out the control points
    GeomPoint edgeCenter = GeomPoint.interpolate(end, headPnt, (float) arrowStyle.edgeControlPosition);
    GeomPoint edgeNorm = startNorm.clone();
    edgeNorm.normalize(halfWidth * arrowStyle.edgeControlSize);
    //log.debug("halfWidth*arrowStyle.edgeControlSize: "+(halfWidth*arrowStyle.edgeControlSize));
    //log.debug("edgeNorm: "+edgeNorm.toString());
    GeomPoint edgeCntrl1 = edgeCenter.add(edgeNorm);
    GeomPoint edgeCntrl2 = edgeCenter.subtract(edgeNorm);

    //log.debug("edgeCntrl1: "+edgeCntrl1.toString());
    //log.debug("edgeCntrl2: "+edgeCntrl2.toString());

    g2d.setPaint(new Color(255, 0, 0));

    //      graphics.moveTo(start1.x,start1.y);
    //      graphics.lineTo(inter1.x,inter1.y);
    //      graphics.lineTo(edge1.x,edge1.y);
    //      graphics.curveTo(edgeCntrl1.x,edgeCntrl1.y,end.x,end.y);
    //      graphics.curveTo(edgeCntrl2.x,edgeCntrl2.y,edge2.x,edge2.y);
    //      graphics.lineTo(inter2.x,inter2.y);
    //      graphics.lineTo(start2.x,start2.y);
    //      graphics.lineTo(start1.x,start1.y);

    //      log.debug("moveTo"+start1.x+","+start1.y);
    //      log.debug("lineTo"+inter1.x+","+inter1.y);
    //      log.debug("lineTo"+edge1.x+","+edge1.y);
    //      log.debug("quadTo"+edgeCntrl1.x+","+edgeCntrl1.y+","+end.x+","+end.y);
    //      log.debug("quadTo"+edgeCntrl2.x+","+edgeCntrl2.y+","+edge2.x+","+edge2.y);
    //      log.debug("lineTo"+inter2.x+","+inter2.y);
    //      log.debug("lineTo"+start2.x+","+start2.y);
    //      log.debug("lineTo"+start1.x+","+start1.y);

    GeneralPath graphics = new GeneralPath();
    graphics.moveTo(start1.x, start1.y);
    graphics.lineTo(inter1.x, inter1.y);
    graphics.lineTo(edge1.x, edge1.y);
    graphics.quadTo(edgeCntrl1.x, edgeCntrl1.y, end.x, end.y);
    graphics.quadTo(edgeCntrl2.x, edgeCntrl2.y, edge2.x, edge2.y);
    graphics.lineTo(inter2.x, inter2.y);
    graphics.lineTo(start2.x, start2.y);
    graphics.lineTo(start1.x, start1.y);
    graphics.closePath();

    int[] rules = new int[8];

    //all possible Compositing Rules:
    rules[0] = AlphaComposite.SRC_OVER;
    rules[1] = AlphaComposite.DST_OVER;
    rules[2] = AlphaComposite.CLEAR;
    rules[3] = AlphaComposite.SRC;
    rules[4] = AlphaComposite.SRC_IN;
    rules[5] = AlphaComposite.DST_IN;
    rules[6] = AlphaComposite.SRC_OUT;
    rules[7] = AlphaComposite.DST_OUT;

    g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC, alpha));
    g2d.setStroke(new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL));

    if (linecoler != null) {
        g2d.setPaint(linecoler);
        g2d.draw(graphics);
    }

    if (fillColor != null) {
        g2d.setPaint(fillColor);
        g2d.fill(graphics);
    }

}