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


Java ListenerList.getListeners方法代码示例

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


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

示例1: fireSelectionChanged

import org.eclipse.core.runtime.ListenerList; //导入方法依赖的package包/类
private void fireSelectionChanged(ListenerList list, ISelection selection)
{
	SelectionChangedEvent event = new SelectionChangedEvent(delegate, selection);
	Object[] listeners = list.getListeners();
	for (int i = 0; i < listeners.length; i++)
	{
		try
		{
			ISelectionChangedListener listener = (ISelectionChangedListener) listeners[i];
			listener.selectionChanged(event);
		}
		catch (Exception e)
		{
			Logger.getLogger(ProjectEditorSelectionService.class.getName()).log(Level.WARNING, "Exception fireing selection changed: "+e.getMessage());
		}

	}
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:19,代码来源:ProjectEditorSelectionService.java

示例2: fireSelectionChanged

import org.eclipse.core.runtime.ListenerList; //导入方法依赖的package包/类
/**
 * Fires the {@link ISelection} change to the given list of {@link ISelectionChangedListener}.
 * 
 * @param list
 *            the list of {@link ISelectionChangedListener}
 * @param selection
 *            the {@link ISelection}
 */
private void fireSelectionChanged(@SuppressWarnings("rawtypes") ListenerList list, ISelection selection) {
	SelectionChangedEvent event = new SelectionChangedEvent(delegate, selection);
	Object[] listeners = list.getListeners();
	for (int i = 0; i < listeners.length; i++) {
		ISelectionChangedListener listener = (ISelectionChangedListener)listeners[i];
		listener.selectionChanged(event);
	}
}
 
开发者ID:ModelWriter,项目名称:Source,代码行数:17,代码来源:SelectionProviderIntermediate.java

示例3: getListeners

import org.eclipse.core.runtime.ListenerList; //导入方法依赖的package包/类
/**
 * @return the listeners attached to this event manager.
 * The listeners currently attached; may be empty, but never
 * null.
 * 
 */
protected final Object[] getListeners() {
	final ListenerList list = listenerList;
	if (list == null) {
		return new Object[0];
	}

	return list.getListeners();
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:15,代码来源:ToolBarManager2.java

示例4: getListeners

import org.eclipse.core.runtime.ListenerList; //导入方法依赖的package包/类
/**
 * Returns the listeners attached to this event manager.
 * 
 * @return The listeners currently attached; may be empty, but never
 *         <code>null</code>
 */
protected final Object[] getListeners() {
	final ListenerList list = listenerList;
	if (list == null) {
		return EMPTY_ARRAY;
	}

	return list.getListeners();
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:15,代码来源:EventManager.java

示例5: fireSelectionChanged

import org.eclipse.core.runtime.ListenerList; //导入方法依赖的package包/类
private void fireSelectionChanged(ListenerList list, ISelection selection){
	SelectionChangedEvent event = new SelectionChangedEvent(delegate, selection);
	Object[] listeners = list.getListeners();
	for (int i = 0; i < listeners.length; i++) {
		ISelectionChangedListener listener = (ISelectionChangedListener) listeners[i];
		listener.selectionChanged(event);
	}
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:9,代码来源:DelegatingSelectionProvider.java


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