public class

MotifComboBoxUI

extends BasicComboBoxUI
implements Serializable
java.lang.Object
   ↳ javax.swing.plaf.ComponentUI
     ↳ javax.swing.plaf.ComboBoxUI
       ↳ javax.swing.plaf.basic.BasicComboBoxUI
         ↳ com.sun.java.swing.plaf.motif.MotifComboBoxUI

Class Overview

ComboBox motif look and feel

* 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. A future release of Swing will provide support for long term persistence.

Summary

Nested Classes
class MotifComboBoxUI.ComboBoxLayoutManager This inner class is marked "public" due to a compiler bug. 
class MotifComboBoxUI.MotifComboPopup Overriden to empty the MouseMotionListener. 
[Expand]
Inherited Fields
From class javax.swing.plaf.basic.BasicComboBoxUI
Public Constructors
MotifComboBoxUI()
Public Methods
void configureEditor()
This protected method is implementation specific and should be private.
static ComponentUI createUI(JComponent c)
Dimension getMinimumSize(JComponent c)
The minumum size is the size of the display area plus insets plus the button.
int iconAreaWidth()
void installUI(JComponent c)
Configures the specified component appropriate for the look and feel.
void paint(Graphics g, JComponent c)
Paints the specified component appropriate for the look and feel.
void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
Paints the currently selected item.
Protected Methods
LayoutManager createLayoutManager()
Creates a layout manager for managing the components which make up the combo box.
ComboPopup createPopup()
Creates the popup portion of the combo box.
PropertyChangeListener createPropertyChangeListener()
Creates a PropertyChangeListener which will be added to the combo box.
void installComponents()
Creates and initializes the components which make up the aggregate combo box.
Rectangle rectangleForArrowIcon()
Rectangle rectangleForCurrentValue()
Returns the area that is reserved for drawing the currently selected item.
void uninstallComponents()
The aggregate components which compise the combo box are unregistered and uninitialized.
[Expand]
Inherited Methods
From class javax.swing.plaf.basic.BasicComboBoxUI
From class javax.swing.plaf.ComboBoxUI
From class javax.swing.plaf.ComponentUI
From class java.lang.Object

Public Constructors

public MotifComboBoxUI ()

Public Methods

public void configureEditor ()

This protected method is implementation specific and should be private. do not call or override.

public static ComponentUI createUI (JComponent c)

public Dimension getMinimumSize (JComponent c)

The minumum size is the size of the display area plus insets plus the button.

Parameters
c the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns
  • a Dimension object or null

public int iconAreaWidth ()

public void installUI (JComponent c)

Configures the specified component appropriate for the look and feel. This method is invoked when the ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:

  1. Install any default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
  2. Install a LayoutManager on the component if necessary.
  3. Create/add any required sub-components to the component.
  4. Create/install event listeners on the component.
  5. Create/install a PropertyChangeListener on the component in order to detect and respond to component property changes appropriately.
  6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
  7. Initialize any appropriate instance data.

Parameters
c the component where this UI delegate is being installed

public void paint (Graphics g, JComponent c)

Paints the specified component appropriate for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.

Parameters
g the Graphics context in which to paint
c the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components

public void paintCurrentValue (Graphics g, Rectangle bounds, boolean hasFocus)

Paints the currently selected item.

Protected Methods

protected LayoutManager createLayoutManager ()

Creates a layout manager for managing the components which make up the combo box.

Returns
  • an instance of a layout manager

protected ComboPopup createPopup ()

Creates the popup portion of the combo box.

Returns
  • an instance of ComboPopup

protected PropertyChangeListener createPropertyChangeListener ()

Creates a PropertyChangeListener which will be added to the combo box. If this method returns null then it will not be added to the combo box.

Returns
  • an instance of a PropertyChangeListener or null

protected void installComponents ()

Creates and initializes the components which make up the aggregate combo box. This method is called as part of the UI installation process.

protected Rectangle rectangleForArrowIcon ()

protected Rectangle rectangleForCurrentValue ()

Returns the area that is reserved for drawing the currently selected item.

protected void uninstallComponents ()

The aggregate components which compise the combo box are unregistered and uninitialized. This method is called as part of the UI uninstallation process.