APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.java.swing.plaf.motif

public Class MotifComboBoxUI

extends BasicComboBoxUI
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@SuppressWarnings:serial
Imports
java.awt.Color, .Component, .Container, .Dimension, .Graphics, .Insets, .LayoutManager, .Rectangle, java.awt.event.KeyListener, .MouseMotionAdapter, .MouseMotionListener, java.beans.PropertyChangeEvent, .PropertyChangeListener, java.io.Serializable, javax.swing.Icon, .JComboBox, .JComponent, .ListCellRenderer, .UIManager, javax.swing.border.Border, javax.swing.plaf.ComponentUI, javax.swing.plaf.basic.BasicComboBoxUI, .BasicComboPopup, .ComboPopup

ComboBox motif look and feel.
Author
Arnaud Weber

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class
MotifComboBoxUI.ComboBoxLayoutManager

This inner class is marked "public" due to a compiler bug.

pack-priv static class
protected class
MotifComboBoxUI.MotifComboPopup

Overridden to empty the MouseMotionListener.

private class
MotifComboBoxUI.MotifPropertyChangeListener

This class should be made "protected" in future releases.

Field Summary

Modifier and TypeField and Description
pack-priv Icon
pack-priv static final int
Inherited from javax.swing.plaf.basic.BasicComboBoxUI:
arrowButtoncachedMinimumSizecomboBoxcurrentValuePaneeditorfocusListenerhasFocusisMinimumSizeDirtyitemListenerkeyListenerlistBoxlistDataListenerpaddingpopuppopupKeyListenerpopupMouseListenerpopupMouseMotionListenerpropertyChangeListenersquareButton

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
configureEditor()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.configureEditor.

This protected method is implementation specific and should be private.

protected LayoutManager
createLayoutManager()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.createLayoutManager.

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

protected ComboPopup
createPopup()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.createPopup.

Creates the popup portion of the combo box.

protected PropertyChangeListener
createPropertyChangeListener()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.createPropertyChangeListener.

Creates a PropertyChangeListener which will be added to the combo box.

public static ComponentUI
createUI(JComponent c)

Hides javax.swing.plaf.basic.BasicComboBoxUI.createUI.

Constructs a new instance of BasicComboBoxUI.

public Dimension
getMinimumSize(JComponent c)

Overrides javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize.

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

public int
protected void
installComponents()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.installComponents.

Creates and initializes the components which make up the aggregate combo box.

public void
installUI(JComponent c)

Overrides javax.swing.plaf.basic.BasicComboBoxUI.installUI.

Configures the specified component appropriately for the look and feel.

private Component
public void
paint(Graphics g, JComponent c)

Overrides javax.swing.plaf.basic.BasicComboBoxUI.paint.

Paints the specified component appropriately for the look and feel.

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

Overrides javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValue.

Paints the currently selected item.

protected Rectangle
protected Rectangle
rectangleForCurrentValue()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.rectangleForCurrentValue.

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

protected void
uninstallComponents()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.uninstallComponents.

The aggregate components which comprise the combo box are unregistered and uninitialized.

Inherited from javax.swing.plaf.basic.BasicComboBoxUI:
addEditorconfigureArrowButtoncreateArrowButtoncreateEditorcreateFocusListenercreateItemListenercreateKeyListenercreateListDataListenercreateRenderergetAccessibleChildgetAccessibleChildrenCountgetBaselinegetBaselineResizeBehaviorgetDefaultSizegetDisplaySizegetInsetsgetMaximumSizegetPreferredSizegetSizeForComponentinstallDefaultsinstallKeyboardActionsinstallListenersisFocusTraversableisNavigationKeyisPopupVisiblepaintCurrentValueBackgroundremoveEditorselectNextPossibleValueselectPreviousPossibleValuesetPopupVisibletoggleOpenCloseunconfigureArrowButtonunconfigureEditoruninstallDefaultsuninstallKeyboardActionsuninstallListenersuninstallUI

Field Detail

arrowIconback to summary
pack-priv Icon arrowIcon
HORIZ_MARGINback to summary
pack-priv static final int HORIZ_MARGIN

Constructor Detail

MotifComboBoxUIback to summary
public MotifComboBoxUI()

Method Detail

configureEditorback to summary
public void configureEditor()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.configureEditor.

Doc from javax.swing.plaf.basic.BasicComboBoxUI.configureEditor.

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

Annotations
@Override
createLayoutManagerback to summary
protected LayoutManager createLayoutManager()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.createLayoutManager.

Doc from javax.swing.plaf.basic.BasicComboBoxUI.createLayoutManager.

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

Annotations
@Override
createPopupback to summary
protected ComboPopup createPopup()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.createPopup.

Doc from javax.swing.plaf.basic.BasicComboBoxUI.createPopup.

Creates the popup portion of the combo box.

Annotations
@Override
createPropertyChangeListenerback to summary
protected PropertyChangeListener createPropertyChangeListener()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.createPropertyChangeListener.

Doc from javax.swing.plaf.basic.BasicComboBoxUI.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.

Annotations
@Override
Since
1.6
createUIback to summary
public static ComponentUI createUI(JComponent c)

Hides javax.swing.plaf.basic.BasicComboBoxUI.createUI.

Doc from javax.swing.plaf.basic.BasicComboBoxUI.createUI.

Constructs a new instance of BasicComboBoxUI.

getMinimumSizeback to summary
public Dimension getMinimumSize(JComponent c)

Overrides javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize.

Doc from javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize.

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

Annotations
@Override
iconAreaWidthback to summary
public int iconAreaWidth()
installComponentsback to summary
protected void installComponents()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.installComponents.

Doc from javax.swing.plaf.basic.BasicComboBoxUI.installComponents.

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

Annotations
@Override
installUIback to summary
public void installUI(JComponent c)

Overrides javax.swing.plaf.basic.BasicComboBoxUI.installUI.

Doc from javax.swing.plaf.ComponentUI.installUI.

Configures the specified component appropriately 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 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.
Annotations
@Override
motifGetEditorback to summary
private Component motifGetEditor()
paintback to summary
public void paint(Graphics g, JComponent c)

Overrides javax.swing.plaf.basic.BasicComboBoxUI.paint.

Doc from javax.swing.plaf.ComponentUI.paint.

Paints the specified component appropriately 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.

Annotations
@Override
paintCurrentValueback to summary
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)

Overrides javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValue.

Doc from javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValue.

Paints the currently selected item.

Annotations
@Override
rectangleForArrowIconback to summary
protected Rectangle rectangleForArrowIcon()
rectangleForCurrentValueback to summary
protected Rectangle rectangleForCurrentValue()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.rectangleForCurrentValue.

Doc from javax.swing.plaf.basic.BasicComboBoxUI.rectangleForCurrentValue.

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

Annotations
@Override
uninstallComponentsback to summary
protected void uninstallComponents()

Overrides javax.swing.plaf.basic.BasicComboBoxUI.uninstallComponents.

Doc from javax.swing.plaf.basic.BasicComboBoxUI.uninstallComponents.

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

Annotations
@Override
com.sun.java.swing.plaf.motif back to summary

public Class MotifComboBoxUI.ComboBoxLayoutManager

extends ComboBoxLayoutManager
Class Inheritance

This inner class is marked "public" due to a compiler bug. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of <FooUI>.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager:
addLayoutComponentminimumLayoutSizepreferredLayoutSizeremoveLayoutComponent

Constructor Detail

ComboBoxLayoutManagerback to summary
public ComboBoxLayoutManager()

Method Detail

layoutContainerback to summary
public void layoutContainer(Container parent)

Overrides javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager.layoutContainer.

Implements java.awt.LayoutManager.layoutContainer.

Doc from java.awt.LayoutManager.layoutContainer.

Lays out the specified container.

Annotations
@Override
com.sun.java.swing.plaf.motif back to summary

pack-priv Class MotifComboBoxUI.MotifComboBoxArrowIcon

extends Object
implements Icon, Serializable
Class Inheritance
  • java.lang.Object
  • com.sun.java.swing.plaf.motif.MotifComboBoxUI.MotifComboBoxArrowIcon
All Implemented Interfaces
java.io.Serializable, javax.swing.Icon
Annotations
@SuppressWarnings:serial

Field Summary

Modifier and TypeField and Description
private Color
private Color
private Color

Constructor Summary

AccessConstructor and Description
public
MotifComboBoxArrowIcon(Color lightShadow, Color darkShadow, Color fill)

Method Summary

Modifier and TypeMethod and Description
public int
getIconHeight()

Implements javax.swing.Icon.getIconHeight.

Returns the icon's height.

public int
getIconWidth()

Implements javax.swing.Icon.getIconWidth.

Returns the icon's width.

public void
paintIcon(Component c, Graphics g, int xo, int yo)

Implements javax.swing.Icon.paintIcon.

Draw the icon at the specified location.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

darkShadowback to summary
private Color darkShadow
fillback to summary
private Color fill
lightShadowback to summary
private Color lightShadow

Constructor Detail

MotifComboBoxArrowIconback to summary
public MotifComboBoxArrowIcon(Color lightShadow, Color darkShadow, Color fill)

Method Detail

getIconHeightback to summary
public int getIconHeight()

Implements javax.swing.Icon.getIconHeight.

Doc from javax.swing.Icon.getIconHeight.

Returns the icon's height.

Annotations
@Override
getIconWidthback to summary
public int getIconWidth()

Implements javax.swing.Icon.getIconWidth.

Doc from javax.swing.Icon.getIconWidth.

Returns the icon's width.

Annotations
@Override
paintIconback to summary
public void paintIcon(Component c, Graphics g, int xo, int yo)

Implements javax.swing.Icon.paintIcon.

Doc from javax.swing.Icon.paintIcon.

Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.

Annotations
@Override
com.sun.java.swing.plaf.motif back to summary

protected Class MotifComboBoxUI.MotifComboPopup

extends BasicComboPopup
Class Inheritance
Annotations
@SuppressWarnings:serial

Overridden to empty the MouseMotionListener.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class

Field Summary

Inherited from javax.swing.plaf.basic.BasicComboPopup:
autoscrollTimercomboBoxhasEnteredisAutoScrollingitemListenerkeyListenerlistlistDataListenerlistMouseListenerlistMouseMotionListenerlistSelectionListenermouseListenermouseMotionListenerpropertyChangeListenerSCROLL_DOWNSCROLL_UPscrollDirectionscrollervalueIsAdjusting

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public KeyListener
createKeyListener()

Overrides javax.swing.plaf.basic.BasicComboPopup.createKeyListener.

Creates the key listener that will be added to the combo box.

public MouseMotionListener
createListMouseMotionListener()

Overrides javax.swing.plaf.basic.BasicComboPopup.createListMouseMotionListener.

Motif combo popup should not track the mouse in the list.

Inherited from javax.swing.plaf.basic.BasicComboPopup:
autoScrollDownautoScrollUpcomputePopupBoundsconfigureListconfigurePopupconfigureScrollerconvertMouseEventcreateItemListenercreateListcreateListDataListenercreateListMouseListenercreateListSelectionListenercreateMouseListenercreateMouseMotionListenercreatePropertyChangeListenercreateScrollerdelegateFocusfirePopupMenuCanceledfirePopupMenuWillBecomeInvisiblefirePopupMenuWillBecomeVisiblegetAccessibleContextgetKeyListenergetListgetMouseListenergetMouseMotionListenergetPopupHeightForRowCounthideinstallComboBoxListenersinstallComboBoxModelListenersinstallKeyboardActionsinstallListListenersisFocusTraversableshowstartAutoScrollingstopAutoScrollingtogglePopupuninstallComboBoxModelListenersuninstallingUIuninstallKeyboardActionsupdateListBoxSelectionForEvent

Constructor Detail

MotifComboPopupback to summary
public MotifComboPopup(JComboBox<Object> comboBox)

Method Detail

createKeyListenerback to summary
public KeyListener createKeyListener()

Overrides javax.swing.plaf.basic.BasicComboPopup.createKeyListener.

Doc from javax.swing.plaf.basic.BasicComboPopup.createKeyListener.

Creates the key listener that will be added to the combo box. If this method returns null then it will not be added to the combo box.

Annotations
@Override
createListMouseMotionListenerback to summary
public MouseMotionListener createListMouseMotionListener()

Overrides javax.swing.plaf.basic.BasicComboPopup.createListMouseMotionListener.

Motif combo popup should not track the mouse in the list.

Annotations
@Override
com.sun.java.swing.plaf.motif back to summary

protected Class MotifComboBoxUI.MotifComboPopup.InvocationKeyHandler

extends InvocationKeyHandler
Class Inheritance

Constructor Summary

AccessConstructor and Description
protected

Constructor Detail

InvocationKeyHandlerback to summary
protected InvocationKeyHandler()
com.sun.java.swing.plaf.motif back to summary

private Class MotifComboBoxUI.MotifPropertyChangeListener

extends PropertyChangeHandler
Class Inheritance

This class should be made "protected" in future releases.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void

Constructor Detail

MotifPropertyChangeListenerback to summary
private MotifPropertyChangeListener()

Method Detail

propertyChangeback to summary
public void propertyChange(PropertyChangeEvent e)

Overrides javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler.propertyChange.

Implements java.beans.PropertyChangeListener.propertyChange.

Doc from java.beans.PropertyChangeListener.propertyChange.

This method gets called when a bound property is changed.

Annotations
@Override