Examples of drawRect()


Examples of java.awt.Graphics2D.drawRect()

            if (mouseInside) {
                g2d.setPaint(settings.tip.backgroundColor);
                g2d.fillRect(px, 1, strw, 18);
                g2d.setPaint(settings.tip.fontColor);
                g2d.drawRect(px, 1, strw, 18);
                g2d.setColor(settings.tip.fontColor);
                g2d.drawString(str, px + 4, 16);
            }

        }
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

        Toolkit t = Toolkit.getDefaultToolkit();
        Dimension d = t.getBestCursorSize(15, 15);
        BufferedImage cursorImage = new BufferedImage(d.width, d.height, BufferedImage.TYPE_INT_ARGB);
        Graphics2D g = cursorImage.createGraphics();
        int cx = d.width/2, cy = d.height/2;
        g.setColor(Color.WHITE); g.drawRect(cx-7, cy-7, 14, 14);
        g.setColor(Color.BLACK); g.drawRect(cx-6, cy-6, 12, 12);
        g.setColor(Color.WHITE); g.drawRect(cx-2, cy-244);
        g.setColor(Color.BLACK); g.drawRect(cx-1, cy-122);
        if (d.width%2 == 0) {
            cx += 1;
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

        Dimension d = t.getBestCursorSize(15, 15);
        BufferedImage cursorImage = new BufferedImage(d.width, d.height, BufferedImage.TYPE_INT_ARGB);
        Graphics2D g = cursorImage.createGraphics();
        int cx = d.width/2, cy = d.height/2;
        g.setColor(Color.WHITE); g.drawRect(cx-7, cy-7, 14, 14);
        g.setColor(Color.BLACK); g.drawRect(cx-6, cy-6, 12, 12);
        g.setColor(Color.WHITE); g.drawRect(cx-2, cy-244);
        g.setColor(Color.BLACK); g.drawRect(cx-1, cy-122);
        if (d.width%2 == 0) {
            cx += 1;
        }
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

        BufferedImage cursorImage = new BufferedImage(d.width, d.height, BufferedImage.TYPE_INT_ARGB);
        Graphics2D g = cursorImage.createGraphics();
        int cx = d.width/2, cy = d.height/2;
        g.setColor(Color.WHITE); g.drawRect(cx-7, cy-7, 14, 14);
        g.setColor(Color.BLACK); g.drawRect(cx-6, cy-6, 12, 12);
        g.setColor(Color.WHITE); g.drawRect(cx-2, cy-244);
        g.setColor(Color.BLACK); g.drawRect(cx-1, cy-122);
        if (d.width%2 == 0) {
            cx += 1;
        }
        if (d.height%2 == 0) {
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

        Graphics2D g = cursorImage.createGraphics();
        int cx = d.width/2, cy = d.height/2;
        g.setColor(Color.WHITE); g.drawRect(cx-7, cy-7, 14, 14);
        g.setColor(Color.BLACK); g.drawRect(cx-6, cy-6, 12, 12);
        g.setColor(Color.WHITE); g.drawRect(cx-2, cy-244);
        g.setColor(Color.BLACK); g.drawRect(cx-1, cy-122);
        if (d.width%2 == 0) {
            cx += 1;
        }
        if (d.height%2 == 0) {
            cy += 1;
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

        g2d.setColor(DARK_BLUE);
        g2d.fillRect(x1, y1, w, h);

        // draw a border
        g2d.setColor(Color.white);
        g2d.drawRect(x1-1, y1-1, w+1, h+1);

        // fill tile cache percentage graph
        g2d.setColor(DARK_RED);
        int p = (int)((float)h * ((float)percent / 100.0F));

View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);

            g2.setPaint(new Color(255, 128, 128, 64));

            g2.drawRect(0, 0, getWidth() - 1, getHeight() - 1);
            g2.fillRect(0, 0, getWidth(), getHeight());

            g2.setPaint(new Color(0, 0, 0, 128));
            g2.setFont(new Font("Sansserif", Font.BOLD, 18));
            g2.drawString("Translucent", 16, 26);
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

  public void drawBorder(Color color) {
    Graphics2D graphics = image.createGraphics();
    try {
      graphics.setColor(color);
      graphics.drawRect(0, 0, width - 1, height - 1);
    } finally {
      graphics.dispose();
    }
  }
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

                if (valueSelector.isActive) {
                    DarculaUIUtil.paintFocusRing(g, 2, 2, width - 4, height - 4);
                } else {
                    boolean editable = valueSelector.isEnabled;
                    g.setColor(getBorderColor(c.isEnabled() && editable));
                    g.drawRect(1, 1, width-2, height-2);
                    g.setColor(UIUtil.getPanelBackground());
                    g.drawRect(0, 0, width, height);

                }
            } else {
View Full Code Here

Examples of java.awt.Graphics2D.drawRect()

                } else {
                    boolean editable = valueSelector.isEnabled;
                    g.setColor(getBorderColor(c.isEnabled() && editable));
                    g.drawRect(1, 1, width-2, height-2);
                    g.setColor(UIUtil.getPanelBackground());
                    g.drawRect(0, 0, width, height);

                }
            } else {
                Border textFieldBorder = UIUtil.getTextFieldBorder();
                if (textFieldBorder instanceof LineBorder) {
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.