Spec-Zone .ru
спецификации, руководства, описания, API
|
public class DropShadow extends Effect
import javafx.scene.*; import javafx.scene.effect.*; import javafx.scene.paint.*; import javafx.scene.shape.*; import javafx.scene.text.*; Group g = new Group(); DropShadow ds = new DropShadow(); ds.setOffsetY(3.0); ds.setColor(Color.color(0.4, 0.4, 0.4)); Text t = new Text(); t.setEffect(ds); t.setCache(true); t.setX(10.0); t.setY(70.0); t.setFill(Color.RED); t.setText("JavaFX drop shadow..."); t.setFont(Font.font(null, FontWeight.BOLD, 32)); DropShadow ds1 = new DropShadow(); ds1.setOffsetY(4.0); Circle c = new Circle(); c.setEffect(ds1); c.setCenterX(50.0); c.setCenterY(125.0); c.setRadius(30.0); c.setFill(Color.ORANGE); c.setCache(true); g.getChildren().add(t); g.getChildren().add(c);
Type | Property and Description |
---|---|
ObjectProperty<BlurType> |
blurType
The algorithm used to blur the shadow.
|
ObjectProperty<Color> |
color
The shadow
Color . |
DoubleProperty |
height
The vertical size of the shadow blur kernel.
|
ObjectProperty<Effect> |
input
The input for this
Effect . |
DoubleProperty |
offsetX
The shadow offset in the x direction, in pixels.
|
DoubleProperty |
offsetY
The shadow offset in the y direction, in pixels.
|
DoubleProperty |
radius
The radius of the shadow blur kernel.
|
DoubleProperty |
spread
The spread of the shadow.
|
DoubleProperty |
width
The horizontal size of the shadow blur kernel.
|
Constructor and Description |
---|
DropShadow() |
Modifier and Type | Method and Description |
---|---|
ObjectProperty<BlurType> |
blurTypeProperty()
The algorithm used to blur the shadow.
|
ObjectProperty<Color> |
colorProperty()
The shadow
Color . |
BlurType |
getBlurType()
The algorithm used to blur the shadow.
|
Color |
getColor()
The shadow
Color . |
double |
getHeight()
The vertical size of the shadow blur kernel.
|
Effect |
getInput()
The input for this
Effect . |
double |
getOffsetX()
The shadow offset in the x direction, in pixels.
|
double |
getOffsetY()
The shadow offset in the y direction, in pixels.
|
double |
getRadius()
The radius of the shadow blur kernel.
|
double |
getSpread()
The spread of the shadow.
|
double |
getWidth()
The horizontal size of the shadow blur kernel.
|
DoubleProperty |
heightProperty()
The vertical size of the shadow blur kernel.
|
ObjectProperty<Effect> |
inputProperty()
The input for this
Effect . |
DoubleProperty |
offsetXProperty()
The shadow offset in the x direction, in pixels.
|
DoubleProperty |
offsetYProperty()
The shadow offset in the y direction, in pixels.
|
DoubleProperty |
radiusProperty()
The radius of the shadow blur kernel.
|
void |
setBlurType(BlurType value)
The algorithm used to blur the shadow.
|
void |
setColor(Color value)
The shadow
Color . |
void |
setHeight(double value)
The vertical size of the shadow blur kernel.
|
void |
setInput(Effect value)
The input for this
Effect . |
void |
setOffsetX(double value)
The shadow offset in the x direction, in pixels.
|
void |
setOffsetY(double value)
The shadow offset in the y direction, in pixels.
|
void |
setRadius(double value)
The radius of the shadow blur kernel.
|
void |
setSpread(double value)
The spread of the shadow.
|
void |
setWidth(double value)
The horizontal size of the shadow blur kernel.
|
DoubleProperty |
spreadProperty()
The spread of the shadow.
|
DoubleProperty |
widthProperty()
The horizontal size of the shadow blur kernel.
|
Effect
.
If set to null
, or left unspecified, a graphical image of
the Node
to which the Effect
is attached will be
used as the input.getInput()
,
setInput(Effect)
width
and height
attributes to a value of (2 * radius + 1)
.
Min: 0.0 Max: 127.0 Default: 10.0 Identity: 0.0
getRadius()
,
setRadius(double)
1.0
are not distributed beyond the original
pixel and so have no blurring effect on the shadow.
Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
getWidth()
,
setWidth(double)
1.0
are not distributed beyond the original
pixel and so have no blurring effect on the shadow.
Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
getHeight()
,
setHeight(double)
Min: n/a Max: n/a Default: BlurType.THREE_PASS_BOX Identity: n/a
getBlurType()
,
setBlurType(BlurType)
0.0
will result in a distribution of the
shadow determined entirely by the blur algorithm.
A spread of 1.0
will result in a solid growth outward of the
source material opacity to the limit of the radius with a very sharp
cutoff to transparency at the radius.
Min: 0.0 Max: 1.0 Default: 0.0 Identity: 0.0
getSpread()
,
setSpread(double)
Color
.
Min: n/a Max: n/a Default: Color.BLACK Identity: n/a
getColor()
,
setColor(Color)
Min: n/a Max: n/a Default: 0.0 Identity: 0.0
getOffsetX()
,
setOffsetX(double)
Min: n/a Max: n/a Default: 0.0 Identity: 0.0
getOffsetY()
,
setOffsetY(double)
public final void setInput(Effect value)
Effect
.
If set to null
, or left unspecified, a graphical image of
the Node
to which the Effect
is attached will be
used as the input.public final Effect getInput()
Effect
.
If set to null
, or left unspecified, a graphical image of
the Node
to which the Effect
is attached will be
used as the input.public final ObjectProperty<Effect> inputProperty()
Effect
.
If set to null
, or left unspecified, a graphical image of
the Node
to which the Effect
is attached will be
used as the input.getInput()
,
setInput(Effect)
public final void setRadius(double value)
width
and height
attributes to a value of (2 * radius + 1)
.
Min: 0.0 Max: 127.0 Default: 10.0 Identity: 0.0
public final double getRadius()
width
and height
attributes to a value of (2 * radius + 1)
.
Min: 0.0 Max: 127.0 Default: 10.0 Identity: 0.0
public final DoubleProperty radiusProperty()
width
and height
attributes to a value of (2 * radius + 1)
.
Min: 0.0 Max: 127.0 Default: 10.0 Identity: 0.0
getRadius()
,
setRadius(double)
public final void setWidth(double value)
1.0
are not distributed beyond the original
pixel and so have no blurring effect on the shadow.
Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
public final double getWidth()
1.0
are not distributed beyond the original
pixel and so have no blurring effect on the shadow.
Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
public final DoubleProperty widthProperty()
1.0
are not distributed beyond the original
pixel and so have no blurring effect on the shadow.
Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
getWidth()
,
setWidth(double)
public final void setHeight(double value)
1.0
are not distributed beyond the original
pixel and so have no blurring effect on the shadow.
Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
public final double getHeight()
1.0
are not distributed beyond the original
pixel and so have no blurring effect on the shadow.
Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
public final DoubleProperty heightProperty()
1.0
are not distributed beyond the original
pixel and so have no blurring effect on the shadow.
Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
getHeight()
,
setHeight(double)
public final void setBlurType(BlurType value)
Min: n/a Max: n/a Default: BlurType.THREE_PASS_BOX Identity: n/a
public final BlurType getBlurType()
Min: n/a Max: n/a Default: BlurType.THREE_PASS_BOX Identity: n/a
public final ObjectProperty<BlurType> blurTypeProperty()
Min: n/a Max: n/a Default: BlurType.THREE_PASS_BOX Identity: n/a
getBlurType()
,
setBlurType(BlurType)
public final void setSpread(double value)
0.0
will result in a distribution of the
shadow determined entirely by the blur algorithm.
A spread of 1.0
will result in a solid growth outward of the
source material opacity to the limit of the radius with a very sharp
cutoff to transparency at the radius.
Min: 0.0 Max: 1.0 Default: 0.0 Identity: 0.0
public final double getSpread()
0.0
will result in a distribution of the
shadow determined entirely by the blur algorithm.
A spread of 1.0
will result in a solid growth outward of the
source material opacity to the limit of the radius with a very sharp
cutoff to transparency at the radius.
Min: 0.0 Max: 1.0 Default: 0.0 Identity: 0.0
public final DoubleProperty spreadProperty()
0.0
will result in a distribution of the
shadow determined entirely by the blur algorithm.
A spread of 1.0
will result in a solid growth outward of the
source material opacity to the limit of the radius with a very sharp
cutoff to transparency at the radius.
Min: 0.0 Max: 1.0 Default: 0.0 Identity: 0.0
getSpread()
,
setSpread(double)
public final void setColor(Color value)
Color
.
Min: n/a Max: n/a Default: Color.BLACK Identity: n/a
public final Color getColor()
Color
.
Min: n/a Max: n/a Default: Color.BLACK Identity: n/a
public final ObjectProperty<Color> colorProperty()
Color
.
Min: n/a Max: n/a Default: Color.BLACK Identity: n/a
getColor()
,
setColor(Color)
public final void setOffsetX(double value)
Min: n/a Max: n/a Default: 0.0 Identity: 0.0
public final double getOffsetX()
Min: n/a Max: n/a Default: 0.0 Identity: 0.0
public final DoubleProperty offsetXProperty()
Min: n/a Max: n/a Default: 0.0 Identity: 0.0
getOffsetX()
,
setOffsetX(double)
public final void setOffsetY(double value)
Min: n/a Max: n/a Default: 0.0 Identity: 0.0
public final double getOffsetY()
Min: n/a Max: n/a Default: 0.0 Identity: 0.0
public final DoubleProperty offsetYProperty()
Min: n/a Max: n/a Default: 0.0 Identity: 0.0
getOffsetY()
,
setOffsetY(double)
Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. Use is subject to