javax.swing.plaf.basic
public class BasicComboBoxRenderer extends JLabel implements ListCellRenderer, Serializable
Nested Class Summary | |
---|---|
static class | BasicComboBoxRenderer.UIResource
A subclass of {@link BasicComboBoxRenderer} that implements the
{@link javax.swing.plaf.UIResource} interface. |
Field Summary | |
---|---|
protected static Border | noFocusBorder
A shared border instance for all renderers. |
Constructor Summary | |
---|---|
BasicComboBoxRenderer()
Creates a new BasicComboBoxRenderer object. |
Method Summary | |
---|---|
Component | getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
Returns a component that has been configured to display the given
value .
|
Dimension | getPreferredSize()
Returns preferredSize of the renderer
|
BasicComboBoxRenderer
object.value
.
Parameters: list List of items for which to the background and foreground colors value object that should be rendered in the cell index index of the cell in the list of items. isSelected draw cell highlighted if isSelected is true cellHasFocus draw focus rectangle around cell if the cell has focus
Returns: Component that will be used to draw the desired cell.
Returns: preferredSize of the renderer