Package com.jme3.system
Class JmeSystemDelegate
java.lang.Object
com.jme3.system.JmeSystemDelegate
- Direct Known Subclasses:
JmeAndroidSystem
,JmeDesktopSystem
,JmeIosSystem
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected final Logger
protected boolean
protected BiFunction<AppSettings,
Boolean, Boolean> protected SoftTextDialogInput
protected Map<JmeSystem.StorageFolderType,
File> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract URL
getResource
(String name) getResourceAsStream
(String name) void
handleErrorMessage
(String message) Internal use only: submit an error to the error message handlerboolean
handleSettings
(AppSettings settings, boolean loadFromRegistry) Internal use only: summon the settings handlerabstract void
initialize
(AppSettings settings) boolean
final AssetManager
final AssetManager
newAssetManager
(URL configFile) abstract AudioRenderer
newAudioRenderer
(AppSettings settings) abstract JmeContext
newContext
(AppSettings settings, JmeContext.Type contextType) void
setErrorMessageHandler
(Consumer<String> handler) Set function to handle errors.void
setLowPermissions
(boolean lowPerm) void
setSettingsHandler
(BiFunction<AppSettings, Boolean, Boolean> handler) Set a function to handler app settings.void
void
showErrorDialog
(String message) Deprecated.Use JmeSystemDelegate.handleErrorMessage(String) insteadboolean
showSettingsDialog
(AppSettings settings, boolean loadFromRegistry) Deprecated.abstract void
showSoftKeyboard
(boolean show) boolean
abstract void
writeImageFile
(OutputStream outStream, String format, ByteBuffer imageData, int width, int height)
-
Field Details
-
logger
-
initialized
protected boolean initialized -
lowPermissions
protected boolean lowPermissions -
storageFolders
-
softTextDialogInput
-
errorMessageHandler
-
settingsHandler
-
-
Constructor Details
-
JmeSystemDelegate
public JmeSystemDelegate()
-
-
Method Details
-
getStorageFolder
-
getFullName
-
getResourceAsStream
-
getResource
-
trackDirectMemory
public boolean trackDirectMemory() -
setLowPermissions
public void setLowPermissions(boolean lowPerm) -
isLowPermissions
public boolean isLowPermissions() -
setSoftTextDialogInput
-
getSoftTextDialogInput
-
newAssetManager
-
newAssetManager
-
writeImageFile
public abstract void writeImageFile(OutputStream outStream, String format, ByteBuffer imageData, int width, int height) throws IOException - Throws:
IOException
-
setErrorMessageHandler
Set function to handle errors. The default implementation show a dialog if available.- Parameters:
handler
- Consumer to which the error is passed as String
-
handleErrorMessage
Internal use only: submit an error to the error message handler -
setSettingsHandler
Set a function to handler app settings. The default implementation shows a settings dialog if available.- Parameters:
handler
- handler function that accepts as argument an instance of AppSettings to transform and a boolean with the value of true if the settings are expected to be loaded from the user registry. The handler function returns false if the configuration is interrupted (eg.the the dialog was closed) or true otherwise.
-
handleSettings
Internal use only: summon the settings handler -
showErrorDialog
Deprecated.Use JmeSystemDelegate.handleErrorMessage(String) instead- Parameters:
message
-
-
showSettingsDialog
Deprecated. -
getPlatform
-
getBuildInfo
-
getPlatformAssetConfigURL
-
newContext
-
newAudioRenderer
-
initialize
-
showSoftKeyboard
public abstract void showSoftKeyboard(boolean show)
-