Example:
InnerShadow innerShadow = new InnerShadow();
innerShadow.setOffsetX(4);
innerShadow.setOffsetY(4);
innerShadow.setColor(Color.web("0x3b596d"));
Text text = new Text();
text.setEffect(innerShadow);
text.setX(20);
text.setY(100);
text.setText("InnerShadow");
text.setFill(Color.ALICEBLUE);
text.setFont(Font.font(null, FontWeight.BOLD, 50));
The code above produces the following:
| Modifier and Type | Field and Description |
|---|---|
| private ObjectProperty | blurType
The algorithm used to blur the shadow. |
| private boolean | |
| private DoubleProperty | choke
The choke of the shadow. |
| private ObjectProperty | color
The shadow |
| private DoubleProperty | height
The vertical size of the shadow blur kernel. |
| private ObjectProperty | input
The input for this |
| private DoubleProperty | offsetX
The shadow offset in the x direction, in pixels. |
| private DoubleProperty | offsetY
The shadow offset in the y direction, in pixels. |
| private DoubleProperty | radius
The radius of the shadow blur kernel. |
| private DoubleProperty | width
The horizontal size of the shadow blur kernel. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | InnerShadow(double
the radius of the shadow blur kernel radius, Color the shadow color)ColorCreates a new instance of InnerShadow with specified radius and color. |
| public | InnerShadow(double
the radius of the shadow blur kernel radius, double the shadow offset in the x direction offsetX, double the shadow offset in the y direction offsetY, Color the shadow color)ColorCreates a new instance of InnerShadow with specified radius, offsetX, offsetY and color. |
| public | InnerShadow(BlurType
the algorithm used to blur the shadow blurType, Color the shadow color, double Colorthe radius of the shadow blur kernel radius, double the portion of the radius where the contribution of
the source material will be 100% choke, double the shadow offset in the x direction offsetX, double the shadow offset in the y direction offsetY)Creates a new instance of InnerShadow with the specified blurType, color, radius, spread, offsetX and offsetY. |
| Modifier and Type | Method and Description |
|---|---|
| public final ObjectProperty | |
| pack-priv boolean | |
| public final DoubleProperty | |
| public final ObjectProperty | |
| pack-priv Effect | |
| pack-priv InnerShadow | |
| public final BlurType | |
| private BlurType | |
| pack-priv BaseBounds | getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)
Implements abstract javafx. Returns bounds of given node with applied effect. |
| public final double | |
| public final Color | |
| private Color | |
| public final double | |
| public final Effect | |
| public final double | |
| public final double | |
| public final double | |
| public final double | |
| public final DoubleProperty | |
| public final ObjectProperty | |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final DoubleProperty | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| pack-priv void | |
| private void | |
| private void | |
| private void | |
| public final DoubleProperty |
| blurType | back to summary |
|---|---|
| private ObjectProperty<BlurType> blurType The algorithm used to blur the shadow.
Min: n/a
Max: n/a
Default: BlurType.THREE_PASS_BOX
Identity: n/a
| |
| changeIsLocal | back to summary |
|---|---|
| private boolean changeIsLocal | |
| choke | back to summary |
|---|---|
| private DoubleProperty choke The choke of the shadow.
The choke is the portion of the radius where the contribution of
the source material will be 100%.
The remaining portion of the radius will have a contribution
controlled by the blur kernel.
A choke of
Min: 0.0
Max: 1.0
Default: 0.0
Identity: 0.0
| |
| color | back to summary |
|---|---|
| private ObjectProperty<Color> color The shadow
Min: n/a
Max: n/a
Default: Color.BLACK
Identity: n/a
| |
| height | back to summary |
|---|---|
| private DoubleProperty height The vertical size of the shadow blur kernel.
This attribute controls the vertical size of the total area over
which the shadow of a single pixel is distributed by the blur algorithm.
Values less than
Min: 0.0
Max: 255.0
Default: 21.0
Identity: <1.0
| |
| input | back to summary |
|---|---|
| private ObjectProperty<Effect> input The input for this
| |
| offsetX | back to summary |
|---|---|
| private DoubleProperty offsetX The shadow offset in the x direction, in pixels.
Min: n/a
Max: n/a
Default: 0.0
Identity: 0.0
| |
| offsetY | back to summary |
|---|---|
| private DoubleProperty offsetY The shadow offset in the y direction, in pixels.
Min: n/a
Max: n/a
Default: 0.0
Identity: 0.0
| |
| radius | back to summary |
|---|---|
| private DoubleProperty radius The radius of the shadow blur kernel.
This attribute controls the distance that the shadow is spread
to each side of the source pixels.
Setting the radius is equivalent to setting both the
Min: 0.0
Max: 127.0
Default: 10.0
Identity: 0.0
| |
| width | back to summary |
|---|---|
| private DoubleProperty width The horizontal size of the shadow blur kernel.
This attribute controls the horizontal size of the total area over
which the shadow of a single pixel is distributed by the blur algorithm.
Values less than
Min: 0.0
Max: 255.0
Default: 21.0
Identity: <1.0
| |
| InnerShadow | back to summary |
|---|---|
| public InnerShadow() Creates a new instance of InnerShadow with default parameters. | |
| InnerShadow | back to summary |
|---|---|
| public InnerShadow(double radius, Color color) Creates a new instance of InnerShadow with specified radius and color.
| |
| InnerShadow | back to summary |
|---|---|
| public InnerShadow(double radius, double offsetX, double offsetY, Color color) Creates a new instance of InnerShadow with specified radius, offsetX, offsetY and color.
| |
| InnerShadow | back to summary |
|---|---|
| public InnerShadow(BlurType blurType, Color color, double radius, double choke, double offsetX, double offsetY) Creates a new instance of InnerShadow with the specified blurType, color, radius, spread, offsetX and offsetY.
| |
| blurTypeProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| checkChainContains | back to summary |
|---|---|
| pack-priv boolean checkChainContains(Effect e) Implements abstract javafx.
| |
| chokeProperty | back to summary |
|---|---|
| public final DoubleProperty chokeProperty() | |
| colorProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| copy | back to summary |
|---|---|
| pack-priv Effect copy() Implements abstract javafx.
| |
| createPeer | back to summary |
|---|---|
| pack-priv InnerShadow createPeer() Implements abstract javafx.
| |
| getBlurType | back to summary |
|---|---|
| public final BlurType getBlurType() | |
| getBlurTypeInternal | back to summary |
|---|---|
| private BlurType getBlurTypeInternal() | |
| getBounds | back to summary |
|---|---|
| pack-priv BaseBounds getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor) Implements abstract javafx. Doc from javafx. Returns bounds of given node with applied effect. We *never* pass null in as a bounds. This method will NOT take a null bounds object. The returned value may be the same bounds object passed in, or it may be a new object.
| |
| getChoke | back to summary |
|---|---|
| public final double getChoke() | |
| getColor | back to summary |
|---|---|
| public final Color getColor() | |
| getColorInternal | back to summary |
|---|---|
| private Color getColorInternal() | |
| getHeight | back to summary |
|---|---|
| public final double getHeight() | |
| getInput | back to summary |
|---|---|
| public final Effect getInput() | |
| getOffsetX | back to summary |
|---|---|
| public final double getOffsetX() | |
| getOffsetY | back to summary |
|---|---|
| public final double getOffsetY() | |
| getRadius | back to summary |
|---|---|
| public final double getRadius() | |
| getWidth | back to summary |
|---|---|
| public final double getWidth() | |
| heightProperty | back to summary |
|---|---|
| public final DoubleProperty heightProperty() | |
| inputProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| offsetXProperty | back to summary |
|---|---|
| public final DoubleProperty offsetXProperty() | |
| offsetYProperty | back to summary |
|---|---|
| public final DoubleProperty offsetYProperty() | |
| radiusProperty | back to summary |
|---|---|
| public final DoubleProperty radiusProperty() | |
| setBlurType | back to summary |
|---|---|
| public final void setBlurType(BlurType value) | |
| setChoke | back to summary |
|---|---|
| public final void setChoke(double value) | |
| setColor | back to summary |
|---|---|
| public final void setColor(Color value) | |
| setHeight | back to summary |
|---|---|
| public final void setHeight(double value) | |
| setInput | back to summary |
|---|---|
| public final void setInput(Effect value) | |
| setOffsetX | back to summary |
|---|---|
| public final void setOffsetX(double value) | |
| setOffsetY | back to summary |
|---|---|
| public final void setOffsetY(double value) | |
| setRadius | back to summary |
|---|---|
| public final void setRadius(double value) | |
| setWidth | back to summary |
|---|---|
| public final void setWidth(double value) | |
| update | back to summary |
|---|---|
| pack-priv void update() Implements abstract javafx.
| |
| updateHeight | back to summary |
|---|---|
| private void updateHeight(double value) | |
| updateRadius | back to summary |
|---|---|
| private void updateRadius(double value) | |
| updateWidth | back to summary |
|---|---|
| private void updateWidth(double value) | |
| widthProperty | back to summary |
|---|---|
| public final DoubleProperty widthProperty() | |