Package java.awt

Examples of java.awt.Graphics2D.fillPolygon()


                    if (link.getWeight() > 0) {
                        g.setColor(Color.black);
                    } else {
                        g.setColor(Color.red);
                    }
                    g.fillPolygon(arrow.toPol());
                }

                if (link.getWeight() > 0) {
                    g.setColor(Color.black);
                } else {
View Full Code Here


           
            Color col = a.getAgentColor();
           
            if (col != null) {
                g.setColor(col);
                g.fillPolygon(p);
            }
           
            // Agent outside view.
            BufferedImage img = a.getOutsideView();
            if (this.isDetailedView && img != null) {
View Full Code Here

                        new Vector2D(1, 1));
               
                arrow = this.getPolygonInVisualization(arrow);
               
                g.setColor(color);
                g.fillPolygon(arrow.toPol());
                g.setColor(Color.black);
                g.drawPolygon(arrow.toPol());
                g.drawString(StaticMethods.round(currentNeuron.getInput(), 2)
                        + "", (float) startPoint.x, (float) startPoint.y - 5);
View Full Code Here

                        new Vector2D(1, 1));
               
                arrow = this.getPolygonInVisualization(arrow);

                g.setColor(color);
                g.fillPolygon(arrow.toPol());
                g.setColor(Color.black);
                g.drawPolygon(arrow.toPol());
                g.drawString(StaticMethods.round(currentNeuron.getOutput(), 2)
                        + "", (float) startPoint.x, (float) startPoint.y - 8);
View Full Code Here

                } else {
                    g.setColor(Color.red);
                }
               
                if (weightPosSelf == null) {
                    g.fillPolygon(pol.toPol());
                    g.drawPolygon(pol.toPol());
                }
               
                // Weight text.
                Font font;
View Full Code Here

                Color objectColor = go.getAgentColor();
                Color oldColor = g.getColor();
               
                if (objectColor != null) {
                    g.setColor(objectColor);
                    g.fillPolygon(shape.toPol());
                }
               
                g.setColor(Color.black);
                g.drawPolygon(shape.toPol());
                g.setColor(oldColor);
View Full Code Here

            }
           
            try {
                Polygon pol = ((AbstractEnvironment2D) this.currentEnv).getAgentShapeInVisualization(this.markedAgentId).toPol();
                g.setColor(this.selectedColor);
                g.fillPolygon(pol);
                g.setColor(Color.red);
                g.drawPolygon(pol);
            } catch (Exception e) {
                g.drawOval(
                        xMitte,
View Full Code Here

        getContext().translate(ENVIRONMENT_SHADOW_OFFSET, ENVIRONMENT_SHADOW_OFFSET);

        final BasicStroke stroke3 = new BasicStroke(50.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER);
        g2.setStroke(stroke3);
        getContext().setColor(ENVIRONMENT_SHADOW_COLOR);
        g2.fillPolygon(poly);

        int offset = (ENVIRONMENT_SHADOW_OFFSET / 4) * 3;
        getContext().translate(-offset, -offset);

        //external border of perimetral wall
View Full Code Here

    public OutlineFieldUI(OutlineFieldJTree pTree) {
        // Create the collapsed (right arrow) icon
        BufferedImage image = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
        Graphics2D g = image.createGraphics();
        g.setColor(Color.black);
        g.fillPolygon(new int[] {8, 14, 8}, new int[] {2, 8, 14}, 3);
        g.dispose();
        collapsedIcon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(image.getSource()), "collapsed");

        // Create the expanded (down arrow) icon
        image = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
View Full Code Here

        // Create the expanded (down arrow) icon
        image = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
        g = image.createGraphics();
        g.setColor(Color.black);
        g.fillPolygon(new int[] {2, 14, 8}, new int[] {8, 8, 14}, 3);
        g.dispose();
        expandedIcon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(image.getSource()), "expanded");

        emptyIcon = new ImageIcon();
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.