Spec-Zone.ru › OpenJavaFX 17

Class Glow

java.lang.Object
javafx.scene.effect.Effect
javafx.scene.effect.Glow
public class Glow
extends Effect
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

Property Summary

Properties
Type Property Description
ObjectProperty<Effect> input
The input for this Effect.
DoubleProperty level
The level value, which controls the intensity of the glow effect.

Constructor Summary

Constructors
Constructor Description
Glow()
Creates a new instance of Glow with default parameters.
Glow​(double level)
Creates a new instance of Glow with specified level.

Method Summary

Modifier and Type Method Description
Effect getInput()
Gets the value of the property input.
double getLevel()
Gets the value of the property level.
ObjectProperty<Effect> inputProperty()
The input for this Effect.
DoubleProperty levelProperty()
The level value, which controls the intensity of the glow effect.
void setInput​(Effect value)
Sets the value of the property input.
void setLevel​(double value)
Sets the value of the property level.

Methods declared in class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Property Details

input

public final ObjectProperty<Effect> inputProperty
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
See Also:
getInput(), setInput(Effect)

level

public final DoubleProperty levelProperty
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
See Also:
getLevel(), setLevel(double)

Constructor Details

Glow

public Glow()
Creates a new instance of Glow with default parameters.

Glow

public Glow(double level)
Creates a new instance of Glow with specified level.
Parameters:
level - the level value, which controls the intensity of the glow effect

Method Details

setInput

public final void setInput(Effect value)
Sets the value of the property input.
Property description:
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

getInput

public final Effect getInput()
Gets the value of the property input.
Property description:
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

inputProperty

public final ObjectProperty<Effect> inputProperty()
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
See Also:
getInput(), setInput(Effect)

setLevel

public final void setLevel(double value)
Sets the value of the property level.
Property description:
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

getLevel

public final double getLevel()
Gets the value of the property level.
Property description:
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

levelProperty

public final DoubleProperty levelProperty()
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
See Also:
getLevel(), setLevel(double)

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API