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.PropertyChangeHandler
arrowButton, 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, uninstallUI
contains, update
public static ComponentUI createUI(JComponent c)
public void paint(Graphics g, JComponent c)
ComponentUI
ComponentUI.update
メソッドから呼び出されます。 サブクラスは、このメソッドをオーバーライドして、指定されたGraphics
オブジェクトを使ってコンポーネントの内容を描画するべきです。 paint
、クラスBasicComboBoxUI
g
- ペイント対象のGraphics
コンテキストc
- ペイントされるコンポーネント。この引数は通常無視されるが、UIオブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがあるComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
paintCurrentValue
、クラスBasicComboBoxUI
g
- ペイントされるGraphicsbounds
- 現在の値がペイントされるRegionhasFocus
- JComboBoxにフォーカスがあるかどうかNullPointerException
- 引数が1つでもnullの場合。public void paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
paintCurrentValueBackground
、クラスBasicComboBoxUI
g
- ペイントされるGraphicsbounds
- バックグラウンドがペイントされるRegionhasFocus
- JComboBoxにフォーカスがあるかどうかNullPointerException
- 引数が1つでもnullの場合。public int getBaseline(JComponent c, int width, int height)
getBaseline
、クラスBasicComboBoxUI
c
- ベースラインが要求されるJComponent
width
- ベースラインを取得する幅height
- ベースラインを取得する高さNullPointerException
- c
がnull
である場合IllegalArgumentException
- 幅または高さが0より小さい場合JComponent.getBaseline(int, int)
protected ComboBoxEditor createEditor()
BasicComboBoxUI
setEditor
で明示的に設定されていない場合だけ、デフォルト・エディタが使用されます。 createEditor
、クラスBasicComboBoxUI
ComboBoxEditor
JComboBox.setEditor(javax.swing.ComboBoxEditor)
protected ComboPopup createPopup()
BasicComboBoxUI
createPopup
、クラスBasicComboBoxUI
ComboPopup
のインスタンスComboPopup
protected JButton createArrowButton()
BasicComboBoxUI
createArrowButton
、クラスBasicComboBoxUI
public PropertyChangeListener createPropertyChangeListener()
BasicComboBoxUI
PropertyChangeListener
を作成します。 このメソッドがnullを返す場合、コンボボックスには追加されません。 createPropertyChangeListener
、クラスBasicComboBoxUI
PropertyChangeListener
のインスタンス、またはnull@Deprecated protected void editablePropertyChanged(PropertyChangeEvent e)
protected LayoutManager createLayoutManager()
BasicComboBoxUI
createLayoutManager
、クラスBasicComboBoxUI
public void layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)
@Deprecated protected void removeListeners()
public void configureEditor()
BasicComboBoxUI
configureEditor
、クラスBasicComboBoxUI
BasicComboBoxUI.addEditor()
public void unconfigureEditor()
BasicComboBoxUI
unconfigureEditor
、クラスBasicComboBoxUI
BasicComboBoxUI.addEditor()
public Dimension getMinimumSize(JComponent c)
BasicComboBoxUI
getMinimumSize
、クラスBasicComboBoxUI
c
- 最小サイズが照会されるコンポーネント。この引数は通常無視されるが、UIオブジェクトがステートレスで、複数のコンポーネントで共有されている場合は使用されることがあるDimension
オブジェクトまたはnull
JComponent.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も参照してください。