Class LabeledComboBoxRenderer
- java.lang.Object
-
- org.optaplanner.examples.common.swingui.components.LabeledComboBoxRenderer
-
- All Implemented Interfaces:
ListCellRenderer
public class LabeledComboBoxRenderer extends Object implements ListCellRenderer
Display the user-friendlyLabeled.getLabel()
instead of the developer-friendlyObject.toString()
.
-
-
Constructor Summary
Constructors Constructor Description LabeledComboBoxRenderer(ListCellRenderer originalListCellRenderer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
applyToComboBox(JComboBox comboBox)
Component
getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
-
-
-
Constructor Detail
-
LabeledComboBoxRenderer
public LabeledComboBoxRenderer(ListCellRenderer originalListCellRenderer)
-
-
Method Detail
-
applyToComboBox
public static void applyToComboBox(JComboBox comboBox)
-
getListCellRendererComponent
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
- Specified by:
getListCellRendererComponent
in interfaceListCellRenderer
-
-