public class MetalComboBoxUI extends BasicComboBoxUI
警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4以降、すべてのJavaBeans™用の長期間の格納サポートがjava.beansパッケージに追加されています。 XMLEncoderを参照してください。
| 修飾子と型 | クラス | 説明 |
|---|---|---|
class |
MetalComboBoxUI.MetalComboBoxLayoutManager |
このクラスは、「protected」内部クラスとして扱うようにしてください。
|
class |
MetalComboBoxUI.MetalComboPopup |
非推奨。
Java 2プラットフォームv1.4以降使われていません。
|
class |
MetalComboBoxUI.MetalPropertyChangeListener |
このクラスは、「protected」内部クラスとして扱うようにしてください。
|
BasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandlerarrowButton, cachedMinimumSize, comboBox, currentValuePane, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, listBox, listDataListener, padding, popup, popupKeyListener, popupMouseListener, popupMouseMotionListener, propertyChangeListener, squareButton| コンストラクタ | 説明 |
|---|---|
MetalComboBoxUI() |
| 修飾子と型 | メソッド | 説明 |
|---|---|---|
void |
configureEditor() |
このprotectedメソッドは実装固有のもので、privateであるべきです。
|
protected JButton |
createArrowButton() |
コンボボックスのポップアップ部分の表示または非表示の制御に使用されるボタンを作成します。
|
protected ComboBoxEditor |
createEditor() |
編集可能なコンボボックスで使用されるデフォルト・エディタを作成します。
|
protected LayoutManager |
createLayoutManager() |
コンボボックスを構成するコンポーネントを管理するためのレイアウト・マネージャを作成します。
|
protected ComboPopup |
createPopup() |
コンボボックスのポップアップ部分を作成します。
|
PropertyChangeListener |
createPropertyChangeListener() |
コンボボックスに追加される
PropertyChangeListenerを作成します。 |
static ComponentUI |
createUI(JComponent c) |
|
protected void |
editablePropertyChanged(PropertyChangeEvent e) |
非推奨。
Java 2プラットフォームv1.4以降使われていません。
|
int |
getBaseline(JComponent c, int width, int height) |
ベースラインを返します。
|
Dimension |
getMinimumSize(JComponent c) |
最小サイズは、ディスプレイ領域、インセットおよびボタンを足したサイズです。
|
void |
layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager) |
|
void |
paint(Graphics g, JComponent c) |
指定されたコンポーネントをLook & Feelに合わせてペイントします。
|
void |
paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus) |
必要に応じて、現在選択されている項目をペイントします。
|
void |
paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus) |
必要に応じて、現在選択されている項目のバックグラウンドをペイントします。
|
protected void |
removeListeners() |
非推奨。
Java 2プラットフォームv1.4以降使われていません。
|
void |
unconfigureEditor() |
このprotectedメソッドは実装固有のもので、privateであるべきです。
|
addEditor, configureArrowButton, createFocusListener, createItemListener, createKeyListener, createListDataListener, createRenderer, getAccessibleChild, getAccessibleChildrenCount, getBaselineResizeBehavior, getDefaultSize, getDisplaySize, getInsets, getMaximumSize, getPreferredSize, getSizeForComponent, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, isFocusTraversable, isNavigationKey, isPopupVisible, rectangleForCurrentValue, removeEditor, selectNextPossibleValue, selectPreviousPossibleValue, setPopupVisible, toggleOpenClose, unconfigureArrowButton, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUIcontains, updatepublic static ComponentUI createUI(JComponent c)
public void paint(Graphics g, JComponent c)
ComponentUIComponentUI.updateメソッドから呼び出されます。 サブクラスは、このメソッドをオーバーライドして、指定されたGraphicsオブジェクトを使ってコンポーネントの内容を描画するべきです。 paint、クラスBasicComboBoxUIg - ペイント対象のGraphicsコンテキストc - ペイントされるコンポーネント。この引数は通常無視されるが、UIオブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがあるComponentUI.update(java.awt.Graphics, javax.swing.JComponent)public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
paintCurrentValue、クラスBasicComboBoxUIg - ペイントされるGraphicsbounds - 現在の値がペイントされるRegionhasFocus - JComboBoxにフォーカスがあるかどうかNullPointerException - 引数が1つでもnullの場合。public void paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
paintCurrentValueBackground、クラスBasicComboBoxUIg - ペイントされるGraphicsbounds - バックグラウンドがペイントされるRegionhasFocus - JComboBoxにフォーカスがあるかどうかNullPointerException - 引数が1つでもnullの場合。public int getBaseline(JComponent c, int width, int height)
getBaseline、クラスBasicComboBoxUIc - ベースラインが要求されるJComponentwidth - ベースラインを取得する幅height - ベースラインを取得する高さNullPointerException - cがnullである場合IllegalArgumentException - 幅または高さが0より小さい場合JComponent.getBaseline(int, int)protected ComboBoxEditor createEditor()
BasicComboBoxUIsetEditorで明示的に設定されていない場合だけ、デフォルト・エディタが使用されます。 createEditor、クラスBasicComboBoxUIComboBoxEditorJComboBox.setEditor(javax.swing.ComboBoxEditor)protected ComboPopup createPopup()
BasicComboBoxUIcreatePopup、クラスBasicComboBoxUIComboPopupのインスタンスComboPopupprotected JButton createArrowButton()
BasicComboBoxUIcreateArrowButton、クラスBasicComboBoxUIpublic PropertyChangeListener createPropertyChangeListener()
BasicComboBoxUIPropertyChangeListenerを作成します。 このメソッドがnullを返す場合、コンボボックスには追加されません。 createPropertyChangeListener、クラスBasicComboBoxUIPropertyChangeListenerのインスタンス、またはnull@Deprecated protected void editablePropertyChanged(PropertyChangeEvent e)
protected LayoutManager createLayoutManager()
BasicComboBoxUIcreateLayoutManager、クラスBasicComboBoxUIpublic void layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)
@Deprecated protected void removeListeners()
public void configureEditor()
BasicComboBoxUIconfigureEditor、クラスBasicComboBoxUIBasicComboBoxUI.addEditor()public void unconfigureEditor()
BasicComboBoxUIunconfigureEditor、クラスBasicComboBoxUIBasicComboBoxUI.addEditor()public Dimension getMinimumSize(JComponent c)
BasicComboBoxUIgetMinimumSize、クラスBasicComboBoxUIc - 最小サイズが照会されるコンポーネント。この引数は通常無視されるが、UIオブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがあるDimensionオブジェクトまたはnullJComponent.getMinimumSize(), LayoutManager.minimumLayoutSize(java.awt.Container), ComponentUI.getPreferredSize(javax.swing.JComponent) バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。