Search this API

y.option
Class IconCellRenderer

java.lang.Object
  extended by y.option.IconCellRenderer
All Implemented Interfaces:
Icon, ListCellRenderer, TableCellRenderer

public class IconCellRenderer
extends Object
implements Icon, ListCellRenderer, TableCellRenderer


Constructor Summary
IconCellRenderer(GuiFactory factory, int desiredWidth, int desiredHeight)
           
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
           
 Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
           
 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

IconCellRenderer

public IconCellRenderer(GuiFactory factory,
                        int desiredWidth,
                        int desiredHeight)
Method Detail

getListCellRendererComponent

public Component getListCellRendererComponent(JList list,
                                              Object value,
                                              int index,
                                              boolean isSelected,
                                              boolean cellHasFocus)
Specified by:
getListCellRendererComponent in interface ListCellRenderer

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

getTableCellRendererComponent

public Component getTableCellRendererComponent(JTable table,
                                               Object value,
                                               boolean isSelected,
                                               boolean hasFocus,
                                               int row,
                                               int column)
Specified by:
getTableCellRendererComponent in interface TableCellRenderer

© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.