Class Light.Distant
java.lang.Object
javafx.scene.effect.Light
javafx.scene.effect.Light.Distant
- Enclosing class:
- Light
Represents a distant light source.
 
Example:
 Light.Distant light = new Light.Distant();
 light.setAzimuth(45.0);
 light.setElevation(30.0);
 Lighting lighting = new Lighting();
 lighting.setLight(light);
 lighting.setSurfaceScale(5.0);
 Text text = new Text();
 text.setText("Distant");
 text.setFill(Color.STEELBLUE);
 text.setFont(Font.font("null", FontWeight.BOLD, 80));
 text.setX(10.0f);
 text.setY(10.0f);
 text.setTextOrigin(VPos.TOP);
 text.setEffect(lighting);
 Rectangle rect = new Rectangle(300,150);
 rect.setFill(Color.ALICEBLUE);
 rect.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 azimuth of the light.final DoublePropertyThe elevation of the light.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal DoublePropertyThe azimuth of the light.final DoublePropertyThe elevation of the light.final doubleGets the value of theazimuthproperty.final doubleGets the value of theelevationproperty.final voidsetAzimuth(double value) Sets the value of theazimuthproperty.final voidsetElevation(double value) Sets the value of theelevationproperty.Methods declared in class javafx.scene.effect.LightcolorProperty, getColor, setColor
- 
Property Details- 
azimuthThe azimuth of the light. The azimuth is the direction angle for the light source on the XY plane, in degrees.Min: n/a Max: n/a Default: 45.0 Identity: n/a- Default value:
- 45.0
- See Also:
 
- 
elevationThe elevation of the light. The elevation is the direction angle for the light source on the YZ plane, in degrees.Min: n/a Max: n/a Default: 45.0 Identity: n/a- Default value:
- 45.0
- See Also:
 
 
- 
- 
Constructor Details- 
Distantpublic Distant()Creates a new instance of Distant light with default parameters.
- 
DistantCreates a new instance of Distant light with the specified azimuth, elevation, and color.- Parameters:
- azimuth- the azimuth of the light
- elevation- the elevation of the light
- color- the color of the light
- Since:
- JavaFX 2.1
 
 
- 
- 
Method Details- 
setAzimuthpublic final void setAzimuth(double value) Sets the value of theazimuthproperty.- Property description:
- The azimuth of the light.  The azimuth is the direction angle
 for the light source on the XY plane, in degrees.
 Min: n/a Max: n/a Default: 45.0 Identity: n/a
- Default value:
- 45.0
- Parameters:
- value- the value for the- azimuthproperty
- See Also:
 
- 
getAzimuthpublic final double getAzimuth()Gets the value of theazimuthproperty.- Property description:
- The azimuth of the light.  The azimuth is the direction angle
 for the light source on the XY plane, in degrees.
 Min: n/a Max: n/a Default: 45.0 Identity: n/a
- Default value:
- 45.0
- Returns:
- the value of the azimuthproperty
- See Also:
 
- 
azimuthPropertyThe azimuth of the light. The azimuth is the direction angle for the light source on the XY plane, in degrees.Min: n/a Max: n/a Default: 45.0 Identity: n/a- Default value:
- 45.0
- Returns:
- the azimuthproperty
- See Also:
 
- 
setElevationpublic final void setElevation(double value) Sets the value of theelevationproperty.- Property description:
- The elevation of the light.  The elevation is the
 direction angle for the light source on the YZ plane, in degrees.
 Min: n/a Max: n/a Default: 45.0 Identity: n/a
- Default value:
- 45.0
- Parameters:
- value- the value for the- elevationproperty
- See Also:
 
- 
getElevationpublic final double getElevation()Gets the value of theelevationproperty.- Property description:
- The elevation of the light.  The elevation is the
 direction angle for the light source on the YZ plane, in degrees.
 Min: n/a Max: n/a Default: 45.0 Identity: n/a
- Default value:
- 45.0
- Returns:
- the value of the elevationproperty
- See Also:
 
- 
elevationPropertyThe elevation of the light. The elevation is the direction angle for the light source on the YZ plane, in degrees.Min: n/a Max: n/a Default: 45.0 Identity: n/a- Default value:
- 45.0
- Returns:
- the elevationproperty
- See Also:
 
 
-