|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--javax.swing.plaf.ComponentUI | +--javax.swing.plaf.ComboBoxUI | +--javax.swing.plaf.basic.BasicComboBoxUI
JComboBox の基本的な UI です。このクラスは、JComboBox からコンポーネントを追加および削除します。矢印ボタンおよびエディタが、このオブジェクトによって管理されます。ポップアップメニューは、BasicComboPopup が扱います。BasicComboPopup は、このクラスを MouseListener、MouseMotionListener、および KeyListener とともに提供します。こうした各リスナーは、矢印ボタンおよび JComboBox にデフォルトで追加されます。BasicComboBoxUI のサブクラスは、リスナーを任意のコンポーネントに接続することができます。 installListeners() で、リスナーを JComboBox (とモデル) に追加します。configureEditor() で、リスナーをエディタに追加します。configureArrowButton() で、リスナーを矢印ボタンに追加します。 イベントを処理する内部クラスは、以下のとおりです。FocusHandler ItemHandler ListDataHandler PropertyChangeHandler KeyHandler
内部クラスの概要 | |
class |
BasicComboBoxUI.ComboBoxLayoutManager
このレイアウトマネージャは、コンボボックスの標準的なレイアウトを扱います。 |
class |
BasicComboBoxUI.FocusHandler
このリスナーは、フォーカスを失うときポップアップを隠します。 |
class |
BasicComboBoxUI.ItemHandler
このリスナーは、コンボボックスの選択内容の変更を監視して、現在選択されている項目の表示を更新します。 |
class |
BasicComboBoxUI.KeyHandler
このリスナーは、キーイベントがナビゲーションキーでないかどうかを調べます。 |
class |
BasicComboBoxUI.ListDataHandler
このリスナーは、データ内の変更を監視して検証をやり直します。 |
class |
BasicComboBoxUI.PropertyChangeHandler
このリスナーは、JComboBox 内で変更されたバウンドプロパティを監視します。 |
フィールドの概要 | |
protected JButton |
arrowButton
|
protected Dimension |
cachedMinimumSize
|
protected JComboBox |
comboBox
|
protected CellRendererPane |
currentValuePane
|
protected Component |
editor
|
protected FocusListener |
focusListener
|
protected boolean |
hasFocus
|
protected boolean |
isMinimumSizeDirty
|
protected ItemListener |
itemListener
|
protected KeyListener |
keyListener
|
protected JList |
listBox
|
protected ListDataListener |
listDataListener
|
protected ComboPopup |
popup
|
protected KeyListener |
popupKeyListener
|
protected MouseListener |
popupMouseListener
|
protected MouseMotionListener |
popupMouseMotionListener
|
protected PropertyChangeListener |
propertyChangeListener
|
コンストラクタの概要 | |
BasicComboBoxUI()
|
メソッドの概要 | |
void |
addEditor()
JComboBox にエディタを追加します。 |
void |
configureArrowButton()
矢印ボタンを構成します。 |
protected void |
configureEditor()
エディタを構成します。 |
protected JButton |
createArrowButton()
矢印ボタンを作成します。 |
protected ComboBoxEditor |
createEditor()
編集可能なコンボボックスで使うエディタを作成します。 |
protected FocusListener |
createFocusListener()
フォーカスを失ったときにポップアップを隠すフォーカスリスナーを作成します。 |
protected ItemListener |
createItemListener()
現在選択されているものの変更を監視して、表示を更新する項目リスナーを作成します。 |
protected KeyListener |
createKeyListener()
タイプ入力を扱うキーリスナーを作成します。 |
protected LayoutManager |
createLayoutManager()
右に矢印ボタン、左にエディタが配置された標準的なコンボボックスのレイアウトマネージャを作成します。 |
protected ListDataListener |
createListDataListener()
適切なサイズをキャッシュに格納するために使うリストデータリスナーを作成します。 |
protected ComboPopup |
createPopup()
ComboPopup インタフェースの実装を作成します。 |
protected PropertyChangeListener |
createPropertyChangeListener()
適切なサイズをキャッシュに格納するために使うリストデータリスナーを作成します。 |
protected ListCellRenderer |
createRenderer()
コンボボックスで使うレンダリングを作成します。 |
static ComponentUI |
createUI(JComponent c)
|
Accessible |
getAccessibleChild(JComponent c,
int i)
オブジェクト内の n 番目のユーザ補助機能を持つ子を返します。 |
int |
getAccessibleChildrenCount(JComponent c)
オブジェクト内のユーザ補助機能を実装する子の数を返します。 |
protected Dimension |
getDefaultSize()
空のコンボボックスのデフォルトサイズを返します。 |
protected Dimension |
getDisplaySize()
|
protected Insets |
getInsets()
JComboBox からインセットを取得します。 |
Dimension |
getMaximumSize(JComponent c)
|
Dimension |
getMinimumSize(JComponent c)
|
Dimension |
getPreferredSize(JComponent c)
|
protected void |
installComponents()
ここで、JComboBox にエディタおよび矢印ボタンが追加されます。 |
protected void |
installDefaults()
JComboBox に、デフォルトのカラー、フォント、レンダリング、およびエディタをインストールします。 |
protected void |
installKeyboardActions()
JComboBox にキーボードアクションを追加します。 |
protected void |
installListeners()
JComboBox および JComboBoxModel にリスナーを接続します。 |
void |
installUI(JComponent c)
|
boolean |
isFocusTraversable(JComboBox c)
JComboBox が、フォーカスのトラバースが可能であるかどうかを判定します。 |
protected boolean |
isNavigationKey(int keyCode)
提供された keyCode について、ナビゲーションに使うキーにマップするかどうかを返します。 |
boolean |
isPopupVisible(JComboBox c)
ポップアップが可視かどうかを判定します。 |
void |
paint(Graphics g,
JComponent c)
|
void |
paintCurrentValue(Graphics g,
Rectangle bounds,
boolean hasFocus)
現在選択されている項目を描画します。 |
void |
paintCurrentValueBackground(Graphics g,
Rectangle bounds,
boolean hasFocus)
現在選択されている項目のバックグラウンドを描画します。 |
protected Rectangle |
rectangleForCurrentValue()
現在選択されている項目を描画するために予約されている領域を返します。 |
void |
removeEditor()
JComboBox からエディタを削除します。 |
protected void |
selectNextPossibleValue()
リストから次の項目を選択します。 |
protected void |
selectPreviousPossibleValue()
リストから 1 つ前の項目を選択します。 |
void |
setPopupVisible(JComboBox c,
boolean v)
ポップアップを隠します。 |
protected void |
toggleOpenClose()
ポップアップが表示されている場合はそれを隠し、隠されている場合はそれを表示します。 |
void |
unconfigureArrowButton()
矢印ボタンからリスナーを削除して、矢印ボタンの構成を解除します。 |
protected void |
unconfigureEditor()
エディタからリスナーを削除して、エディタの構成を解除します。 |
protected void |
uninstallComponents()
ここで、JComboBox からエディタまたは矢印ボタン、あるいはその両方が削除されます。 |
protected void |
uninstallDefaults()
JComboBox から、デフォルトのカラー、フォント、レンダリング、およびエディタをアンインストールします。 |
protected void |
uninstallKeyboardActions()
フォーカス InputMap および ActionMap を削除します。 |
protected void |
uninstallListeners()
JComboBox および JComboBoxModel からリスナーを削除します。 |
void |
uninstallUI(JComponent c)
|
クラス javax.swing.plaf.ComponentUI から継承したメソッド |
contains, update |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
protected JComboBox comboBox
protected boolean hasFocus
protected JList listBox
protected CellRendererPane currentValuePane
protected ComboPopup popup
protected Component editor
protected JButton arrowButton
protected KeyListener keyListener
protected FocusListener focusListener
protected ItemListener itemListener
protected PropertyChangeListener propertyChangeListener
protected MouseListener popupMouseListener
protected MouseMotionListener popupMouseMotionListener
protected KeyListener popupKeyListener
protected ListDataListener listDataListener
protected boolean isMinimumSizeDirty
protected Dimension cachedMinimumSize
コンストラクタの詳細 |
public BasicComboBoxUI()
メソッドの詳細 |
public static ComponentUI createUI(JComponent c)
public void installUI(JComponent c)
ComponentUI
内の installUI
public void uninstallUI(JComponent c)
ComponentUI
内の uninstallUI
protected void installDefaults()
protected void installListeners()
protected void uninstallDefaults()
protected void uninstallListeners()
protected ComboPopup createPopup()
protected KeyListener createKeyListener()
protected FocusListener createFocusListener()
protected ListDataListener createListDataListener()
protected ItemListener createItemListener()
protected PropertyChangeListener createPropertyChangeListener()
protected LayoutManager createLayoutManager()
protected ListCellRenderer createRenderer()
protected ComboBoxEditor createEditor()
protected void installComponents()
protected void uninstallComponents()
public void addEditor()
public void removeEditor()
protected void configureEditor()
protected void unconfigureEditor()
public void configureArrowButton()
public void unconfigureArrowButton()
protected JButton createArrowButton()
public boolean isPopupVisible(JComboBox c)
ComboBoxUI
内の isPopupVisible
public void setPopupVisible(JComboBox c, boolean v)
ComboBoxUI
内の setPopupVisible
public boolean isFocusTraversable(JComboBox c)
ComboBoxUI
内の isFocusTraversable
public void paint(Graphics g, JComponent c)
ComponentUI
内の paint
public Dimension getPreferredSize(JComponent c)
ComponentUI
内の getPreferredSize
public Dimension getMinimumSize(JComponent c)
ComponentUI
内の getMinimumSize
public Dimension getMaximumSize(JComponent c)
ComponentUI
内の getMaximumSize
public int getAccessibleChildrenCount(JComponent c)
ComponentUI
の記述: ComponentUI
内の getAccessibleChildrenCount
javax.swing.plaf.ComponentUI
からコピーされたタグ:ComponentUI.getAccessibleChild(javax.swing.JComponent, int)
public Accessible getAccessibleChild(JComponent c, int i)
ComponentUI
の記述: ComponentUI
内の getAccessibleChild
javax.swing.plaf.ComponentUI
からコピーされたタグ:i
- 子のゼロから始まるインデックスComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
protected boolean isNavigationKey(int keyCode)
protected void selectNextPossibleValue()
protected void selectPreviousPossibleValue()
protected void toggleOpenClose()
protected Rectangle rectangleForCurrentValue()
protected Insets getInsets()
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
public void paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
protected Dimension getDefaultSize()
protected Dimension getDisplaySize()
protected void installKeyboardActions()
protected void uninstallKeyboardActions()
|
JavaTM 2 Platform Std. Ed. v1.3 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.