Examples of BasicStroke


Examples of java.awt.BasicStroke

        jtb.setFloatable(false);

        DrawingAttributes da = new DrawingAttributes();
        da.setLinePaint(Color.blue);
        da.setFillPaint(Color.blue);
        da.setStroke(new BasicStroke(2));
        DrawingAttributes da2 = new DrawingAttributes();
        da2.setFillPaint(Color.lightGray);
        da2.setLinePaint(Color.lightGray);
        da2.setStroke(new BasicStroke(2));

        int[] xpoints = new int[] { 15, 15, 50, 50, 90, 50, 50, 15 };
        int[] ypoints = new int[] { 30, 70, 70, 90, 50, 10, 30, 30 };
        Shape shape = new Polygon(xpoints, ypoints, xpoints.length);
View Full Code Here

Examples of java.awt.BasicStroke

    protected float miterLimit; // 10f default, must be >= 1f
    protected float[] dash;
    protected float dashPhase;

    public BasicStrokeEditor() {
        basicStroke = new BasicStroke(1f);
    }
View Full Code Here

Examples of java.awt.BasicStroke

    public BasicStrokeEditor(BasicStroke bs) {
        if (bs != null) {
            basicStroke = bs;
        } else {
            basicStroke = new BasicStroke(1f);
        }

        setStrokeWidth(basicStroke.getLineWidth());
        setMiterLimit(basicStroke.getMiterLimit());
        setDash(basicStroke.getDashArray());
View Full Code Here

Examples of java.awt.BasicStroke

        setEndCaps(basicStroke.getEndCap());
        setLineJoins(basicStroke.getLineJoin());
    }

    public void resetStroke() {
        BasicStroke oldStroke = basicStroke;
        setMiterLimit(miterLimit);
        basicStroke = new BasicStroke(width, endCaps, lineJoins, miterLimit, dash, dashPhase);
        pcs.firePropertyChange("line", oldStroke, basicStroke);
    }
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.