public interface SingleSelectionModel
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener listener)
将
侦听器添加为模型中的更改的侦听器。
|
void |
clearSelection()
清除选择(至-1)。
|
int |
getSelectedIndex()
返回模型的选择。
|
boolean |
isSelected()
如果选择模型当前具有选定的值,则返回true。
|
void |
removeChangeListener(ChangeListener listener)
将
侦听器作为监听器删除以更改模型。
|
void |
setSelectedIndex(int index)
将模型的所选索引设置为
索引 。
|
int getSelectedIndex()
setSelectedIndex(int)
void setSelectedIndex(int index)
index
- 指定模型选择的int
getSelectedIndex()
,
addChangeListener(javax.swing.event.ChangeListener)
void clearSelection()
boolean isSelected()
void addChangeListener(ChangeListener listener)
listener
- 要添加的ChangeListener
void removeChangeListener(ChangeListener listener)
listener
- 要删除的ChangeListener
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.