Paint (Java SE 10 & JDK 10 ) (original) (raw)
- javafx.scene.paint.Paint
Direct Known Subclasses:
[Color](../../../javafx/scene/paint/Color.html "class in javafx.scene.paint")
,[ImagePattern](../../../javafx/scene/paint/ImagePattern.html "class in javafx.scene.paint")
,[LinearGradient](../../../javafx/scene/paint/LinearGradient.html "class in javafx.scene.paint")
,[RadialGradient](../../../javafx/scene/paint/RadialGradient.html "class in javafx.scene.paint")
public abstract class Paint
extends Object
Base class for a color or gradients used to fill shapes and backgrounds when rendering the scene graph.
Since:
JavaFX 2.0
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
Modifier and Type Method Description abstract boolean isOpaque() Gets whether this Paint is completely opaque. static Paint valueOf(String value) Creates a paint value from a string representation. * ### Methods declared in class java.lang.[Object](../../../java/lang/Object.html "class in java.lang") `[clone](../../../java/lang/Object.html#clone%28%29), [equals](../../../java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../../java/lang/Object.html#finalize%28%29), [getClass](../../../java/lang/Object.html#getClass%28%29), [hashCode](../../../java/lang/Object.html#hashCode%28%29), [notify](../../../java/lang/Object.html#notify%28%29), [notifyAll](../../../java/lang/Object.html#notifyAll%28%29), [toString](../../../java/lang/Object.html#toString%28%29), [wait](../../../java/lang/Object.html#wait%28%29), [wait](../../../java/lang/Object.html#wait%28long%29), [wait](../../../java/lang/Object.html#wait%28long,int%29)`
Method Detail
* #### isOpaque public abstract boolean isOpaque() Gets whether this Paint is completely opaque. An opaque paint is one that has no alpha component in any of its colors. It may be possible for a Paint to be opaque and yet return false, if it cannot be easily determined whether the paint is actually opaque. For example, the ImagePattern may not be able to cheaply determine its opacity. Returns: true if the Paint is opaque, false if it is not opaque or if it cannot be determined. Since: JavaFX 8.0 * #### valueOf public static [Paint](../../../javafx/scene/paint/Paint.html "class in javafx.scene.paint") valueOf([String](../../../java/lang/String.html "class in java.lang") value) Creates a paint value from a string representation. Recognizes strings representing `Color`, `RadialGradient` or `LinearGradient`. String specifying LinearGradient must begin with linear-gradient keyword and string specifying RadialGradient must begin with radial-gradient. Parameters: `value` \- the string to convert Returns: a `Color`, `RadialGradient` or `LinearGradient` object holding the value represented by the string argument. Throws: `[NullPointerException](../../../java/lang/NullPointerException.html "class in java.lang")` \- if `value` is `null` `[IllegalArgumentException](../../../java/lang/IllegalArgumentException.html "class in java.lang")` \- if `value` cannot be parsed Since: JavaFX 2.1 See Also: [Color.valueOf(String)](../../../javafx/scene/paint/Color.html#valueOf%28java.lang.String%29), [LinearGradient.valueOf(String)](../../../javafx/scene/paint/LinearGradient.html#valueOf%28java.lang.String%29), [RadialGradient.valueOf(String)](../../../javafx/scene/paint/RadialGradient.html#valueOf%28java.lang.String%29)
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2018, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.