Spec-Zone.ru › OpenJavaFX 8
javafx.scene.paint

Class Paint

java.lang.Object
  • javafx.scene.paint.Paint

Direct Known Subclasses:

Color, ImagePattern, LinearGradient, RadialGradient



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 MethodsStatic MethodsInstance MethodsAbstract MethodsConcrete Methods
    Modifier and Type Method and 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 inherited from class java.lang.Object

      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 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 - the string to convert

      Returns:

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

      Throws:

      NullPointerException - if value is null

      Since:

      JavaFX 2.1

      See Also:

      Color.valueOf(String), LinearGradient.valueOf(String), RadialGradient.valueOf(String)

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API