public enum VisualCachingPolicy extends Enum<VisualCachingPolicy>
Node
s are cached when they are removed temporarily from the
CanvasControl
's visual tree.
Node
s are temporarily removed when they are moved outside the visual part of the canvas (the
Viewport
) and re-added when they enter the Viewport
again. Caching prevents the need to re-build the visuals from scratch.
In order to be cached a IDisposeVisualCallback
has to be registered
during creation
.
Enum Constant and Description |
---|
NEVER
Disables caching of
Node s completely. |
STRONG
Node s will always be cached. |
WEAK
Node s will be cached using a weak reference, which means they might be removed by the Garbage
Collection. |
Modifier and Type | Method and Description |
---|---|
static VisualCachingPolicy |
fromOrdinal(int ordinal) |
int |
value() |
static VisualCachingPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static VisualCachingPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final VisualCachingPolicy NEVER
Node
s completely.public static final VisualCachingPolicy STRONG
Node
s will always be cached.
The cached reference will be kept until the corresponding ICanvasObject
is removed.
public static final VisualCachingPolicy WEAK
Node
s will be cached using a weak reference, which means they might be removed by the Garbage
Collection.public static final VisualCachingPolicy fromOrdinal(int ordinal)
public int value()
public static VisualCachingPolicy valueOf(String name)
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullname
- the name of the enum constant to be returned.public static VisualCachingPolicy[] values()
for (VisualCachingPolicy c : VisualCachingPolicy.values()) System.out.println(c);