edu.wisc.ssec.mcidasv.ui
Class McvToolbarEditor.IconCellRenderer

java.lang.Object
  extended by edu.wisc.ssec.mcidasv.ui.McvToolbarEditor.IconCellRenderer
All Implemented Interfaces:
ListCellRenderer
Enclosing class:
McvToolbarEditor

private static class McvToolbarEditor.IconCellRenderer
extends Object
implements ListCellRenderer

Renders a toolbar action and its icon within the TwoListPanel's JLists.


Field Summary
private  DefaultListCellRenderer defaultRenderer
          Used to capture the normal cell renderer behaviors.
private  McvToolbarEditor editor
          Used to determine the action ID to icon associations.
private static Icon SPACE_ICON
          Icon that represents spaces in the current toolbar actions.
 
Constructor Summary
McvToolbarEditor.IconCellRenderer(McvToolbarEditor editor)
          Associates this renderer with the McvToolbarEditor that created it.
 
Method Summary
 Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPACE_ICON

private static final Icon SPACE_ICON
Icon that represents spaces in the current toolbar actions.


defaultRenderer

private DefaultListCellRenderer defaultRenderer
Used to capture the normal cell renderer behaviors.


editor

private McvToolbarEditor editor
Used to determine the action ID to icon associations.

Constructor Detail

McvToolbarEditor.IconCellRenderer

public McvToolbarEditor.IconCellRenderer(McvToolbarEditor editor)
Associates this renderer with the McvToolbarEditor that created it.

Parameters:
editor - Toolbar editor that contains relevant action ID to icon mapping.
Throws:
NullPointerException - if a null McvToolbarEditor was given.
Method Detail

getListCellRendererComponent

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