Package framework

Examples of framework.INavaidCoord


        int lineSize = navaidRadius / 10;
        int polyRadius = navaidRadius / 5;
        g.setColor(colors.get("NAVAIDS_DETAILED").getColor());
        while (it.hasNext()) {
            INavaidCoord tmp = (NavaidCoord) it.next();
            if (allObjects.get("Navaid: " + tmp.getName())) {

                g.drawOval(getX(tmp.getLon()) - navaidRadius, getY(tmp.getLat()) - navaidRadius, navaidRadius * 2, navaidRadius * 2);

                double xRaw = getX(tmp.getLon());
                double yRaw = getY(tmp.getLat());


                for (int i = 0; i < 36; i++) {
                    if (i != 0 && i % 3 != 0) {
                        g.drawLine(
                                (int) (xRaw + (Math.sin((Math.PI / 18) * i)) * (navaidRadius - lineSize)),
                                (int) (yRaw + (Math.cos((Math.PI / 18) * i)) * (navaidRadius - lineSize)),
                                (int) (xRaw + (Math.sin((Math.PI / 18) * i)) * navaidRadius),
                                (int) (yRaw + (Math.cos((Math.PI / 18) * i)) * navaidRadius));
                    }


                }


                for (int i = 0; i < 12; i++) {
                    g.drawLine(
                            (int) (xRaw + (Math.sin((Math.PI / 6) * i)) * (navaidRadius - lineSize * 2)),
                            (int) (yRaw + (Math.cos((Math.PI / 6) * i)) * (navaidRadius - lineSize * 2)),
                            (int) (xRaw + (Math.sin((Math.PI / 6) * i)) * navaidRadius),
                            (int) (yRaw + (Math.cos((Math.PI / 6) * i)) * navaidRadius));
                }


                int[] xPointsPoly = new int[6];
                int[] yPointsPoly = new int[6];




                for (int i = 0; i < 6; i++) {
                    xPointsPoly[i] = (int) (xRaw + (Math.sin((Math.PI / 3) * i) * polyRadius));
                    yPointsPoly[i] = (int) (yRaw + (Math.cos((Math.PI / 3) * i) * polyRadius));
                }


                g.fillRect((int) xRaw - 1, (int) yRaw - 1, 3, 3);
                g.drawPolygon(xPointsPoly, yPointsPoly, 6);
                g.drawString(tmp.getName(), (float) (xRaw), (float) (yRaw + navaidRadius + 20));
                g.drawString(tmp.getFrequency(), (float) (xRaw), (float) (yRaw + navaidRadius + 32));
            }
        }
    }
View Full Code Here


    private void drawNavaidsUndetailed(Graphics2D g) {
        g.setColor(colors.get("NAVAIDS_UNDETAILED").getColor());
        Iterator it = navaids.values().iterator();
        while (it.hasNext()) {
            INavaidCoord tmp = (NavaidCoord) it.next();
            if (allObjects.get("Navaid: " + tmp.getName())) {
                g.drawString(tmp.getID(), getX(tmp.getLon()) - 2, getY(tmp.getLat()) - 4);
                g.fillRect(getX(tmp.getLon()) - 2, getY(tmp.getLat()) - 2, 4, 4);
            }


        }
    }
View Full Code Here

TOP

Related Classes of framework.INavaidCoord

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.