Package it.tidalwave.util
Interface PreferencesHandler
public interface PreferencesHandler
- Since:
- 3.2-ALPHA-17
- Author:
- Fabrizio Giudici
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PreferencesHandler
<T> Optional
<T> getProperty
(Key<T> name) Gets a property.static void
setAppName
(String name) Sets the application name.<T> void
setDefaultProperty
(Key<T> name, T value) Sets a property, unless it has been already set.<T> void
setProperty
(Key<T> name, T value) Sets a property, overriding the current value.
-
Field Details
-
PROPS_BASE_NAME
-
PROP_APP_NAME
-
PROP_SUPPRESS_CONSOLE
Suppress any console output. @since 3.2-ALPHA-21 -
__BASE_NAME
- See Also:
-
KEY_INITIAL_SIZE
A property representing the initial main window size as a percentual of the screen size. -
KEY_FULL_SCREEN
Whether the application should start at full screen.
-
-
Method Details
-
getInstance
-
getAppFolder
-
getLogFolder
-
setAppName
Sets the application name. This method must be called at boot from themain
method before doing anything else.- Parameters:
name
- the property name
-
getProperty
Gets a property.- Type Parameters:
T
- the property type- Parameters:
name
- the property name- Returns:
- the property value
-
setProperty
Sets a property, overriding the current value.- Type Parameters:
T
- the property type- Parameters:
name
- the property namevalue
- the property value
-
setDefaultProperty
Sets a property, unless it has been already set.- Type Parameters:
T
- the property type- Parameters:
name
- the property namevalue
- the property value
-