E
-这个模型的元素类型
public interface MutableComboBoxModel<E> extends ComboBoxModel<E>
ComboBoxModel
。
Modifier and Type | Method and Description |
---|---|
void |
addElement(E item)
在模型的结尾添加一个项目。
|
void |
insertElementAt(E item, int index)
在一个特定的索引中添加一个项目。
|
void |
removeElement(Object obj)
从模型中移除一个项目。
|
void |
removeElementAt(int index)
在一个特定的索引中删除一个项目。
|
getSelectedItem, setSelectedItem
addListDataListener, getElementAt, getSize, removeListDataListener
void addElement(E item)
ListDataListener
s,项目已添加。
item
-要添加的项目
void removeElement(Object obj)
ListDataListener
s该项已被删除。
obj
-
Object
被删除
void insertElementAt(E item, int index)
ListDataListener
s,项目已添加。
item
-要添加的项目
index
位置添加对象
void removeElementAt(int index)
ListDataListener
s该项已被删除。
index
项目的位置将被删除
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.