Package java.awt

Examples of java.awt.Graphics2D.fill()


            for (Cluster<DoublePoint> cluster : clusters) {
                g2.setPaint(colors[index++]);
                for (DoublePoint point : cluster.getPoints()) {
                    Clusterable p = transform(point, w, h);
                    double[] arr = p.getPoint();
                    g2.fill(new Ellipse2D.Double(arr[0] - 1, arr[1] - 1, 3, 3));
                }
               
                if (cluster instanceof CentroidCluster) {
                    Clusterable p = transform(((CentroidCluster<?>) cluster).getCenter(), w, h);
                    double[] arr = p.getPoint();
View Full Code Here


               
                if (cluster instanceof CentroidCluster) {
                    Clusterable p = transform(((CentroidCluster<?>) cluster).getCenter(), w, h);
                    double[] arr = p.getPoint();
                    Shape s = new Ellipse2D.Double(arr[0] - 4, arr[1] - 4, 8, 8);
                    g2.fill(s);
                    g2.setPaint(Color.black);
                    g2.draw(s);
                }
            }
           
View Full Code Here

    BufferedImage image = new BufferedImage(420, 340, ColorSpace.TYPE_RGB);

    Graphics2D g2d = (Graphics2D) image.getGraphics();
    g2d.setColor(Color.WHITE);
    g2d.setBackground(Color.WHITE);
    g2d.fill(g2d.getDeviceConfiguration().getBounds());
   
    AwtGraphicsDevice driver = new AwtGraphicsDevice(g2d);
    topLevelContext.getSingleton(GraphicsDevices.class).setActive(new GraphicsDevice(driver));
   
    try {
View Full Code Here

    @Override
    public void paint(final Graphics g, final Divider divider) {
      if (divider == activeDivider() && !isContinuousLayout()) {
        final Graphics2D g2d = (Graphics2D) g;
        g2d.setColor(JBColor.black);
        g2d.fill(divider.getBounds());
      }
    }
  }

View Full Code Here

    final PageDefinition pageDefinition = getRenderContext().getContextRoot().getPageDefinition();
    final Rectangle2D.Double area = new Rectangle2D.Double(0, 0, pageDefinition.getWidth() * scaleFactor, getHeight());
    g2.translate(leftBorder * scaleFactor, topBorder * scaleFactor);
    g2.clip(area);
    g2.setColor(Color.WHITE);
    g2.fill(area);

    // draw the grid (unscaled, but translated)
    final Point2D offset = getOffset();
    if (offset.getX() != 0)
    {
View Full Code Here

    {
      // The blackout area is for inline sub-reports and is the area where the subreport is not interested in
      // (so we can clip out).  The blackout area is only visible in the sub-report.
      final Rectangle2D.Double blackoutArea = new Rectangle2D.Double(0, 0, offset.getX() * scaleFactor, getHeight());
      g2.setColor(Color.LIGHT_GRAY);
      g2.fill(blackoutArea);
    }
    paintGrid(g2);
    paintElementAlignment(g2);
    g2.dispose();

View Full Code Here

        {
          rendererRoot.handleError(designerContext, renderContext);

          logicalPageAreaG2.scale(1f / scaleFactor, 1f / scaleFactor);
          logicalPageAreaG2.setPaint(Color.WHITE);
          logicalPageAreaG2.fill(area);
        }
      }
    }
    catch (Exception e)
    {
View Full Code Here

  public void draw(final Graphics2D g2, final Rectangle2D bounds)
  {
    final Graphics2D graphics2D = (Graphics2D) g2.create();
    graphics2D.clip(bounds);
    graphics2D.setColor(background);
    graphics2D.fill(bounds);
    graphics2D.setFont(font);
    graphics2D.setColor(foreground);
    if (value == null)
    {
      graphics2D.drawString("Subreport", 0, font.getSize2D());
View Full Code Here

    final RoundRectangle2D roundRectangle2D = new RoundRectangle2D.Double(0, 0, w - 1, h - 1, 6, 6);

    //if (!selected || rollover)
    {
      g.fill(roundRectangle2D);
    }

    if (selected)
    {
      final GradientPaint gp = new GradientPaint(0, 0,
View Full Code Here

    }
    else
    {
      g2.setPaint(getBackground());
    }
    g2.fill(getBounds());
    g2.dispose();
  }
}
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.