Spec-Zone .ru
спецификации, руководства, описания, API
001/*
002 * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004 *
005 * This code is free software; you can redistribute it and/or modify it
006 * under the terms of the GNU General Public License version 2 only, as
007 * published by the Free Software Foundation.  Oracle designates this
008 * particular file as subject to the "Classpath" exception as provided
009 * by Oracle in the LICENSE file that accompanied this code.
010 *
011 * This code is distributed in the hope that it will be useful, but WITHOUT
012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014 * version 2 for more details (a copy is included in the LICENSE file that
015 * accompanied this code).
016 *
017 * You should have received a copy of the GNU General Public License version
018 * 2 along with this work; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020 *
021 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
022 * or visit www.oracle.com if you need additional information or have any
023 * questions.
024 */
025
026package javafx.scene;
027
028/**
029 * Cache hints for use with {@code Node.cacheHint}
030 *
031 * @see Node#cacheHintProperty
032 * @since JavaFX 1.3
033 */
034public enum CacheHint {
035   /**
036    * No additional hint.  The system will determine the best use of the bitmap
037    * cache.
038    *
039    * @since JavaFX 1.3
040    */
041    DEFAULT,
042
043   /**
044    * A hint to tell the bitmap caching mechanism that this node is animating,
045    * and should be painted from the bitmap cache whenever possible in order to
046    * maintain smooth animation.  The trade-off is that this may result in
047    * decreased visual quality.
048    *
049    * @since JavaFX 1.3
050    */
051    SPEED,
052
053   /**
054    * A hint to tell the bitmap caching mechanism that this node should appear
055    * on screen at the highest visual quality.  The cached bitmap will only be
056    * used when it will not degrade the node's appearance on screen.
057    * <p>
058    * The trade-off is that animations may cause subtle variations in the way
059    * that a node would be rendered, and so a node with a cacheHint of QUALITY
060    * may be required to re-render a node even when such subtle variations would
061    * not be visible in the midst of an animation.  As such, a node with a
062    * cacheHint of QUALITY will often benefit from having its cacheHint
063    * replaced with a more permissive value (such as {@code SPEED}) during the
064    * period of the animation.
065    *
066    * @since JavaFX 1.3
067    */
068    QUALITY,
069
070   /**
071    * A hint to tell the bitmap caching mechanism that if the node is scaled up
072    * or down, it is acceptable to paint it by scaling the cached bitmap (rather
073    * than re-rendering the node).
074    *
075    * @since JavaFX 1.3
076    */
077    SCALE,
078
079   /**
080    * A hint to tell the bitmap caching mechanism that if the node is rotated,
081    * it is acceptable to paint it by rotating the the cached bitmap (rather
082    * than re-rendering the node).
083    *
084    * @since JavaFX 1.3
085    */
086    ROTATE,
087
088   /**
089    * A hint to tell the bitmap caching mechanism that if the node is scaled
090    * and/or rotated, it is acceptable to paint it by scaling and/or rotating
091    * the cached bitmap (rather than re-rendering the node).
092    *
093    * @since JavaFX 1.3
094    */
095    SCALE_AND_ROTATE,
096}