Top Description Fields Constructors Methods
javafx.scene.shape

public Class LineTo

extends PathElement
Class Inheritance
Imports
com.sun.javafx.geom.Path2D, com.sun.javafx.scene.shape.LineToHelper, com.sun.javafx.sg.prism.NGPath, javafx.beans.property.DoubleProperty, .DoublePropertyBase

Creates a line path element by drawing a straight line from the current coordinate to the new coordinates.

For more information on path elements see the Path and PathElement classes.

Example:

import javafx.scene.shape.*;

Path path = new Path();
path.getElements().add(new MoveTo(0.0f, 50.0f));
path.getElements().add(new LineTo(100.0f, 100.0f));
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private DoubleProperty
x

Defines the X coordinate.

private DoubleProperty
y

Defines the Y coordinate.

Inherited from javafx.scene.shape.PathElement:
nodes

Constructor Summary

AccessConstructor and Description
public
LineTo()

Creates an empty instance of LineTo.

public
LineTo(double
the horizontal coordinate of the line end point
x
,
double
the vertical coordinate of the line end point
y
)

Creates a new instance of LineTo.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
private void
public final double
getX()

public final double
getY()

public final void
setX(double value)

public final void
setY(double value)

public String

Returns:

a string representation of this LineTo object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this LineTo object.

public final DoubleProperty
public final DoubleProperty
Inherited from javafx.scene.shape.PathElement:
absolutePropertyaddNodeisAbsoluteremoveNodesetAbsoluteu

Field Detail

xback to summary
private DoubleProperty x

Defines the X coordinate.

Default Value
0.0
yback to summary
private DoubleProperty y

Defines the Y coordinate.

Default Value
0.0

Constructor Detail

LineToback to summary
public LineTo()

Creates an empty instance of LineTo.

LineToback to summary
public LineTo(double x, double y)

Creates a new instance of LineTo.

Parameters
x:double

the horizontal coordinate of the line end point

y:double

the vertical coordinate of the line end point

Method Detail

addToback to summary
pack-priv void addTo(NGPath pgPath)

Implements abstract javafx.scene.shape.PathElement.addTo.

Annotations
@Override
doAddToback to summary
private void doAddTo(Path2D path)
getXback to summary
public final double getX()
getYback to summary
public final double getY()
setXback to summary
public final void setX(double value)
setYback to summary
public final void setY(double value)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this LineTo object.

Returns:String

a string representation of this LineTo object.

Annotations
@Override
xPropertyback to summary
public final DoubleProperty xProperty()
yPropertyback to summary
public final DoubleProperty yProperty()