This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.plaf.metal
class MetalComboBoxUI

java.lang.Object extended by javax.swing.plaf.ComponentUI extended by javax.swing.plaf.ComboBoxUI extended by javax.swing.plaf.basic.BasicComboBoxUI extended by javax.swing.plaf.metal.MetalComboBoxUI

public class MetalComboBoxUI
extends BasicComboBoxUI

Metal UI for JComboBox

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 JavaBeansTM has been added to the java.beans package. Please see {@link java.beans.XMLEncoder}.


Nested Class Summary
 class

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

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

           This inner class is marked "public" due to a compiler bug.
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicComboBoxUI
BasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandler
   
Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicComboBoxUI
arrowButton, cachedMinimumSize, comboBox, currentValuePane, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, listBox, listDataListener, popup, popupKeyListener, popupMouseListener, popupMouseMotionListener, propertyChangeListener
 
Constructor Summary

          
 
Method Summary
 void

          This protected method is implementation specific and should be private.
protected JButton

          Creates an button which will be used as the control to show or hide the popup portion of the combo box.
protected ComboBoxEditor

          Creates the default editor that will be used in editable combo boxes.
protected LayoutManager

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

          Creates the popup portion of the combo box.
 PropertyChangeListener

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

          
protected void

          As of Java 2 platform v1.4 this method is no longer used.
 int
getBaseline(JComponent c, int width, int height)

          Returns the baseline.
 Dimension

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

          
 void

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

          If necessary paints the currently selected item.
 void
paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)

          If necessary paints the background of the currently selected item.
protected void

          As of Java 2 platform v1.4 this method is no longer used.
 void

          This protected method is implementation specific and should be private.
 
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxUI
addEditor, configureArrowButton, configureEditor, createArrowButton, createEditor, createFocusListener, createItemListener, createKeyListener, createLayoutManager, createListDataListener, createPopup, createPropertyChangeListener, createRenderer, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getDefaultSize, getDisplaySize, getInsets, getMaximumSize, getMinimumSize, getPreferredSize, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, isFocusTraversable, isNavigationKey, isPopupVisible, paint, paintCurrentValue, paintCurrentValueBackground, rectangleForCurrentValue, removeEditor, selectNextPossibleValue, selectPreviousPossibleValue, setPopupVisible, toggleOpenClose, unconfigureArrowButton, unconfigureEditor, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComboBoxUI
isFocusTraversable, isPopupVisible, setPopupVisible
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetalComboBoxUI

public MetalComboBoxUI()
Method Detail

configureEditor

public void configureEditor()
Overrides:
configureEditor in class BasicComboBoxUI

createArrowButton

protected JButton createArrowButton()
Overrides:
createArrowButton in class BasicComboBoxUI

createEditor

protected ComboBoxEditor createEditor()
Overrides:
createEditor in class BasicComboBoxUI

createLayoutManager

protected LayoutManager createLayoutManager()
Overrides:
createLayoutManager in class BasicComboBoxUI

createPopup

protected ComboPopup createPopup()
Overrides:
createPopup in class BasicComboBoxUI

createPropertyChangeListener

public PropertyChangeListener createPropertyChangeListener()
Overrides:
createPropertyChangeListener in class BasicComboBoxUI

createUI

public static ComponentUI createUI(JComponent c)
Parameters:
c

editablePropertyChanged

protected void editablePropertyChanged(PropertyChangeEvent e)
As of Java 2 platform v1.4 this method is no longer used. Do not call or override. All the functionality of this method is in the MetalPropertyChangeListener.

Parameters:
e

getBaseline

public int getBaseline(JComponent c,
                       int width,
                       int height)
Returns the baseline.

Overrides:
getBaseline in class BasicComboBoxUI
Parameters:
c
width
height

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Overrides:
getMinimumSize in class BasicComboBoxUI
Parameters:
c

layoutComboBox

public void layoutComboBox(Container parent,
                           MetalComboBoxUI.MetalComboBoxLayoutManager manager)
Parameters:
parent
manager

paint

public void paint(Graphics g,
                  JComponent c)
Overrides:
paint in class BasicComboBoxUI
Parameters:
g
c

paintCurrentValue

public void paintCurrentValue(Graphics g,
                              Rectangle bounds,
                              boolean hasFocus)
If necessary paints the currently selected item.

Overrides:
paintCurrentValue in class BasicComboBoxUI
Parameters:
g - Graphics to paint to
bounds - Region to paint current value to
hasFocus - whether or not the JComboBox has focus

paintCurrentValueBackground

public void paintCurrentValueBackground(Graphics g,
                                        Rectangle bounds,
                                        boolean hasFocus)
If necessary paints the background of the currently selected item.

Overrides:
paintCurrentValueBackground in class BasicComboBoxUI
Parameters:
g - Graphics to paint to
bounds - Region to paint background to
hasFocus - whether or not the JComboBox has focus

removeListeners

protected void removeListeners()
As of Java 2 platform v1.4 this method is no longer used.


unconfigureEditor

public void unconfigureEditor()
Overrides:
unconfigureEditor in class BasicComboBoxUI


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.