Package org.polyfrost.polyui.property
Class PropertyManager
-
- All Implemented Interfaces:
-
kotlin.Cloneable
public final class PropertyManager implements Cloneable
-
-
Field Summary
Fields Modifier and Type Field Description private final HashMap<String, Properties>propertiesprivate final Colorscolorsprivate final FontFamilyfonts
-
Constructor Summary
Constructors Constructor Description PropertyManager(Colors colors, FontFamily fonts)
-
Method Summary
Modifier and Type Method Description final HashMap<String, Properties>getProperties()final ColorsgetColors()final FontFamilygetFonts()final <C extends Component> Propertiesget()final <T extends Properties> Tget(Component component)final <T extends Properties> Tget(String name)final UnitaddPropertyType(Component forComponent, Properties properties)Add the given property to the property' registry. final UnitaddPropertyType(Class<?> forComponent, Properties properties)final UnitaddPropertyType(KClass<?> forComponent, Properties properties)final UnitaddPropertyType(String name, Properties properties)Add the given property to the property registry. final UnitaddPropertyTypes(HashMap<String, Properties> map)Add the given properties to the property registry (bulk version of addPropertyType). final UnitsetTheme(HashMap<String, Properties> map)PropertyManagerclone()-
-
Constructor Detail
-
PropertyManager
PropertyManager(Colors colors, FontFamily fonts)
-
-
Method Detail
-
getProperties
final HashMap<String, Properties> getProperties()
-
getFonts
final FontFamily getFonts()
-
get
final <C extends Component> Properties get()
-
get
final <T extends Properties> T get(Component component)
-
get
final <T extends Properties> T get(String name)
-
addPropertyType
final Unit addPropertyType(Component forComponent, Properties properties)
Add the given property to the property' registry.
This will OVERWRITE any existing property for the given component.
- Parameters:
properties- the property to add
-
addPropertyType
final Unit addPropertyType(Class<?> forComponent, Properties properties)
-
addPropertyType
final Unit addPropertyType(KClass<?> forComponent, Properties properties)
-
addPropertyType
final Unit addPropertyType(String name, Properties properties)
Add the given property to the property registry.
This will OVERWRITE any existing property for the given component.
- Parameters:
name- the simple class name of the component (e.g.properties- the property to add
-
addPropertyTypes
final Unit addPropertyTypes(HashMap<String, Properties> map)
Add the given properties to the property registry (bulk version of addPropertyType).
This will OVERWRITE any existing property for the given component.
- Parameters:
map- a map of properties, and their accompanying properties to add.
-
setTheme
final Unit setTheme(HashMap<String, Properties> map)
-
clone
PropertyManager clone()
-
-
-
-