Package java.awt

Examples of java.awt.Graphics.fillRect()


      drawArrow(g, x + 8, y, -4);
    } else if (shift == SHIFT_ROLL_LEFT) {
      g.fillRect(x + 6, y - 1, 4, 3);
      g.fillRect(x + 8, y - 7, 2, 8);
      g.fillRect(x, y - 7, 2, 8);
      g.fillRect(x, y - 7, 10, 2);
      drawArrow(g, x + 3, y, 4);
    } else { // SHIFT_LOGICAL_LEFT
      g.fillRect(x + 2, y - 1, 8, 3);
      drawArrow(g, x, y, 4);
    }
View Full Code Here


      g.fillRect(x + 8, y - 7, 2, 8);
      g.fillRect(x, y - 7, 2, 8);
      g.fillRect(x, y - 7, 10, 2);
      drawArrow(g, x + 3, y, 4);
    } else { // SHIFT_LOGICAL_LEFT
      g.fillRect(x + 2, y - 1, 8, 3);
      drawArrow(g, x, y, 4);
    }
  }
 
  private void drawArrow(Graphics g, int x, int y, int d) {
View Full Code Here

      return;
    }

    final Graphics graphics = gfx.create();
    graphics.setColor(value);
    graphics.fillRect(box.x, box.y, box.width, box.height);
    graphics.setColor(Color.BLACK);
    graphics.drawRect(box.x, box.y, box.width, box.height);
    graphics.dispose();
  }
View Full Code Here

    Graphics og = offscreen.getGraphics();
    FontMetrics fm = og.getFontMetrics();

    // clear background color
    og.setColor(bgColor);
    og.fillRect(0, 0, offscreen.getWidth(null), offscreen.getHeight(null));

    og.setColor(fgColor);
    String message = getDescriptionForState();

    // if we had a failure of some sort, notify the user
View Full Code Here

      Graphics g = buffer.getGraphics();

      // clear background on buffer
      g.setColor(bgColor);
      g.fillRect(0, 0, buffer.getWidth(null), buffer.getHeight(null));

      // buffer background is cleared, so draw logo under progressbar
      if (img == progressbar && logo != null) {
        g.drawImage(logoBuffer, progressbar.getWidth(null)/2-logo.getWidth(null)/2,
                    progressbar.getHeight(null)/2-logo.getHeight(null)/2, null);
View Full Code Here

    if (bufferImage != null) {
      Graphics g = bufferImage.getGraphics();

      g.setColor(getBackground());
      if (dirty)
        g.fillRect(0, 0, width, height);

      buffer.paintBuffer(g);

      dirty = false;
      repaint();
View Full Code Here

        }

        // copy the source image into the produced image
        Graphics g = texImage.getGraphics();
        g.setColor(new Color(0f,0f,0f,0f));
        g.fillRect(0,0,texWidth,texHeight);
        g.drawImage(bufferedImage,0,0,null);

        // build a byte buffer from the temporary image
        // that be used by OpenGL to produce a texture.
        byte[] data = ((DataBufferByte) texImage.getRaster().getDataBuffer()).getData();
View Full Code Here

    tx.scale(scalex, scaley);

    final BufferedImage mask = new BufferedImage(img.getWidth(observer), img.getHeight(observer),
        BufferedImage.TYPE_BYTE_BINARY);
    final Graphics g = mask.getGraphics();
    g.fillRect(sx1, sy1, (int) swidth, (int) sheight);
    drawImage(img, mask, tx, null, observer);
    g.dispose();
    return true;
  }
View Full Code Here

   

    mockBorder.paintBorder(mockComponent, g, x, y, width, height);
    expect(mockBorder.getBorderInsets(mockComponent)).andStubReturn(insets);
    g.setColor(isA(Color.class));
    g.fillRect(anyInt(), anyInt(), anyInt(), anyInt());
    expectLastCall().anyTimes();
   
    mockHelper.replayAll();   
    classUnderTest.paintBorder(mockComponent, g, x, y, width, height);
    mockHelper.verifyAll();
View Full Code Here

                g.setColor(foreColor);
                g.drawRect(next.myLeftX, next.myTopY, next.myWidth,
                        next.myHeight);
            } else {
                g.setColor(next.getBackgroundColor());
                g.fillRect(next.myLeftX, next.myTopY, next.myWidth,
                        next.myHeight);
            }
        }
    }
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.