Package java.awt

Examples of java.awt.Graphics.fill3DRect()


    private void redraw() {
      if (backingStore == null || text == null) return;
      Graphics g = backingStore.getGraphics();
      int width = (int) (((float) current / (float) max) * getSize().width);
      g.fill3DRect(0, 0, getSize().width, getSize().height, false);
      g.setColor(getBackground());
      g.fill3DRect(0, 0, width, getSize().height, true);
      g.setColor(getForeground());
      g.setXORMode(getBackground());
      String percent = "" + (current * 100 / (max > 0?max:1))
View Full Code Here


      if (backingStore == null || text == null) return;
      Graphics g = backingStore.getGraphics();
      int width = (int) (((float) current / (float) max) * getSize().width);
      g.fill3DRect(0, 0, getSize().width, getSize().height, false);
      g.setColor(getBackground());
      g.fill3DRect(0, 0, width, getSize().height, true);
      g.setColor(getForeground());
      g.setXORMode(getBackground());
      String percent = "" + (current * 100 / (max > 0?max:1))
                     + "% / " + current + " of "+max;
      g.drawString(percent,
View Full Code Here

                    h / 2 - fm.getHeight() * 2);
           
            g.setFont(new Font(null, 0, 12));
            fm = g.getFontMetrics();
           
            g.fill3DRect(w / 2 - 56 - 8, h / 2, 56, 20, true);
            g.fill3DRect(w / 2 + 8, h / 2, 56, 20, true);
           
            msg = Translater.getString("updater.askUpdate");
            g.drawString(msg, w / 2 - fm.stringWidth(msg) / 2, h / 2 - 8);
           
View Full Code Here

           
            g.setFont(new Font(null, 0, 12));
            fm = g.getFontMetrics();
           
            g.fill3DRect(w / 2 - 56 - 8, h / 2, 56, 20, true);
            g.fill3DRect(w / 2 + 8, h / 2, 56, 20, true);
           
            msg = Translater.getString("updater.askUpdate");
            g.drawString(msg, w / 2 - fm.stringWidth(msg) / 2, h / 2 - 8);
           
            g.setColor(Color.BLACK);
View Full Code Here

       marginy,
       width-(2*marginx),
       height-(2*marginy));
  }
  dbg.setColor(Color.white);
  dbg.fill3DRect(marginx + rect_margin_x,
           marginy + rect_margin_y - guideHeight/2,
           getGraduationLength(),
           guideHeight,
           false);
  paintGraduation(dbg);
View Full Code Here

  dbg.setClip(s);
  dbg.setColor(bg);
  dx = d.width - width;
  dy = d.height - height;
  dbg.clearRect(0, 0, d.width, d.height);
  dbg.fill3DRect(1, 1, d.width-2, d.height-2, raised);
  dbg.drawImage(currentImg, dx/2, dy/2, this);
  g.drawImage(dbi, 0, 0, this);
    }

    /**
 
View Full Code Here

    @Override
    public RenderedImage getFrame(int index) {
        BufferedImage img = new BufferedImage(frameWidth, frameHeight, BufferedImage.TYPE_4BYTE_ABGR);
        Graphics g = img.getGraphics();
        g.setColor(color);
        g.fill3DRect(0, 0, frameWidth + 1, frameHeight + 1, false);
        return img;
    }

    @Override
    public String toString() {
View Full Code Here

                int stringWidth =
                        (int) fm.getStringBounds(wmText, g).getWidth();
                int x = img.getWidth() / 2 - stringWidth / 2;
                int y = img.getHeight() - fm.getHeight();
                g.setColor(new Color(180, 180, 180));
                g.fill3DRect(x - 10,
                             y - fm.getHeight() - 4,
                             stringWidth + 20,
                             fm.getHeight() + 12,
                             true);
                g.setColor(new Color(100, 100, 100));
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.