Spec-Zone .ru
спецификации, руководства, описания, API
|
public static class Light.Distant extends Light
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:
Type | Property and Description |
---|---|
DoubleProperty |
azimuth
The azimuth of the light.
|
DoubleProperty |
elevation
The elevation of the light.
|
Light.Distant, Light.Point, Light.Spot
Constructor and Description |
---|
Light.Distant()
Creates a new instance of Distant light with default parameters.
|
Light.Distant(double azimuth,
double elevation,
Color color)
Creates a new instance of Distant light with the specified azimuth,
elevation, and color.
|
Modifier and Type | Method and Description |
---|---|
DoubleProperty |
azimuthProperty()
The azimuth of the light.
|
DoubleProperty |
elevationProperty()
The elevation of the light.
|
double |
getAzimuth()
Gets the value of the property azimuth.
|
double |
getElevation()
Gets the value of the property elevation.
|
void |
setAzimuth(double value)
Sets the value of the property azimuth.
|
void |
setElevation(double value)
Sets the value of the property elevation.
|
colorProperty, getColor, setColor
public final DoubleProperty azimuthProperty
Min: n/a Max: n/a Default: 45.0 Identity: n/a
getAzimuth()
,
setAzimuth(double)
public final DoubleProperty elevationProperty
Min: n/a Max: n/a Default: 45.0 Identity: n/a
getElevation()
,
setElevation(double)
public Light.Distant()
public Light.Distant(double azimuth, double elevation, Color color)
azimuth
- the azimuth of the lightelevation
- the elevation of the lightcolor
- the color of the lightpublic final void setAzimuth(double value)
Min: n/a Max: n/a Default: 45.0 Identity: n/a
public final double getAzimuth()
Min: n/a Max: n/a Default: 45.0 Identity: n/a
public final DoubleProperty azimuthProperty()
Min: n/a Max: n/a Default: 45.0 Identity: n/a
getAzimuth()
,
setAzimuth(double)
public final void setElevation(double value)
Min: n/a Max: n/a Default: 45.0 Identity: n/a
public final double getElevation()
Min: n/a Max: n/a Default: 45.0 Identity: n/a
public final DoubleProperty elevationProperty()
Min: n/a Max: n/a Default: 45.0 Identity: n/a
getElevation()
,
setElevation(double)
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to