java.lang.Objectjavax.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)
ComponentUIComponentUI.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 BasicComboBoxUIg - 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 BasicComboBoxUIg - 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 BasicComboBoxUIg - 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()
BasicComboBoxUIsetEditor.
createEditor in class BasicComboBoxUIComboBoxEditor used for the combo boxJComboBox.setEditor(javax.swing.ComboBoxEditor)protected ComboPopup createPopup()
BasicComboBoxUI
createPopup in class BasicComboBoxUIComboPopupComboPopupprotected JButton createArrowButton()
BasicComboBoxUI
createArrowButton in class BasicComboBoxUIpublic PropertyChangeListener createPropertyChangeListener()
BasicComboBoxUIPropertyChangeListener 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 BasicComboBoxUIPropertyChangeListener or null@Deprecated protected void editablePropertyChanged(PropertyChangeEvent e)
protected LayoutManager createLayoutManager()
BasicComboBoxUI
createLayoutManager in class BasicComboBoxUIpublic void layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)
@Deprecated protected void removeListeners()
public void configureEditor()
BasicComboBoxUI
configureEditor in class BasicComboBoxUIBasicComboBoxUI.addEditor()public void unconfigureEditor()
BasicComboBoxUI
unconfigureEditor in class BasicComboBoxUIBasicComboBoxUI.addEditor()public Dimension getMinimumSize(JComponent c)
BasicComboBoxUI
getMinimumSize in class BasicComboBoxUIc - 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 nullJComponent.getMinimumSize(),
LayoutManager.minimumLayoutSize(java.awt.Container),
ComponentUI.getPreferredSize(javax.swing.JComponent)Ces informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
8 mots clés dont 0 définis manuellement (plus d'information...).
Avertissement
Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)