Class TransitionAwareResizableIcon
- java.lang.Object
-
- org.pushingpixels.substance.flamingo.common.TransitionAwareResizableIcon
-
- All Implemented Interfaces:
Icon
,org.pushingpixels.flamingo.api.common.icon.ResizableIcon
public class TransitionAwareResizableIcon extends Object implements org.pushingpixels.flamingo.api.common.icon.ResizableIcon
Icon with transition-aware capabilities. Has a delegate that does the actual painting based on the transition themes. This class is used heavily on Substance-provided icons, such as title pane button icons, arrow icons on scroll bars and combos etc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TransitionAwareResizableIcon.Delegate
The delegate needs to implement the method in this interface based on the provided theme.static interface
TransitionAwareResizableIcon.StateTransitionTrackerDelegate
-
Constructor Summary
Constructors Constructor Description TransitionAwareResizableIcon(org.pushingpixels.flamingo.api.common.AbstractCommandButton button, TransitionAwareResizableIcon.StateTransitionTrackerDelegate stateTransitionTrackerDelegate, TransitionAwareResizableIcon.Delegate delegate, 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(Component c, Graphics g, int x, int y)
void
setDimension(Dimension newDimension)
-
-
-
Constructor Detail
-
TransitionAwareResizableIcon
public TransitionAwareResizableIcon(org.pushingpixels.flamingo.api.common.AbstractCommandButton button, TransitionAwareResizableIcon.StateTransitionTrackerDelegate stateTransitionTrackerDelegate, TransitionAwareResizableIcon.Delegate delegate, Dimension initialDim)
Creates a new transition-aware icon.- Parameters:
button
- Associated command button.delegate
- Delegate to compute the actual icons.initialDim
- Initial icon dimension.
-
-
Method Detail
-
setDimension
public void setDimension(Dimension newDimension)
- Specified by:
setDimension
in interfaceorg.pushingpixels.flamingo.api.common.icon.ResizableIcon
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interfaceIcon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interfaceIcon
-
-