Class EmptyIcon

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.Icon

    public class EmptyIcon
    extends java.lang.Object
    implements javax.swing.Icon, java.io.Serializable
    A standard icon that doesn't paint anything. This can be used when some Completions have icons and others don't, to visually align the text of all completions.
    Version:
    1.0
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int size  
    • Constructor Summary

      Constructors 
      Constructor Description
      EmptyIcon​(int size)  
    • 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 setSize​(int size)
      Sets the size of this icon.
      • Methods inherited from class java.lang.Object

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

      • size

        private int size
    • Constructor Detail

      • EmptyIcon

        public EmptyIcon​(int size)
    • Method Detail

      • 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
      • setSize

        public void setSize​(int size)
        Sets the size of this icon. The parent container will likely need to be revalidated if this is called after the UI is displayed.
        Parameters:
        size - The new icon size.