Package ca.cgjennings.ui
Class IconRow
- java.lang.Object
-
- ca.cgjennings.ui.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
-
-
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)
-
-
-
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 pixelsicons
- 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 interfacejavax.swing.Icon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interfacejavax.swing.Icon
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interfacejavax.swing.Icon
-
-