Class Polyline

  • All Implemented Interfaces:
    Styleable, EventTarget

    public class Polyline
    extends Shape
    Creates a polyline, defined by the array of the segment points. The Polyline class is similar to the Polygon class, except that it is not automatically closed.
    import javafx.scene.shape.*;
    Polyline polyline = new Polyline();
    polyline.getPoints().addAll(new Double[]{
        0.0, 0.0,
        20.0, 10.0,
        10.0, 20.0 });
    JavaFX 2.0
    • Constructor Detail

      • Polyline

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

        public Polyline​(double... points)
        Creates a new instance of Polyline.
        points - the coordinates of the polyline segments
    • Method Detail

      • getPoints

        public final ObservableList<Double> getPoints()
        Gets the coordinates of the PolyLine segments.
        An observable list of points constituting segments of this PolyLine
      • toString

        public String toString()
        Returns a string representation of this Polyline object.
        toString in class Node
        a string representation of this Polyline object.