|
Java プラットフォーム 1.2 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPopupMenu | +--javax.swing.plaf.basic.BasicComboPopup
ComboPopup インタフェースの実装です。主に、BasicComboBoxUI およびそのサブクラスが使うためのものです。BasicComboPopup は JPopupMenu を拡張します。これは、ほとんどのコンボボックスが、ポップアップメニューを使って選択肢のリストを表示するためです。BasicComboBoxUI は ComboPopup だけを必要とするので、BasicComboBoxUI のサブクラスはこのクラスを使わなくてもかまいません。 すべてのイベント処理は、createxxxListener() の各メソッド、および内部クラスが扱います。このクラスの動作を変更するには、createxxxListener() の各メソッドをオーバーライドした上で、独自のイベントリスナーを提供するか、このクラスで提供されたイベントリスナーからサブクラス化します。
イベントを扱うための内部クラスは、次のとおりです。 InvocationMouseHandler InvocationMouseMotionHandler InvocationKeyHandler ListSelectionHandler ListDataHandler ListMouseHandler ListMouseMotionHandler PropertyChangeHandler ItemHandler
警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。今後の Swing リリースでは、長期間の持続性をサポートする予定です
内部クラスの概要 | |
class |
BasicComboPopup.InvocationKeyHandler
このリスナーはスペースバーの押下を監視して、必要に応じてポップアップを表示したり隠したりします。 |
protected class |
BasicComboPopup.InvocationMouseHandler
このリスナーは、このポップアップメニューをいつ、どのようにして呼び出すかを認識しています。 |
protected class |
BasicComboPopup.InvocationMouseMotionHandler
このリスナーは、マウスのドラッグを監視して、リスト上でのドラッグであればリストの現在の選択範囲を更新します。 |
protected class |
BasicComboPopup.ItemHandler
このリスナーは、JComboBox の選択範囲の変化を監視します。 |
class |
BasicComboPopup.ListDataHandler
リスト内の選択されたインデックスを、コンボボックスでの選択と同期して保持します。 |
protected class |
BasicComboPopup.ListMouseHandler
このリスナーは、リスト内でマウスが離されたときにポップアップを隠します。 |
protected class |
BasicComboPopup.ListMouseMotionHandler
このリスナーは、リスト上でのマウスの移動に応じて、選択された項目を変更します。 |
protected class |
BasicComboPopup.ListSelectionHandler
このリスナーは、リストの選択内の変更を監視して、その変更をコンボボックスに報告します。 |
protected class |
BasicComboPopup.PropertyChangeHandler
このリスナーは、JComboBox のバウンドプロパティの変化を監視します。 |
クラス javax.swing.JPopupMenu から継承した内部クラス |
JPopupMenu.AccessibleJPopupMenu,
JPopupMenu.Separator |
クラス javax.swing.JComponent から継承した内部クラス |
JComponent.AccessibleJComponent |
フィールドの概要 | |
protected Timer |
autoscrollTimer
|
protected JComboBox |
comboBox
|
protected boolean |
hasEntered
|
protected boolean |
isAutoScrolling
|
protected ItemListener |
itemListener
|
protected KeyListener |
keyListener
|
protected JList |
list
|
protected ListDataListener |
listDataListener
|
protected MouseListener |
listMouseListener
|
protected MouseMotionListener |
listMouseMotionListener
|
protected ListSelectionListener |
listSelectionListener
|
protected MouseListener |
mouseListener
|
protected MouseMotionListener |
mouseMotionListener
|
protected PropertyChangeListener |
propertyChangeListener
|
protected static int |
SCROLL_DOWN
|
protected static int |
SCROLL_UP
|
protected int |
scrollDirection
|
protected JScrollPane |
scroller
|
protected boolean |
valueIsAdjusting
|
クラス javax.swing.JComponent から継承したフィールド |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
クラス java.awt.Component から継承したフィールド |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
コンストラクタの概要 | |
BasicComboPopup(JComboBox combo)
|
メソッドの概要 | |
protected void |
autoScrollDown()
|
protected void |
autoScrollUp()
|
protected Rectangle |
computePopupBounds(int px,
int py,
int pw,
int ph)
|
protected void |
configureList()
createList() で作成されたリストを構成するために呼び出されます。 |
protected void |
configurePopup()
この JPopupMenu を構成するために呼び出されます (BasicComboPopup は JPopupMenu)。 |
protected void |
configureScroller()
createScroller() で作成された JScrollPane を構成するために呼び出されます。 |
protected MouseEvent |
convertMouseEvent(MouseEvent e)
|
protected ItemListener |
createItemListener()
JComboBox で選択された項目の変更を監視する項目リスナーを作成します。 |
protected KeyListener |
createKeyListener()
ComboPopup.getKeyListener() で返されるキーリスナーを作成します。 |
protected JList |
createList()
モデル内の項目を表示するためにポップアップで使用される JList を作成します。 |
protected ListDataListener |
createListDataListener()
コンボボックスモデルについて挿入または削除された項目を監視するリストデータリスナーを作成します。 |
protected MouseListener |
createListMouseListener()
ポップアップのリストでのマウスイベントを監視するマウスリスナーを作成します。 |
protected MouseMotionListener |
createListMouseMotionListener()
ポップアップのリストでのマウスイベントを監視するマウスモーションリスナーを作成します。 |
protected ListSelectionListener |
createListSelectionListener()
ポップアップのリストでの選択の変更を監視するリスト選択リスナーを作成します。 |
protected MouseListener |
createMouseListener()
ComboPopup.getMouseListener() で返されるマウスリスナーを作成します。 |
protected MouseMotionListener |
createMouseMotionListener()
ComboPopup.getMouseMotionListener() で返されるマウスモーションリスナーを作成します。 |
protected PropertyChangeListener |
createPropertyChangeListener()
JComboBox のバウンドプロパティの変更を監視するプロパティ変更リスナーを作成します。 |
protected JScrollPane |
createScroller()
リストを保持するためにポップアップで使用される JScrollPane を作成します。 |
protected void |
delegateFocus(MouseEvent e)
ポップアップが開くときに、フォーカスの送り先をイベントハンドラが決定するのを補助するユーティリティメソッドです。 |
KeyListener |
getKeyListener()
ComboPopup.getKeyListener() の実装です。 |
JList |
getList()
ComboPopup.getList() の実装です。 |
MouseListener |
getMouseListener()
ComboPopup.getMouseListener() の実装です。 |
MouseMotionListener |
getMouseMotionListener()
ComboPopup.getMouseMotionListener() の実装です。 |
protected int |
getPopupHeightForRowCount(int maxRowCount)
|
void |
hide()
ComboPopup.hide() の実装です。 |
protected void |
installComboBoxListeners()
JComboBox に必要なリスナーを追加します。 |
protected void |
installComboBoxModelListeners(ComboBoxModel model)
|
protected void |
installKeyboardActions()
|
protected void |
installListListeners()
configureList() で呼び出され、必要なリスナーをリストに追加します。 |
boolean |
isFocusTraversable()
無条件で false を返すためにオーバーライドされます。 |
void |
show()
ComboPopup.show() の実装です。 |
protected void |
startAutoScrolling(int direction)
リストの自動スクロールを扱うために、BasicComboPopup$InvocationMouseMotionHandler によって呼び出されます。 |
protected void |
stopAutoScrolling()
|
protected void |
togglePopup()
ポップアップが隠されていればはポップアップを可視にし、可視であればポップアップを隠します。 |
protected void |
uninstallComboBoxModelListeners(ComboBoxModel model)
|
void |
uninstallingUI()
UI がアンインストールしているときに呼び出されます。 |
protected void |
uninstallKeyboardActions()
|
protected void |
updateListBoxSelectionForEvent(MouseEvent anEvent,
boolean shouldScroll)
イベントリスナーが使うユーティリティメソッドです。 |
クラス java.lang.Object から継承したメソッド |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
フィールドの詳細 |
protected JComboBox comboBox
protected JList list
protected JScrollPane scroller
protected boolean valueIsAdjusting
protected MouseMotionListener mouseMotionListener
protected MouseListener mouseListener
protected KeyListener keyListener
protected ListSelectionListener listSelectionListener
protected ListDataListener listDataListener
protected MouseListener listMouseListener
protected MouseMotionListener listMouseMotionListener
protected PropertyChangeListener propertyChangeListener
protected ItemListener itemListener
protected Timer autoscrollTimer
protected boolean hasEntered
protected boolean isAutoScrolling
protected int scrollDirection
protected static final int SCROLL_UP
protected static final int SCROLL_DOWN
コンストラクタの詳細 |
public BasicComboPopup(JComboBox combo)
メソッドの詳細 |
public void show()
public void hide()
public JList getList()
public MouseListener getMouseListener()
public MouseMotionListener getMouseMotionListener()
public KeyListener getKeyListener()
public void uninstallingUI()
protected void uninstallComboBoxModelListeners(ComboBoxModel model)
protected void uninstallKeyboardActions()
protected MouseListener createMouseListener()
protected MouseMotionListener createMouseMotionListener()
protected KeyListener createKeyListener()
protected ListSelectionListener createListSelectionListener()
protected ListDataListener createListDataListener()
protected MouseListener createListMouseListener()
protected MouseMotionListener createListMouseMotionListener()
protected PropertyChangeListener createPropertyChangeListener()
protected ItemListener createItemListener()
protected JList createList()
protected void configureList()
protected void installListListeners()
protected JScrollPane createScroller()
protected void configureScroller()
protected void configurePopup()
protected void installComboBoxListeners()
protected void installComboBoxModelListeners(ComboBoxModel model)
protected void installKeyboardActions()
public boolean isFocusTraversable()
protected void startAutoScrolling(int direction)
protected void stopAutoScrolling()
protected void autoScrollUp()
protected void autoScrollDown()
protected void delegateFocus(MouseEvent e)
protected void togglePopup()
protected MouseEvent convertMouseEvent(MouseEvent e)
protected int getPopupHeightForRowCount(int maxRowCount)
protected Rectangle computePopupBounds(int px, int py, int pw, int ph)
protected void updateListBoxSelectionForEvent(MouseEvent anEvent, boolean shouldScroll)
|
Java プラットフォーム 1.2 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |