org.jminor.common.model.combobox
Class ItemComboBoxModel.IconItem<T>

java.lang.Object
  extended by org.jminor.common.model.Item<T>
      extended by org.jminor.common.model.combobox.ItemComboBoxModel.IconItem<T>
All Implemented Interfaces:
Serializable, Comparable<Item<T>>, Icon
Enclosing class:
ItemComboBoxModel<T>

public static final class ItemComboBoxModel.IconItem<T>
extends Item<T>
implements Icon

An IconItem to use in a ItemComboBoxModel.

See Also:
Serialized Form

Constructor Summary
ItemComboBoxModel.IconItem(T item, ImageIcon icon)
          Constructs a new IconItem.
 
Method Summary
 int getIconHeight()
          
 int getIconWidth()
          
 void paintIcon(Component c, Graphics g, int x, int y)
          
 
Methods inherited from class org.jminor.common.model.Item
compareTo, equals, getCaption, getItem, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ItemComboBoxModel.IconItem

public ItemComboBoxModel.IconItem(T item,
                                  ImageIcon icon)
Constructs a new IconItem.

Parameters:
item - the item this IconItem represents
icon - the icon
Method Detail

getIconHeight

public int getIconHeight()

Specified by:
getIconHeight in interface Icon

getIconWidth

public int getIconWidth()

Specified by:
getIconWidth in interface Icon

paintIcon

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

Specified by:
paintIcon in interface Icon