javax.swing.plaf.basic

Class BasicComboBoxUI.ComboBoxLayoutManager

public class BasicComboBoxUI.ComboBoxLayoutManager extends Object implements LayoutManager

A {@link LayoutManager} used to position the sub-components of the {@link JComboBox}.

See Also: createLayoutManager

Constructor Summary
ComboBoxLayoutManager()
Creates a new ComboBoxLayoutManager object.
Method Summary
voidaddLayoutComponent(String name, Component comp)
Adds a component to the layout.
voidlayoutContainer(Container parent)
Arranges the components in the container.
DimensionminimumLayoutSize(Container parent)
Returns the minimum layout size.
DimensionpreferredLayoutSize(Container parent)
Returns preferred layout size of the JComboBox.
voidremoveLayoutComponent(Component comp)
Removes a component from the layout.

Constructor Detail

ComboBoxLayoutManager

public ComboBoxLayoutManager()
Creates a new ComboBoxLayoutManager object.

Method Detail

addLayoutComponent

public void addLayoutComponent(String name, Component comp)
Adds a component to the layout. This method does nothing, since the layout manager doesn't need to track the components.

Parameters: name the name to associate the component with (ignored). comp the component (ignored).

layoutContainer

public void layoutContainer(Container parent)
Arranges the components in the container. It puts arrow button right end part of the comboBox. If the comboBox is editable then editor is placed to the left of arrow button, starting from the beginning.

Parameters: parent Container that should be layed out.

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Returns the minimum layout size.

Parameters: parent the container.

Returns: The minimum size.

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Returns preferred layout size of the JComboBox.

Parameters: parent the Container for which the preferred size should be calculated.

Returns: The preferred size for the given container

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes a component from the layout. This method does nothing, since the layout manager doesn't need to track the components.

Parameters: comp the component.