APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.shape

public non-sealed Class Polyline

extends Shape
Class Inheritance
Imports
com.sun.javafx.collections.TrackableObservableList, com.sun.javafx.geom.BaseBounds, .Path2D, com.sun.javafx.geom.transform.BaseTransform, com.sun.javafx.scene.DirtyBits, .NodeHelper, com.sun.javafx.scene.shape.PolylineHelper, .ShapeHelper, com.sun.javafx.sg.prism.NGNode, .NGPolyline, .NGShape, javafx.collections.ListChangeListener.Change, .ObservableList, javafx.css.StyleableProperty, javafx.scene.Node, javafx.scene.paint.Color, .Paint

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 });
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private final ObservableList<Double>
points

Defines the coordinates of the polyline segments.

private final Path2D
Inherited from javafx.scene.shape.Shape:
old_fillold_stroke

Constructor Summary

AccessConstructor and Description
public
Polyline()

Creates an empty instance of Polyline.

public
Polyline(double...
the coordinates of the polyline segments
points
)

Creates a new instance of Polyline.

Method Summary

Modifier and TypeMethod and Description
private BaseBounds
private Path2D
private NGNode
private Paint
private Paint
private void
public final ObservableList<Double>

Returns:

An observable list of points constituting segments of this PolyLine
getPoints
()

Gets the coordinates of the PolyLine segments.

public String

Returns:

a string representation of this Polyline object.
toString
()

Overrides javafx.scene.Node.toString.

Returns a string representation of this Polyline object.

Inherited from javafx.scene.shape.Shape:
computeBoundscomputeShapeBoundscomputeShapeContainsconvertLineJoinfillPropertygetClassCssMetaDatagetCssMetaDatagetFillgetModegetStrokegetStrokeDashArraygetStrokeDashOffsetgetStrokeLineCapgetStrokeLineJoingetStrokeMiterLimitgetStrokeTypegetStrokeWidthintersectisSmoothsetFillsetShapeChangeListenersetSmoothsetStrokesetStrokeDashOffsetsetStrokeLineCapsetStrokeLineJoinsetStrokeMiterLimitsetStrokeTypesetStrokeWidthsmoothPropertystrokeDashOffsetPropertystrokeLineCapPropertystrokeLineJoinPropertystrokeMiterLimitPropertystrokePropertystrokeTypePropertystrokeWidthPropertysubtractunion

Field Detail

pointsback to summary
private final ObservableList<Double> points

Defines the coordinates of the polyline segments.

Default Value
empty
shapeback to summary
private final Path2D shape

Constructor Detail

Polylineback to summary
public Polyline()

Creates an empty instance of Polyline.

Polylineback to summary
public Polyline(double... points)

Creates a new instance of Polyline.

Parameters
points:double[]

the coordinates of the polyline segments

Method Detail

doComputeGeomBoundsback to summary
private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx)

Hides javafx.scene.shape.Shape.doComputeGeomBounds.

doConfigShapeback to summary
private Path2D doConfigShape()
doCreatePeerback to summary
private NGNode doCreatePeer()
doCssGetFillInitialValueback to summary
private Paint doCssGetFillInitialValue()

Hides javafx.scene.shape.Shape.doCssGetFillInitialValue.

doCssGetStrokeInitialValueback to summary
private Paint doCssGetStrokeInitialValue()

Hides javafx.scene.shape.Shape.doCssGetStrokeInitialValue.

doUpdatePeerback to summary
private void doUpdatePeer()

Hides javafx.scene.shape.Shape.doUpdatePeer.

getPointsback to summary
public final ObservableList<Double> getPoints()

Gets the coordinates of the PolyLine segments.

Returns:ObservableList<Double>

An observable list of points constituting segments of this PolyLine

toStringback to summary
public String toString()

Overrides javafx.scene.Node.toString.

Returns a string representation of this Polyline object.

Returns:String

a string representation of this Polyline object.

Annotations
@Override