Package java.awt

Examples of java.awt.BasicStroke$DashIterator$Line


     */
    public void setStroke(Stroke s) {
        if (s != null) {
            stroke = s;
        } else {
            stroke = new BasicStroke();
        }
    }
View Full Code Here


        Shape shp = getShape();
        if (shp != null) {

            if (matted) {
                if (gr instanceof Graphics2D && stroke instanceof BasicStroke) {
                    ((Graphics2D) gr).setStroke(new BasicStroke(((BasicStroke) stroke).getLineWidth() + 2f));
                    setGraphicsColor(gr, mattingPaint);
                    draw(gr);
                }
            }
View Full Code Here

    }

    protected void renderGeometry(OMGeometry geometry, Graphics gr) {
        if (matted) {
            if (gr instanceof Graphics2D && stroke instanceof BasicStroke) {
                ((Graphics2D) gr).setStroke(new BasicStroke(((BasicStroke) stroke).getLineWidth() + 2f));
                setGraphicsColor(gr, mattingPaint);
                geometry.draw(gr);
            }
        }
View Full Code Here

     */
    private void processPenWord(StringTokenizer st, OMGraphic omg) {
        if (omg == null)
            return;
        int width = Integer.parseInt(st.nextToken());
        omg.setStroke(new BasicStroke(width));
        /* int pattern = */Integer.parseInt(st.nextToken());
        Color col = convertColor(Integer.parseInt(st.nextToken()));
        omg.setLinePaint(col);
    }
View Full Code Here

        int len = vals.size();
        OMGraphic omg = null;
        for (int i = 0; i < len; i++) {
            omg = (OMGraphic) vals.elementAt(i);
            omg.setLinePaint(col);
            omg.setStroke(new BasicStroke(width));
        }
    }
View Full Code Here

                Geo g3 = new Geo(ll2[0], ll2[1]);
                Geo g4 = new Geo(ll2[2], ll2[3]);

                OMLine line2 = new OMLine((float) ogc.getLatitude(), (float) ogc.getLongitude(), (float) gc.getLatitude(), (float) gc.getLongitude(), OMGraphic.LINETYPE_GREATCIRCLE);
                line2.setLinePaint(line.getLinePaint());
                line2.setStroke(new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0f, new float[] {
                        10, 10 }, 0f));
                line2.addArrowHead(true);
                list.add(line2);

                Geo i = gc.crossNormalize(ogc);
View Full Code Here

            }
           
            int descDir = -1; // this description direction

            ButtonGroup group = new ButtonGroup();
            ImageIcon ii = createArrowIcon(new BasicStroke(1), 50, 20, descDir);
            JRadioButtonMenuItem button = new JRadioButtonMenuItem(ii, !doArrowHead);
            button.setActionCommand(String.valueOf(descDir));
            group.add(button);
            button.addActionListener(listener);
            arrowheadMenu.add(button);

            for (descDir = OMArrowHead.ARROWHEAD_DIRECTION_FORWARD; descDir <= OMArrowHead.ARROWHEAD_DIRECTION_BOTH; descDir++) {
                ii = createArrowIcon(new BasicStroke(1), 50, 20, descDir);
                button = new JRadioButtonMenuItem(ii, doArrowHead
                        && currentDirection == descDir);
                button.setActionCommand(String.valueOf(descDir));
                group.add(button);
                button.addActionListener(listener);
View Full Code Here

        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

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

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

    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

TOP

Related Classes of java.awt.BasicStroke$DashIterator$Line

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.