Class BladeTransitionAwareRadianceIcon
- java.lang.Object
-
- org.pushingpixels.radiance.component.internal.theming.common.BladeTransitionAwareRadianceIcon
-
- All Implemented Interfaces:
javax.swing.Icon
,RadianceIcon
public class BladeTransitionAwareRadianceIcon extends java.lang.Object implements RadianceIcon
Icon with transition-aware capabilities. Has a delegate that does the actual painting based on the transition themes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
BladeTransitionAwareRadianceIcon.Delegate
The delegate needs to implement the method in this interface based on the provided theme.static interface
BladeTransitionAwareRadianceIcon.StateTransitionTrackerDelegate
-
Nested classes/interfaces inherited from interface org.pushingpixels.radiance.common.api.icon.RadianceIcon
RadianceIcon.ColorFilter, RadianceIcon.Factory
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JComponent
comp
The associated component.private BladeTransitionAwareRadianceIcon.Delegate
delegate
Delegate to compute the actual icons.protected int
height
The height of the rendered image.private BladeColorScheme
mutableColorScheme
private BladeTransitionAwareRadianceIcon.StateTransitionTrackerDelegate
stateTransitionTrackerDelegate
protected int
width
The width of the rendered image.
-
Constructor Summary
Constructors Constructor Description BladeTransitionAwareRadianceIcon(JCommandButton button, BladeTransitionAwareRadianceIcon.StateTransitionTrackerDelegate stateTransitionTrackerDelegate, BladeTransitionAwareRadianceIcon.Delegate delegate, java.awt.Dimension initialDim)
Creates a new transition-aware icon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIconHeight()
int
getIconWidth()
void
paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
void
setColorFilter(RadianceIcon.ColorFilter colorFilter)
void
setDimension(java.awt.Dimension newDimension)
Changes the dimension ofthis
icon.boolean
supportsColorFilter()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pushingpixels.radiance.common.api.icon.RadianceIcon
toImage
-
-
-
-
Field Detail
-
width
protected int width
The width of the rendered image.
-
height
protected int height
The height of the rendered image.
-
comp
private javax.swing.JComponent comp
The associated component.
-
stateTransitionTrackerDelegate
private BladeTransitionAwareRadianceIcon.StateTransitionTrackerDelegate stateTransitionTrackerDelegate
-
delegate
private BladeTransitionAwareRadianceIcon.Delegate delegate
Delegate to compute the actual icons.
-
mutableColorScheme
private BladeColorScheme mutableColorScheme
-
-
Constructor Detail
-
BladeTransitionAwareRadianceIcon
public BladeTransitionAwareRadianceIcon(JCommandButton button, BladeTransitionAwareRadianceIcon.StateTransitionTrackerDelegate stateTransitionTrackerDelegate, BladeTransitionAwareRadianceIcon.Delegate delegate, java.awt.Dimension initialDim)
Creates a new transition-aware icon.- Parameters:
button
- Associated command button.stateTransitionTrackerDelegate
- State transition tracker delegatedelegate
- Delegate to compute the actual icons.initialDim
- Initial icon dimension.
-
-
Method Detail
-
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
- Specified by:
paintIcon
in interfacejavax.swing.Icon
-
setDimension
public void setDimension(java.awt.Dimension newDimension)
Description copied from interface:RadianceIcon
Changes the dimension ofthis
icon.- Specified by:
setDimension
in interfaceRadianceIcon
- Parameters:
newDimension
- New dimension forthis
icon.
-
supportsColorFilter
public boolean supportsColorFilter()
- Specified by:
supportsColorFilter
in interfaceRadianceIcon
-
setColorFilter
public void setColorFilter(RadianceIcon.ColorFilter colorFilter)
- Specified by:
setColorFilter
in interfaceRadianceIcon
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interfacejavax.swing.Icon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interfacejavax.swing.Icon
-
-