APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.effect

public Class Glow

extends Effect
Class Inheritance
Imports
javafx.beans.property.DoubleProperty, .DoublePropertyBase, .ObjectProperty, javafx.scene.Node, com.sun.javafx.util.Utils, com.sun.javafx.effect.EffectDirtyBits, com.sun.javafx.geom.BaseBounds, com.sun.javafx.geom.transform.BaseTransform, com.sun.javafx.scene.BoundsAccessor

A high-level effect that makes the input image appear to glow, based on a configurable threshold.

Example:

Image image = new Image("boat.jpg");
ImageView imageView = new ImageView(image);
imageView.setFitWidth(200);
imageView.setPreserveRatio(true);

imageView.setEffect(new Glow(0.8));

The code above applied on this image:

A photo

produces the following:

The visual effect of Glow on photo

Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private ObjectProperty<Effect>
input

The input for this Effect.

private DoubleProperty
level

The level value, which controls the intensity of the glow effect.

Constructor Summary

AccessConstructor and Description
public
Glow()

Creates a new instance of Glow with default parameters.

public
Glow(double
the level value, which controls the intensity of the glow effect
level
)

Creates a new instance of Glow with specified level.

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
pack-priv Effect
copy()

Implements abstract javafx.scene.effect.Effect.copy.

pack-priv Glow
pack-priv BaseBounds
getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)

Implements abstract javafx.scene.effect.Effect.getBounds.

Returns bounds of given node with applied effect.

public final Effect
public final double
public final ObjectProperty<Effect>
public final DoubleProperty
public final void
public final void
setLevel(double value)

pack-priv void
Inherited from javafx.scene.effect.Effect:
containsCycleseffectBoundsChangedgetInputBoundsgetKernelSizegetPeergetShadowBoundsmarkDirtysynctransformBounds

Field Detail

inputback to summary
private ObjectProperty<Effect> input

The input for this 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.

Default Value
null
levelback to summary
private DoubleProperty level

The level value, which controls the intensity of the glow effect.

      Min: 0.0
      Max: 1.0
  Default: 0.3
 Identity: 0.0
Default Value
0.3

Constructor Detail

Glowback to summary
public Glow()

Creates a new instance of Glow with default parameters.

Glowback to summary
public Glow(double level)

Creates a new instance of Glow with specified level.

Parameters
level:double

the level value, which controls the intensity of the glow effect

Method Detail

checkChainContainsback to summary
pack-priv boolean checkChainContains(Effect e)

Implements abstract javafx.scene.effect.Effect.checkChainContains.

Annotations
@Override
copyback to summary
pack-priv Effect copy()

Implements abstract javafx.scene.effect.Effect.copy.

Annotations
@Override
createPeerback to summary
pack-priv Glow createPeer()

Implements abstract javafx.scene.effect.Effect.createPeer.

Annotations
@Override
getBoundsback to summary
pack-priv BaseBounds getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)

Implements abstract javafx.scene.effect.Effect.getBounds.

Doc from javafx.scene.effect.Effect.getBounds.

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.

Annotations
@Override
getInputback to summary
public final Effect getInput()
getLevelback to summary
public final double getLevel()
inputPropertyback to summary
public final ObjectProperty<Effect> inputProperty()
levelPropertyback to summary
public final DoubleProperty levelProperty()
setInputback to summary
public final void setInput(Effect value)
setLevelback to summary
public final void setLevel(double value)
updateback to summary
pack-priv void update()

Implements abstract javafx.scene.effect.Effect.update.

Annotations
@Override