Spec-Zone .ru
спецификации, руководства, описания, API
|
public class Blend extends Effect
BlendMode
s.
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:
Type | Property and Description |
---|---|
ObjectProperty<Effect> |
bottomInput
The bottom input for this
Blend operation. |
ObjectProperty<BlendMode> |
mode
The
BlendMode used to blend the two inputs together. |
DoubleProperty |
opacity
The opacity value, which is modulated with the top input prior
to blending.
|
ObjectProperty<Effect> |
topInput
The top input for this
Blend operation. |
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
ObjectProperty<Effect> |
bottomInputProperty()
The bottom input for this
Blend operation. |
Effect |
getBottomInput()
Gets the value of the property bottomInput.
|
BlendMode |
getMode()
Gets the value of the property mode.
|
double |
getOpacity()
Gets the value of the property opacity.
|
Effect |
getTopInput()
Gets the value of the property topInput.
|
ObjectProperty<BlendMode> |
modeProperty()
The
BlendMode used to blend the two inputs together. |
DoubleProperty |
opacityProperty()
The opacity value, which is modulated with the top input prior
to blending.
|
void |
setBottomInput(Effect value)
Sets the value of the property bottomInput.
|
void |
setMode(BlendMode value)
Sets the value of the property mode.
|
void |
setOpacity(double value)
Sets the value of the property opacity.
|
void |
setTopInput(Effect value)
Sets the value of the property topInput.
|
ObjectProperty<Effect> |
topInputProperty()
The top input for this
Blend operation. |
public final ObjectProperty<BlendMode> modeProperty
BlendMode
used to blend the two inputs together.
Min: n/a Max: n/a Default: BlendMode.SRC_OVER Identity: n/a
getMode()
,
setMode(BlendMode)
public final DoubleProperty opacityProperty
Min: 0.0 Max: 1.0 Default: 1.0 Identity: 1.0
getOpacity()
,
setOpacity(double)
public final ObjectProperty<Effect> bottomInputProperty
Blend
operation.
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.getBottomInput()
,
setBottomInput(Effect)
public final ObjectProperty<Effect> topInputProperty
Blend
operation.
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.getTopInput()
,
setTopInput(Effect)
public Blend()
public Blend(BlendMode mode)
mode
- the BlendMode
used to blend the two inputs togetherpublic Blend(BlendMode mode, Effect bottomInput, Effect topInput)
mode
- the BlendMode
used to blend the two inputs togetherbottomInput
- the bottom input for this Blend
operationtopInput
- the top input for this Blend
operationpublic final void setMode(BlendMode value)
BlendMode
used to blend the two inputs together.
Min: n/a Max: n/a Default: BlendMode.SRC_OVER Identity: n/a
public final BlendMode getMode()
BlendMode
used to blend the two inputs together.
Min: n/a Max: n/a Default: BlendMode.SRC_OVER Identity: n/a
public final ObjectProperty<BlendMode> modeProperty()
BlendMode
used to blend the two inputs together.
Min: n/a Max: n/a Default: BlendMode.SRC_OVER Identity: n/a
getMode()
,
setMode(BlendMode)
public final void setOpacity(double value)
Min: 0.0 Max: 1.0 Default: 1.0 Identity: 1.0
public final double getOpacity()
Min: 0.0 Max: 1.0 Default: 1.0 Identity: 1.0
public final DoubleProperty opacityProperty()
Min: 0.0 Max: 1.0 Default: 1.0 Identity: 1.0
getOpacity()
,
setOpacity(double)
public final void setBottomInput(Effect value)
Blend
operation.
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 getBottomInput()
Blend
operation.
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> bottomInputProperty()
Blend
operation.
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.getBottomInput()
,
setBottomInput(Effect)
public final void setTopInput(Effect value)
Blend
operation.
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 getTopInput()
Blend
operation.
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> topInputProperty()
Blend
operation.
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.getTopInput()
,
setTopInput(Effect)
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to