|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.plaf.ComponentUI javax.swing.plaf.ComboBoxUI javax.swing.plaf.basic.BasicComboBoxUI javax.swing.plaf.metal.MetalComboBoxUI
public class MetalComboBoxUI
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 XMLEncoder
.
MetalComboBoxEditor
,
MetalComboBoxButton
Nested Class Summary | |
---|---|
class |
MetalComboBoxUI.MetalComboBoxLayoutManager
This inner class is marked "public" due to a compiler bug. |
class |
MetalComboBoxUI.MetalComboPopup
Deprecated. As of Java 2 platform v1.4. |
class |
MetalComboBoxUI.MetalPropertyChangeListener
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 | |
---|---|
MetalComboBoxUI()
|
Method Summary | |
---|---|
void |
configureEditor()
This protected method is implementation specific and should be private. |
protected JButton |
createArrowButton()
Creates an button which will be used as the control to show or hide the popup portion of the combo box. |
protected ComboBoxEditor |
createEditor()
Creates the default editor that will be used in editable combo boxes. |
protected LayoutManager |
createLayoutManager()
Creates a layout manager for managing the components which make up the combo box. |
protected ComboPopup |
createPopup()
Creates the popup portion of the combo box. |
PropertyChangeListener |
createPropertyChangeListener()
Creates a PropertyChangeListener which will be added to
the combo box. |
static ComponentUI |
createUI(JComponent c)
|
protected void |
editablePropertyChanged(PropertyChangeEvent e)
Deprecated. As of Java 2 platform v1.4. |
Dimension |
getMinimumSize(JComponent c)
The minumum size is the size of the display area plus insets plus the button. |
void |
layoutComboBox(Container parent,
MetalComboBoxUI.MetalComboBoxLayoutManager manager)
|
void |
paint(Graphics g,
JComponent c)
Paints the specified component appropriate for the look and feel. |
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 |
removeListeners()
Deprecated. As of Java 2 platform v1.4. |
void |
unconfigureEditor()
This protected method is implementation specific and should be private. |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetalComboBoxUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent c)
public void paint(Graphics g, JComponent c)
ComponentUI
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.
paint
in class BasicComboBoxUI
g
- the Graphics
context in which to paintc
- the component being painted;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
paintCurrentValue
in class BasicComboBoxUI
g
- Graphics to paint tobounds
- Region to paint current value tohasFocus
- whether or not the JComboBox has focus
NullPointerException
- if any of the arguments are null.public void paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
paintCurrentValueBackground
in class BasicComboBoxUI
g
- Graphics to paint tobounds
- Region to paint background tohasFocus
- whether or not the JComboBox has focus
NullPointerException
- if any of the arguments are null.protected ComboBoxEditor createEditor()
BasicComboBoxUI
setEditor
.
createEditor
in class BasicComboBoxUI
ComboBoxEditor
used for the combo boxJComboBox.setEditor(javax.swing.ComboBoxEditor)
protected ComboPopup createPopup()
BasicComboBoxUI
createPopup
in class BasicComboBoxUI
ComboPopup
ComboPopup
protected JButton createArrowButton()
BasicComboBoxUI
createArrowButton
in class BasicComboBoxUI
public PropertyChangeListener createPropertyChangeListener()
BasicComboBoxUI
PropertyChangeListener
which will be added to
the combo box. If this method returns null then it will not
be added to the combo box.
createPropertyChangeListener
in class BasicComboBoxUI
PropertyChangeListener
or null@Deprecated protected void editablePropertyChanged(PropertyChangeEvent e)
protected LayoutManager createLayoutManager()
BasicComboBoxUI
createLayoutManager
in class BasicComboBoxUI
public void layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)
@Deprecated protected void removeListeners()
public void configureEditor()
BasicComboBoxUI
configureEditor
in class BasicComboBoxUI
BasicComboBoxUI.addEditor()
public void unconfigureEditor()
BasicComboBoxUI
unconfigureEditor
in class BasicComboBoxUI
BasicComboBoxUI.addEditor()
public Dimension getMinimumSize(JComponent c)
BasicComboBoxUI
getMinimumSize
in class BasicComboBoxUI
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
Dimension
object or null
JComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.