JavaTM Platform
Standard Ed. 6

javax.swing.plaf.basic
クラス BasicComboPopup

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 に適しています。JDK Version 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 comboBox
           
protected  boolean hasEntered
           
protected  boolean isAutoScrolling
           
protected  ItemListener itemListener
          この protected フィールドは実装固有のものです。
protected  KeyListener keyListener
          この protected フィールドは実装固有のものです。
protected  JList 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 から継承されたフィールド
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
 
インタフェース java.awt.image.ImageObserver から継承されたフィールド
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
コンストラクタの概要
BasicComboPopup(JComboBox combo)
           
 
メソッドの概要
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 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)
          ポップアップが開くときに、フォーカスの送り先をイベントハンドラが決定するのを補助するユーティリティーメソッドです。
protected  void firePopupMenuCanceled()
          PopupMenuListener に、ポップアップメニューが取り消されたことを通知します。
protected  void firePopupMenuWillBecomeInvisible()
          PopupMenuListener に、ポップアップメニューが不可視になることを通知します。
protected  void firePopupMenuWillBecomeVisible()
          PopupMenuListener に、ポップアップメニューが可視になることを通知します。
 AccessibleContext getAccessibleContext()
          BasicComboPopup に関連付けられた AccessibleContext を取得します。
 KeyListener getKeyListener()
          ComboPopup.getKeyListener() の実装です。
 JList 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, getComponent, getComponentAtIndex, getComponentIndex, getDefaultLightWeightPopupEnabled, getInvoker, getLabel, getMargin, getMenuKeyListeners, getPopupMenuListeners, getSelectionModel, getSubElements, getUI, getUIClassID, insert, insert, isBorderPainted, isLightWeightPopupEnabled, isPopupTrigger, isVisible, menuSelectionChanged, pack, paintBorder, paramString, processFocusEvent, 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, 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, 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, transferFocusBackward, 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, 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, getPeer, 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, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
インタフェース javax.swing.plaf.basic.ComboPopup から継承されたメソッド
isVisible
 

フィールドの詳細

comboBox

protected JComboBox comboBox

list

protected JList list
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。アクセス用のメソッドを代わりに使用します。

関連項目:
getList(), createList()

scroller

protected JScrollPane scroller
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。代わりに、生成メソッドを使用してください。

関連項目:
createScroller()

valueIsAdjusting

protected boolean valueIsAdjusting
ドキュメントから削除済みのこのフィールドは、Java 2 プラットフォーム 1.4 では使用されません。


mouseMotionListener

protected MouseMotionListener mouseMotionListener
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。代わりに、アクセス用メソッドまたは生成用メソッドを使用してください。

関連項目:
getMouseMotionListener(), createMouseMotionListener()

mouseListener

protected MouseListener mouseListener
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。代わりに、アクセス用メソッドまたは生成用メソッドを使用してください。

関連項目:
getMouseListener(), createMouseListener()

keyListener

protected KeyListener keyListener
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。代わりに、アクセス用メソッドまたは生成用メソッドを使用してください。

関連項目:
getKeyListener(), createKeyListener()

listSelectionListener

protected ListSelectionListener listSelectionListener
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。代わりに create メソッドを使用します。

関連項目:
createListSelectionListener()

listMouseListener

protected MouseListener listMouseListener
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。代わりに create メソッドを使用します。

関連項目:
createListMouseListener()

listMouseMotionListener

protected MouseMotionListener listMouseMotionListener
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。代わりに、生成メソッドを使用してください。

関連項目:
createListMouseMotionListener()

propertyChangeListener

protected PropertyChangeListener propertyChangeListener
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。代わりに、生成メソッドを使用してください。

関連項目:
createPropertyChangeListener()

listDataListener

protected ListDataListener listDataListener
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。代わりに、生成メソッドを使用してください。

関連項目:
createListDataListener()

itemListener

protected ItemListener itemListener
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。代わりに、生成メソッドを使用してください。

関連項目:
createItemListener()

autoscrollTimer

protected Timer autoscrollTimer
この protected フィールドは実装固有のものです。直接のアクセスやオーバーライドはしないでください。


hasEntered

protected boolean hasEntered

isAutoScrolling

protected boolean isAutoScrolling

scrollDirection

protected int scrollDirection

SCROLL_UP

protected static final int SCROLL_UP
関連項目:
定数フィールド値

SCROLL_DOWN

protected static final int SCROLL_DOWN
関連項目:
定数フィールド値
コンストラクタの詳細

BasicComboPopup

public BasicComboPopup(JComboBox combo)
メソッドの詳細

show

public void show()
ComboPopup.show() の実装です。

定義:
インタフェース ComboPopup 内の show
オーバーライド:
クラス Component 内の show

hide

public void hide()
ComboPopup.hide() の実装です。

定義:
インタフェース ComboPopup 内の hide
オーバーライド:
クラス Component 内の hide

getList

public JList getList()
ComboPopup.getList() の実装です。

定義:
インタフェース ComboPopup 内の getList

getMouseListener

public MouseListener getMouseListener()
ComboPopup.getMouseListener() の実装です。

定義:
インタフェース ComboPopup 内の getMouseListener
戻り値:
MouseListener または null
関連項目:
ComboPopup.getMouseListener()

getMouseMotionListener

public MouseMotionListener getMouseMotionListener()
ComboPopup.getMouseMotionListener() の実装です。

定義:
インタフェース ComboPopup 内の getMouseMotionListener
戻り値:
MouseMotionListener または null
関連項目:
ComboPopup.getMouseMotionListener()

getKeyListener

public KeyListener getKeyListener()
ComboPopup.getKeyListener() の実装です。

定義:
インタフェース ComboPopup 内の getKeyListener
戻り値:
KeyListener または null
関連項目:
ComboPopup.getKeyListener()

uninstallingUI

public void uninstallingUI()
UI のアンインストール中に呼び出されます。このポップアップはコンポーネントツリーに含まれないので、コンポーネントツリーの uninstallUI() は呼び出されません。addComboBoxListeners() に追加されたリスナーを削除します。

定義:
インタフェース ComboPopup 内の uninstallingUI

uninstallComboBoxModelListeners

protected void uninstallComboBoxModelListeners(ComboBoxModel model)
コンボボックスモデルからリスナーを削除します。

パラメータ:
model - リスナーをインストールするコンボボックスモデル
関連項目:
installComboBoxModelListeners(javax.swing.ComboBoxModel)

uninstallKeyboardActions

protected void uninstallKeyboardActions()

firePopupMenuWillBecomeVisible

protected void firePopupMenuWillBecomeVisible()
クラス JPopupMenu の記述:
PopupMenuListener に、ポップアップメニューが可視になることを通知します。

オーバーライド:
クラス JPopupMenu 内の firePopupMenuWillBecomeVisible

firePopupMenuWillBecomeInvisible

protected void firePopupMenuWillBecomeInvisible()
クラス JPopupMenu の記述:
PopupMenuListener に、ポップアップメニューが不可視になることを通知します。

オーバーライド:
クラス JPopupMenu 内の firePopupMenuWillBecomeInvisible

firePopupMenuCanceled

protected void firePopupMenuCanceled()
クラス JPopupMenu の記述:
PopupMenuListener に、ポップアップメニューが取り消されたことを通知します。

オーバーライド:
クラス JPopupMenu 内の firePopupMenuCanceled

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 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 を返します。

オーバーライド:
クラス Component 内の isFocusTraversable
戻り値:
この Component がフォーカスを取得できる場合は true、 そうでない場合は false
関連項目:
Component.setFocusable(boolean)

startAutoScrolling

protected void startAutoScrolling(int direction)
protected メソッドは実装固有のもので、private である必要があります。呼び出しまたはオーバーライドしないでください。


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 に設定されています。

定義:
インタフェース Accessible 内の getAccessibleContext
オーバーライド:
クラス JPopupMenu 内の getAccessibleContext
戻り値:
BasicComboPopup の AccessibleContext
導入されたバージョン:
1.5

delegateFocus

protected void delegateFocus(MouseEvent e)
ポップアップが開くときに、フォーカスの送り先をイベントハンドラが決定するのを補助するユーティリティーメソッドです。標準的な実装では、コンボボックスが編集可能な場合はエディタにフォーカスを委譲し、編集不可能な場合は JComboBox に委譲します。


togglePopup

protected void togglePopup()
ポップアップが非表示になっている場合は表示し、表示されていれば非表示にします。


convertMouseEvent

protected MouseEvent convertMouseEvent(MouseEvent e)

getPopupHeightForRowCount

protected int getPopupHeightForRowCount(int maxRowCount)
現在の ListCellRenderer に基づくポップアップの高さと、最大行数を検出します。


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)
イベントリスナーが使用するユーティリティーメソッドです。マウスイベントを受けて、マウスの下にあるリスト項目のリスト選択を変更します。


JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。