Package java.awt

Examples of java.awt.Graphics.drawRect()


    if (dragRect != null)
    {
      //System.out.println("drawing: " + dragRect.toString());
      graphics.setColor(Color.black);
      graphics.drawRect(dragRect.x, dragRect.y, dragRect.width, dragRect.height);
    }
   
    currHeight = height;
    currWidth = width;
    currXMulti = xMulti;
View Full Code Here


    if (dragRect != null)
    {
      // System.out.println("drawing: " + dragRect.toString());
      graphics.setColor(Color.black);
      graphics.drawRect(dragRect.x, dragRect.y, dragRect.width,
          dragRect.height);
    }

    currHeight = height;
    currWidth = width;
View Full Code Here

   
    if (dragRect != null)
    {
      //System.out.println("drawing: " + dragRect.toString());
      graphics.setColor(Color.black);
      graphics.drawRect(dragRect.x, dragRect.y, dragRect.width, dragRect.height);
    }
  }
 
  public void kludgyMultiDimensionalDraw(int x, int y, int w, int h,
    ChunkVisInfo cVI, int featNum, Graphics graphics)
View Full Code Here

  protected void performPixelTransformation(WFImage pImg) {
    SimpleImage img = (SimpleImage) pImg;
    Graphics g = img.getGraphics();
    g.setColor(color);
    if (thickness == 1) {
      g.drawRect(left, top, width, height);
    }
    else if (thickness > 1) {
      // p1                          p2
      //   p5                      p6
      //   p7                      p8
View Full Code Here

            drawable.setColor(bgColor);
            drawable.fillRect(0, 0, 270, 270);
            drawable.setColor(fgColor);
            drawable.fillOval(25, 25, 220, 220);
            drawable.setColor(java.awt.Color.blue);
            drawable.drawRect(0, 0, 269, 269);
            drawable.setColor(java.awt.Color.black);
            drawable.drawString(
                    "r=" + String.valueOf(fgColor.getRed()) + ",g="
                            + String.valueOf(fgColor.getGreen()) + ",b="
                            + String.valueOf(fgColor.getBlue()), 50, 100);
View Full Code Here

        drawable.setColor(Color.lightGray);
        drawable.fillRect(0, 0, 200, 200);
        drawable.setColor(Color.yellow);
        drawable.fillOval(25, 25, 150, 150);
        drawable.setColor(Color.blue);
        drawable.drawRect(0, 0, 199, 199);

        // Use the parameter to create dynamic content.
        drawable.setColor(Color.black);
        drawable.drawString("Time: " + textToDisplay, 75, 100);
View Full Code Here

        drawable.setColor(Color.lightGray);
        drawable.fillRect(0, 0, 200, 200);
        drawable.setColor(Color.yellow);
        drawable.fillOval(25, 25, 150, 150);
        drawable.setColor(Color.blue);
        drawable.drawRect(0, 0, 199, 199);

        // Use the parameter to create dynamic content.
        drawable.setColor(Color.black);
        drawable.drawString("Tex", 75, 100);
View Full Code Here

      repaint();
      break;
    case ZOOM:
      Graphics gcomp = getGraphics();
      gcomp.setColor(Color.black);
      gcomp.drawRect(min(mouseClick[0], mouseCurrent[0]), min(mouseClick[1], mouseCurrent[1]), abs(mouseCurrent[0] - mouseClick[0]), abs(mouseCurrent[1]
          - mouseClick[1]));
      repaint();
      break;
    }
    //repaint();
View Full Code Here

                            if (rectType == 0) {
                                // Invalid rectangle
                                continue;
                            }
                            if (!execute(shape, x, y, RECT_WIDTH, RECT_HEIGHT, rectType)) {
                                g.drawRect(x, y, RECT_WIDTH, RECT_HEIGHT);
                                error = true;
                            }
                        }

                    int errCount = 0;
View Full Code Here

                        if (rectType == 0) {
                            // Invalid rectangle
                            continue;
                        }
                        if (!execute(shape, rx, ry, rw, rh, rectType)) {
                            g.drawRect(rx, ry, rw, rh);
                            error = true;
                            errCount++;
                        }
                        if (errCount > ERROR_MAX_COUNT) {
                            break;
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.