Package edu.wisc.ssec.mcidasv.ui
Class McvToolbarEditor.IconCellRenderer
java.lang.Object
edu.wisc.ssec.mcidasv.ui.McvToolbarEditor.IconCellRenderer
- All Implemented Interfaces:
ListCellRenderer
- Enclosing class:
McvToolbarEditor
Renders a toolbar action and its icon within the
TwoListPanel's
JLists
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DefaultListCellRenderer
Used to capture the normal cell renderer behaviors.private McvToolbarEditor
Used to determine the action ID to icon associations.private static final Icon
Icon that represents spaces in the current toolbar actions. -
Constructor Summary
ConstructorsConstructorDescriptionIconCellRenderer
(McvToolbarEditor editor) Associates this renderer with theMcvToolbarEditor
that created it. -
Method Summary
Modifier and TypeMethodDescriptiongetListCellRendererComponent
(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
-
Field Details
-
SPACE_ICON
Icon that represents spaces in the current toolbar actions. -
defaultRenderer
Used to capture the normal cell renderer behaviors. -
editor
Used to determine the action ID to icon associations.
-
-
Constructor Details
-
IconCellRenderer
Associates this renderer with theMcvToolbarEditor
that created it.- Parameters:
editor
- Toolbar editor that contains relevant action ID to icon mapping.- Throws:
NullPointerException
- if a null McvToolbarEditor was given.
-
-
Method Details
-
getListCellRendererComponent
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) - Specified by:
getListCellRendererComponent
in interfaceListCellRenderer
-