Class LayeredIcon

  • All Implemented Interfaces:
    javax.swing.Icon, org.pushingpixels.neon.api.icon.NeonIcon


    public class LayeredIcon
    extends java.lang.Object
    implements org.pushingpixels.neon.api.icon.NeonIcon
    Decorator icon that layers icons one on top of the other. The original icons are drawn and resized together as one layered stack.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.pushingpixels.neon.api.icon.NeonIcon

        org.pushingpixels.neon.api.icon.NeonIcon.ColorFilter, org.pushingpixels.neon.api.icon.NeonIcon.Factory
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.pushingpixels.neon.api.icon.NeonIcon[] layers
      The layer icons.
    • Constructor Summary

      Constructors 
      Constructor Description
      LayeredIcon​(org.pushingpixels.neon.api.icon.NeonIcon... layers)
      Creates a new layered 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​(org.pushingpixels.neon.api.icon.NeonIcon.ColorFilter colorFilter)  
      void setDimension​(java.awt.Dimension newDimension)  
      boolean supportsColorFilter​()  
      • Methods inherited from interface org.pushingpixels.neon.api.icon.NeonIcon

        toImage
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • layers

        protected org.pushingpixels.neon.api.icon.NeonIcon[] layers
        The layer icons.
    • Constructor Detail

      • LayeredIcon

        public LayeredIcon​(org.pushingpixels.neon.api.icon.NeonIcon... layers)
        Creates a new layered icon.
        Parameters:
        layers - Layer icons.
    • Method Detail

      • setDimension

        public void setDimension​(java.awt.Dimension newDimension)
        Specified by:
        setDimension in interface org.pushingpixels.neon.api.icon.NeonIcon
      • supportsColorFilter

        public boolean supportsColorFilter​()
        Specified by:
        supportsColorFilter in interface org.pushingpixels.neon.api.icon.NeonIcon
      • setColorFilter

        public void setColorFilter​(org.pushingpixels.neon.api.icon.NeonIcon.ColorFilter colorFilter)
        Specified by:
        setColorFilter in interface org.pushingpixels.neon.api.icon.NeonIcon
      • getIconHeight

        public int getIconHeight​()
        Specified by:
        getIconHeight in interface javax.swing.Icon
      • getIconWidth

        public int getIconWidth​()
        Specified by:
        getIconWidth in interface javax.swing.Icon
      • paintIcon

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