Package com.formdev.flatlaf.icons
Class FlatAnimatedIcon
- java.lang.Object
-
- com.formdev.flatlaf.icons.FlatAbstractIcon
-
- com.formdev.flatlaf.icons.FlatAnimatedIcon
-
- All Implemented Interfaces:
AnimatedIcon
,javax.swing.Icon
,javax.swing.plaf.UIResource
public abstract class FlatAnimatedIcon extends FlatAbstractIcon implements AnimatedIcon
Base class for animated icons that scale width and height, creates and initializes a scaled graphics context for icon painting.Subclasses do not need to scale icon painting.
This class does not store any state information (needed for animation) in its instance. Instead, a client property is set on the painted component. This makes it possible to use a share icon instance for multiple components.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.formdev.flatlaf.util.AnimatedIcon
AnimatedIcon.AnimationSupport
-
-
Field Summary
-
Fields inherited from class com.formdev.flatlaf.icons.FlatAbstractIcon
color, height, width
-
-
Constructor Summary
Constructors Constructor Description FlatAnimatedIcon(int width, int height, java.awt.Color color)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
paintIcon(java.awt.Component c, java.awt.Graphics2D g)
void
paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
-
Methods inherited from class com.formdev.flatlaf.icons.FlatAbstractIcon
getIconHeight, getIconWidth
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.formdev.flatlaf.util.AnimatedIcon
getAnimationDuration, getAnimationInterpolator, getAnimationResolution, getClientPropertyKey, getValue, isAnimationEnabled, paintIconAnimated
-
-
-
-
Method Detail
-
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
- Specified by:
paintIcon
in interfaceAnimatedIcon
- Specified by:
paintIcon
in interfacejavax.swing.Icon
- Overrides:
paintIcon
in classFlatAbstractIcon
-
paintIcon
protected void paintIcon(java.awt.Component c, java.awt.Graphics2D g)
- Specified by:
paintIcon
in classFlatAbstractIcon
-
-