当前位置: 首页>>代码示例>>Java>>正文


Java ListDataListener.contentsChanged方法代码示例

本文整理汇总了Java中javax.swing.event.ListDataListener.contentsChanged方法的典型用法代码示例。如果您正苦于以下问题:Java ListDataListener.contentsChanged方法的具体用法?Java ListDataListener.contentsChanged怎么用?Java ListDataListener.contentsChanged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.event.ListDataListener的用法示例。


在下文中一共展示了ListDataListener.contentsChanged方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: callListenersSet

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void callListenersSet(ListEdit<T> edit, ListDataEvent dataEvent) {
	assert (!editProtection[0]);
	
	editProtection[0] = true;
	try {
		if (edit != null) {
			addEdit(edit);
		}
		
		if (dataEvent != null) {
			for (ListDataListener l : listDataListeners) {
				l.contentsChanged(dataEvent);
			}
		}
	}
	finally {
		editProtection[0] = false;
	}
}
 
开发者ID:mgropp,项目名称:pdfjumbler,代码行数:20,代码来源:UndoableList.java

示例2: fireContentsChanged

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void fireContentsChanged(int index) {
    final ListDataListener[] clone;
    synchronized (listeners) {
        clone = listeners.toArray(new ListDataListener[listeners.size()]);
    }
    
    final ListDataEvent event = new ListDataEvent(
            this,
            ListDataEvent.CONTENTS_CHANGED,
            index,
            index);
    
    for (ListDataListener listener: clone) {
        listener.contentsChanged(event);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:ApplicationLocationPanel.java

示例3: fireContentsChanged

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void fireContentsChanged(int index) {
    final ListDataListener[] clone;
    synchronized (listeners) {
        clone = listeners.toArray(new ListDataListener[listeners.size()]);
    }

    final ListDataEvent event = new ListDataEvent(
            this,
            ListDataEvent.CONTENTS_CHANGED,
            index,
            index);

    for (ListDataListener listener : clone) {
        listener.contentsChanged(event);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:LicenseComboBoxModel.java

示例4: resultChanged

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
@Override
public final void resultChanged(LookupEvent ev) {
    List<WizardAdapter> fresh = new ArrayList<WizardAdapter>();
    for (ServerWizardProvider wizard : result.allInstances()) {

        // safety precaution shouldn't ever happen - used because of bridging
        if (wizard.getInstantiatingIterator() != null) {
            fresh.add(new WizardAdapter(wizard));
        }
    }
    Collections.sort(fresh);

    synchronized (serverWizards) {
        serverWizards.clear();
        serverWizards.addAll(fresh);
    }

    ListDataEvent event = new ListDataEvent(this,
                ListDataEvent.CONTENTS_CHANGED, 0, fresh.size() - 1);
    for (ListDataListener l : listeners) {
        l.contentsChanged(event);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:ServerWizardVisual.java

示例5: fireChange

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void fireChange (ListDataEvent ev) {
    if (list.getListenerCount () == 0) {
        return ;
    }
    Object[] arr = list.getListenerList ();
    for (int i = arr.length - 1; i >= 0; i -= 2) {
        ListDataListener l = (ListDataListener)arr[i];
        switch (ev.getType ()) {
            case ListDataEvent.CONTENTS_CHANGED: l.contentsChanged (ev); break;
            case ListDataEvent.INTERVAL_ADDED: l.intervalAdded (ev); break;
            case ListDataEvent.INTERVAL_REMOVED: l.intervalRemoved (ev); break;
            default:
                throw new IllegalArgumentException  ("Unknown type: " + ev.getType ());
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:FilteredListModel.java

示例6: setDirty

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
public void setDirty(String filterText) {
    if (!this.ignoreChange) {
        getChoiceBox().doConfigure(false);
        this.dirty = true;
        this.filterText = filterText;
        this.selectedItem = null;
        for (ListDataListener l : this.listeners) {
            l.contentsChanged(
                new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, 0, getSize()));
        }
        getChoiceBox().hidePopup();
        if (getSize() > 0 && filterText.length() > 0) {
            getChoiceBox().showPopup();
        }
        getChoiceBox().doConfigure(true);
    }
}
 
开发者ID:meteoorkip,项目名称:JavaGraph,代码行数:18,代码来源:FormulaDialog.java

示例7: fireListDataEvent

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void fireListDataEvent(int type, int index1, int index2) {
    ListDataEvent event = new ListDataEvent(this, type, index1, index2);

    for (ListDataListener listener : dataListeners) {
        switch (type) {
            case ListDataEvent.CONTENTS_CHANGED: {
                listener.contentsChanged(event);
                break;
            }

            case ListDataEvent.INTERVAL_ADDED: {
                listener.intervalAdded(event);
                break;
            }

            case ListDataEvent.INTERVAL_REMOVED: {
                listener.intervalRemoved(event);
                break;
            }
        }

    }
}
 
开发者ID:NBANDROIDTEAM,项目名称:NBANDROID-V2,代码行数:24,代码来源:LogDevicesComboBoxSupport.java

示例8: fireSelectionChange

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void fireSelectionChange() {
    if (listeners == null) {
        return;
    }

    ListDataListener[] arrayListeners = listeners.toArray(new ListDataListener[0]);
    for (ListDataListener l : arrayListeners) {
        l.contentsChanged(event);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:ListComboBoxModel.java

示例9: fire

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void fire() {
    final ListDataEvent event = new ListDataEvent(
            this,
            -1,
            -1,
            Integer.MAX_VALUE);
    for (ListDataListener l : listeners) {
        l.contentsChanged(event);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:HistorySupport.java

示例10: dispatchListDataEvent

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void dispatchListDataEvent(final ListDataEvent e) {
    for (final ListDataListener l : m_listeners) {
        if (e.getType() == ListDataEvent.INTERVAL_ADDED) {
            l.intervalAdded(e);
        } else if (e.getType() == ListDataEvent.INTERVAL_REMOVED) {
            l.intervalRemoved(e);
        } else { // CONTENTS_CHANGED
            l.contentsChanged(e);
        }
    }
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:12,代码来源:ClassModel.java

示例11: notifyAllListeners

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
/**
 * powiadomienie wszystkich słuchaczy o zmianie
 */
protected void notifyAllListeners() {
    for (ListDataListener dataListener : listeners
            .getListeners(ListDataListener.class)) {
        dataListener.contentsChanged(new ListDataEvent(this,
                ListDataEvent.CONTENTS_CHANGED, 0, 0));
    }
}
 
开发者ID:CLARIN-PL,项目名称:WordnetLoom,代码行数:11,代码来源:GenericListModel.java

示例12: fireDataChanged

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void fireDataChanged() {
    int stop = getSize() - 1;
    for(ListDataListener l : listeners) {
        l.contentsChanged(new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, 0, stop));
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:RuntimeComboBox.java

示例13: fireChange

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void fireChange() {
    ListDataEvent ev = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, 0, 0);
    for (ListDataListener l : new ArrayList<ListDataListener>(listeners)) {
        l.contentsChanged(ev);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:JavaPlatformComponentFactory.java

示例14: fireClassPathAdded

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void fireClassPathAdded() {
    for (ListDataListener listener : classListeners) {
        listener.contentsChanged(new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, aPackage.getBootPaths().size() - 2, aPackage.getBootPaths().size() - 1));
    }
}
 
开发者ID:NBANDROIDTEAM,项目名称:NBANDROID-V2,代码行数:6,代码来源:AndroidPlatformCustomizer.java

示例15: fireClassPathRemoved

import javax.swing.event.ListDataListener; //导入方法依赖的package包/类
private void fireClassPathRemoved() {
    for (ListDataListener listener : classListeners) {
        listener.contentsChanged(new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, aPackage.getBootPaths().size() - 1, aPackage.getBootPaths().size() - 1));
    }
}
 
开发者ID:NBANDROIDTEAM,项目名称:NBANDROID-V2,代码行数:6,代码来源:AndroidPlatformCustomizer.java


注:本文中的javax.swing.event.ListDataListener.contentsChanged方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。