Examples of RoundRectangle2D


Examples of java.awt.geom.RoundRectangle2D

        updateSize();
        Graphics2D g2d = (Graphics2D) g;
        g2d.setFont(font);

        RoundRectangle2D r = new RoundRectangle2D.Double(getX(), getY(),
                getWidth(), getHeight(), 35, 35);
        Line2D l = new Line2D.Double(getX(), getY() + 25, getX() + getWidth(),
                getY() + 25);
        g2d.setColor(Color.white);
        g2d.fill(r);
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

        updateSize();
        Graphics2D g2d = (Graphics2D) g;
        g2d.setFont(font);

        RoundRectangle2D r = new RoundRectangle2D.Double(getX(), getY(),
                getWidth(), getHeight(), 1, 1);
        //Rectangle2D r = new Rectangle2D.Double(getX(), getY(), getWidth(),
        // getHeight());
        Line2D l = new Line2D.Double(getX(), 25 + getY(), getWidth() + getX(),
                getY() + 25);
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

    public void paint(Graphics g)
    {
        Graphics2D g2d = (Graphics2D) g;
        g2d.setFont(font);
        updateSize();
        RoundRectangle2D r = new RoundRectangle2D.Double(getX(), getY(),
                getWidth(), getHeight(), 1, 1);
        Line2D l = new Line2D.Double(getX(), 25 + getY(), getWidth() + getX(),
                25 + getY());
        g2d.setColor(Color.white);
        g2d.fill(r);
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

     *                    at the four corners.
     * @see        java.awt.Graphics#fillRoundRect
     */
    public void drawRoundRect(int x, int y, int width, int height,
                              int arcWidth, int arcHeight){
        RoundRectangle2D rect = new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight);
        draw(rect);
    }
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

     *                     of the arc at the four corners.
     * @see         java.awt.Graphics#drawRoundRect
     */
    public void fillRoundRect(int x, int y, int width, int height,
                              int arcWidth, int arcHeight){
        RoundRectangle2D rect = new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight);
        fill(rect);
    }
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

                break;
        }


        RoundRectangle2D rect = new RoundRectangle2D.Float(x, y, width * 2, height * 2, width, height);

        Color bgColor = Color.decode(bg);

        Color fgColor = Color.decode(fg);
        Rectangle r = new Rectangle(width, height);
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

          new Color(Math.min(251 + b, 255), Math.min(251 + b, 255), Math.min(252 + b, 255)), 0, h + o,
          new Color(Math.min(215 + b, 255), Math.min(218 + b, 255), Math.min(224 + b, 255)), true);
      g.setPaint(gp);
    }

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

    //if (!selected || rollover)
    {
      g.fill(roundRectangle2D);
    }
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

   * @throws IOException if an I/O error occured.
   */
  public void writeObject (final Object o, final ObjectOutputStream out)
          throws IOException
  {
    final RoundRectangle2D rectangle = (RoundRectangle2D) o;
    out.writeDouble(rectangle.getX());
    out.writeDouble(rectangle.getY());
    out.writeDouble(rectangle.getWidth());
    out.writeDouble(rectangle.getHeight());
    out.writeDouble(rectangle.getArcWidth());
    out.writeDouble(rectangle.getArcHeight());
  }
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

   *
   * @return The object.
   */
  public Object createObject()
  {
    final RoundRectangle2D rect = new RoundRectangle2D.Float();
    final float w = getFloatParameter("width");
    final float h = getFloatParameter("height");
    final float x = getFloatParameter("x");
    final float y = getFloatParameter("y");
    final float aw = getFloatParameter("arcWidth");
    final float ah = getFloatParameter("arcHeight");
    rect.setRoundRect(x, y, w, h, aw, ah);

    return rect;
  }
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

    if (!(o instanceof RoundRectangle2D))
    {
      throw new ObjectFactoryException("The given object is no java.awt.geom.Rectangle2D.");
    }

    final RoundRectangle2D rect = (RoundRectangle2D) o;
    final float x = (float) rect.getX();
    final float y = (float) rect.getY();
    final float w = (float) rect.getWidth();
    final float h = (float) rect.getHeight();
    final float aw = (float) rect.getArcWidth();
    final float ah = (float) rect.getArcHeight();

    setParameter("x", new Float(x));
    setParameter("y", new Float(y));
    setParameter("width", new Float(w));
    setParameter("height", new Float(h));
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.