public class ColorAdjust extends Effect
例:
ColorAdjust colorAdjust = new ColorAdjust();
colorAdjust.setContrast(0.1);
colorAdjust.setHue(-0.05);
colorAdjust.setBrightness(0.1);
colorAdjust.setSaturation(0.2);
Image image = new Image("boat.jpg");
ImageView imageView = new ImageView(image);
imageView.setFitWidth(200);
imageView.setPreserveRatio(true);
imageView.setEffect(colorAdjust);
前述のコードを次のイメージに適用します。
生成される結果は次のとおりです。
Type | プロパティと説明 |
---|---|
DoubleProperty |
brightness
明度調整値。
|
DoubleProperty |
contrast
コントラスト調整値。
|
DoubleProperty |
hue
色相調整値。
|
ObjectProperty<Effect> |
input
この
Effect の入力。 |
DoubleProperty |
saturation
彩度調整値。
|
コンストラクタと説明 |
---|
ColorAdjust()
デフォルトのパラメータでColorAdjustの新しいインスタンスを作成します。
|
ColorAdjust(double hue, double saturation, double brightness, double contrast)
指定された色相、彩度、明度およびコントラストを持つColorAdjustの新しいインスタンスを作成します。
|
修飾子と型 | メソッドと説明 |
---|---|
DoubleProperty |
brightnessProperty()
明度調整値。
|
DoubleProperty |
contrastProperty()
コントラスト調整値。
|
double |
getBrightness()
プロパティbrightnessの値を取得します。
|
double |
getContrast()
プロパティcontrastの値を取得します。
|
double |
getHue()
プロパティhueの値を取得します。
|
Effect |
getInput()
プロパティinputの値を取得します。
|
double |
getSaturation()
プロパティsaturationの値を取得します。
|
DoubleProperty |
hueProperty()
色相調整値。
|
ObjectProperty<Effect> |
inputProperty()
この
Effect の入力。 |
DoubleProperty |
saturationProperty()
彩度調整値。
|
void |
setBrightness(double value)
プロパティbrightnessの値を設定します。
|
void |
setContrast(double value)
プロパティcontrastの値を設定します。
|
void |
setHue(double value)
プロパティhueの値を設定します。
|
void |
setInput(Effect value)
プロパティinputの値を設定します。
|
void |
setSaturation(double value)
プロパティsaturationの値を設定します。
|
public final ObjectProperty<Effect> inputProperty
Effect
の入力。null
に設定した場合、または指定しない場合、Effect
がアタッチされているNode
のグラフィカル・イメージが入力として使用されます。getInput()
、setInput(Effect)
public final DoubleProperty hueProperty
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
getHue()
, setHue(double)
public final DoubleProperty saturationProperty
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
getSaturation()
、setSaturation(double)
public final DoubleProperty brightnessProperty
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
getBrightness()
、setBrightness(double)
public final DoubleProperty contrastProperty
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
getContrast()
、setContrast(double)
public ColorAdjust()
public ColorAdjust(double hue, double saturation, double brightness, double contrast)
hue
- 色相調整値saturation
- 彩度調整値brightness
- 明度調整値contrast
- コントラスト調整値public final void setInput(Effect value)
Effect
の入力。null
に設定した場合、または指定しない場合、Effect
がアタッチされているNode
のグラフィカル・イメージが入力として使用されます。public final Effect getInput()
Effect
の入力。null
に設定した場合、または指定しない場合、Effect
がアタッチされているNode
のグラフィカル・イメージが入力として使用されます。public final ObjectProperty<Effect> inputProperty()
Effect
の入力。null
に設定した場合、または指定しない場合、Effect
がアタッチされているNode
のグラフィカル・イメージが入力として使用されます。getInput()
、setInput(Effect)
public final void setHue(double value)
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
public final double getHue()
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
public final DoubleProperty hueProperty()
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
getHue()
, setHue(double)
public final void setSaturation(double value)
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
public final double getSaturation()
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
public final DoubleProperty saturationProperty()
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
getSaturation()
、setSaturation(double)
public final void setBrightness(double value)
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
public final double getBrightness()
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
public final DoubleProperty brightnessProperty()
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
getBrightness()
、setBrightness(double)
public final void setContrast(double value)
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
public final double getContrast()
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
public final DoubleProperty contrastProperty()
Min: -1.0 Max: +1.0 Default: 0.0 Identity: 0.0
getContrast()
、setContrast(double)
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.