- 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を参照してください。- 関連項目:
- 直列化された形式
-
-
ネストされたクラスのサマリー
ネストされたクラス 修飾子と型 クラス 説明 classBasicComboPopup.InvocationKeyHandlerJava 2プラットフォーム1.4からこのクラスは廃止され、APIの下位互換だけのために組み込まれています。protected classBasicComboPopup.InvocationMouseHandlerポップアップ・メニューの状態に影響を与えるマウス・イベントを処理するため、(そのポップアップ・メニューではなく)コンボボックスに登録されるリスナーです。protected classBasicComboPopup.InvocationMouseMotionHandlerこのリスナーは、マウスのドラッグを監視して、リスト上でのドラッグであればリストの現在の選択範囲を更新します。protected classBasicComboPopup.ItemHandlerこのリスナーは、コンボボックスの選択の変更を監視します。classBasicComboPopup.ListDataHandler1.4からこのクラスは廃止され、何も行わず、API下位互換だけのために組み込まれています。protected classBasicComboPopup.ListMouseHandlerこのリスナーは、リスト内でマウス・ボタンを放したときにポップアップを隠します。protected classBasicComboPopup.ListMouseMotionHandlerこのリスナーは、リスト上でのマウスの動きに応じて、選択された項目を変更します。protected classBasicComboPopup.ListSelectionHandlerJava 2プラットフォーム1.4では、このクラスは廃止され、何も行わず、API下位互換だけのために組み込まれています。protected classBasicComboPopup.PropertyChangeHandlerこのリスナーは、コンボボックス内で変更されたバウンド・プロパティを監視します。-
クラス java.awt.Componentで宣言されたネストされたクラス/インタフェース
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
クラス java.awt.Containerで宣言されたネストされたクラス/インタフェース
Container.AccessibleAWTContainer
-
クラス javax.swing.JComponentで宣言されたネストされたクラス/インタフェース
JComponent.AccessibleJComponent
-
クラス javax.swing.JPopupMenuで宣言されたネストされたクラス/インタフェース
JPopupMenu.AccessibleJPopupMenu, JPopupMenu.Separator
-
-
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 protected TimerautoscrollTimerこのprotectedフィールドは実装固有のものです。protected JComboBox<Object>comboBoxJComboBoxのインスタンス。protected booleanhasEnteredtrueマウス・カーソルがポップアップにある場合。protected booleanisAutoScrollingtrueの場合、自動スクロールが有効になります。protected ItemListeneritemListenerこのprotectedフィールドは実装固有のものです。protected KeyListenerkeyListenerこのprotectedフィールドは実装固有のものです。protected JList<Object>listこのprotectedフィールドは実装固有のものです。protected ListDataListenerlistDataListenerこのprotectedフィールドは実装固有のものです。protected MouseListenerlistMouseListenerこのprotectedフィールドは実装固有のものです。protected MouseMotionListenerlistMouseMotionListenerこのprotectedフィールドは実装固有のものです。protected ListSelectionListenerlistSelectionListenerこのprotectedフィールドは実装固有のものです。protected MouseListenermouseListenerこのprotectedフィールドは実装固有のものです。protected MouseMotionListenermouseMotionListenerこのprotectedフィールドは実装固有のものです。protected PropertyChangeListenerpropertyChangeListenerこのprotectedフィールドは実装固有のものです。protected static intSCROLL_DOWNスクロール・ダウンの方向。protected static intSCROLL_UPスクロール・アップの方向。protected intscrollDirectionスクロールの方向。protected JScrollPanescrollerこのprotectedフィールドは実装固有のものです。protected booleanvalueIsAdjusting以前はドキュメントに記載されていなかったこのフィールドは、Java 2プラットフォーム1.4以降では使用されません。-
クラス 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
-
クラス javax.swing.JComponentで宣言されたフィールド
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 BasicComboPopup(JComboBox<Object> combo)BasicComboPopupの新しいインスタンスを構築します。
-
メソッドのサマリー
すべてのメソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 protected voidautoScrollDown()このprotectedメソッドは実装固有のもので、privateであるべきです。protected voidautoScrollUp()このprotectedメソッドは実装固有のもので、privateであるべきです。protected RectanglecomputePopupBounds(int px, int py, int pw, int ph)コンボボックスの位置と画面の囲み境界に基づいて、コンボボックスのポップアップ部分の配置とサイズを計算します。protected voidconfigureList()ポップアップのコンボボックス項目の保存に使用されるリストを設定します。protected voidconfigurePopup()コンボボックスのポップアップ部分を設定します。protected voidconfigureScroller()コンボ・ボックス・ポップアップ内にリストを持つ、スクロール可能な部分を設定します。protected MouseEventconvertMouseEvent(MouseEvent e)マウス・イベントを変換します。protected ItemListenercreateItemListener()コンボボックスに追加されるItemListenerを作成します。protected KeyListenercreateKeyListener()コンボボックスに追加されるキー・リスナーを作成します。protected JList<Object>createList()コンボ・ボックス・モデルの項目を表示するために、ポップアップで使用されるJListを作成します。protected ListDataListenercreateListDataListener()ComboBoxModelに追加されるリスト・データ・リスナーを作成します。protected MouseListenercreateListMouseListener()ポップアップのリストのマウス・イベントを監視するマウス・リスナーを作成します。protected MouseMotionListenercreateListMouseMotionListener()ポップアップのリストのマウス動作イベントを監視するマウス動作リスナーを作成します。protected ListSelectionListenercreateListSelectionListener()ポップアップのリストの選択変更を待機するリスト選択リスナーを作成します。protected MouseListenercreateMouseListener()コンボボックス上でマウス・ボタンを押したり放したりするイベントを監視するリスナーを作成します。protected MouseMotionListenercreateMouseMotionListener()コンボボックスに追加されるマウス動作リスナーを作成します。protected PropertyChangeListenercreatePropertyChangeListener()コンボボックスに追加されるPropertyChangeListenerを作成します。protected JScrollPanecreateScroller()スクロール可能なリストを持つスクロール・ペインを作成します。protected voiddelegateFocus(MouseEvent e)これは、イベント・ハンドラがポップアップが表示されたときにフォーカスを送信する場所を把握するのに役立つユーティリティ・メソッドです。AccessibleContextgetAccessibleContext()BasicComboPopupに関連付けられたAccessibleContextを取得します。KeyListenergetKeyListener()ComboPopup.getKeyListener()の実装です。JList<Object>getList()ComboPopup.getList()の実装です。MouseListenergetMouseListener()ComboPopup.getMouseListener()の実装です。MouseMotionListenergetMouseMotionListener()ComboPopup.getMouseMotionListener()の実装です。protected intgetPopupHeightForRowCount(int maxRowCount)現在のListCellRendererに基づくポップアップの高さと、最大行数を取得します。voidhide()ComboPopup.hide()の実装です。protected voidinstallComboBoxListeners()必要なリスナーをJComboBoxに追加します。protected voidinstallComboBoxModelListeners(ComboBoxModel<?> model)コンボ・ボックス・モデル上にリスナーをインストールします。protected voidinstallKeyboardActions()キーボード操作を登録します。protected voidinstallListListeners()リスト・コントロールにリスナーを追加します。booleanisFocusTraversable()オーバーライドされ、無条件でfalseを返します。voidshow()ComboPopup.show()の実装です。protected voidstartAutoScrolling(int direction)このprotectedメソッドは実装固有のもので、privateであるべきです。protected voidstopAutoScrolling()このprotectedメソッドは実装固有のもので、privateであるべきです。protected voidtogglePopup()ポップアップが非表示になっている場合は表示し、表示されていれば非表示にします。protected voiduninstallComboBoxModelListeners(ComboBoxModel<?> model)コンボ・ボックス・モデルからリスナーを削除します。voiduninstallingUI()UIのアンインストール中に呼び出されます。protected voiduninstallKeyboardActions()キーボード操作の登録を解除します。protected voidupdateListBoxSelectionForEvent(MouseEvent anEvent, boolean shouldScroll)イベント・リスナーが使用するユーティリティ・メソッドです。-
インタフェース javax.swing.plaf.basic.ComboPopupで宣言されたメソッド
isVisible
-
クラス 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.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
-
クラス 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
-
クラス 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
-
-
-
-
フィールドの詳細
-
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、クラス:Component
-
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リストをスクロールする必要がある場合。
-
-