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:
Type | Property and Description |
---|---|
ObjectProperty<Effect> |
input
The input for this
Effect . |
DoubleProperty |
level
The level value, which controls the intensity of the sepia effect.
|
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.
|
Modifier and Type | Method and 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 sepia effect.
|
void |
setInput(Effect value)
Sets the value of the property input.
|
void |
setLevel(double value)
Sets the value of the property level.
|
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 levelProperty
Min: 0.0f Max: 1.0f Default: 1.0f Identity: 0.0f
getLevel()
,
setLevel(double)
public SepiaTone()
public SepiaTone(double level)
level
- the level value, which controls the intensity of the effectpublic 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 setLevel(double value)
Min: 0.0f Max: 1.0f Default: 1.0f Identity: 0.0f
public final double getLevel()
Min: 0.0f Max: 1.0f Default: 1.0f Identity: 0.0f
public final DoubleProperty levelProperty()
Min: 0.0f Max: 1.0f Default: 1.0f Identity: 0.0f
getLevel()
,
setLevel(double)
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, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.