JavaScript is disabled on your browser.
JavaFX 2.2
javafx.scene.shape

Class Circle

  • All Implemented Interfaces:
    EventTarget


    public class Circle
    extends Shape 
    The Circle class creates a new circle with the specified radius and center location measured in pixels Example usage. The following code creates a circle with radius 50px centered at (100,100)px.
    import javafx.scene.shape.*;
    Circle circle = new Circle();
    circle.setCenterX(100.0f);
    circle.setCenterY(100.0f);
    circle.setRadius(50.0f);
    }
    
    • Constructor Detail

      • Circle

        public Circle(double radius)
        Creates a new instance of Circle with a specified radius.
        Parameters:
        radius - the radius of the circle in pixels
      • Circle

        public Circle(double radius,
         Paint fill)
        Creates a new instance of Circle with a specified radius and fill.
        Parameters:
        radius - the radius of the circle
        fill - determines how to fill the interior of the Circle
      • Circle

        public Circle()
        Creates an empty instance of Circle.
      • Circle

        public Circle(double centerX,
         double centerY,
         double radius)
        Creates a new instance of Circle with a specified position and radius.
        Parameters:
        centerX - the horizontal position of the center of the circle in pixels
        centerY - the vertical position of the center of the circle in pixels
        radius - the radius of the circle in pixels
      • Circle

        public Circle(double centerX,
         double centerY,
         double radius,
         Paint fill)
        Creates a new instance of Circle with a specified position, radius and fill.
        Parameters:
        centerX - the horizontal position of the center of the circle in pixels
        centerY - the vertical position of the center of the circle in pixels
        radius - the radius of the circle in pixels
        fill - determines how to fill the interior of the Circle
    • Method Detail

      • setCenterX

        public final void setCenterX(double value)
        Sets the value of the property centerX.
        Property description:
        Defines the horizontal position of the center of the circle in pixels.
        Default value:
        0.0
      • getCenterX

        public final double getCenterX()
        Gets the value of the property centerX.
        Property description:
        Defines the horizontal position of the center of the circle in pixels.
        Default value:
        0.0
      • setCenterY

        public final void setCenterY(double value)
        Sets the value of the property centerY.
        Property description:
        Defines the vertical position of the center of the circle in pixels.
        Default value:
        0.0
      • getCenterY

        public final double getCenterY()
        Gets the value of the property centerY.
        Property description:
        Defines the vertical position of the center of the circle in pixels.
        Default value:
        0.0
      • setRadius

        public final void setRadius(double value)
        Sets the value of the property radius.
        Property description:
        Defines the radius of the circle in pixels.
        Default value:
        0.0
      • getRadius

        public final double getRadius()
        Gets the value of the property radius.
        Property description:
        Defines the radius of the circle in pixels.
        Default value:
        0.0
JavaFX 2.2

Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /