Package java.awt

Examples of java.awt.Graphics2D.drawRoundRect()


      g2d.setColor(borderColorAlpha1);
      g2d.drawRoundRect(x,y+1,w,h-1,arc,arc-1);

      g2d.setClip(vOldClip);
      g2d.setColor(borderColorAlpha2);
      g2d.drawRoundRect(x+1,y+2,w-2,h-3,arc,arc-2);
    }
  }
}
View Full Code Here


            BasicStroke b_stroke = new BasicStroke(stroke_width);
            graphics.setColor(ColorMapper.getColorByName(stroke));
            graphics.setStroke(b_stroke);

            if ((arcwidth != 0) || (archeight != 0)) {
                graphics.drawRoundRect(0, 0, width, height, arcwidth, archeight);
            } else {
                graphics.drawRect(0, 0, width, height);
            }
        }
View Full Code Here

            endTest(print);

            // rrect-direct-draw
            startTest("rrect-direct-draw", n);
            for ( int i=0; i<n; ++i ) {
                g2.drawRoundRect(x,y,w,h,c,c);
            }
            endTest(print);
           
            // rrect-shape-draw
            RoundRectangle2D rrect = new RoundRectangle2D.Float(xf,yf,wf,hf,cf,cf);
View Full Code Here

        {
            final int sx = this.selectedSector.getX();
            final int sy = this.selectedSector.getY();
            g.setColor(Color.BLACK);
            g.setStroke(new BasicStroke(5.0f / this.scale));
            g.drawRoundRect(sx * 100 - 60, sy * 100 - 60, 120, 120, 20, 20);
            g.setColor(Color.GREEN);
            g.setStroke(new BasicStroke(3.0f / this.scale));
            g.drawRoundRect(sx * 100 - 60, sy * 100 - 60, 120, 120, 20, 20);
        }

View Full Code Here

            g.setColor(Color.BLACK);
            g.setStroke(new BasicStroke(5.0f / this.scale));
            g.drawRoundRect(sx * 100 - 60, sy * 100 - 60, 120, 120, 20, 20);
            g.setColor(Color.GREEN);
            g.setStroke(new BasicStroke(3.0f / this.scale));
            g.drawRoundRect(sx * 100 - 60, sy * 100 - 60, 120, 120, 20, 20);
        }

        // Emphasize the hovered sector
        if (this.overSector != null)
        {
View Full Code Here

            final int sy = this.overSector.getY();
            if (!this.overSector.equals(this.selectedSector))
            {
                g.setColor(Color.BLACK);
                g.setStroke(new BasicStroke(5.0f / this.scale));
                g.drawRoundRect(sx * 100 - 60, sy * 100 - 60, 120, 120, 20, 20);
                g.setColor(Color.RED);
                g.setStroke(new BasicStroke(3.0f / this.scale));
                g.drawRoundRect(sx * 100 - 60, sy * 100 - 60, 120, 120, 20, 20);
            }

View Full Code Here

                g.setColor(Color.BLACK);
                g.setStroke(new BasicStroke(5.0f / this.scale));
                g.drawRoundRect(sx * 100 - 60, sy * 100 - 60, 120, 120, 20, 20);
                g.setColor(Color.RED);
                g.setStroke(new BasicStroke(3.0f / this.scale));
                g.drawRoundRect(sx * 100 - 60, sy * 100 - 60, 120, 120, 20, 20);
            }

            // Create the sector info text
            final Color titleColor = new Color(0x40, 0x40, 0x40);
            final Color detailColor = new Color(0x50, 0x50, 0x50);
View Full Code Here

    // draw a thick border
    Graphics2D g2d = (Graphics2D)g;
    Rectangle bounds = BoxHighlightPainter.getBounds( text, start, end );
    g2d.setColor( Color.black );
    g2d.setStroke( new BasicStroke( 2.0f ) );
    g2d.drawRoundRect( bounds.x, bounds.y, bounds.width, bounds.height, 4, 4 );
  }
}
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.