public enum VisualCachingPolicy extends Enum<VisualCachingPolicy>
Nodes are cached when they are removed temporarily from the
CanvasControl's visual tree.
Nodes 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
Nodes completely. |
STRONG
Nodes will always be cached. |
WEAK
Nodes 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
Nodes completely.public static final VisualCachingPolicy STRONG
Nodes will always be cached.
The cached reference will be kept until the corresponding ICanvasObject is removed.
public static final VisualCachingPolicy WEAK
Nodes 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);