E
-这个模型的元素类型
public interface ComboBoxModel<E> extends ListModel<E>
ListDataModel
接口扩展和增加一个选定的项目概念。选定的项目通常是在组合框显示区域中可见的项目。
选定的项目不一定是由底层的ListModel
管理。这种不相交的行为允许在模型中的一个选定的项目的临时存储和检索。
Modifier and Type | Method and Description |
---|---|
Object |
getSelectedItem()
返回选定的项目
|
void |
setSelectedItem(Object anItem)
设置选定的项目。
|
addListDataListener, getElementAt, getSize, removeListDataListener
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.