- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPopupMenu
-
- javax.swing.plaf.basic.BasicComboPopup
-
- すべての実装されたインタフェース:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,MenuElement
,ComboPopup
- 直系の既知のサブクラス:
MetalComboBoxUI.MetalComboPopup
public class BasicComboPopup extends JPopupMenu implements ComboPopup
これは、ComboPopup
インタフェースの基本実装です。 このクラスは、コンボボックスのポップアップ部分のUIを表現します。すべてのイベント処理は、
createxxxListener()
の各メソッド、および内部クラスを使用して作成されたリスナー・クラスにより処理されます。 このクラスの動作を変更するには、createxxxListener()
の各メソッドをオーバーライドした上で、独自のイベント・リスナーを提供するか、このクラスで提供されているイベント・リスナーからサブクラス化します。警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4以降、すべてのJavaBeans™用の長期間の格納サポートが
java.beans
パッケージに追加されています。XMLEncoder
を参照してください。
-
-
ネストされたクラスのサマリー
ネストされたクラス 修飾子と型 クラス 説明 class
BasicComboPopup.InvocationKeyHandler
Java 2プラットフォーム1.4からこのクラスは廃止され、APIの下位互換だけのために組み込まれています。protected class
BasicComboPopup.InvocationMouseHandler
ポップアップ・メニューの状態に影響を与えるマウス・イベントを処理するため、(そのポップアップ・メニューではなく)コンボボックスに登録されるリスナーです。protected class
BasicComboPopup.InvocationMouseMotionHandler
このリスナーは、マウスのドラッグを監視して、リスト上でのドラッグであればリストの現在の選択範囲を更新します。protected class
BasicComboPopup.ItemHandler
このリスナーは、コンボボックスの選択の変更を監視します。class
BasicComboPopup.ListDataHandler
1.4からこのクラスは廃止され、何も行わず、API下位互換だけのために組み込まれています。protected class
BasicComboPopup.ListMouseHandler
このリスナーは、リスト内でマウス・ボタンを放したときにポップアップを隠します。protected class
BasicComboPopup.ListMouseMotionHandler
このリスナーは、リスト上でのマウスの動きに応じて、選択された項目を変更します。protected class
BasicComboPopup.ListSelectionHandler
Java 2プラットフォーム1.4では、このクラスは廃止され、何も行わず、API下位互換だけのために組み込まれています。protected class
BasicComboPopup.PropertyChangeHandler
このリスナーは、コンボボックス内で変更されたバウンド・プロパティを監視します。-
クラス javax.swing.JPopupMenuで宣言されたネストされたクラス/インタフェース
JPopupMenu.AccessibleJPopupMenu, JPopupMenu.Separator
-
クラス javax.swing.JComponentで宣言されたネストされたクラス/インタフェース
JComponent.AccessibleJComponent
-
クラス java.awt.Containerで宣言されたネストされたクラス/インタフェース
Container.AccessibleAWTContainer
-
クラス java.awt.Componentで宣言されたネストされたクラス/インタフェース
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 protected Timer
autoscrollTimer
このprotectedフィールドは実装固有のものです。protected JComboBox<Object>
comboBox
JComboBox
のインスタンス。protected boolean
hasEntered
true
マウス・カーソルがポップアップにある場合。protected boolean
isAutoScrolling
true
の場合、自動スクロールが有効になります。protected ItemListener
itemListener
このprotectedフィールドは実装固有のものです。protected KeyListener
keyListener
このprotectedフィールドは実装固有のものです。protected JList<Object>
list
このprotectedフィールドは実装固有のものです。protected ListDataListener
listDataListener
このprotectedフィールドは実装固有のものです。protected MouseListener
listMouseListener
このprotectedフィールドは実装固有のものです。protected MouseMotionListener
listMouseMotionListener
このprotectedフィールドは実装固有のものです。protected ListSelectionListener
listSelectionListener
このprotectedフィールドは実装固有のものです。protected MouseListener
mouseListener
このprotectedフィールドは実装固有のものです。protected MouseMotionListener
mouseMotionListener
このprotectedフィールドは実装固有のものです。protected PropertyChangeListener
propertyChangeListener
このprotectedフィールドは実装固有のものです。protected static int
SCROLL_DOWN
スクロール・ダウンの方向。protected static int
SCROLL_UP
スクロール・アップの方向。protected int
scrollDirection
スクロールの方向。protected JScrollPane
scroller
このprotectedフィールドは実装固有のものです。protected boolean
valueIsAdjusting
以前はドキュメントに記載されていなかったこのフィールドは、Java 2プラットフォーム1.4以降では使用されません。-
クラス javax.swing.JComponentで宣言されたフィールド
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
クラス java.awt.Componentで宣言されたフィールド
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
インタフェース java.awt.image.ImageObserverで宣言されたフィールド
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 BasicComboPopup(JComboBox<Object> combo)
BasicComboPopup
の新しいインスタンスを構築します。
-
メソッドのサマリー
修飾子と型 メソッド 説明 protected void
autoScrollDown()
このprotectedメソッドは実装固有のもので、privateであるべきです。protected void
autoScrollUp()
このprotectedメソッドは実装固有のもので、privateであるべきです。protected Rectangle
computePopupBounds(int px, int py, int pw, int ph)
コンボボックスの位置と画面の囲み境界に基づいて、コンボボックスのポップアップ部分の配置とサイズを計算します。protected void
configureList()
ポップアップのコンボボックス項目の保存に使用されるリストを設定します。protected void
configurePopup()
コンボボックスのポップアップ部分を設定します。protected void
configureScroller()
コンボ・ボックス・ポップアップ内にリストを持つ、スクロール可能な部分を設定します。protected MouseEvent
convertMouseEvent(MouseEvent e)
マウス・イベントを変換します。protected ItemListener
createItemListener()
コンボボックスに追加されるItemListener
を作成します。protected KeyListener
createKeyListener()
コンボボックスに追加されるキー・リスナーを作成します。protected JList<Object>
createList()
コンボ・ボックス・モデルの項目を表示するために、ポップアップで使用されるJListを作成します。protected ListDataListener
createListDataListener()
ComboBoxModel
に追加されるリスト・データ・リスナーを作成します。protected MouseListener
createListMouseListener()
ポップアップのリストのマウス・イベントを監視するマウス・リスナーを作成します。protected MouseMotionListener
createListMouseMotionListener()
ポップアップのリストのマウス動作イベントを監視するマウス動作リスナーを作成します。protected ListSelectionListener
createListSelectionListener()
ポップアップのリストの選択変更を待機するリスト選択リスナーを作成します。protected MouseListener
createMouseListener()
コンボボックス上でマウス・ボタンを押したり放したりするイベントを監視するリスナーを作成します。protected MouseMotionListener
createMouseMotionListener()
コンボボックスに追加されるマウス動作リスナーを作成します。protected PropertyChangeListener
createPropertyChangeListener()
コンボボックスに追加されるPropertyChangeListener
を作成します。protected JScrollPane
createScroller()
スクロール可能なリストを持つスクロール・ペインを作成します。protected void
delegateFocus(MouseEvent e)
これは、イベント・ハンドラがポップアップが表示されたときにフォーカスを送信する場所を把握するのに役立つユーティリティ・メソッドです。AccessibleContext
getAccessibleContext()
BasicComboPopupに関連付けられたAccessibleContextを取得します。KeyListener
getKeyListener()
ComboPopup.getKeyListener()の実装です。JList<Object>
getList()
ComboPopup.getList()の実装です。MouseListener
getMouseListener()
ComboPopup.getMouseListener()の実装です。MouseMotionListener
getMouseMotionListener()
ComboPopup.getMouseMotionListener()の実装です。protected int
getPopupHeightForRowCount(int maxRowCount)
現在のListCellRendererに基づくポップアップの高さと、最大行数を取得します。void
hide()
ComboPopup.hide()の実装です。protected void
installComboBoxListeners()
必要なリスナーをJComboBoxに追加します。protected void
installComboBoxModelListeners(ComboBoxModel<?> model)
コンボ・ボックス・モデル上にリスナーをインストールします。protected void
installKeyboardActions()
キーボード・アクションを登録します。protected void
installListListeners()
リスト・コントロールにリスナーを追加します。boolean
isFocusTraversable()
オーバーライドされ、無条件でfalseを返します。void
show()
ComboPopup.show()の実装です。protected void
startAutoScrolling(int direction)
このprotectedメソッドは実装固有のもので、privateであるべきです。protected void
stopAutoScrolling()
このprotectedメソッドは実装固有のもので、privateであるべきです。protected void
togglePopup()
ポップアップが非表示になっている場合は表示し、表示されていれば非表示にします。protected void
uninstallComboBoxModelListeners(ComboBoxModel<?> model)
コンボ・ボックス・モデルからリスナーを削除します。void
uninstallingUI()
UIのアンインストール中に呼び出されます。protected void
uninstallKeyboardActions()
キーボード・アクションを登録解除します。protected void
updateListBoxSelectionForEvent(MouseEvent anEvent, boolean shouldScroll)
イベント・リスナーが使用するユーティリティ・メソッドです。-
クラス javax.swing.JPopupMenuで宣言されたメソッド
add, add, add, addMenuKeyListener, addPopupMenuListener, addSeparator, createActionChangeListener, createActionComponent, firePopupMenuCanceled, firePopupMenuWillBecomeInvisible, firePopupMenuWillBecomeVisible, getComponent, getComponentAtIndex, getComponentIndex, getDefaultLightWeightPopupEnabled, getInvoker, getLabel, getMargin, getMenuKeyListeners, getPopupMenuListeners, getSelectionModel, getSubElements, getUI, getUIClassID, insert, insert, isBorderPainted, isLightWeightPopupEnabled, isPopupTrigger, isVisible, menuSelectionChanged, pack, paintBorder, paramString, processKeyEvent, processKeyEvent, processMouseEvent, remove, removeMenuKeyListener, removePopupMenuListener, setBorderPainted, setDefaultLightWeightPopupEnabled, setInvoker, setLabel, setLightWeightPopupEnabled, setLocation, setPopupSize, setPopupSize, setSelected, setSelectionModel, setUI, setVisible, show, updateUI
-
クラス javax.swing.JComponentで宣言されたメソッド
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
-
クラス java.awt.Containerで宣言されたメソッド
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
クラス java.awt.Componentで宣言されたメソッド
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
クラス java.lang.Objectで宣言されたメソッド
clone、equals、finalize、getClass、hashCode、notify、notifyAll、wait、wait、wait
-
インタフェース javax.swing.plaf.basic.ComboPopupで宣言されたメソッド
isVisible
-
-
-
-
フィールドの詳細
-
list
protected JList<Object> list
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 アクセス用のメソッドを代わりに使用します。- 関連項目:
getList()
,createList()
-
scroller
protected JScrollPane scroller
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりに、生成メソッドを使用してください。- 関連項目:
createScroller()
-
valueIsAdjusting
protected boolean valueIsAdjusting
以前はドキュメントに記載されていなかったこのフィールドは、Java 2プラットフォーム1.4以降では使用されません。
-
mouseMotionListener
protected MouseMotionListener mouseMotionListener
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりに、アクセス用メソッドまたは生成用メソッドを使用してください。
-
mouseListener
protected MouseListener mouseListener
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりに、アクセス用メソッドまたは生成用メソッドを使用してください。
-
keyListener
protected KeyListener keyListener
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりに、アクセス用メソッドまたは生成用メソッドを使用してください。
-
listSelectionListener
protected ListSelectionListener listSelectionListener
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりにcreateメソッドを使用します。
-
listMouseListener
protected MouseListener listMouseListener
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりにcreateメソッドを使用します。
-
listMouseMotionListener
protected MouseMotionListener listMouseMotionListener
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりに、生成メソッドを使用してください。
-
propertyChangeListener
protected PropertyChangeListener propertyChangeListener
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりに、生成メソッドを使用してください。
-
listDataListener
protected ListDataListener listDataListener
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりに、生成メソッドを使用してください。- 関連項目:
createListDataListener()
-
itemListener
protected ItemListener itemListener
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりに、生成メソッドを使用してください。- 関連項目:
createItemListener()
-
autoscrollTimer
protected Timer autoscrollTimer
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。
-
hasEntered
protected boolean hasEntered
true
マウス・カーソルがポップアップにある場合。
-
isAutoScrolling
protected boolean isAutoScrolling
true
の場合、自動スクロールが有効になります。
-
scrollDirection
protected int scrollDirection
スクロールの方向。
-
SCROLL_UP
protected static final int SCROLL_UP
スクロール・アップの方向。- 関連項目:
- 定数フィールド値
-
SCROLL_DOWN
protected static final int SCROLL_DOWN
スクロール・ダウンの方向。- 関連項目:
- 定数フィールド値
-
-
メソッドの詳細
-
show
public void show()
ComboPopup.show()の実装です。- 定義:
show
、インタフェース:ComboPopup
- オーバーライド:
show
、クラス:Component
-
hide
public void hide()
ComboPopup.hide()の実装です。- 定義:
hide
、インタフェース:ComboPopup
- オーバーライド:
hide
、クラス:JComponent
-
getList
public JList<Object> getList()
ComboPopup.getList()の実装です。- 定義:
getList
、インタフェース:ComboPopup
- 戻り値:
- コンボ・ボックスにアイテムを描画するために使用されているリスト
-
getMouseListener
public MouseListener getMouseListener()
ComboPopup.getMouseListener()の実装です。- 定義:
getMouseListener
、インタフェース:ComboPopup
- 戻り値:
MouseListener
またはnull- 関連項目:
ComboPopup.getMouseListener()
-
getMouseMotionListener
public MouseMotionListener getMouseMotionListener()
ComboPopup.getMouseMotionListener()の実装です。- 定義:
getMouseMotionListener
、インタフェース:ComboPopup
- 戻り値:
MouseMotionListener
またはnull- 関連項目:
ComboPopup.getMouseMotionListener()
-
getKeyListener
public KeyListener getKeyListener()
ComboPopup.getKeyListener()の実装です。- 定義:
getKeyListener
、インタフェース:ComboPopup
- 戻り値:
KeyListener
またはnull- 関連項目:
ComboPopup.getKeyListener()
-
uninstallingUI
public void uninstallingUI()
UIのアンインストール中に呼び出されます。 このポップアップはコンポーネント・ツリーに含まれないので、コンポーネント・ツリーのuninstallUI()は呼び出されません。 addComboBoxListeners()に追加されたリスナーを削除します。- 定義:
uninstallingUI
、インタフェース:ComboPopup
-
uninstallComboBoxModelListeners
protected void uninstallComboBoxModelListeners(ComboBoxModel<?> model)
コンボ・ボックス・モデルからリスナーを削除します。- パラメータ:
model
- リスナーをインストールするコンボ・ボックス・モデル- 関連項目:
installComboBoxModelListeners(javax.swing.ComboBoxModel<?>)
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()
キーボード・アクションを登録解除します。
-
createMouseListener
protected MouseListener createMouseListener()
コンボボックス上でマウス・ボタンを押したり放したりするイベントを監視するリスナーを作成します。 警告: このメソッドをオーバーライドする場合、必ず既存の動作を維持するようにしてください。- 戻り値:
- コンボボックスに追加される
MouseListener
、またはnull
-
createMouseMotionListener
protected MouseMotionListener createMouseMotionListener()
コンボボックスに追加されるマウス動作リスナーを作成します。 警告: このメソッドをオーバーライドする場合、必ず既存の動作を維持するようにしてください。- 戻り値:
- コンボボックスに追加される
MouseMotionListener
、またはnull
-
createKeyListener
protected KeyListener createKeyListener()
コンボボックスに追加されるキー・リスナーを作成します。 このメソッドがnullを返す場合、コンボボックスには追加されません。- 戻り値:
KeyListener
またはnull
-
createListSelectionListener
protected ListSelectionListener createListSelectionListener()
ポップアップのリストの選択変更を待機するリスト選択リスナーを作成します。 このメソッドがnullを返す場合、ポップアップ・リストには追加されません。- 戻り値:
ListSelectionListener
のインスタンス、またはnull
-
createListDataListener
protected ListDataListener createListDataListener()
ComboBoxModel
に追加されるリスト・データ・リスナーを作成します。 このメソッドがnullを返す場合、コンボ・ボックス・モデルには追加されません。- 戻り値:
ListDataListener
のインスタンス、またはnull
-
createListMouseListener
protected MouseListener createListMouseListener()
ポップアップのリストのマウス・イベントを監視するマウス・リスナーを作成します。 このメソッドがnullを返す場合、コンボボックスには追加されません。- 戻り値:
MouseListener
のインスタンス、またはnull
-
createListMouseMotionListener
protected MouseMotionListener createListMouseMotionListener()
ポップアップのリストのマウス動作イベントを監視するマウス動作リスナーを作成します。 このメソッドがnullを返す場合、コンボボックスには追加されません。- 戻り値:
MouseMotionListener
のインスタンス、またはnull
-
createPropertyChangeListener
protected PropertyChangeListener createPropertyChangeListener()
コンボボックスに追加されるPropertyChangeListener
を作成します。 このメソッドがnullを返す場合、コンボボックスには追加されません。- 戻り値:
PropertyChangeListener
のインスタンス、またはnull
-
createItemListener
protected ItemListener createItemListener()
コンボボックスに追加されるItemListener
を作成します。 このメソッドがnullを返す場合、コンボボックスには追加されません。サブクラスは、このメソッドをオーバーライドして、独自のItemEventハンドラのインスタンスを返すことができます。
- 戻り値:
ItemListener
のインスタンス、またはnull
-
createList
protected JList<Object> createList()
コンボ・ボックス・モデルの項目を表示するために、ポップアップで使用されるJListを作成します。 UIクラス作成時に、このメソッドは呼び出されます。- 戻り値:
- コンボボックス項目の表示に使用される
JList
-
configureList
protected void configureList()
ポップアップのコンボボックス項目の保存に使用されるリストを設定します。 UIクラス作成時に、このメソッドは呼び出されます。- 関連項目:
createList()
-
installListListeners
protected void installListListeners()
リスト・コントロールにリスナーを追加します。
-
createScroller
protected JScrollPane createScroller()
スクロール可能なリストを持つスクロール・ペインを作成します。- 戻り値:
- スクロール可能リストを格納するスクロール・ペイン
-
configureScroller
protected void configureScroller()
コンボ・ボックス・ポップアップ内にリストを持つ、スクロール可能な部分を設定します。 UIクラス作成時に、このメソッドは呼び出されます。
-
configurePopup
protected void configurePopup()
コンボボックスのポップアップ部分を設定します。 UIクラス作成時に、このメソッドは呼び出されます。
-
installComboBoxListeners
protected void installComboBoxListeners()
必要なリスナーをJComboBoxに追加します。
-
installComboBoxModelListeners
protected void installComboBoxModelListeners(ComboBoxModel<?> model)
コンボ・ボックス・モデル上にリスナーをインストールします。 コンボ・ボックス・モデル上にインストールされたリスナーはすべて、uninstallComboBoxModelListeners
で削除されるべきです。- パラメータ:
model
- リスナーをインストールするコンボ・ボックス・モデル- 関連項目:
uninstallComboBoxModelListeners(javax.swing.ComboBoxModel<?>)
-
installKeyboardActions
protected void installKeyboardActions()
キーボード・アクションを登録します。
-
isFocusTraversable
public boolean isFocusTraversable()
オーバーライドされ、無条件でfalseを返します。- オーバーライド:
isFocusTraversable
、クラス:Component
- 戻り値:
- この
Component
がフォーカスを取得できる場合はtrue
、そうでない場合はfalse
- 関連項目:
Component.setFocusable(boolean)
-
startAutoScrolling
protected void startAutoScrolling(int direction)
protectedメソッドは実装固有のもので、privateであるべきです。呼び出しまたはオーバーライドしないでください。- パラメータ:
direction
- スクロールの方向
-
stopAutoScrolling
protected void stopAutoScrolling()
protectedメソッドは実装固有のもので、privateであるべきです。呼び出しまたはオーバーライドしないでください。
-
autoScrollUp
protected void autoScrollUp()
protectedメソッドは実装固有のもので、privateであるべきです。呼び出しまたはオーバーライドしないでください。
-
autoScrollDown
protected void autoScrollDown()
protectedメソッドは実装固有のもので、privateであるべきです。呼び出しまたはオーバーライドしないでください。
-
getAccessibleContext
public AccessibleContext getAccessibleContext()
BasicComboPopupに関連付けられたAccessibleContextを取得します。 AccessibleContextの親はComboBoxに設定されています。- 定義:
getAccessibleContext
、インタフェース:Accessible
- オーバーライド:
getAccessibleContext
、クラス:JPopupMenu
- 戻り値:
- BasicComboPopupのAccessibleContext
- 導入されたバージョン:
- 1.5
-
delegateFocus
protected void delegateFocus(MouseEvent e)
これは、イベント・ハンドラがポップアップが表示されたときにフォーカスを送信する場所を把握するのに役立つユーティリティ・メソッドです。 標準的な実装では、コンボボックスが編集可能な場合はエディタにフォーカスを委譲し、編集不可能な場合はJComboBoxに委譲します。- パラメータ:
e
- マウス・イベント
-
togglePopup
protected void togglePopup()
ポップアップが非表示になっている場合は表示し、表示されていれば非表示にします。
-
convertMouseEvent
protected MouseEvent convertMouseEvent(MouseEvent e)
マウス・イベントを変換します。- パラメータ:
e
- マウス・イベント- 戻り値:
- 変換されたマウス・イベント
-
getPopupHeightForRowCount
protected int getPopupHeightForRowCount(int maxRowCount)
現在のListCellRendererに基づくポップアップの高さと、最大行数を取得します。- パラメータ:
maxRowCount
- 行数- 戻り値:
- ポップアップの高さ
-
computePopupBounds
protected Rectangle computePopupBounds(int px, int py, int pw, int ph)
コンボボックスの位置と画面の囲み境界に基づいて、コンボボックスのポップアップ部分の配置とサイズを計算します。 変換が必要ない場合、返される矩形の値はパラメータと同じになります。- パラメータ:
px
- 開始のx位置py
- 開始のy位置pw
- 開始の幅ph
- 開始の高さ- 戻り値:
- ポップアップの配置とサイズを表す矩形
-
updateListBoxSelectionForEvent
protected void updateListBoxSelectionForEvent(MouseEvent anEvent, boolean shouldScroll)
イベント・リスナーが使用するユーティリティ・メソッドです。 マウス・イベントを受けて、マウスの下にあるリスト項目のリスト選択を変更します。- パラメータ:
anEvent
- マウス・イベントshouldScroll
-true
リストをスクロールする必要がある場合。
-
-