APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.swing.plaf.basic

public Class BasicComboBoxRenderer

extends JLabel
implements ListCellRenderer<Object>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.swing.ListCellRenderer
Known Direct Subclasses
javax.swing.plaf.basic.BasicComboBoxRenderer.UIResource
Annotations
@SuppressWarnings:serial
Imports
javax.swing.*, javax.swing.event.*, javax.swing.border.*, java.awt.*, java.io.Serializable

ComboBox renderer

Warning

Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see java.beans.XMLEncoder.

Author
Arnaud Weber

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
BasicComboBoxRenderer.UIResource

A subclass of BasicComboBoxRenderer that implements UIResource.

Field Summary

Modifier and TypeField and Description
protected static Border
noFocusBorder

An empty Border.

Inherited from javax.swing.JLabel:
labelFor

Constructor Summary

AccessConstructor and Description
public
BasicComboBoxRenderer()

Constructs a new instance of BasicComboBoxRenderer.

Method Summary

Modifier and TypeMethod and Description
public Component
getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)

Implements javax.swing.ListCellRenderer.getListCellRendererComponent.

Return a component that has been configured to display the specified value.

private static Border
public Dimension
getPreferredSize()

Overrides javax.swing.JComponent.getPreferredSize.

If the preferredSize has been set to a non-null value just returns it.

Inherited from javax.swing.JLabel:
checkHorizontalKeycheckVerticalKeygetAccessibleContextgetDisabledIcongetDisplayedMnemonicgetDisplayedMnemonicIndexgetHorizontalAlignmentgetHorizontalTextPositiongetIcongetIconTextGapgetLabelForgetTextgetUIgetUIClassIDgetVerticalAlignmentgetVerticalTextPositionimageUpdateparamStringsetDisabledIconsetDisplayedMnemonicsetDisplayedMnemonicsetDisplayedMnemonicIndexsetHorizontalAlignmentsetHorizontalTextPositionsetIconsetIconTextGapsetLabelForsetTextsetUIsetVerticalAlignmentsetVerticalTextPositionupdateUI

Field Detail

noFocusBorderback to summary
protected static Border noFocusBorder

An empty Border. This field might not be used. To change the Border used by this renderer directly set it using the setBorder method.

Constructor Detail

BasicComboBoxRendererback to summary
public BasicComboBoxRenderer()

Constructs a new instance of BasicComboBoxRenderer.

Method Detail

getListCellRendererComponentback to summary
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus)

Implements javax.swing.ListCellRenderer.getListCellRendererComponent.

Doc from javax.swing.ListCellRenderer.getListCellRendererComponent.

Return a component that has been configured to display the specified value. That component's paint method is then called to "render" the cell. If it is necessary to compute the dimensions of a list because the list cells do not have a fixed size, this method is called to generate a component on which getPreferredSize can be invoked.

Annotations
@Override
getNoFocusBorderback to summary
private static Border getNoFocusBorder()
getPreferredSizeback to summary
public Dimension getPreferredSize()

Overrides javax.swing.JComponent.getPreferredSize.

Doc from javax.swing.JComponent.getPreferredSize.

If the preferredSize has been set to a non-null value just returns it. If the UI delegate's getPreferredSize method returns a non null value then return that; otherwise defer to the component's layout manager.

javax.swing.plaf.basic back to summary

public Class BasicComboBoxRenderer.UIResource

extends BasicComboBoxRenderer
implements UIResource
Class Inheritance
All Implemented Interfaces
javax.swing.plaf.UIResource
Annotations
@SuppressWarnings:serial

A subclass of BasicComboBoxRenderer that implements UIResource. BasicComboBoxRenderer doesn't implement UIResource directly so that applications can safely override the cellRenderer property with BasicListCellRenderer subclasses.

Warning

Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see java.beans.XMLEncoder.

Field Summary

Inherited from javax.swing.plaf.basic.BasicComboBoxRenderer:
noFocusBorder

Constructor Summary

AccessConstructor and Description
public
UIResource()

Constructs a UIResource.

Method Summary

Inherited from javax.swing.plaf.basic.BasicComboBoxRenderer:
getListCellRendererComponentgetPreferredSize

Constructor Detail

UIResourceback to summary
public UIResource()

Constructs a UIResource.