util.ui.customizableitems

## Class SelectableItemRenderer

- java.lang.Object
- - util.ui.customizableitems.SelectableItemRenderer

- All Implemented Interfaces:
    javax.swing.ListCellRenderer

      public class SelectableItemRenderer
      extends java.lang.Object
      implements javax.swing.ListCellRenderer

  A ListCellRenderer for SelectableItems.
  Author:
    René Mach

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SelectableItemRenderer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.swing.JPanel` | `getListCellComponent(javax.swing.JList list, java.lang.Object value, int index, boolean isSelected, boolean cellHasFocus)`
    `java.awt.Component` | `getListCellRendererComponent(javax.swing.JList list, java.lang.Object value, int index, boolean isSelected, boolean cellHasFocus)`
    `int` | `getSelectionWidth()`
    `void` | `setCenterRendererComponent(java.lang.Class<?> clazz, SelectableItemRendererCenterComponentIf component)` Sets the render component that is to be used for the given class or it's super class.
    `void` | `setEnabled(boolean value)`
    `protected void` | `setScrollPane(javax.swing.JScrollPane parentScrollPane)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SelectableItemRenderer

          public SelectableItemRenderer()

  - ### Method Detail

    - #### getListCellComponent

          public javax.swing.JPanel getListCellComponent(javax.swing.JList list,
                                                java.lang.Object value,
                                                int index,
                                                boolean isSelected,
                                                boolean cellHasFocus)

    - #### setEnabled

          public void setEnabled(boolean value)

      Parameters:
        `value` - If the renderer should be enabled

    - #### getSelectionWidth

          public int getSelectionWidth()

      Returns:
        The selection width.

    - #### setCenterRendererComponent

          public void setCenterRendererComponent(java.lang.Class<?> clazz,
                                        SelectableItemRendererCenterComponentIf component)

      Sets the render component that is to be used for the given class or it's super class.

      Parameters:
        `clazz` - The class to use the render component for, the render component is also used for the super class of clazz.
        `component` - The render component.
      Since:
        2.7

    - #### setScrollPane

          protected void setScrollPane(javax.swing.JScrollPane parentScrollPane)

    - #### getListCellRendererComponent

          public java.awt.Component getListCellRendererComponent(javax.swing.JList list,
                                                        java.lang.Object value,
                                                        int index,
                                                        boolean isSelected,
                                                        boolean cellHasFocus)

      Specified by:
        `getListCellRendererComponent` in interface `javax.swing.ListCellRenderer`

TV-Browser 3.4.3, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)