Class 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.

    • Constructor Detail

      • FlatAnimatedIcon

        public FlatAnimatedIcon​(int width,
                                int height,
                                java.awt.Color color)
    • Method Detail

      • paintIcon

        public void paintIcon​(java.awt.Component c,
                              java.awt.Graphics g,
                              int x,
                              int y)
        Specified by:
        paintIcon in interface AnimatedIcon
        Specified by:
        paintIcon in interface javax.swing.Icon
        Overrides:
        paintIcon in class FlatAbstractIcon
      • paintIcon

        protected void paintIcon​(java.awt.Component c,
                                 java.awt.Graphics2D g)
        Specified by:
        paintIcon in class FlatAbstractIcon