javafx.scene.paint.LinearGradient and
javafx.scene.paint.RadialGradient.
Example:
// object bounding box relative (proportional:true, default)
Stop[] stops = { new Stop(0, Color.WHITE), new Stop(1, Color.BLACK)};
LinearGradient lg = new LinearGradient(0, 0, 1, 0, true, CycleMethod.NO_CYCLE, stops);
Rectangle r = new Rectangle();
r.setFill(lg);
| Modifier and Type | Field and Description |
|---|---|
| private Color | color
The color of the gradient at this offset. |
| private int | hash
The cached hash code, used to improve performance in situations where we cache gradients, such as in the CSS routines. |
| pack-priv static final List | |
| private double | offset
The |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if this object is equal to the obj argument; false otherwise.the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public final Color | Returns: the color of the gradient at this offsetGets the color of the gradient at this offset. |
| public final double | Returns: position of the Stop within the gradient (ranging from0 to 1)Gets a number ranging from |
| public int | Returns: a hash code for thisStop object.Overrides java. Returns a hash code for this |
| pack-priv static List | |
| pack-priv static List | |
| public String | Returns: a string representation of thisStop object.Overrides java. Returns a string representation of this |
| color | back to summary |
|---|---|
| private Color color The color of the gradient at this offset.
| |
| hash | back to summary |
|---|---|
| private int hash The cached hash code, used to improve performance in situations where we cache gradients, such as in the CSS routines. | |
| NO_STOPS | back to summary |
|---|---|
| pack-priv static final List<Stop> NO_STOPS | |
| offset | back to summary |
|---|---|
| private double offset The
| |
| Stop | back to summary |
|---|---|
| public Stop(double offset, Color color) Creates a new instance of Stop.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Indicates whether some other object is "equal to" this one. | |
| getColor | back to summary |
|---|---|
| public final Color getColor() Gets the color of the gradient at this offset.
| |
| getOffset | back to summary |
|---|---|
| public final double getOffset() Gets a number ranging from
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hash code for this
| |
| normalize | back to summary |
|---|---|
| pack-priv static List | |
| normalize | back to summary |
|---|---|
| pack-priv static List | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this | |