Class CommandButtonFollowColorTokensIcon
java.lang.Object
org.pushingpixels.radiance.component.api.common.icon.CommandButtonFollowColorTokensIcon
- All Implemented Interfaces:
Icon, RadianceIcon
Implementation of
RadianceIcon for command buttons that wish to have their icon
be dynamically rendered at runtime based on the color tokens that match the current
transition-aware state.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe delegate needs to implement the method in this interface based on the provided color tokens.Nested classes/interfaces inherited from interface RadianceIcon
RadianceIcon.ColorFilter, RadianceIcon.Factory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe height of the rendered image.private BladeContainerColorTokensprivate intThe width of the rendered image. -
Constructor Summary
ConstructorsConstructorDescriptionCommandButtonFollowColorTokensIcon(CommandButtonFollowColorTokensIcon.Delegate delegate, Dimension initialDim) CommandButtonFollowColorTokensIcon(RadianceThemingSlices.ContainerColorTokensAssociationKind colorTokensAssociationKind, CommandButtonFollowColorTokensIcon.Delegate delegate, Dimension initialDim) Creates a new icon. -
Method Summary
Modifier and TypeMethodDescriptionintintvoidvoidsetColorFilter(RadianceIcon.ColorFilter colorFilter) voidsetDimension(Dimension newDimension) Changes the dimension ofthisicon.booleanMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RadianceIcon
toImage
-
Field Details
-
width
private int widthThe width of the rendered image. -
height
private int heightThe height of the rendered image. -
colorTokensAssociationKind
-
delegate
-
mutableTokens
-
-
Constructor Details
-
CommandButtonFollowColorTokensIcon
public CommandButtonFollowColorTokensIcon(CommandButtonFollowColorTokensIcon.Delegate delegate, Dimension initialDim) -
CommandButtonFollowColorTokensIcon
public CommandButtonFollowColorTokensIcon(RadianceThemingSlices.ContainerColorTokensAssociationKind colorTokensAssociationKind, CommandButtonFollowColorTokensIcon.Delegate delegate, Dimension initialDim) Creates a new icon.- Parameters:
colorTokensAssociationKind- Color tokens association kind to use for determining the color tokens for this icon.delegate- Delegate to compute the actual icons.initialDim- Initial icon dimension.
-
-
Method Details
-
paintIcon
-
setDimension
Description copied from interface:RadianceIconChanges the dimension ofthisicon.- Specified by:
setDimensionin interfaceRadianceIcon- Parameters:
newDimension- New dimension forthisicon.
-
supportsColorFilter
public boolean supportsColorFilter()- Specified by:
supportsColorFilterin interfaceRadianceIcon
-
setColorFilter
- Specified by:
setColorFilterin interfaceRadianceIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeightin interfaceIcon
-
getIconWidth
public int getIconWidth()- Specified by:
getIconWidthin interfaceIcon
-