Class Light.Point
java.lang.Object
javafx.scene.effect.Light
javafx.scene.effect.Light.Point
- Direct Known Subclasses:
- Light.Spot
- Enclosing class:
- Light
Represents a light source at a given position in 3D space.
 
Example:
 Light.Point light = new Light.Point();
 light.setX(100);
 light.setY(100);
 light.setZ(50);
 Lighting lighting = new Lighting();
 lighting.setLight(light);
 lighting.setSurfaceScale(5.0);
 Text text = new Text();
 text.setText("Point");
 text.setFill(Color.STEELBLUE);
 text.setFont(Font.font(null, FontWeight.BOLD, 80));
 text.setX(10.0);
 text.setY(10.0);
 text.setTextOrigin(VPos.TOP);
 Rectangle rect = new Rectangle(250, 150);
 rect.setFill(Color.ALICEBLUE);
 rect.setEffect(lighting);
 text.setEffect(lighting);
 The code above produces the following:
  
 
- Since:
- JavaFX 2.0
- 
Nested Class SummaryNested classes/interfaces declared in class javafx.scene.effect.LightLight.Distant, Light.Point, Light.Spot
- 
Property SummaryPropertiesTypePropertyDescriptionfinal DoublePropertyThe x coordinate of the light position.final DoublePropertyThe y coordinate of the light position.final DoublePropertyThe z coordinate of the light position.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal doublegetX()Gets the value of thexproperty.final doublegetY()Gets the value of theyproperty.final doublegetZ()Gets the value of thezproperty.final voidsetX(double value) Sets the value of thexproperty.final voidsetY(double value) Sets the value of theyproperty.final voidsetZ(double value) Sets the value of thezproperty.final DoublePropertyThe x coordinate of the light position.final DoublePropertyThe y coordinate of the light position.final DoublePropertyThe z coordinate of the light position.Methods declared in class javafx.scene.effect.LightcolorProperty, getColor, setColor
- 
Property Details- 
xThe x coordinate of the light position.Min: n/a Max: n/a Default: 0.0 Identity: n/a- Default value:
- 0.0
- See Also:
 
- 
yThe y coordinate of the light position.Min: n/a Max: n/a Default: 0.0 Identity: n/a- Default value:
- 0.0
- See Also:
 
- 
zThe z coordinate of the light position.Min: n/a Max: n/a Default: 0.0 Identity: n/a- Default value:
- 0.0
- See Also:
 
 
- 
- 
Constructor Details- 
Pointpublic Point()Creates a new instance of Point light with default parameters.
- 
PointCreates a new instance of Point light with the specified x, y, x, and color.- Parameters:
- x- the x coordinate of the light position
- y- the y coordinate of the light position
- z- the z coordinate of the light position
- color- the color of the light
- Since:
- JavaFX 2.1
 
 
- 
- 
Method Details- 
setXpublic final void setX(double value) Sets the value of thexproperty.- Property description:
- The x coordinate of the light position.
 Min: n/a Max: n/a Default: 0.0 Identity: n/a
- Default value:
- 0.0
- Parameters:
- value- the value for the- xproperty
- See Also:
 
- 
getXpublic final double getX()Gets the value of thexproperty.- Property description:
- The x coordinate of the light position.
 Min: n/a Max: n/a Default: 0.0 Identity: n/a
- Default value:
- 0.0
- Returns:
- the value of the xproperty
- See Also:
 
- 
xPropertyThe x coordinate of the light position.Min: n/a Max: n/a Default: 0.0 Identity: n/a- Default value:
- 0.0
- Returns:
- the xproperty
- See Also:
 
- 
setYpublic final void setY(double value) Sets the value of theyproperty.- Property description:
- The y coordinate of the light position.
 Min: n/a Max: n/a Default: 0.0 Identity: n/a
- Default value:
- 0.0
- Parameters:
- value- the value for the- yproperty
- See Also:
 
- 
getYpublic final double getY()Gets the value of theyproperty.- Property description:
- The y coordinate of the light position.
 Min: n/a Max: n/a Default: 0.0 Identity: n/a
- Default value:
- 0.0
- Returns:
- the value of the yproperty
- See Also:
 
- 
yPropertyThe y coordinate of the light position.Min: n/a Max: n/a Default: 0.0 Identity: n/a- Default value:
- 0.0
- Returns:
- the yproperty
- See Also:
 
- 
setZpublic final void setZ(double value) Sets the value of thezproperty.- Property description:
- The z coordinate of the light position.
 Min: n/a Max: n/a Default: 0.0 Identity: n/a
- Default value:
- 0.0
- Parameters:
- value- the value for the- zproperty
- See Also:
 
- 
getZpublic final double getZ()Gets the value of thezproperty.- Property description:
- The z coordinate of the light position.
 Min: n/a Max: n/a Default: 0.0 Identity: n/a
- Default value:
- 0.0
- Returns:
- the value of the zproperty
- See Also:
 
- 
zPropertyThe z coordinate of the light position.Min: n/a Max: n/a Default: 0.0 Identity: n/a- Default value:
- 0.0
- Returns:
- the zproperty
- See Also:
 
 
-