CacheHint (JavaFX 28)
Description: declaration: module: javafx.graphics, package: javafx.scene, enum: CacheHint

# Enum Class CacheHint

java.lang.Object
java.lang.Enum<CacheHint>
javafx.scene.CacheHint

All Implemented Interfaces:
  `Serializable, Comparable<CacheHint>, Constable`

public enum CacheHint extends Enum<CacheHint>
Cache hints for use with `Node.cacheHint`

Since:
  JavaFX 2.0
See Also:
  - `Node.cacheHintProperty()`

- ## Nested Class Summary

  ### Nested classes/interfaces declared in class Enum

  `Enum.EnumDesc<E>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `DEFAULT`
  No additional hint.
  `QUALITY`
  A hint to tell the bitmap caching mechanism that this node should appear on screen at the highest visual quality.
  `ROTATE`
  A hint to tell the bitmap caching mechanism that if the node is rotated, it is acceptable to paint it by rotating the cached bitmap (rather than re-rendering the node).
  `SCALE`
  A hint to tell the bitmap caching mechanism that if the node is scaled up or down, it is acceptable to paint it by scaling the cached bitmap (rather than re-rendering the node).
  `SCALE_AND_ROTATE`
  A hint to tell the bitmap caching mechanism that if the node is scaled and/or rotated, it is acceptable to paint it by scaling and/or rotating the cached bitmap (rather than re-rendering the node).
  `SPEED`
  A hint to tell the bitmap caching mechanism that this node is animating, and should be painted from the bitmap cache whenever possible in order to maintain smooth animation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CacheHint`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static CacheHint[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods declared in class Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods declared in class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### DEFAULT

    public static final CacheHint DEFAULT
    No additional hint. The system will determine the best use of the bitmap cache.

  - ### SPEED

    public static final CacheHint SPEED
    A hint to tell the bitmap caching mechanism that this node is animating, and should be painted from the bitmap cache whenever possible in order to maintain smooth animation. The trade-off is that this may result in decreased visual quality.

  - ### QUALITY

    public static final CacheHint QUALITY
    A hint to tell the bitmap caching mechanism that this node should appear on screen at the highest visual quality. The cached bitmap will only be used when it will not degrade the node's appearance on screen.

    The trade-off is that animations may cause subtle variations in the way that a node would be rendered, and so a node with a cacheHint of QUALITY may be required to re-render a node even when such subtle variations would not be visible in the midst of an animation. As such, a node with a cacheHint of QUALITY will often benefit from having its cacheHint replaced with a more permissive value (such as `SPEED`) during the period of the animation.

  - ### SCALE

    public static final CacheHint SCALE
    A hint to tell the bitmap caching mechanism that if the node is scaled up or down, it is acceptable to paint it by scaling the cached bitmap (rather than re-rendering the node).

  - ### ROTATE

    public static final CacheHint ROTATE
    A hint to tell the bitmap caching mechanism that if the node is rotated, it is acceptable to paint it by rotating the cached bitmap (rather than re-rendering the node).

  - ### SCALE_AND_ROTATE

    public static final CacheHint SCALE_AND_ROTATE
    A hint to tell the bitmap caching mechanism that if the node is scaled and/or rotated, it is acceptable to paint it by scaling and/or rotating the cached bitmap (rather than re-rendering the node).

- ## Method Details

  - ### values

    public static CacheHint[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static CacheHint valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null