Class CoreColorTokenUtils
- java.lang.Object
-
- org.pushingpixels.radiance.theming.internal.utils.CoreColorTokenUtils
-
public class CoreColorTokenUtils extends java.lang.ObjectUtilities related to color tokens. This class is for internal use only.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCoreColorTokenUtils.ContainerTypeEnumeration of available container types.
-
Field Summary
Fields Modifier and Type Field Description private static LazyResettableHashMap<ContainerColorTokens>blendedCacheCache of blended tokens.
-
Constructor Summary
Constructors Constructor Description CoreColorTokenUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static ContainerColorTokensblendTowards(ContainerColorTokens original, java.awt.Color backgroundShiftColor, double backgroundShiftFactor, java.awt.Color foregroundShiftColor, double foregroundShiftFactor)static ContainerColorTokensgetActiveContainerTokens(java.awt.Component component)Returns the active color tokens of the component.static ContainerColorTokensgetActiveContainerTokens(java.awt.Component component, ComponentState componentState)private static ContainerColorTokensgetBlendedTokens(java.awt.Component component, ContainerColorTokens tokens, boolean isEnabled)private static ContainerColorTokensgetBlendedTokens(java.awt.Component component, ContainerColorTokens tokens, java.awt.Color fgColor, java.awt.Color bgColor, boolean isEnabled)static ContainerColorTokensgetBlendedTokens(ContainerColorTokens original, java.awt.Color backgroundShiftColor, double backgroundShiftFactor, java.awt.Color foregroundShiftColor, double foregroundShiftFactor)static ContainerColorTokensgetContainerTokens(java.awt.Component component, ComponentState componentState, CoreColorTokenUtils.ContainerType inactiveContainerType)static ContainerColorTokensgetContainerTokens(java.awt.Component component, RadianceThemingSlices.ContainerColorTokensAssociationKind associationKind, ComponentState componentState, CoreColorTokenUtils.ContainerType inactiveContainerType)Returns the color tokens of the component.static ContainerColorTokensgetContainerTokens(java.awt.Component component, RadianceThemingSlices.ContainerColorTokensAssociationKind associationKind, ComponentState componentState, CoreColorTokenUtils.ContainerType inactiveContainerType, boolean skipFlatCheck)Returns the color tokens of the component.static ContainerColorTokensgetContainerTokens(javax.swing.JTabbedPane jtp, int tabIndex, RadianceThemingSlices.ContainerColorTokensAssociationKind associationKind, ComponentState componentState)Returns the color tokens of the specified tabbed pane tab.static ContainerColorTokensgetPressedSelectedTokens(ContainerColorTokens baseTokens)static ContainerColorTokensgetPressedUnselectedTokens(ContainerColorTokens baseTokens)static ContainerColorTokensgetRolloverArmedTokens(ContainerColorTokens baseTokens)static ContainerColorTokensgetRolloverSelectedTokens(ContainerColorTokens baseTokens)static ContainerColorTokensgetRolloverUnselectedTokens(ContainerColorTokens baseTokens)private static ContainerColorTokensoverlay(ContainerColorTokens original, java.awt.Color overlay, float overlayAmount)
-
-
-
Field Detail
-
blendedCache
private static final LazyResettableHashMap<ContainerColorTokens> blendedCache
Cache of blended tokens.
-
-
Method Detail
-
getContainerTokens
public static ContainerColorTokens getContainerTokens(javax.swing.JTabbedPane jtp, int tabIndex, RadianceThemingSlices.ContainerColorTokensAssociationKind associationKind, ComponentState componentState)
Returns the color tokens of the specified tabbed pane tab.- Parameters:
jtp- Tabbed pane.tabIndex- Tab index.componentState- Tab component state.- Returns:
- The color tokens of the specified tabbed pane tab.
-
getContainerTokens
public static ContainerColorTokens getContainerTokens(java.awt.Component component, ComponentState componentState, CoreColorTokenUtils.ContainerType inactiveContainerType)
-
getContainerTokens
public static ContainerColorTokens getContainerTokens(java.awt.Component component, RadianceThemingSlices.ContainerColorTokensAssociationKind associationKind, ComponentState componentState, CoreColorTokenUtils.ContainerType inactiveContainerType)
Returns the color tokens of the component.- Parameters:
component- Component.associationKind- Association kind.componentState- Component state.- Returns:
- Component color tokens.
-
getContainerTokens
public static ContainerColorTokens getContainerTokens(java.awt.Component component, RadianceThemingSlices.ContainerColorTokensAssociationKind associationKind, ComponentState componentState, CoreColorTokenUtils.ContainerType inactiveContainerType, boolean skipFlatCheck)
Returns the color tokens of the component.- Parameters:
component- Component.associationKind- Association kind.componentState- Component state.- Returns:
- Component color tokens.
-
getActiveContainerTokens
public static ContainerColorTokens getActiveContainerTokens(java.awt.Component component)
Returns the active color tokens of the component.- Parameters:
component- Component.- Returns:
- Component color tokens.
-
getActiveContainerTokens
public static ContainerColorTokens getActiveContainerTokens(java.awt.Component component, ComponentState componentState)
-
getRolloverUnselectedTokens
public static ContainerColorTokens getRolloverUnselectedTokens(ContainerColorTokens baseTokens)
-
getRolloverSelectedTokens
public static ContainerColorTokens getRolloverSelectedTokens(ContainerColorTokens baseTokens)
-
getRolloverArmedTokens
public static ContainerColorTokens getRolloverArmedTokens(ContainerColorTokens baseTokens)
-
getPressedUnselectedTokens
public static ContainerColorTokens getPressedUnselectedTokens(ContainerColorTokens baseTokens)
-
getPressedSelectedTokens
public static ContainerColorTokens getPressedSelectedTokens(ContainerColorTokens baseTokens)
-
overlay
private static ContainerColorTokens overlay(ContainerColorTokens original, java.awt.Color overlay, float overlayAmount)
-
getBlendedTokens
private static ContainerColorTokens getBlendedTokens(java.awt.Component component, ContainerColorTokens tokens, boolean isEnabled)
-
getBlendedTokens
private static ContainerColorTokens getBlendedTokens(java.awt.Component component, ContainerColorTokens tokens, java.awt.Color fgColor, java.awt.Color bgColor, boolean isEnabled)
-
getBlendedTokens
public static ContainerColorTokens getBlendedTokens(ContainerColorTokens original, java.awt.Color backgroundShiftColor, double backgroundShiftFactor, java.awt.Color foregroundShiftColor, double foregroundShiftFactor)
-
blendTowards
private static ContainerColorTokens blendTowards(ContainerColorTokens original, java.awt.Color backgroundShiftColor, double backgroundShiftFactor, java.awt.Color foregroundShiftColor, double foregroundShiftFactor)
-
-