public class BoxBlur extends Effect
Example:
BoxBlur boxBlur = new BoxBlur();
boxBlur.setWidth(10);
boxBlur.setHeight(3);
boxBlur.setIterations(3);
Text text = new Text();
text.setText("Blurry Text!");
text.setFill(Color.web("0x3b596d"));
text.setFont(Font.font(null, FontWeight.BOLD, 50));
text.setX(10);
text.setY(50);
text.setEffect(boxBlur);
The code above produces the following:
Type | Property and Description |
---|---|
DoubleProperty |
height
The vertical dimension of the blur effect.
|
ObjectProperty<Effect> |
input
The input for this
Effect . |
IntegerProperty |
iterations
The number of times to iterate the blur effect to improve its
"quality" or "smoothness".
|
DoubleProperty |
width
The horizontal dimension of the blur effect.
|
Constructor and Description |
---|
BoxBlur()
Creates a new instance of BoxBlur with default parameters.
|
BoxBlur(double width,
double height,
int iterations)
Creates a new instance of BoxBlur with specified width, height and
iterations.
|
Modifier and Type | Method and Description |
---|---|
double |
getHeight()
Gets the value of the property height.
|
Effect |
getInput()
Gets the value of the property input.
|
int |
getIterations()
Gets the value of the property iterations.
|
double |
getWidth()
Gets the value of the property width.
|
DoubleProperty |
heightProperty()
The vertical dimension of the blur effect.
|
ObjectProperty<Effect> |
inputProperty()
The input for this
Effect . |
IntegerProperty |
iterationsProperty()
The number of times to iterate the blur effect to improve its
"quality" or "smoothness".
|
void |
setHeight(double value)
Sets the value of the property height.
|
void |
setInput(Effect value)
Sets the value of the property input.
|
void |
setIterations(int value)
Sets the value of the property iterations.
|
void |
setWidth(double value)
Sets the value of the property width.
|
DoubleProperty |
widthProperty()
The horizontal dimension of the blur effect.
|
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 DoubleProperty widthProperty
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
getWidth()
,
setWidth(double)
public final DoubleProperty heightProperty
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
getHeight()
,
setHeight(double)
public final IntegerProperty iterationsProperty
Min: 0 Max: 3 Default: 1 Identity: 0
getIterations()
,
setIterations(int)
public BoxBlur()
public BoxBlur(double width, double height, int iterations)
width
- the horizontal dimension of the blur effectheight
- the vertical dimension of the blur effectiterations
- the number of times to iterate the blur effect to
improve its "quality" or "smoothness"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 setWidth(double value)
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
public final double getWidth()
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
public final DoubleProperty widthProperty()
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
getWidth()
,
setWidth(double)
public final void setHeight(double value)
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
public final double getHeight()
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
public final DoubleProperty heightProperty()
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
getHeight()
,
setHeight(double)
public final void setIterations(int value)
Min: 0 Max: 3 Default: 1 Identity: 0
public final int getIterations()
Min: 0 Max: 3 Default: 1 Identity: 0
public final IntegerProperty iterationsProperty()
Min: 0 Max: 3 Default: 1 Identity: 0
getIterations()
,
setIterations(int)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.