Package com.jme3.system
Class JmeSystem
java.lang.Object
com.jme3.system.JmeSystem
Utility class to access platform-dependant features.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static Platform
Determine which Platform (operating system and architecture) the application is running on.static URL
static URL
getResource
(String name) static InputStream
getResourceAsStream
(String name) static SoftTextDialogInput
static File
static File
static void
handleErrorMessage
(String message) static void
handleSettings
(AppSettings sourceSettings, boolean loadFromRegistry) static void
initialize
(AppSettings settings) static boolean
static AssetManager
static AssetManager
newAssetManager
(URL configFile) static AudioRenderer
newAudioRenderer
(AppSettings settings) static JmeContext
newContext
(AppSettings settings, JmeContext.Type contextType) static void
setErrorMessageHandler
(Consumer<String> handler) static void
setLowPermissions
(boolean lowPerm) static void
setSettingsHandler
(BiFunction<AppSettings, Boolean, Boolean> handler) static void
static void
setSystemDelegate
(JmeSystemDelegate systemDelegate) static void
showErrorDialog
(String message) Deprecated.Use JmeSystem.handleErrorMessage(String) insteadstatic boolean
showSettingsDialog
(AppSettings sourceSettings, boolean loadFromRegistry) Deprecated.static void
showSoftKeyboard
(boolean show) Displays or hides the onscreen soft keyboardstatic boolean
static void
writeImageFile
(OutputStream outStream, String format, ByteBuffer imageData, int width, int height) Compresses a raw image into a stream.
-
Method Details
-
setSystemDelegate
-
getStorageFolder
-
getStorageFolder
-
getFullName
-
getResourceAsStream
-
getResource
-
trackDirectMemory
public static boolean trackDirectMemory() -
setLowPermissions
public static void setLowPermissions(boolean lowPerm) -
isLowPermissions
public static boolean isLowPermissions() -
setSoftTextDialogInput
-
showSoftKeyboard
public static void showSoftKeyboard(boolean show) Displays or hides the onscreen soft keyboard- Parameters:
show
- If true, the keyboard is displayed, if false, the screen is hidden.
-
getSoftTextDialogInput
-
writeImageFile
public static void writeImageFile(OutputStream outStream, String format, ByteBuffer imageData, int width, int height) throws IOException Compresses a raw image into a stream. The encoding is performed via system libraries. On desktop, the encoding is performed via ImageIO, whereas on Android, is done via the Bitmap class.- Parameters:
outStream
- The stream where to write the image data.format
- The format to use, either "png" or "jpg".imageData
- The image data inImage.Format.RGBA8
format.width
- The width of the image.height
- The height of the image.- Throws:
IOException
- If outStream throws an exception while writing.
-
newAssetManager
-
newAssetManager
-
getPlatform
Determine which Platform (operating system and architecture) the application is running on.- Returns:
- an enum value (not null)
-
newContext
-
newAudioRenderer
-
getPlatformAssetConfigURL
-
showErrorDialog
Deprecated.Use JmeSystem.handleErrorMessage(String) insteadDisplays an error message to the user in whichever way the context feels is appropriate. If this is a headless or an offscreen surface context, this method should do nothing.- Parameters:
message
- The error message to display. May contain new line characters.
-
handleErrorMessage
-
setErrorMessageHandler
-
handleSettings
-
setSettingsHandler
-
showSettingsDialog
@Deprecated public static boolean showSettingsDialog(AppSettings sourceSettings, boolean loadFromRegistry) Deprecated. -
initialize
-