Package java.awt

Examples of java.awt.Graphics2D.clearRect()


  public void paint(Graphics g) {
    Graphics2D g2d = (Graphics2D) g;
    g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    g2d.setStroke(stroke);
    g2d.setBackground(Color.white);
    g2d.clearRect(0, 0, this.getWidth(), this.getHeight());
    changeDrawSettings(dCst);
    START_GAP = START_GAP
        * 2
        + drawLegend(new Color[] { probC, queueC, animQueuesC }, new String[] { "probability", "queue", "current state" }, dCst.getFont(),
            START_GAP, START_GAP, g2d);
View Full Code Here


  @Override
  public void paint(Graphics g) {
    Graphics2D g2d = (Graphics2D) g;
    g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    g2d.clearRect(0, 0, this.getWidth(), this.getHeight());
    g2d.setStroke(dCst.getDrawStroke());
    changeDrawSettings(dCst);

    //disegna jobs
    drawJobsRemaining(donejobs, totjobs, panelW * 0.15f, 10.0f, panelW * 0.7f, panelH / 2.0f, g2d);
View Full Code Here

         g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
             RenderingHints.VALUE_ANTIALIAS_ON);
       }
     
      // paint the background black
      g2.clearRect(0, 0, width, height);
     
      return g2;
    }
}
View Full Code Here

        width,
        height,
        BufferedImage.TYPE_INT_ARGB);
    final Graphics2D g2 = (Graphics2D) image.getGraphics();
    g2.setBackground(TRANSPARENT);
    g2.clearRect(0, 0, width, height);
   
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
View Full Code Here

    if (icon == null) {
      final BufferedImage image = new BufferedImage(IconSize.width,
          IconSize.height, BufferedImage.TYPE_INT_ARGB);
      final Graphics2D g2 = (Graphics2D) image.getGraphics();
      g2.setBackground(new Color(255, 255, 255, 0)); // transparent
      g2.clearRect(0, 0, IconSize.width, IconSize.height);
      g2.translate(IconSize.width / 2, IconSize.height / 2);
      g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
          RenderingHints.VALUE_ANTIALIAS_ON);
      g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
          RenderingHints.VALUE_INTERPOLATION_BILINEAR);
View Full Code Here

    int i = 12;
    if (x > getSize().width)
      x = 0;
    // Borro un poco adelante
    gr.setBackground(Color.gray);
    gr.clearRect(x, 0, 20, getSize().height);

    // Dibujo la linea roja
    gr.setColor(Color.red);
    gr.drawLine(x + 2, 0, x + 2, getSize().height);
    gr.setColor(Color.gray);
View Full Code Here

  public void paint(java.awt.Graphics gr1d) {
    Graphics2D gr = (Graphics2D) gr1d;

    // Limpio el fondo
    gr.setBackground(Color.gray);
    gr.clearRect(0, 0, getSize().width, getSize().height);

    // dibujo los nombres
    int i = 12;
    Iterator iter = listNames.iterator();
    while (iter.hasNext()) {
View Full Code Here

   *            java.awt.Graphics
   */
  public void paint(java.awt.Graphics gr1d) {
    Graphics2D gr = (Graphics2D) gr1d;
    gr.setBackground(Color.gray);
    gr.clearRect(0, 0, getSize().width, getSize().height);

    // Y dibujo los valores guardados
    int width = getSize().width;
    int alt = 12;
    gr.setColor(Color.green);
View Full Code Here

    Graphics2D gr = (Graphics2D) gr1d;
    Dimension dim = getSize();

    // Limpio el cuestion
    gr.setBackground(Color.gray);
    gr.clearRect(0, 0, dim.width, dim.height);
    gr.drawImage(image, 0, 0, this);

  }
}
View Full Code Here

    Graphics2D gr = (Graphics2D) gr1d;
    Dimension dim = getSize();

    // Limpio el cuestion
    gr.setBackground(Color.gray);
    gr.clearRect(0, 0, dim.width, dim.height);
    gr.drawImage(image, 0, 0, this);

    // Redibujo
    repaint();
  }
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.