public abstract class AbstractSpinnerModel extends Object implements SpinnerModel, Serializable
setValue
, getValue
, getNextValue
和getPreviousValue
方法。
JSpinner
, SpinnerModel
, SpinnerListModel
, SpinnerNumberModel
, SpinnerDateModel
Modifier and Type | Field and Description |
---|---|
protected EventListenerList |
listenerList
此模型的ChangeListeners列表。
|
Constructor and Description |
---|
AbstractSpinnerModel() |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener l)
添加一个ChangeListener到模型的监听器列表。
|
protected void |
fireStateChanged()
运行每个ChangeListeners stateChanged()方法。
|
ChangeListener[] |
getChangeListeners()
返回使用addChangeListener()添加到此AbstractSpinnerModel的所有
ChangeListener 的数组。
|
<T extends EventListener> |
getListeners(类<T> listenerType)
返回添加到此模型的给定类型的所有侦听器的数组。
|
void |
removeChangeListener(ChangeListener l)
从模型的监听器列表中删除一个ChangeListener。
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNextValue, getPreviousValue, getValue, setValue
protected EventListenerList listenerList
public void addChangeListener(ChangeListener l)
addChangeListener
在界面
SpinnerModel
l
- 要添加的ChangeListener
removeChangeListener(javax.swing.event.ChangeListener)
,
SpinnerModel.addChangeListener(javax.swing.event.ChangeListener)
public void removeChangeListener(ChangeListener l)
removeChangeListener
在界面
SpinnerModel
l
- 要删除的ChangeListener
addChangeListener(javax.swing.event.ChangeListener)
,
SpinnerModel.removeChangeListener(javax.swing.event.ChangeListener)
public ChangeListener[] getChangeListeners()
ChangeListener
的数组。
ChangeListener
或一个空数组,如果没有添加听众
protected void fireStateChanged()
public <T extends EventListener> T[] getListeners(类<T> listenerType)
myAbstractSpinnerModel.getListeners(ChangeListener.class);
listenerType
- 要返回的监听器的类型,例如ChangeListener.class
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.