Class SepiaTone
- javafx.scene.effect.Effect
-
- javafx.scene.effect.SepiaTone
public class SepiaTone extends Effect
Example:
SepiaTone sepiaTone = new SepiaTone();
sepiaTone.setLevel(0.7);
Image image = new Image("boat.jpg");
ImageView imageView = new ImageView(image);
imageView.setFitWidth(200);
imageView.setPreserveRatio(true);
imageView.setEffect(sepiaTone); The code above applied on this image:
produces the following:
Since:
JavaFX 2.0
-
Property Summary
All MethodsInstance MethodsConcrete Methods Type Property and Description ObjectProperty<Effect>inputThe input for thisEffect.DoublePropertylevelThe level value, which controls the intensity of the sepia effect.
-
Constructor Summary
Constructors Constructor and Description SepiaTone()Creates a new instance of SepiaTone with default parameters.SepiaTone(double level)Creates a new instance of SepiaTone with the specified level.
-
Method Summary
All MethodsInstance MethodsConcrete Methods Modifier and Type Method and Description EffectgetInput()Gets the value of the property input.doublegetLevel()Gets the value of the property level.ObjectProperty<Effect>inputProperty()The input for thisEffect.DoublePropertylevelProperty()The level value, which controls the intensity of the sepia effect.voidsetInput(Effect value)Sets the value of the property input.voidsetLevel(double value)Sets the value of the property level.
-
Property Detail
-
input
public final ObjectProperty<Effect> inputProperty
The input for thisEffect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.Default value:
null
See Also:
-
level
public final DoubleProperty levelProperty
The level value, which controls the intensity of the sepia effect.Min: 0.0f Max: 1.0f Default: 1.0f Identity: 0.0fDefault value:
1.0f
See Also:
-
-
Constructor Detail
-
SepiaTone
public SepiaTone()
Creates a new instance of SepiaTone with default parameters.
-
SepiaTone
public SepiaTone(double level)
Creates a new instance of SepiaTone with the specified level.Parameters:
level- the level value, which controls the intensity of the effectSince:
JavaFX 2.1
-
-
Method Detail
-
setInput
public final void setInput(Effect value)
Sets the value of the property input.Property description:
The input for this
Effect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis 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 tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.Default value:
null
-
inputProperty
public final ObjectProperty<Effect> inputProperty()
The input for thisEffect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.Default value:
null
See Also:
-
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 sepia effect.
Min: 0.0f Max: 1.0f Default: 1.0f Identity: 0.0fDefault value:
1.0f
-
getLevel
public final double getLevel()
Gets the value of the property level.Property description:
The level value, which controls the intensity of the sepia effect.
Min: 0.0f Max: 1.0f Default: 1.0f Identity: 0.0fDefault value:
1.0f
-
levelProperty
public final DoubleProperty levelProperty()
The level value, which controls the intensity of the sepia effect.Min: 0.0f Max: 1.0f Default: 1.0f Identity: 0.0fDefault value:
1.0f
See Also:
-
© 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.