ehsbe CommonsTM
Version 1.1.0rc3

com.ehsbe.commons.gui.util
Class CombinedIcon

java.lang.Object
  extended by com.ehsbe.commons.gui.util.CombinedIcon
All Implemented Interfaces:
Icon

public class CombinedIcon
extends Object
implements Icon

Combines two icons into one icon.

Version:
$Revision: 432 $
Author:
Jens Elkner

Constructor Summary
CombinedIcon(Icon firstIcon, Icon secondIcon)
          Icon constructor.
 
Method Summary
 Icon getFirstIcon()
          Get the first icon drawn by this Icon.
 int getGap()
          Get the gap between two icons.
 int getIconHeight()
          
 int getIconWidth()
          
 Icon getSecondIcon()
          Get the second icon drawn by this Icon.
 void paintIcon(Component c, 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

CombinedIcon

public CombinedIcon(Icon firstIcon,
                    Icon secondIcon)
Icon constructor.

Parameters:
firstIcon - icon to draw first.
secondIcon - second icon to draw.
Method Detail

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)

Specified by:
paintIcon in interface Icon

getIconWidth

public int getIconWidth()

Specified by:
getIconWidth in interface Icon

getIconHeight

public int getIconHeight()

Specified by:
getIconHeight in interface Icon

getFirstIcon

public Icon getFirstIcon()
Get the first icon drawn by this Icon.

Returns:
null if not set, the icon otherwise.

getSecondIcon

public Icon getSecondIcon()
Get the second icon drawn by this Icon.

Returns:
null if not set, the icon otherwise.

getGap

public int getGap()
Get the gap between two icons.

Returns:
the gap.

ehsbe CommonsTM
Version 1.1.0rc3

Copyright ©2005-2009 EHSBE, Walther-Rathenau-Str. 58, 39104 Magdeburg, Sachsen-Anhalt, Germany. All Rights Reserved.