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.
|
<any> |
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.
|
Effect.EffectInputChangeListener, Effect.EffectInputProperty
Modifier and Type | Field and Description |
---|---|
private DoubleProperty |
height
The vertical dimension of the blur effect.
|
private <any> |
input
The input for this
Effect . |
private IntegerProperty |
iterations
The number of times to iterate the blur effect to improve its
"quality" or "smoothness".
|
private 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 |
---|---|
(package private) boolean |
checkChainContains(Effect e) |
(package private) Effect |
copy() |
(package private) com.sun.scenario.effect.BoxBlur |
createPeer() |
(package private) BaseBounds |
getBounds(BaseBounds bounds,
BaseTransform tx,
Node node,
BoundsAccessor boundsAccessor)
Returns bounds of given node with applied effect.
|
private int |
getClampedHeight() |
private int |
getClampedIterations() |
private int |
getClampedWidth() |
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.
|
<any> |
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.
|
(package private) void |
update() |
DoubleProperty |
widthProperty()
The horizontal dimension of the blur effect.
|
containsCycles, effectBoundsChanged, getInputBounds, getKernelSize, getPeer, getShadowBounds, markDirty, sync, transformBounds
public final <any> 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)
private <any> input
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.private DoubleProperty width
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
private DoubleProperty height
Min: 0.0 Max: 255.0 Default: 5.0 Identity: <1.0
private IntegerProperty iterations
Min: 0 Max: 3 Default: 1 Identity: 0
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"com.sun.scenario.effect.BoxBlur createPeer()
createPeer
in class Effect
public final void setInput(Effect value)
public final Effect getInput()
public final <any> 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)
boolean checkChainContains(Effect e)
checkChainContains
in class Effect
public final void setWidth(double value)
public final double getWidth()
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)
public final double getHeight()
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)
public final int getIterations()
public final IntegerProperty iterationsProperty()
Min: 0 Max: 3 Default: 1 Identity: 0
getIterations()
,
setIterations(int)
private int getClampedWidth()
private int getClampedHeight()
private int getClampedIterations()
BaseBounds getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)
Effect