- java.lang.Object
- 
- javafx.scene.effect.Effect
- 
- javafx.scene.effect.Blend
 
 
- 
 public class Blend extends Effect An effect that blends the two inputs together using one of the pre-definedBlendModes.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 SummaryProperties Type Property Description ObjectProperty<Effect>bottomInputThe bottom input for thisBlendoperation.ObjectProperty<BlendMode>modeTheBlendModeused to blend the two inputs together.DoublePropertyopacityThe opacity value, which is modulated with the top input prior to blending.ObjectProperty<Effect>topInputThe top input for thisBlendoperation.
 - 
Constructor SummaryConstructors Constructor Description Blend()Creates a new instance of Blend with default parameters.Blend(BlendMode mode)Creates a new instance of Blend with the specified mode.Blend(BlendMode mode, Effect bottomInput, Effect topInput)Creates a new instance of Blend with the specified mode and bottom and top inputs.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectProperty<Effect>bottomInputProperty()The bottom input for thisBlendoperation.EffectgetBottomInput()Gets the value of the property bottomInput.BlendModegetMode()Gets the value of the property mode.doublegetOpacity()Gets the value of the property opacity.EffectgetTopInput()Gets the value of the property topInput.ObjectProperty<BlendMode>modeProperty()TheBlendModeused to blend the two inputs together.DoublePropertyopacityProperty()The opacity value, which is modulated with the top input prior to blending.voidsetBottomInput(Effect value)Sets the value of the property bottomInput.voidsetMode(BlendMode value)Sets the value of the property mode.voidsetOpacity(double value)Sets the value of the property opacity.voidsetTopInput(Effect value)Sets the value of the property topInput.ObjectProperty<Effect>topInputProperty()The top input for thisBlendoperation.
 
- 
- 
- 
Property Detail- 
modepublic final ObjectProperty<BlendMode> modeProperty TheBlendModeused 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:
- getMode(),- setMode(BlendMode)
 
 - 
opacitypublic final DoubleProperty opacityProperty 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
- See Also:
- getOpacity(),- setOpacity(double)
 
 - 
bottomInputpublic final ObjectProperty<Effect> bottomInputProperty The 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:
- getBottomInput(),- setBottomInput(Effect)
 
 - 
topInputpublic final ObjectProperty<Effect> topInputProperty The 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:
- getTopInput(),- setTopInput(Effect)
 
 
- 
 - 
Constructor Detail- 
Blendpublic Blend() Creates a new instance of Blend with default parameters.
 - 
Blendpublic Blend(BlendMode mode) Creates a new instance of Blend with the specified mode.- Parameters:
- mode- the- BlendModeused to blend the two inputs together
- Since:
- JavaFX 2.1
 
 - 
Blendpublic Blend(BlendMode mode, Effect bottomInput, Effect topInput) Creates 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 Detail- 
setModepublic final void setMode(BlendMode value) Sets the value of the property mode.- 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
 
 - 
getModepublic final BlendMode getMode() Gets the value of the property mode.- 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
 
 - 
modePropertypublic final ObjectProperty<BlendMode> modeProperty() TheBlendModeused 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:
- getMode(),- setMode(BlendMode)
 
 - 
setOpacitypublic final void setOpacity(double value) Sets the value of the property opacity.- 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
 
 - 
getOpacitypublic final double getOpacity() Gets the value of the property opacity.- 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
 
 - 
opacityPropertypublic final DoubleProperty opacityProperty() 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
- See Also:
- getOpacity(),- setOpacity(double)
 
 - 
setBottomInputpublic final void setBottomInput(Effect value) Sets the value of the property bottomInput.- 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
 
 - 
getBottomInputpublic final Effect getBottomInput() Gets the value of the property bottomInput.- 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
 
 - 
bottomInputPropertypublic final ObjectProperty<Effect> bottomInputProperty() The 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:
- getBottomInput(),- setBottomInput(Effect)
 
 - 
setTopInputpublic final void setTopInput(Effect value) Sets the value of the property topInput.- 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
 
 - 
getTopInputpublic final Effect getTopInput() Gets the value of the property topInput.- 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
 
 - 
topInputPropertypublic final ObjectProperty<Effect> topInputProperty() The 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:
- getTopInput(),- setTopInput(Effect)
 
 
- 
 
-