Package com.j3d.ui.theme.updator
Class Locator
java.lang.Object
com.j3d.ui.theme.updator.Locator
A utility class that acts as a locator for a specific theme property and its corresponding
setter function. This class is typically used in UI theme management systems to associate
a theme property (e.g., a color defined in
J3DTheme) with a method that can
apply that colour to a UI component.
It provides methods to access and modify the associated theme property and its setter.
- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()Returns a hash code value for the object.Returns theConsumerresponsible for setting the color property.voidsetPropertySetter(Consumer<Color> propertySetter) Sets theConsumerresponsible for setting the color property.voidsetThemeProperty(J3DTheme themeProperty) Sets theJ3DThemeenum value associated with this locator.Returns theJ3DThemeenum value associated with this locator.toString()Returns a string representation of thisLocator.
-
Field Details
-
themeProperty
TheJ3DThemeenum value representing the specific theme property this locator is associated with. -
propertySetter
-
-
Constructor Details
-
Method Details
-
themeProperty
Returns theJ3DThemeenum value associated with this locator.- Returns:
- The theme property.
-
propertySetter
Returns theConsumerresponsible for setting the color property. This consumer takes aColorobject as input.- Returns:
- The consumer function for setting the color property.
-
equals
-
hashCode
public int hashCode()Returns a hash code value for the object. This method is supported for the benefit of hash tables. -
toString
Returns a string representation of thisLocator. The string representation includes the theme property and the property setter. -
setPropertySetter
Sets theConsumerresponsible for setting the color property.- Parameters:
propertySetter- The new consumer function for setting the color property.
-
setThemeProperty
Sets theJ3DThemeenum value associated with this locator.- Parameters:
themeProperty- The new theme property.
-