Examples of drawRect()


Examples of java.awt.Graphics2D.drawRect()

    g.setColor(Color.WHITE);
    g.fillRect(1, 1, 23, 13);
    g.setColor(mColor);
    g.fillRect(1, 1, 23, 13);
    g.setColor(Color.BLACK);
    g.drawRect(0, 0, 24, 14);
   
    ImageIcon icon = new ImageIcon(img);

    return icon;
  }
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

    int y = 1 + 10 - ic.getIconHeight() / 2;

    ic.paintIcon(null, g, x, y);

    g.setColor(Color.BLACK);
    g.drawRect(0, 0, 42, 22);

    return new ImageIcon(img);
  }

  public static int getChannelIconHeight() {
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

      BasicStroke dashed = new BasicStroke(lineWidth, BasicStroke.CAP_BUTT,
          BasicStroke.JOIN_MITER, 10.0f, dash, 0.0f);
      grp.setColor(Color.BLACK);
      grp.setStroke(dashed);

      grp.drawRect(lineWidth - 1, lineWidth - 1, width - lineWidth, height - lineWidth);

      grp.setStroke(str);
      grp.setColor(col);
    }
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

                page.paintBorder(c, pagePaintingClearanceWidth, Layer.PAGED_MODE_SCREEN);
               
                Color old = g.getColor();
               
                g.setColor(Color.BLACK);
                g.drawRect(overall.x, overall.y, overall.width, overall.height);
                g.setColor(old);
               
                Rectangle content = page.getPagedViewClippingBounds(c, pagePaintingClearanceWidth);
                g.clip(content);
               
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

        Graphics2D g2d = bufferedImage.createGraphics();
        g2d.setClip(0, 0, width, height);
        g2d.setColor(Color.red);
        g2d.drawLine(10, 10, 95, 95);
        g2d.drawLine(105, 105, 190, 190);
        g2d.drawRect(1, 1, 198, 198);
        g2d.dispose();
        // byte [] imageData = AcmeGifHelper.encodeGif(bufferedImage);

        // ServletOutputStream sos = response.getOutputStream();
        // sos.write(imageData);
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

        Graphics2D g2d = bufferedImage.createGraphics();
        g2d.setClip(0, 0, width, height);
        g2d.setColor(Color.red);
        g2d.drawLine(10, 10, 95, 95);
        g2d.drawLine(105, 105, 190, 190);
        g2d.drawRect(1, 1, 198, 198);
        g2d.dispose();
        // byte [] imageData = AcmeGifHelper.encodeGif(bufferedImage);

        // ServletOutputStream sos = response.getOutputStream();
        // sos.write(imageData);
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

            g2.fillRect(0, pageHeight - _param.ymargin, pageWidth - _param.xmargin, _param.height);
            g2.fillRect(0, 0 , _param.xmargin, pageHeight -  _param.ymargin);
            g2.fillRect(_param.xmargin, 0, pageWidth - 2*_param.xmargin, _param.ymargin);

            g2.setColor(Color.BLACK);
            g2.drawRect(_param.xmargin, _param.ymargin, pageWidth - 2*_param.xmargin, pageHeight - 2* _param.ymargin);  

            g2.fillRect(pageWidth - _param.xmargin, _param.ymargin + 4 , 2, pageHeight - 2* _param.ymargin - 2 );
            g2.fillRect(_param.xmargin + 4, pageHeight - _param.ymargin , pageWidth - 2*_param.xmargin - 2, 2);
        }

View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

    for(int i=0;i<sheet.size();i++){
      Object o = sheet.get(i);
      if (o instanceof AbstractShape) {
        AbstractShape shape = (AbstractShape)o;
        g2.setColor(Color.BLACK);
        g2.drawRect(shape.getBounds().x, shape.getBounds().y, CIRCLE_SIZE, CIRCLE_SIZE);
       
        g2.setColor(Color.RED);
        g2.fillRect(shape.getBounds().x, shape.getBounds().y, CIRCLE_SIZE, CIRCLE_SIZE);
        g2.setColor(Color.WHITE);
        new TextLayout(new Integer(i).toString(), g2.getFont(), g2.getFontRenderContext()).draw(g2, shape.getBounds().x+4, shape.getBounds().y+ (CIRCLE_SIZE-4));
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

                  Graphics2D g2D = (Graphics2D)g;
                  for (int i = 0; i < 4; i++) {
                    g2D.drawImage(patternImage, x + i * patternImage.getWidth(), y + 1, list);
                  }
                  g2D.setColor(list.getForeground());
                  g2D.drawRect(x, y, getIconWidth() - 2, getIconHeight() - 1);
                }
              });
            return component;
          }
        });
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

                    new DateTime(new Date(min)),
                    new DateTime(new Date(max)));
        }

        g2d.setColor(settings.defaultStrokeColor);
        g2d.drawRect((int) sf, settings.tmMarginTop, sw, height - settings.tmMarginBottom - 1);

        double v = model.getValueFromFloat(currentMousePositionX * (1.0 / width));

        v += model.getMinValue();

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.