Package java.awt

Examples of java.awt.Graphics2D.fillOval()


        g2d.fillOval(71, 72, 5, 5);
        g2d.fillOval(76, 80, 5, 5);
        g2d.fillOval(72, 70, 5, 5);
        g2d.fillOval(68, 80, 5, 5);
        g2d.fillOval(78, 78, 5, 5);
        g2d.fillOval(80, 80, 5, 5);
      }
    } else
    {
      g2d.setColor(Color.RED);
    }
View Full Code Here


        g2.setColor(Color.BLACK);
        for (Line2D line : model.getLines()) {
            g2.draw(line);
        }
        for (Point2D point : model.getPoints()) {
            g2.fillOval((int)point.getX(), (int)point.getY(), 5, 5);
        }
    }
}
View Full Code Here

                    @Override
                    public void paintIcon(Component comp, Graphics g, int x, int y) {
                        Graphics2D g2 = (Graphics2D) g;
                        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                        g2.setColor(c);
                        g2.fillOval(2, 2, 12, 12);
                        g2.setColor(Color.BLACK);
                        g2.drawOval(2, 2, 12, 12);
                    }

                    @Override
View Full Code Here

          g2d.setPaint(new GradientPaint(0, 0, color, getWidth(), getHeight(),
              // The color here is a darker version of the player color.
              new Color(Math.min(color.getRed(), DARK_COLOR_CHANNEL_VALUE),
              Math.min(color.getGreen(), DARK_COLOR_CHANNEL_VALUE),
              Math.min(color.getBlue(), DARK_COLOR_CHANNEL_VALUE)), false));         
          g2d.fillOval(0, 0, getWidth(), getHeight());
        }
      };
     
      iconPanel.setMinimumSize(ICON_PANEL_SIZE);
      iconPanel.setMaximumSize(ICON_PANEL_SIZE);
View Full Code Here

         
          if (mark != null)
            currentGradient = PlayerColorRepresentation.valueOf(mark).getPlayerPaint(cellOrigX, cellOrigY, cellDestX, cellDestY);
         
          g2d.setPaint(currentGradient);
          g2d.fillOval(cellOrigX, cellOrigY, cellWidthDraw, cellHeightDraw);
        }
      }
     
      // Marks the last inserted chip differently
      // in case the game is running.
View Full Code Here

       
        int j = lastInsertedCell.getColIndex();
        int i = lastInsertedCell.getRowIndex();
        g2d.setColor(CIRCLE_COLOR);
       
        g2d.fillOval(cellWidth * j + CELL_BORDER_WIDTH, cellHeight * i + CELL_BORDER_WIDTH, cellWidthDraw, cellHeightDraw);
       
        PlayerMark mark = playerMarks[i][j];
        g2d.setPaint(PlayerColorRepresentation.valueOf(mark).getPlayerPaint(cellWidth * j + CELL_BORDER_WIDTH, cellHeight * i + CELL_BORDER_WIDTH,
            cellWidth * (j + 1) - CELL_BORDER_WIDTH, cellHeight * (i + 1) - CELL_BORDER_WIDTH));
       
View Full Code Here

       
        PlayerMark mark = playerMarks[i][j];
        g2d.setPaint(PlayerColorRepresentation.valueOf(mark).getPlayerPaint(cellWidth * j + CELL_BORDER_WIDTH, cellHeight * i + CELL_BORDER_WIDTH,
            cellWidth * (j + 1) - CELL_BORDER_WIDTH, cellHeight * (i + 1) - CELL_BORDER_WIDTH));
       
        g2d.fillOval(cellWidth * j + CIRCLE_WIDTH + CELL_BORDER_WIDTH, cellHeight * i + CIRCLE_WIDTH + CELL_BORDER_WIDTH, cellWidthDraw - 2 * CIRCLE_WIDTH, cellHeightDraw - 2 * CIRCLE_WIDTH);
      }
     
      if (gameModel.getGameStatus().equals(GameStatus.WON_STATUS))
      {
        List<CellCoord> winningLine = gameModel.getWinLine();
View Full Code Here

    Graphics2D g = (Graphics2D) img.getGraphics();
    g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);

    g.setColor(p.getRealColor());
    g.fillOval(20, 20, 8, 8);

    g.setColor(Color.BLACK);
    g.drawOval(20, 20, 8, 8);

    g.dispose();
View Full Code Here

        g.setColor(Color.black);
        int x = baseIcon.getIconWidth()/4;
        int dx = baseIcon.getIconWidth()/2 - 2;
        int y = baseIcon.getIconHeight()/2;
        int dy = baseIcon.getIconHeight()/4 - 1;
        g.fillOval(x, y, dx, dy*2);

        return result;
    }

}
View Full Code Here

                        vecTemp.translate(d);
                        v = this.getPointInVisualization(v);
                        vecTemp = this.getPointInVisualization(vecTemp);
                        d = vecTemp.sub(v);
                       
                        g.fillOval((int) v.x - 5, (int) v.y - 5, 10, 10);
                       
                        Vector2D p1 = this.getPointInVisualization(new Vector2D(
                                planePoint1.x * heightProfileGridWidth + heightProfileBoundingBox.upperLeftCorner().x,
                                planePoint1.y * heightProfileGridHeight + heightProfileBoundingBox.upperLeftCorner().y));
                        Vector2D p2 = this.getPointInVisualization(new Vector2D(
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.