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を参照してください。
-
ネストされたクラスのサマリー
ネストされたクラス修飾子と型クラス説明classJava 2プラットフォームv 1.4からこのクラスは廃止され、APIの下位互換性のためだけに組み込まれています。protected classポップアップ・メニューの状態に影響を与えるマウス・イベントを処理するため、(そのポップアップ・メニューではなく)コンボボックスに登録されるリスナーです。protected classこのリスナーは、ドラッグを監視し、リスト上をドラッグしている場合はリスト内の現在の選択範囲を更新します。protected classこのリスナーは、コンボボックスの選択の変更を監視します。class1.4からこのクラスは廃止され、何も行わず、API下位互換だけのために組み込まれています。protected classこのリスナーは、リスト内でマウス・ボタンを放したときにポップアップを隠します。protected classこのリスナーは、リスト上でのマウスの動きに応じて、選択された項目を変更します。protected classJava 2プラットフォーム1.4では、このクラスは廃止され、何も行わず、API下位互換だけのために組み込まれています。protected classこのリスナーは、コンボボックス内で変更されたバウンド・プロパティを監視します。クラス 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このprotectedフィールドは実装固有のものです。JComboBoxのインスタンス。protected booleantrueマウス・カーソルがポップアップにある場合。protected booleantrueの場合、自動スクロールが有効になります。protected ItemListenerこのprotectedフィールドは実装固有のものです。protected KeyListenerこのprotectedフィールドは実装固有のものです。このprotectedフィールドは実装固有のものです。protected ListDataListenerこのprotectedフィールドは実装固有のものです。protected MouseListenerこのprotectedフィールドは実装固有のものです。protected MouseMotionListenerこのprotectedフィールドは実装固有のものです。protected ListSelectionListenerこのprotectedフィールドは実装固有のものです。protected MouseListenerこのprotectedフィールドは実装固有のものです。protected MouseMotionListenerこのprotectedフィールドは実装固有のものです。protected PropertyChangeListenerこのprotectedフィールドは実装固有のものです。protected static final intスクロール・ダウンの方向。protected static final intスクロール・アップの方向。protected intスクロールの方向。protected JScrollPaneこのprotectedフィールドは実装固有のものです。protected boolean以前はドキュメントに記載されていなかったこのフィールドは、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 -
コンストラクタのサマリー
コンストラクタ -
メソッドのサマリー
修飾子と型メソッド説明protected voidこのprotectedメソッドは実装固有のもので、privateであるべきです。protected voidこのprotectedメソッドは実装固有のもので、privateであるべきです。protected RectanglecomputePopupBounds(int px, int py, int pw, int ph) コンボボックスの位置と画面の囲み境界に基づいて、コンボボックスのポップアップ部分の配置とサイズを計算します。protected voidポップアップのコンボボックス項目の保存に使用されるリストを設定します。protected voidコンボボックスのポップアップ部分を設定します。protected voidコンボ・ボックス・ポップアップ内にリストを持つ、スクロール可能な部分を設定します。protected MouseEventマウス・イベントを変換します。protected ItemListenerコンボボックスに追加されるItemListenerを作成します。protected KeyListenerコンボボックスに追加されるキー・リスナーを作成します。コンボ・ボックス・モデルの項目を表示するために、ポップアップで使用されるJListを作成します。protected ListDataListenerComboBoxModelに追加されるリスト・データ・リスナーを作成します。protected MouseListenerポップアップのリストのマウス・イベントを監視するマウス・リスナーを作成します。protected MouseMotionListenerポップアップのリストのマウス・モーション・イベントを監視するマウス・モーション・リスナーを作成します。protected ListSelectionListenerポップアップのリストの選択変更を待機するリスト選択リスナーを作成します。protected MouseListenerコンボボックス上でマウス・ボタンを押したり放したりするイベントを監視するリスナーを作成します。protected MouseMotionListenerコンボボックスに追加されるマウス・モーション・リスナーを作成します。protected PropertyChangeListenerコンボボックスに追加されるPropertyChangeListenerを作成します。protected JScrollPaneスクロール可能なリストを持つスクロール・ペインを作成します。protected voidこれは、イベント・ハンドラがポップアップが表示されたときにフォーカスを送信する場所を把握するのに役立つユーティリティ・メソッドです。BasicComboPopupに関連付けられたAccessibleContextを取得します。ComboPopup.getKeyListener()の実装です。getList()ComboPopup.getList()の実装です。ComboPopup.getMouseListener()の実装です。ComboPopup.getMouseMotionListener()の実装です。protected intgetPopupHeightForRowCount(int maxRowCount) 現在のListCellRendererに基づくポップアップの高さと、最大行数を取得します。voidhide()ComboPopup.hide()の実装です。protected void必要なリスナーをJComboBoxに追加します。protected voidinstallComboBoxModelListeners(ComboBoxModel<?> model) コンボ・ボックス・モデル上にリスナーをインストールします。protected voidキーボード操作を登録します。protected voidリスト・コントロールにリスナーを追加します。booleanオーバーライドされ、無条件でfalseを返します。voidshow()ComboPopup.show()の実装です。protected voidstartAutoScrolling(int direction) このprotectedメソッドは実装固有のもので、privateであるべきです。protected voidこのprotectedメソッドは実装固有のもので、privateであるべきです。protected voidポップアップが非表示になっている場合は表示し、表示されていれば非表示にします。protected voiduninstallComboBoxModelListeners(ComboBoxModel<?> model) コンボ・ボックス・モデルからリスナーを削除します。voidUIのアンインストール中に呼び出されます。protected voidキーボード操作の登録を解除します。protected voidupdateListBoxSelectionForEvent(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
-
フィールド詳細
-
comboBox
JComboBoxのインスタンス。 -
list
このprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 アクセス用のメソッドを代わりに使用します。- 関連項目:
-
scroller
protected JScrollPane scrollerこのprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりに、生成メソッドを使用してください。- 関連項目:
-
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フィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりに、生成メソッドを使用してください。- 関連項目:
-
itemListener
protected ItemListener itemListenerこのprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 代わりに、生成メソッドを使用してください。- 関連項目:
-
autoscrollTimer
protected Timer autoscrollTimerこのprotectedフィールドは実装固有のものです。 直接のアクセスやオーバーライドはしないでください。 -
hasEntered
protected boolean hasEnteredtrueマウス・カーソルがポップアップにある場合。 -
isAutoScrolling
protected boolean isAutoScrollingtrueの場合、自動スクロールが有効になります。 -
scrollDirection
protected int scrollDirectionスクロールの方向。 -
SCROLL_UP
protected static final int SCROLL_UPスクロール・アップの方向。- 関連項目:
-
SCROLL_DOWN
protected static final int SCROLL_DOWNスクロール・ダウンの方向。- 関連項目:
-
-
コンストラクタの詳細
-
BasicComboPopup
BasicComboPopupの新しいインスタンスを構築します。- パラメータ:
combo-JComboBoxのインスタンス
-
-
メソッドの詳細
-
show
public void show()ComboPopup.show()の実装です。- 定義:
show、インタフェースComboPopup- オーバーライド:
show、クラスComponent
-
hide
public void hide()ComboPopup.hide()の実装です。- 定義:
hide、インタフェースComboPopup- オーバーライド:
hide、クラスJComponent
-
getList
ComboPopup.getList()の実装です。- 定義:
getList、インタフェースComboPopup- 戻り値:
- コンボ・ボックスにアイテムを描画するために使用されているリスト
-
getMouseListener
public MouseListener getMouseListener()ComboPopup.getMouseListener()の実装です。- 定義:
getMouseListener、インタフェースComboPopup- 戻り値:
MouseListenerまたはnull- 関連項目:
-
getMouseMotionListener
public MouseMotionListener getMouseMotionListener()ComboPopup.getMouseMotionListener()の実装です。- 定義:
getMouseMotionListener、インタフェースComboPopup- 戻り値:
MouseMotionListenerまたはnull- 関連項目:
-
getKeyListener
public KeyListener getKeyListener()ComboPopup.getKeyListener()の実装です。- 定義:
getKeyListener、インタフェースComboPopup- 戻り値:
KeyListenerまたはnull- 関連項目:
-
uninstallingUI
public void uninstallingUI()UIのアンインストール中に呼び出されます。 このポップアップはコンポーネント・ツリーに含まれないので、コンポーネント・ツリーのuninstallUI()は呼び出されません。 addComboBoxListeners()に追加されたリスナーを削除します。- 定義:
uninstallingUI、インタフェースComboPopup
-
uninstallComboBoxModelListeners
protected void uninstallComboBoxModelListeners(ComboBoxModel<?> model) コンボ・ボックス・モデルからリスナーを削除します。- パラメータ:
model- リスナーをインストールするコンボ・ボックス・モデル- 関連項目:
-
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
コンボ・ボックス・モデルの項目を表示するために、ポップアップで使用されるJListを作成します。 UIクラス作成時に、このメソッドは呼び出されます。- 戻り値:
- コンボボックス項目の表示に使用される
JList
-
configureList
protected void configureList()ポップアップのコンボボックス項目の保存に使用されるリストを設定します。 UIクラス作成時に、このメソッドは呼び出されます。- 関連項目:
-
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- リスナーをインストールするコンボ・ボックス・モデル- 関連項目:
-
installKeyboardActions
protected void installKeyboardActions()キーボード操作を登録します。 -
isFocusTraversable
public boolean isFocusTraversable()オーバーライドされ、無条件でfalseを返します。- オーバーライド:
isFocusTraversable、クラスComponent- 戻り値:
- この
Componentがフォーカスを取得できる場合はtrue、そうでない場合はfalse - 関連項目:
-
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リストをスクロールする必要がある場合。
-