Spec-Zone .ru
спецификации, руководства, описания, API
|
public final class Stop
extends java.lang.Object
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);
Constructor and Description |
---|
Stop(double offset,
Color color)
Creates a new instance of Stop.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
Color |
getColor()
Gets the color of the gradient at this offset.
|
double |
getOffset()
Gets a number ranging from
0 to 1
that indicates where this gradient stop is placed. |
int |
hashCode()
Returns a hash code for this
Stop object. |
java.lang.String |
toString()
Returns a string representation of this
Stop object. |
public Stop(double offset, Color color)
offset
- Stop's position (ranging from 0
to 1
color
- Stop's colorpublic final double getOffset()
0
to 1
that indicates where this gradient stop is placed. For linear gradients,
the offset
variable represents a location along the gradient vector.
For radial gradients, it represents a percentage distance from
the focus point to the edge of the outermost/largest circle.0
to 1
)public final Color getColor()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the reference object with which to compare.true
if this object is equal to the obj
argument; false
otherwise.public int hashCode()
Stop
object.hashCode
in class java.lang.Object
Stop
object.public java.lang.String toString()
Stop
object.toString
in class java.lang.Object
Stop
object.Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to