java.lang.Object
javafx.scene.effect.Effect
javafx.scene.effect.Blend
An effect that blends the two inputs together using one of the
 pre-defined 
BlendModes.
 Example:
 Blend blend = new Blend();
 blend.setMode(BlendMode.COLOR_BURN);
 ColorInput colorInput = new ColorInput();
 colorInput.setPaint(Color.STEELBLUE);
 colorInput.setX(10);
 colorInput.setY(10);
 colorInput.setWidth(100);
 colorInput.setHeight(180);
 blend.setTopInput(colorInput);
 Rectangle rect = new Rectangle();
 rect.setWidth(220);
 rect.setHeight(100);
 Stop[] stops = new Stop[]{new Stop(0, Color.LIGHTSTEELBLUE), new Stop(1, Color.PALEGREEN)};
 LinearGradient lg = new LinearGradient(0, 0, 0.25, 0.25, true, CycleMethod.REFLECT, stops);
 rect.setFill(lg);
 Text text = new Text();
 text.setX(15);
 text.setY(65);
 text.setFill(Color.PALEVIOLETRED);
 text.setText("COLOR_BURN");
 text.setFont(Font.font(null, FontWeight.BOLD, 30));
 Group g = new Group();
 g.setEffect(blend);
 g.getChildren().addAll(rect, text);
 The code above produces the following:
  
 
- Since:
- JavaFX 2.0
- 
Property SummaryPropertiesTypePropertyDescriptionfinal ObjectProperty<Effect> The bottom input for thisBlendoperation.final ObjectProperty<BlendMode> TheBlendModeused to blend the two inputs together.final DoublePropertyThe opacity value, which is modulated with the top input prior to blending.final ObjectProperty<Effect> The top input for thisBlendoperation.
- 
Constructor SummaryConstructorsConstructorDescriptionBlend()Creates a new instance of Blend with default parameters.Creates a new instance of Blend with the specified mode.Creates a new instance of Blend with the specified mode and bottom and top inputs.
- 
Method SummaryModifier and TypeMethodDescriptionfinal ObjectProperty<Effect> The bottom input for thisBlendoperation.final EffectGets the value of thebottomInputproperty.final BlendModegetMode()Gets the value of themodeproperty.final doubleGets the value of theopacityproperty.final EffectGets the value of thetopInputproperty.final ObjectProperty<BlendMode> TheBlendModeused to blend the two inputs together.final DoublePropertyThe opacity value, which is modulated with the top input prior to blending.final voidsetBottomInput(Effect value) Sets the value of thebottomInputproperty.final voidSets the value of themodeproperty.final voidsetOpacity(double value) Sets the value of theopacityproperty.final voidsetTopInput(Effect value) Sets the value of thetopInputproperty.final ObjectProperty<Effect> The top input for thisBlendoperation.
- 
Property Details- 
modeTheBlendModeused to blend the two inputs together.Min: n/a Max: n/a Default: BlendMode.SRC_OVER Identity: n/a- Default value:
- SRC_OVER
- See Also:
 
- 
opacityThe opacity value, which is modulated with the top input prior to blending.Min: 0.0 Max: 1.0 Default: 1.0 Identity: 1.0- Default value:
- 1.0
- See Also:
 
- 
bottomInputThe bottom input for thisBlendoperation. 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:
 
- 
topInputThe top input for thisBlendoperation. 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:
 
 
- 
- 
Constructor Details- 
Blendpublic Blend()Creates a new instance of Blend with default parameters.
- 
BlendCreates a new instance of Blend with the specified mode.- Parameters:
- mode- the- BlendModeused to blend the two inputs together
- Since:
- JavaFX 2.1
 
- 
BlendCreates a new instance of Blend with the specified mode and bottom and top inputs.- Parameters:
- mode- the- BlendModeused to blend the two inputs together
- bottomInput- the bottom input for this- Blendoperation
- topInput- the top input for this- Blendoperation
- Since:
- JavaFX 2.1
 
 
- 
- 
Method Details- 
setModeSets the value of themodeproperty.- Property description:
- The BlendModeused to blend the two inputs together.Min: n/a Max: n/a Default: BlendMode.SRC_OVER Identity: n/a
- Default value:
- SRC_OVER
- Parameters:
- value- the value for the- modeproperty
- See Also:
 
- 
getModeGets the value of themodeproperty.- Property description:
- The BlendModeused to blend the two inputs together.Min: n/a Max: n/a Default: BlendMode.SRC_OVER Identity: n/a
- Default value:
- SRC_OVER
- Returns:
- the value of the modeproperty
- See Also:
 
- 
modePropertyTheBlendModeused to blend the two inputs together.Min: n/a Max: n/a Default: BlendMode.SRC_OVER Identity: n/a- Default value:
- SRC_OVER
- Returns:
- the modeproperty
- See Also:
 
- 
setOpacitypublic final void setOpacity(double value) Sets the value of theopacityproperty.- Property description:
- The opacity value, which is modulated with the top input prior
 to blending.
 Min: 0.0 Max: 1.0 Default: 1.0 Identity: 1.0
- Default value:
- 1.0
- Parameters:
- value- the value for the- opacityproperty
- See Also:
 
- 
getOpacitypublic final double getOpacity()Gets the value of theopacityproperty.- Property description:
- The opacity value, which is modulated with the top input prior
 to blending.
 Min: 0.0 Max: 1.0 Default: 1.0 Identity: 1.0
- Default value:
- 1.0
- Returns:
- the value of the opacityproperty
- See Also:
 
- 
opacityPropertyThe opacity value, which is modulated with the top input prior to blending.Min: 0.0 Max: 1.0 Default: 1.0 Identity: 1.0- Default value:
- 1.0
- Returns:
- the opacityproperty
- See Also:
 
- 
setBottomInputSets the value of thebottomInputproperty.- Property description:
- The bottom input for this Blendoperation. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.
- Default value:
- null
- Parameters:
- value- the value for the- bottomInputproperty
- See Also:
 
- 
getBottomInputGets the value of thebottomInputproperty.- Property description:
- The bottom input for this Blendoperation. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.
- Default value:
- null
- Returns:
- the value of the bottomInputproperty
- See Also:
 
- 
bottomInputPropertyThe bottom input for thisBlendoperation. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.- Default value:
- null
- Returns:
- the bottomInputproperty
- See Also:
 
- 
setTopInputSets the value of thetopInputproperty.- Property description:
- The top input for this Blendoperation. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.
- Default value:
- null
- Parameters:
- value- the value for the- topInputproperty
- See Also:
 
- 
getTopInputGets the value of thetopInputproperty.- Property description:
- The top input for this Blendoperation. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.
- Default value:
- null
- Returns:
- the value of the topInputproperty
- See Also:
 
- 
topInputPropertyThe top input for thisBlendoperation. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.- Default value:
- null
- Returns:
- the topInputproperty
- See Also:
 
 
-