Package io.guise.framework.style
Class ResourceColor
- java.lang.Object
-
- io.guise.framework.style.ResourceColor
-
- All Implemented Interfaces:
Color
public class ResourceColor extends java.lang.Object implements Color
A color that retrieves its values from the Guise session resources based upon a resource key. When color-related access methods are called the calling thread must have access to the current Guise session.- Author:
- Garret Wilson
- See Also:
GuiseSession.getColorResource(String)
-
-
Constructor Summary
Constructors Constructor Description ResourceColor(java.lang.String resourceKey)
Resource key constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HSLColor
asHSL()
RGBColor
asRGB()
boolean
equals(java.lang.Object object)
java.lang.String
getResourceKey()
int
hashCode()
-
-
-
Method Detail
-
getResourceKey
public java.lang.String getResourceKey()
- Returns:
- The key to accessing the color defined in the resources.
-
asHSL
public HSLColor asHSL()
This implementation retrieves a color from the Guise session resources and delegates to that object.
-
asRGB
public RGBColor asRGB()
This implementation retrieves a color from the Guise session resources and delegates to that object.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
This implementation returns whether the object is another resource color with the same resource key.
- Overrides:
equals
in classjava.lang.Object
- See Also:
getResourceKey()
-
-