Class LayeredIcon

  • All Implemented Interfaces:
    Icon, ResizableIcon

    public class LayeredIcon
    extends Object
    implements ResizableIcon
    Decorator icon that layers icons one on top of the other. The original icons are drawn and resized together as one layered stack.
    • Constructor Detail

      • LayeredIcon

        public LayeredIcon​(ResizableIcon... layers)
        Creates a new layered icon.
        Parameters:
        layers - Layer icons.
    • Method Detail

      • setDimension

        public void setDimension​(Dimension newDimension)
        Description copied from interface: ResizableIcon
        Changes the dimension of this icon.
        Specified by:
        setDimension in interface ResizableIcon
        Parameters:
        newDimension - New dimension for this icon.
      • getIconHeight

        public int getIconHeight()
        Specified by:
        getIconHeight in interface Icon
      • getIconWidth

        public int getIconWidth()
        Specified by:
        getIconWidth in interface Icon