public abstract class JmeSystemDelegate
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.function.Consumer<java.lang.String> |
errorMessageHandler |
protected boolean |
initialized |
protected java.util.logging.Logger |
logger |
protected boolean |
lowPermissions |
protected java.util.function.BiFunction<AppSettings,java.lang.Boolean,java.lang.Boolean> |
settingsHandler |
protected SoftTextDialogInput |
softTextDialogInput |
protected java.util.Map<JmeSystem.StorageFolderType,java.io.File> |
storageFolders |
Constructor and Description |
---|
JmeSystemDelegate() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBuildInfo() |
java.lang.String |
getFullName() |
Platform |
getPlatform() |
abstract java.net.URL |
getPlatformAssetConfigURL() |
java.net.URL |
getResource(java.lang.String name) |
java.io.InputStream |
getResourceAsStream(java.lang.String name) |
SoftTextDialogInput |
getSoftTextDialogInput() |
java.io.File |
getStorageFolder(JmeSystem.StorageFolderType type) |
void |
handleErrorMessage(java.lang.String message)
Internal use only: submit an error to the error message handler
|
boolean |
handleSettings(AppSettings settings,
boolean loadFromRegistry)
Internal use only: summon the settings handler
|
abstract void |
initialize(AppSettings settings) |
boolean |
isLowPermissions() |
AssetManager |
newAssetManager() |
AssetManager |
newAssetManager(java.net.URL configFile) |
abstract AudioRenderer |
newAudioRenderer(AppSettings settings) |
abstract JmeContext |
newContext(AppSettings settings,
JmeContext.Type contextType) |
void |
setErrorMessageHandler(java.util.function.Consumer<java.lang.String> handler)
Set function to handle errors.
|
void |
setLowPermissions(boolean lowPerm) |
void |
setSettingsHandler(java.util.function.BiFunction<AppSettings,java.lang.Boolean,java.lang.Boolean> handler)
Set a function to handler app settings.
|
void |
setSoftTextDialogInput(SoftTextDialogInput input) |
void |
showErrorDialog(java.lang.String message)
Deprecated.
Use JmeSystemDelegate.handleErrorMessage(String) instead
|
boolean |
showSettingsDialog(AppSettings settings,
boolean loadFromRegistry)
Deprecated.
|
abstract void |
showSoftKeyboard(boolean show) |
boolean |
trackDirectMemory() |
abstract void |
writeImageFile(java.io.OutputStream outStream,
java.lang.String format,
java.nio.ByteBuffer imageData,
int width,
int height) |
protected final java.util.logging.Logger logger
protected boolean initialized
protected boolean lowPermissions
protected java.util.Map<JmeSystem.StorageFolderType,java.io.File> storageFolders
protected SoftTextDialogInput softTextDialogInput
protected java.util.function.Consumer<java.lang.String> errorMessageHandler
protected java.util.function.BiFunction<AppSettings,java.lang.Boolean,java.lang.Boolean> settingsHandler
public java.io.File getStorageFolder(JmeSystem.StorageFolderType type)
public java.lang.String getFullName()
public java.io.InputStream getResourceAsStream(java.lang.String name)
public java.net.URL getResource(java.lang.String name)
public boolean trackDirectMemory()
public void setLowPermissions(boolean lowPerm)
public boolean isLowPermissions()
public void setSoftTextDialogInput(SoftTextDialogInput input)
public SoftTextDialogInput getSoftTextDialogInput()
public final AssetManager newAssetManager(java.net.URL configFile)
public final AssetManager newAssetManager()
public abstract void writeImageFile(java.io.OutputStream outStream, java.lang.String format, java.nio.ByteBuffer imageData, int width, int height) throws java.io.IOException
java.io.IOException
public void setErrorMessageHandler(java.util.function.Consumer<java.lang.String> handler)
handler
- Consumer to which the error is passed as Stringpublic void handleErrorMessage(java.lang.String message)
public void setSettingsHandler(java.util.function.BiFunction<AppSettings,java.lang.Boolean,java.lang.Boolean> handler)
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.public boolean handleSettings(AppSettings settings, boolean loadFromRegistry)
@Deprecated public void showErrorDialog(java.lang.String message)
message
- @Deprecated public boolean showSettingsDialog(AppSettings settings, boolean loadFromRegistry)
public Platform getPlatform()
public java.lang.String getBuildInfo()
public abstract java.net.URL getPlatformAssetConfigURL()
public abstract JmeContext newContext(AppSettings settings, JmeContext.Type contextType)
public abstract AudioRenderer newAudioRenderer(AppSettings settings)
public abstract void initialize(AppSettings settings)
public abstract void showSoftKeyboard(boolean show)