Package com.jme3.view.surfaceview
Enum JmeSurfaceView.DestructionPolicy
- java.lang.Object
-
- java.lang.Enum<JmeSurfaceView.DestructionPolicy>
-
- com.jme3.view.surfaceview.JmeSurfaceView.DestructionPolicy
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<JmeSurfaceView.DestructionPolicy>
- Enclosing class:
- JmeSurfaceView
public static enum JmeSurfaceView.DestructionPolicy extends java.lang.Enum<JmeSurfaceView.DestructionPolicy>
Determines whether the app context would be destructed with the holder activity context in case ofDESTROY_WHEN_FINISHor be spared for a second use in case ofKEEP_WHEN_FINISH. Default value is :DESTROY_WHEN_FINISH.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DESTROY_WHEN_FINISHFinishes the game context with the activity context (ignores the static memoryJmeSurfaceView.GameState.legacyApplication).KEEP_WHEN_FINISHSpares the game context inside a static memoryJmeSurfaceView.GameState.legacyApplicationwhen the activity context is destroyed, but the app stills in the background.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JmeSurfaceView.DestructionPolicyvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static JmeSurfaceView.DestructionPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DESTROY_WHEN_FINISH
public static final JmeSurfaceView.DestructionPolicy DESTROY_WHEN_FINISH
Finishes the game context with the activity context (ignores the static memoryJmeSurfaceView.GameState.legacyApplication).
-
KEEP_WHEN_FINISH
public static final JmeSurfaceView.DestructionPolicy KEEP_WHEN_FINISH
Spares the game context inside a static memoryJmeSurfaceView.GameState.legacyApplicationwhen the activity context is destroyed, but the app stills in the background.
-
-
Method Detail
-
values
public static JmeSurfaceView.DestructionPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JmeSurfaceView.DestructionPolicy c : JmeSurfaceView.DestructionPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JmeSurfaceView.DestructionPolicy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-