Package de.xima.fc.gui.common.model
Class CustomColor
- java.lang.Object
-
- de.xima.fc.gui.common.model.CustomColor
-
- All Implemented Interfaces:
IGuiColor
,Serializable
public class CustomColor extends Object implements IGuiColor
A customIGuiColor
color with a builder that supports whatever color fields were added during the build process.- Since:
- 6.5.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CustomColor.Builder
Simple builder for aCustomColor
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CustomColor.Builder
builder()
boolean
equals(Object obj)
<T extends Serializable>
TgetField(IColorField<T> field)
Finds the value of the given color palette field.com.google.common.collect.ImmutableSet<IColorField<?>>
getSupportedFields()
int
hashCode()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.xima.fc.interfaces.color.IGuiColor
getStyleBackground, getStyleClassBackground, getStyleClassTextOnWhite, getStyleTextOnWhite, supportsField
-
-
-
-
Method Detail
-
getField
public <T extends Serializable> T getField(IColorField<T> field) throws IllegalArgumentException
Description copied from interface:IGuiColor
Finds the value of the given color palette field.- Specified by:
getField
in interfaceIGuiColor
- Type Parameters:
T
- Type of the field value.- Parameters:
field
- A field to retrieve.- Returns:
- The value of this color palette entry for the given field.
- Throws:
IllegalArgumentException
- If the given field is not supported, seeEColorPalette#supportsField
.
-
getSupportedFields
public com.google.common.collect.ImmutableSet<IColorField<?>> getSupportedFields()
- Specified by:
getSupportedFields
in interfaceIGuiColor
- Returns:
- All fields supported by this color.
- See Also:
IGuiColor.supportsField(IColorField)
-
builder
public static CustomColor.Builder builder()
- Returns:
- A new builder for a custom color.
-
-