當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。