Package java.awt

Examples of java.awt.BasicStroke$Dasher


    public StrokeEditorComponent(BasicStrokeEditor editor)
    {
      this.editor = editor;
      samplePanel = new SamplePanel();

      final BasicStroke vb = (BasicStroke) editor.getValue();
      if (vb != null)
      {
        width = vb.getLineWidth();
        borderStyle = StrokeUtility.translateStrokeStyle(vb);
      }
      else
      {
        width = 0;
View Full Code Here


    labelFactory.setMinimumSize(new FloatDimension(-100, 15));
    labelFactory.setText("Notes:");
    b.addElement(labelFactory.createElement());

    final Element line = HorizontalLineElementFactory.createHorizontalLine(15);
    line.getStyle().setStyleProperty(ElementStyleKeys.STROKE, new BasicStroke(1));
    b.addElement(line);

    final Group group = report.getGroupByName("record-group");
    group.getHeader().addElement(b);
  }
View Full Code Here

    style.setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, new Color(0xAFAFAF));


    pageHeader.addElement
        (HorizontalLineElementFactory.createHorizontalLine
            (18, null, new BasicStroke(1)));

    final DateFieldElementFactory elementFactory = new DateFieldElementFactory();
    elementFactory.setAbsolutePosition(new Point2D.Float(-50, 0));
    elementFactory.setMinimumSize(new FloatDimension(-50, -100));
    elementFactory.setVerticalAlignment(ElementAlignment.MIDDLE);
View Full Code Here

    style.setStyleProperty(BandStyleKeys.DISPLAY_ON_FIRSTPAGE, Boolean.TRUE);
    style.setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(24));
    style.setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, new Color(0xAFAFAF));
    pageFooter.addElement
        (HorizontalLineElementFactory.createHorizontalLine
            (0, null, new BasicStroke(1)));

    final TextFieldElementFactory elementFactory = new TextFieldElementFactory();
    elementFactory.setAbsolutePosition(new Point2D.Float(0, 4));
    elementFactory.setMinimumSize(new FloatDimension(-100, -100));
    elementFactory.setVerticalAlignment(ElementAlignment.MIDDLE);
View Full Code Here

    labelFactory.setMinimumSize(new FloatDimension(-100, 15));
    labelFactory.setText("Task");
    b.addElement(labelFactory.createElement());

    b.addElement(HorizontalLineElementFactory.createHorizontalLine
        (15, null, new BasicStroke(1)));

    final Group group = report.getGroupByName("record-group");
    group.getHeader().addElement(b);
  }
View Full Code Here

        // Just to draw the matting for the arrowhead. The matting
        // for the rest of the line will be taken care of in
        // super.render().
        if (arrowhead != null && isMatted() && g instanceof Graphics2D
                && stroke instanceof BasicStroke) {
            ((Graphics2D) g).setStroke(new BasicStroke(((BasicStroke) stroke).getLineWidth() + 2f));
            setGraphicsColor(g, Color.black);
            arrowhead.render(g);
        }

        super.render(g);
View Full Code Here

     */
    public void render(Graphics g) {

        if (matted) {
            if (g instanceof Graphics2D && stroke instanceof BasicStroke) {
                BasicStroke bs = (BasicStroke) stroke;
                ((Graphics2D) g).setStroke(new BasicStroke(bs.getLineWidth() + 2f, bs.getEndCap(), bs.getLineJoin()));
                setGraphicsColor(g, mattingPaint);
                draw(g);
            }
        }

View Full Code Here

                int endcap = ois.readInt();
                int linejoin = ois.readInt();
                float miterlimit = ois.readFloat();
                float dasharray[] = (float[]) ois.readObject();
                float dashphase = ois.readFloat();
                stroke = new BasicStroke(linewidth, endcap, linejoin, miterlimit, dasharray, dashphase);
            } else {
                stroke = (Stroke) ois.readObject();
            }
        } else {
            stroke = OMGraphic.BASIC_STROKE;
View Full Code Here

        if (paint == null)
            paint = Color.black;

        DrawingAttributes da = new DrawingAttributes();
        da.setLinePaint(paint);
        da.setStroke(new BasicStroke(2));
        if (fill) {
            da.setFillPaint(paint);
        }

        OpenMapAppPartCollection collection = OpenMapAppPartCollection.getInstance();
        IconPartList parts = new IconPartList();

        if (paint instanceof Color || paint == OMColor.clear) {
            Color color = (Color) paint;
            Color opaqueColor = new Color(color.getRed(), color.getGreen(), color.getBlue());
            DrawingAttributes opaqueDA = new DrawingAttributes();
            opaqueDA.setLinePaint(opaqueColor);
            opaqueDA.setStroke(new BasicStroke(2));

            if (fill) {
                opaqueDA.setFillPaint(opaqueColor);
            }
View Full Code Here

                    if (matted || !isLineClear || !edgeMatchesFill) {

                        if (matted) {
                            if (g instanceof Graphics2D
                                    && stroke instanceof BasicStroke) {
                                ((Graphics2D) g).setStroke(new BasicStroke(((BasicStroke) stroke).getLineWidth() + 2f));
                                setGraphicsColor(g, mattingPaint);
                                g.drawPolyline(_x, _y, _x.length);
                            }
                        }

                        setGraphicsForEdge(g);
                        // for some reason, this used to be
                        // drawPolygon
                        g.drawPolygon(_x, _y, _x.length);
                    }
                }

                // render polyline
                else {

                    if (matted) {
                        if (g instanceof Graphics2D
                                && stroke instanceof BasicStroke) {
                            ((Graphics2D) g).setStroke(new BasicStroke(((BasicStroke) stroke).getLineWidth() + 2f));
                            // Just to draw the matting for the
                            // arrowhead.
                            if (arrowhead != null) {
                                setGraphicsColor(g, mattingPaint);
                                arrowhead.render(g);
View Full Code Here

TOP

Related Classes of java.awt.BasicStroke$Dasher

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.