Class EmptyResizableIcon

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


    public class EmptyResizableIcon
    extends java.lang.Object
    implements org.pushingpixels.neon.api.icon.ResizableIcon
    Implementation of ResizableIcon that paints nothing.
    • Nested Class Summary

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

        org.pushingpixels.neon.api.icon.ResizableIcon.Factory
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int height
      The current icon height.
      protected int width
      The current icon width.
    • Constructor Summary

      Constructors 
      Constructor Description
      EmptyResizableIcon​(int initialDim)
      Creates a new empty resizable icon of the specified size.
      EmptyResizableIcon​(java.awt.Dimension initialDim)
      Creates a new empty resizable icon of the specified size.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.pushingpixels.neon.api.icon.ResizableIcon.Factory factory​()  
      int getIconHeight​()  
      int getIconWidth​()  
      void paintIcon​(java.awt.Component c, java.awt.Graphics g, int x, int y)  
      void setDimension​(java.awt.Dimension newDimension)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.pushingpixels.neon.api.icon.ResizableIcon

        toImage
    • Field Detail

      • width

        protected int width
        The current icon width.
      • height

        protected int height
        The current icon height.
    • Constructor Detail

      • EmptyResizableIcon

        public EmptyResizableIcon​(java.awt.Dimension initialDim)
        Creates a new empty resizable icon of the specified size.
        Parameters:
        initialDim - Initial dimension of the icon.
      • EmptyResizableIcon

        public EmptyResizableIcon​(int initialDim)
        Creates a new empty resizable icon of the specified size.
        Parameters:
        initialDim - Initial dimension of the icon.
    • Method Detail

      • setDimension

        public void setDimension​(java.awt.Dimension newDimension)
        Specified by:
        setDimension in interface org.pushingpixels.neon.api.icon.ResizableIcon
      • 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
      • factory

        public static org.pushingpixels.neon.api.icon.ResizableIcon.Factory factory​()