Class IconRow

  • All Implemented Interfaces:
    javax.swing.Icon

    public class IconRow
    extends java.lang.Object
    implements javax.swing.Icon
    An icon row combines two or more icons into a single icon by painting them in a horizontal row.
    Since:
    3.0
    Author:
    Chris Jennings
    • Constructor Summary

      Constructors 
      Constructor Description
      IconRow​(int iconGap, javax.swing.Icon... icons)
      Creates a new icon row with the specified gap size.
      IconRow​(javax.swing.Icon... icons)
      Creates a new icon row with a default gap size of four pixels.
    • 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)  
      • Methods inherited from class java.lang.Object

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

      • IconRow

        public IconRow​(javax.swing.Icon... icons)
        Creates a new icon row with a default gap size of four pixels.
        Parameters:
        icons - the icons to include in the row
      • IconRow

        public IconRow​(int iconGap,
                       javax.swing.Icon... icons)
        Creates a new icon row with the specified gap size.
        Parameters:
        iconGap - the gap between icons, in pixels
        icons - the icons to include in the row
    • Method Detail

      • paintIcon

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

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

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