Module javafx.graphics
Package javafx.scene.effect

# Class SepiaTone

java.lang.Object
javafx.scene.effect.Effect
javafx.scene.effect.SepiaTone

public class SepiaTone extends Effect
A filter that produces a sepia tone effect, similar to antique photographs.

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

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

- ## Constructor Summary

  Constructors
  Constructor
  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

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

  ### 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)`
      - `inputProperty()`

  - ### 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.0f

    Default value:
      1.0f
    See Also:
      - `getLevel()`
      - `setLevel(double)`
      - `levelProperty()`

- ## Constructor Details

  - ### 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 effect
    Since:
      JavaFX 2.1

- ## Method Details

  - ### setInput

    public final void setInput(Effect value)
    Sets the value of the `input` property.
    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
    Parameters:
      `value` - the value for the `input` property
    See Also:
      - `getInput()`
      - `inputProperty()`

  - ### getInput

    public final Effect getInput()
    Gets the value of the `input` property.
    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
    Returns:
      the value of the `input` property
    See Also:
      - `setInput(Effect)`
      - `inputProperty()`

  - ### 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
    Returns:
      the `input` property
    See Also:
      - `getInput()`
      - `setInput(Effect)`

  - ### setLevel

    public final void setLevel(double value)
    Sets the value of the `level` property.
    Property description:
      The level value, which controls the intensity of the sepia effect.

                 Min: 0.0f
                 Max: 1.0f
             Default: 1.0f
            Identity: 0.0f

    Default value:
      1.0f
    Parameters:
      `value` - the value for the `level` property
    See Also:
      - `getLevel()`
      - `levelProperty()`

  - ### getLevel

    public final double getLevel()
    Gets the value of the `level` property.
    Property description:
      The level value, which controls the intensity of the sepia effect.

                 Min: 0.0f
                 Max: 1.0f
             Default: 1.0f
            Identity: 0.0f

    Default value:
      1.0f
    Returns:
      the value of the `level` property
    See Also:
      - `setLevel(double)`
      - `levelProperty()`

  - ### 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.0f

    Default value:
      1.0f
    Returns:
      the `level` property
    See Also:
      - `getLevel()`
      - `setLevel(double)`