javax.swing.plaf.basic
Class BasicComboBoxUI.ComboBoxLayoutManager

java.lang.Object
  extended by javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager
All Implemented Interfaces:
LayoutManager
Direct Known Subclasses:
MetalComboBoxUI.MetalComboBoxLayoutManager
Enclosing class:
BasicComboBoxUI

public class BasicComboBoxUI.ComboBoxLayoutManager
extends Object
implements LayoutManager

A LayoutManager used to position the sub-components of the JComboBox.

See Also:
BasicComboBoxUI.createLayoutManager()

Constructor Summary
BasicComboBoxUI.ComboBoxLayoutManager()
          Creates a new ComboBoxLayoutManager object.
 
Method Summary
 void addLayoutComponent(String name, Component comp)
          Adds a component to the layout.
 void layoutContainer(Container parent)
          Arranges the components in the container.
 Dimension minimumLayoutSize(Container parent)
          Returns the minimum layout size.
 Dimension preferredLayoutSize(Container parent)
          Returns preferred layout size of the JComboBox.
 void removeLayoutComponent(Component comp)
          Removes a component from the layout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicComboBoxUI.ComboBoxLayoutManager

public BasicComboBoxUI.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.

Specified by:
addLayoutComponent in interface LayoutManager
Parameters:
name - the name to associate the component with (ignored).
comp - the component (ignored).

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.

Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
comp - the component.

preferredLayoutSize

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

Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
parent - the Container for which the preferred size should be calculated.
Returns:
The preferred size for the given container
See Also:
LayoutManager.minimumLayoutSize(Container)

minimumLayoutSize

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

Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
parent - the container.
Returns:
The minimum size.
See Also:
LayoutManager.preferredLayoutSize(Container)

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.

Specified by:
layoutContainer in interface LayoutManager
Parameters:
parent - Container that should be layed out.