Package java.awt

Examples of java.awt.Graphics2D.drawRect()


      for(NeuralLinkChristian l : net.neurons.get(i).links){
        int j = l.neuron;

        if(i < net.inputs+1) {
          g.setColor(Color.white);
          g.drawRect(j*16, i*16, 14, 14);
        }
        else{
          if(j < net.inputs+1) {
            g.setColor(Color.white);
            g.fillRect(j*16, i*16, 14, 14);
View Full Code Here


          }
          else{
            if(j>=i){
              //                    g.setColor(new Color(80, 80, 80));
              g.setColor(Color.black);
              g.drawRect(j*16, i*16, 13, 13);
              //                    g.fillRect(j*16, i*16, 14, 14);
            }
            else{
              g.setColor(Color.black);
              g.fillRect(j*16, i*16, 14, 14);
View Full Code Here

            int height = letterHeight;

            g.setColor(Color.white);
            g.fillRect(146, 52 + (i - 1) * 15, width, height);
            g.setColor(Color.black);
            g.drawRect(146, 52 + (i - 1) * 15, width, height);
           
            g.drawString(
                    value,
                    150,
                    50 + i * 15);
 
View Full Code Here

                        : shape.getBounds();
      g2d.fillRect(r.x, r.y, r.width, r.height);
      g2d.setColor(borderColor);
//      Stroke oldStroke = g2d.getStroke();
//      g2d.setStroke(stroke);
      g2d.drawRect(r.x,r.y, r.width-1,r.height-1);
//      g2d.setStroke(oldStroke);
      return r;
    } catch (BadLocationException e) { // Never happens
      e.printStackTrace();
      return null;
View Full Code Here

        + this.headHeight - TEXT_GAP_Y+ 2 );

    // Edge
    g.setColor(EDGE_COLOR);
    // Comment of dont want circle in rectangle
    g.drawRect(position.x, position.y, this.dimension.height+2,
        this.dimension.height);

    // Paint all ports
    for (Port port : this.node.getAllPorts()) {
      port.getGUI().paint(g);
View Full Code Here

       
        for (int i = 0; i < feld.length; i++) {
            for (int j = 0; j < feld[0].length; j++) {
                if (this.getPix(i, j)) {
                    g.setColor(Color.DARK_GRAY);
                    g.drawRect(i * fac + 1, j * fac + 1, fac - 2, fac - 2);
                    g.setColor(Color.gray);
                    g.drawRect(i * fac + 0, j * fac + 0, fac - 2, fac - 2);
                    if (j == feld[0].length - 1) {
                        g.setColor(Color.black);
                        g.fillRect(i * fac + 1, j * fac + 1, fac - 2, fac - 2);
View Full Code Here

            for (int j = 0; j < feld[0].length; j++) {
                if (this.getPix(i, j)) {
                    g.setColor(Color.DARK_GRAY);
                    g.drawRect(i * fac + 1, j * fac + 1, fac - 2, fac - 2);
                    g.setColor(Color.gray);
                    g.drawRect(i * fac + 0, j * fac + 0, fac - 2, fac - 2);
                    if (j == feld[0].length - 1) {
                        g.setColor(Color.black);
                        g.fillRect(i * fac + 1, j * fac + 1, fac - 2, fac - 2);
                    } else {
                        g.setColor(new Color(Math.min(255, j * 5 + 150), 0, 0));
View Full Code Here

                            (int) ((v.x + 1) * env.fac),
                            (int) ((v.y + 1) * env.fac),
                            env.fac,
                            env.fac);
                    g.setColor(Color.red);
                    g.drawRect(
                            (int) ((v.x + 1) * env.fac),
                            (int) ((v.y + 1) * env.fac),
                            env.fac,
                            env.fac);
                }
View Full Code Here

       
        g.drawString(
                value,
                5,
                letterHeight - 4);
        g.drawRect(0, 0, img.getWidth() - 1, img.getHeight() - 1);
       
        return img;
    }
   
    /**
 
View Full Code Here

            g.drawImage(sensActImgs[j], x, y, null);
            y += sensActImgs[j].getHeight();
        }

        g.setColor(Color.blue);
        g.drawRect(0, 0, img.getWidth() - 1, img.getHeight() - 1);

        return img;
    }
   
    /**
 
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.