|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ctdp.rfdynhud.util.ConfigurationLoader
public class ConfigurationLoader
This utility class servs to load HUD configuration files.
Field Summary | |
---|---|
static java.lang.Object |
DEFAULT_PLACEHOLDER
|
Constructor Summary | |
---|---|
ConfigurationLoader(WidgetsConfiguration.ConfigurationLoadListener loadListener)
|
Method Summary | |
---|---|
void |
clearConfiguration(WidgetsConfiguration widgetsConfig,
LiveGameData gameData,
boolean isEditorMode)
Loads fully configured Widget s to a WidgetsConfiguration . |
ConfigurationCandidatesIterator |
getCandidatesIterator()
|
java.lang.String |
getCurrentKey()
Gets the currently loaded property key. |
java.lang.String |
getCurrentValue()
Gets the currently loaded property value. |
java.lang.String |
getKeyPrefix()
|
java.lang.String |
getNoConfigFoundMessage()
|
Version |
getSourceVersion()
Gets the rfDynHUD version, the source file was written by. |
boolean |
isDefaultLoadingEnabled()
|
void |
loadConfiguration(java.io.InputStream in,
java.lang.String name,
WidgetsConfiguration widgetsConfig,
LiveGameData gameData,
boolean isEditorMode)
Loads fully configured Widget s to a WidgetsConfiguration . |
boolean |
loadProperty(Property property)
Attempts to load the value into the passed property. |
static int[] |
readDesignResolutionFromConfiguration(java.io.File file,
boolean quietMode)
Loads fully configured Widget s to a WidgetsConfiguration . |
void |
setCandidatesIterator(ConfigurationCandidatesIterator it)
|
void |
setDefaultLoadingEnabled(boolean enabled)
|
void |
setKeyPrefix(java.lang.String prefix)
|
void |
setNoConfigFoundMessage(java.lang.String message)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Object DEFAULT_PLACEHOLDER
Constructor Detail |
---|
public ConfigurationLoader(WidgetsConfiguration.ConfigurationLoadListener loadListener)
Method Detail |
---|
public void setCandidatesIterator(ConfigurationCandidatesIterator it)
public final ConfigurationCandidatesIterator getCandidatesIterator()
public void setDefaultLoadingEnabled(boolean enabled)
public final boolean isDefaultLoadingEnabled()
public void setNoConfigFoundMessage(java.lang.String message)
public final java.lang.String getNoConfigFoundMessage()
public void setKeyPrefix(java.lang.String prefix)
public final java.lang.String getKeyPrefix()
public final java.lang.String getCurrentKey()
PropertyLoader
getCurrentKey
in interface PropertyLoader
public final java.lang.String getCurrentValue()
PropertyLoader
getCurrentValue
in interface PropertyLoader
public final Version getSourceVersion()
PropertyLoader
getSourceVersion
in interface PropertyLoader
public boolean loadProperty(Property property)
PropertyLoader
loadProperty
in interface PropertyLoader
true
, if and only if the property accepted the key and value.public static int[] readDesignResolutionFromConfiguration(java.io.File file, boolean quietMode) throws java.io.IOException
Widget
s to a WidgetsConfiguration
.
file
- the file to parsequietMode
- suppress warnings to the log?
null
.
java.io.IOException
- if anything went wrong.public void clearConfiguration(WidgetsConfiguration widgetsConfig, LiveGameData gameData, boolean isEditorMode) throws java.io.IOException
Widget
s to a WidgetsConfiguration
.
widgetsConfig
- gameData
- isEditorMode
-
java.io.IOException
- if anything went wrong.public void loadConfiguration(java.io.InputStream in, java.lang.String name, WidgetsConfiguration widgetsConfig, LiveGameData gameData, boolean isEditorMode) throws java.io.IOException
Widget
s to a WidgetsConfiguration
.
in
- name
- widgetsConfig
- gameData
- isEditorMode
-
java.io.IOException
- if anything went wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |