本文整理了Java中javax.swing.event.ChangeListener.stateChanged()
方法的一些代码示例,展示了ChangeListener.stateChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ChangeListener.stateChanged()
方法的具体详情如下:
包路径:javax.swing.event.ChangeListener
类名称:ChangeListener
方法名:stateChanged
暂无
代码示例来源:origin: libgdx/libgdx
public void setValue (float value) {
this.value = (int)(Math.max(min, Math.min(max, value)) / stepSize) * stepSize;
repaint();
if (listener != null) listener.stateChanged(new ChangeEvent(this));
}
代码示例来源:origin: libgdx/libgdx
public void setValue (float value) {
this.value = (int)(Math.max(min, Math.min(max, value)) / stepSize) * stepSize;
repaint();
if (listener != null) listener.stateChanged(new ChangeEvent(this));
}
代码示例来源:origin: cmusphinx/sphinx4
/** Notify all ChangeListeners of a change. */
protected void fireStateChanged() {
ChangeEvent event = new ChangeEvent(this);
for (ChangeListener listener : listeners)
listener.stateChanged(event);
}
}
代码示例来源:origin: geotools/geotools
/** Informs every listeners that system-wide configuration changed. */
public static void fireConfigurationChanged() {
final ChangeEvent event = new ChangeEvent(GeoTools.class);
final Object[] listeners = LISTENERS.getListenerList();
for (int i = 0; i < listeners.length; i += 2) {
if (listeners[i] == ChangeListener.class) {
((ChangeListener) listeners[i + 1]).stateChanged(event);
}
}
}
代码示例来源:origin: nodebox/nodebox
/**
* Send a ChangeEvent, whose source is this Slider, to
* each listener. This method method is called each time
* a ChangeEvent is received from the model.
*
* @see #addChangeListener
* @see javax.swing.event.EventListenerList
*/
protected void fireStateChanged() {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ChangeListener.class) {
if (changeEvent == null) {
changeEvent = new ChangeEvent(this);
}
((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);
}
}
}
代码示例来源:origin: nodebox/nodebox
/**
* Send a ChangeEvent, whose source is this Slider, to
* each listener. This method method is called each time
* a ChangeEvent is received from the model.
*
* @see #addChangeListener
* @see javax.swing.event.EventListenerList
*/
protected void fireStateChanged() {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ChangeListener.class) {
if (changeEvent == null) {
changeEvent = new ChangeEvent(this);
}
((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);
}
}
}
代码示例来源:origin: nodebox/nodebox
protected void fireStateChanged() {
if (changeEvent == null) {
changeEvent = new ChangeEvent(this);
}
for (EventListener l : listenerList.getListeners(ChangeListener.class)) {
((ChangeListener) l).stateChanged(changeEvent);
}
}
代码示例来源:origin: nodebox/nodebox
protected void fireStateChanged() {
if (changeEvent == null) {
changeEvent = new ChangeEvent(this);
}
for (EventListener l : listenerList.getListeners(ChangeListener.class)) {
((ChangeListener) l).stateChanged(changeEvent);
}
}
代码示例来源:origin: dcaoyuan/nbscala
public void valueChanged (ListSelectionEvent evt) {
if (changeListener != null) {
changeListener.stateChanged (new ChangeEvent (evt));
}
}
});
代码示例来源:origin: stackoverflow.com
protected void fireChangeOccurred(Change change) {
for (ChangeListener listener:
listenerList.getListeners(ChangeListener.class)) {
listener.stateChanged(new ChangeEvent(this));
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-project-ui
private synchronized void fireChange() {
ChangeEvent e = new ChangeEvent(this);
for (ChangeListener l : listeners) {
l.stateChanged(e);
}
}
代码示例来源:origin: us.ihmc/ihmc-yovariables
/**
* Tell all listeners that a change in the variable count occurred. At time of writing
* only VarPanelsHolders are listeners for this.
*/
private void notifyListeners()
{
for (ChangeListener listener : listeners)
{
listener.stateChanged(new ChangeEvent(this));
}
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
public void setSelectedVariable(YoVariable<?> var)
{
this.var = var;
for (ChangeListener listener : listeners)
{
if (listener != null)
listener.stateChanged(new ChangeEvent(this));
}
}
代码示例来源:origin: org.apache.jmeter/jorphan
/**
* Notify all registered change listeners that the text in the text field
* has changed.
*/
private void notifyChangeListeners() {
ChangeEvent ce = new ChangeEvent(this);
for (ChangeListener mChangeListener : mChangeListeners) {
mChangeListener.stateChanged(ce);
}
}
代码示例来源:origin: matsim-org/matsim
private void fireChangeListeners() {
for (ChangeListener changeListener : changeListeners) {
changeListener.stateChanged(new ChangeEvent(this));
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-toolchain
public static void fireCompilerSetChange(CompilerSet set) {
ChangeEvent ev = new ChangeEvent(set);
currentCompilerSet = set;
synchronized (listenerChanged) {
for (ChangeListener l : listenerChanged) {
l.stateChanged(ev);
}
}
}
代码示例来源:origin: nz.ac.waikato.cms.moa/moa
/**
* Notifies all registered change listeners that the options have changed.
*/
protected void notifyChangeListeners() {
ChangeEvent e = new ChangeEvent(this);
for (ChangeListener l : changeListeners) {
l.stateChanged(e);
}
}
}
代码示例来源:origin: nz.ac.waikato.cms.moa/moa
/**
* Notifies all registered change listeners that the options have changed.
*/
protected void notifyChangeListeners() {
ChangeEvent e = new ChangeEvent(this);
for (ChangeListener l : changeListeners) {
l.stateChanged(e);
}
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf
private void fireChange() {
ChangeEvent e = new ChangeEvent(this);
for (ChangeListener l : listeners) {
l.stateChanged(e);
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mobility-cldcplatform
public void fireChanged() {
final ChangeEvent e = new ChangeEvent(this);
for ( final ChangeListener l : listeners ) {
l.stateChanged(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!