Class CustomListCellRenderer
- java.lang.Object
-
- org.opends.guitools.controlpanel.ui.renderer.CustomListCellRenderer
-
- All Implemented Interfaces:
ListCellRenderer
- Direct Known Subclasses:
IndexCellRenderer,IndexComboBoxCellRenderer,NoLeftInsetCategoryComboBoxRenderer,SchemaElementComboBoxCellRenderer
public class CustomListCellRenderer extends Object implements ListCellRenderer
A renderer used in the Control Panel that deals with CategorizedComboBoxElement elements. It can be used to render JList and JComboBoxes.
-
-
Field Summary
Fields Modifier and Type Field Description protected FontdefaultFontThe default font.
-
Constructor Summary
Constructors Constructor Description CustomListCellRenderer(JComboBox combo)Constructor of a renderer to be used with a combo box.CustomListCellRenderer(JList list)Constructor of a renderer to be used with a list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentgetListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)protected StringgetStringValue(CategorizedComboBoxElement desc)Returns the String value for a given CategorizedComboBoxElement.
-
-
-
Field Detail
-
defaultFont
protected Font defaultFont
The default font.
-
-
Constructor Detail
-
CustomListCellRenderer
public CustomListCellRenderer(JComboBox combo)
Constructor of a renderer to be used with a combo box.- Parameters:
combo- the combo box containing the elements to be rendered.
-
CustomListCellRenderer
public CustomListCellRenderer(JList list)
Constructor of a renderer to be used with a list.- Parameters:
list- the list to be rendered.
-
-
Method Detail
-
getListCellRendererComponent
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
- Specified by:
getListCellRendererComponentin interfaceListCellRenderer
-
getStringValue
protected String getStringValue(CategorizedComboBoxElement desc)
Returns the String value for a given CategorizedComboBoxElement.- Parameters:
desc- the combo box element.- Returns:
- the String value for a given CategorizedComboBoxElement.
-
-