Package it.tidalwave.util
Interface PreferencesHandler
- 
 public interface PreferencesHandler- Since:
- 3.2-ALPHA-17
- Author:
- Fabrizio Giudici
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classPreferencesHandler.Inner
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.String__BASE_NAMEstatic Key<java.lang.Boolean>KEY_FULL_SCREENWhether the application should start at full screen.static Key<java.lang.Double>KEY_INITIAL_SIZEA property representing the initial main window size as a percentual of the screen size.static java.lang.StringPROP_APP_NAMEstatic java.lang.StringPROP_SUPPRESS_CONSOLESuppress any console output.static java.lang.StringPROPS_BASE_NAME
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.nio.file.PathgetAppFolder()static PreferencesHandlergetInstance()java.nio.file.PathgetLogFolder()<T> java.util.Optional<T>getProperty(Key<T> name)Gets a property.static voidsetAppName(java.lang.String name)Sets the application name.<T> voidsetDefaultProperty(Key<T> name, T value)Sets a property, unless it has been already set.<T> voidsetProperty(Key<T> name, T value)Sets a property, overriding the current value.
 
- 
- 
- 
Field Detail- 
PROPS_BASE_NAMEstatic final java.lang.String PROPS_BASE_NAME 
 - 
PROP_APP_NAMEstatic final java.lang.String PROP_APP_NAME 
 - 
PROP_SUPPRESS_CONSOLEstatic final java.lang.String PROP_SUPPRESS_CONSOLE Suppress any console output. @since 3.2-ALPHA-21
 - 
__BASE_NAMEstatic final java.lang.String __BASE_NAME - See Also:
- Constant Field Values
 
 - 
KEY_INITIAL_SIZEstatic final Key<java.lang.Double> KEY_INITIAL_SIZE A property representing the initial main window size as a percentual of the screen size.
 - 
KEY_FULL_SCREENstatic final Key<java.lang.Boolean> KEY_FULL_SCREEN Whether the application should start at full screen.
 
- 
 - 
Method Detail- 
getInstance@Nonnull static PreferencesHandler getInstance() 
 - 
getAppFolder@Nonnull java.nio.file.Path getAppFolder() 
 - 
getLogFolder@Nonnull java.nio.file.Path getLogFolder() 
 - 
setAppNamestatic void setAppName(@Nonnull java.lang.String name)Sets the application name. This method must be called at boot from themainmethod before doing anything else.- Parameters:
- name- the property name
 
 - 
getProperty@Nonnull <T> java.util.Optional<T> getProperty(@Nonnull Key<T> name)Gets a property.- Type Parameters:
- T- the property type
- Parameters:
- name- the property name
- Returns:
- the property value
 
 - 
setProperty<T> void setProperty(@Nonnull Key<T> name, @Nonnull T value)Sets a property, overriding the current value.- Type Parameters:
- T- the property type
- Parameters:
- name- the property name
- value- the property value
 
 - 
setDefaultProperty<T> void setDefaultProperty(@Nonnull Key<T> name, @Nonnull T value)Sets a property, unless it has been already set.- Type Parameters:
- T- the property type
- Parameters:
- name- the property name
- value- the property value
 
 
- 
 
-