Top Description Constructors Methods
javafx.scene.paint

public abstract Class Paint

extends Object
Class Inheritance
Known Direct Subclasses
javafx.scene.paint.RadialGradient, javafx.scene.paint.Color, javafx.scene.paint.ImagePattern, javafx.scene.paint.LinearGradient
Imports
com.sun.javafx.beans.event.AbstractNotifyListener, com.sun.javafx.tk.Toolkit

Base class for a color or gradients used to fill shapes and backgrounds when rendering the scene graph.
Since
JavaFX 2.0

Constructor Summary

AccessConstructor and Description
pack-priv
Paint()

Only allow classes in this package to subclass Paint

Method Summary

Modifier and TypeMethod and Description
pack-priv void
acc_addListener(AbstractNotifyListener platformChangeListener)

pack-priv abstract Object
pack-priv boolean
pack-priv void
public abstract boolean

Returns:

true if the Paint is opaque, false if it is not opaque or if it cannot be determined.
isOpaque
()

Gets whether this Paint is completely opaque.

public static Paint

Returns:

a Color, RadialGradient or LinearGradient object holding the value represented by the string argument.
valueOf
(String
the string to convert
value
)

Creates a paint value from a string representation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Paintback to summary
pack-priv Paint()

Only allow classes in this package to subclass Paint

Method Detail

acc_addListenerback to summary
pack-priv void acc_addListener(AbstractNotifyListener platformChangeListener)
acc_getPlatformPaintback to summary
pack-priv abstract Object acc_getPlatformPaint()
acc_isMutableback to summary
pack-priv boolean acc_isMutable()
acc_removeListenerback to summary
pack-priv void acc_removeListener(AbstractNotifyListener platformChangeListener)
isOpaqueback to summary
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:boolean

true if the Paint is opaque, false if it is not opaque or if it cannot be determined.

Since
JavaFX 8.0
valueOfback to summary
public static Paint valueOf(String 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:String

the string to convert

Returns:Paint

a Color, RadialGradient or LinearGradient object holding the value represented by the string argument.

Exceptions
NullPointerException:
if value is null
IllegalArgumentException:
if value cannot be parsed
Since
JavaFX 2.1
See Also
Color#valueOf(String), LinearGradient#valueOf(String), RadialGradient#valueOf(String)