當前位置: 首頁>>代碼示例>>Java>>正文


Java ViewerFilter類代碼示例

本文整理匯總了Java中org.eclipse.jface.viewers.ViewerFilter的典型用法代碼示例。如果您正苦於以下問題:Java ViewerFilter類的具體用法?Java ViewerFilter怎麽用?Java ViewerFilter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ViewerFilter類屬於org.eclipse.jface.viewers包,在下文中一共展示了ViewerFilter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initPart

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final HardwareSensor hardwareSensor = (HardwareSensor)elt;
		final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
			// init part
			clockSettings = new EObjectFlatComboSettings(hardwareSensor, HrmPackage.eINSTANCE.getHardwareResource_Clock());
			timingPart.initClock(clockSettings);
			// set the button mode
			timingPart.setClockButtonMode(ButtonsModeEnum.BROWSE);
		}
		// init filters
		if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
			timingPart.addFilterToClock(new ViewerFilter() {
			
				/**
				 * {@inheritDoc}
				 * 
				 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
				 */
				public boolean select(Viewer viewer, Object parentElement, Object element) {
					return (element instanceof String && element.equals("")) || (element instanceof HardwareClock); //$NON-NLS-1$ 
				}
				
			});
			// Start of user code for additional businessfilters for clock
			// End of user code
		}
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:47,代碼來源:HardwareSensorTimingPropertiesEditionComponent.java

示例2: addFilterToComponent

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see be.cetic.simqri.metamodel.parts.ModelPropertiesEditionPart#addFilterComponent(ViewerFilter filter)
 * 
 */
public void addFilterToComponent(ViewerFilter filter) {
	componentFilters.add(filter);
	if (this.component != null) {
		this.component.addFilter(filter);
	}
}
 
開發者ID:cetic,項目名稱:SimQRI,代碼行數:13,代碼來源:ModelPropertiesEditionPartForm.java

示例3: addFilterToSchedulingParameters

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.analysis.parts.TaskPropertiesEditionPart#addFilterSchedulingParameters(ViewerFilter filter)
 * @generated
 */
public void addFilterToSchedulingParameters(ViewerFilter filter) {
	schedulingParametersFilters.add(filter);
	if (this.schedulingParameters != null) {
		this.schedulingParameters.addFilter(filter);
	}
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:13,代碼來源:TaskPropertiesEditionPartImpl.java

示例4: addFilterToOutputs

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see be.cetic.simqri.metamodel.parts.BatchProcessPropertiesEditionPart#addFilterOutputs(ViewerFilter filter)
 * 
 */
public void addFilterToOutputs(ViewerFilter filter) {
	outputsFilters.add(filter);
	if (this.outputs != null) {
		this.outputs.addFilter(filter);
	}
}
 
開發者ID:cetic,項目名稱:SimQRI,代碼行數:13,代碼來源:BatchProcessPropertiesEditionPartForm.java

示例5: getViewerFilter

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
@Override
protected ViewerFilter getViewerFilter() {
	return new ViewerFilter() {
		public boolean select(Viewer viewer, Object parentElement, Object element) {
			return true;
		}
	};
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:9,代碼來源:StringCustomListModel.java

示例6: addFilterToOffsets

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.analysis.parts.EventModelPropertiesEditionPart#addFilterOffsets(ViewerFilter filter)
 * @generated
 */
public void addFilterToOffsets(ViewerFilter filter) {
	offsetsFilters.add(filter);
	if (this.offsets != null) {
		this.offsets.addFilter(filter);
	}
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:13,代碼來源:EventModelPropertiesEditionPartImpl.java

示例7: initPart

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final HardwareTimingResource hardwareTimingResource = (HardwareTimingResource)elt;
		final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
			// init part
			clockSettings = new EObjectFlatComboSettings(hardwareTimingResource, HrmPackage.eINSTANCE.getHardwareResource_Clock());
			timingPart.initClock(clockSettings);
			// set the button mode
			timingPart.setClockButtonMode(ButtonsModeEnum.BROWSE);
		}
		// init filters
		if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
			timingPart.addFilterToClock(new ViewerFilter() {
			
				/**
				 * {@inheritDoc}
				 * 
				 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
				 */
				public boolean select(Viewer viewer, Object parentElement, Object element) {
					return (element instanceof String && element.equals("")) || (element instanceof HardwareClock); //$NON-NLS-1$ 
				}
				
			});
			// Start of user code for additional businessfilters for clock
			// End of user code
		}
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:47,代碼來源:HardwareTimingResourceTimingPropertiesEditionComponent.java

示例8: addFilterToMutexes

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.analysis.parts.AnalyzedSystemPropertiesEditionPart#addFilterMutexes(ViewerFilter filter)
 * @generated
 */
public void addFilterToMutexes(ViewerFilter filter) {
	mutexesFilters.add(filter);
	if (this.mutexes != null) {
		this.mutexes.addFilter(filter);
	}
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:13,代碼來源:AnalyzedSystemPropertiesEditionPartForm.java

示例9: initPart

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final HardwareBridge hardwareBridge = (HardwareBridge)elt;
		final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
			// init part
			clockSettings = new EObjectFlatComboSettings(hardwareBridge, HrmPackage.eINSTANCE.getHardwareResource_Clock());
			timingPart.initClock(clockSettings);
			// set the button mode
			timingPart.setClockButtonMode(ButtonsModeEnum.BROWSE);
		}
		// init filters
		if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
			timingPart.addFilterToClock(new ViewerFilter() {
			
				/**
				 * {@inheritDoc}
				 * 
				 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
				 */
				public boolean select(Viewer viewer, Object parentElement, Object element) {
					return (element instanceof String && element.equals("")) || (element instanceof HardwareClock); //$NON-NLS-1$ 
				}
				
			});
			// Start of user code for additional businessfilters for clock
			// End of user code
		}
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:47,代碼來源:HardwareBridgeTimingPropertiesEditionComponent.java

示例10: initPart

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final HardwareIo hardwareIo = (HardwareIo)elt;
		final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
			// init part
			clockSettings = new EObjectFlatComboSettings(hardwareIo, HrmPackage.eINSTANCE.getHardwareResource_Clock());
			timingPart.initClock(clockSettings);
			// set the button mode
			timingPart.setClockButtonMode(ButtonsModeEnum.BROWSE);
		}
		// init filters
		if (isAccessible(HrmViewsRepository.Timing.TimingProperties.clock)) {
			timingPart.addFilterToClock(new ViewerFilter() {
			
				/**
				 * {@inheritDoc}
				 * 
				 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
				 */
				public boolean select(Viewer viewer, Object parentElement, Object element) {
					return (element instanceof String && element.equals("")) || (element instanceof HardwareClock); //$NON-NLS-1$ 
				}
				
			});
			// Start of user code for additional businessfilters for clock
			// End of user code
		}
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:47,代碼來源:HardwareIoTimingPropertiesEditionComponent.java

示例11: initPart

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final SoftwareResource softwareResource = (SoftwareResource)elt;
		final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(SrmViewsRepository.Timing.Properties.resCtrlPolicy)) {
			resCtrlPolicySettings = new ReferencesTableSettings(softwareResource, GrmPackage.eINSTANCE.getResourceManager_ResCtrlPolicy());
			timingPart.initResCtrlPolicy(resCtrlPolicySettings);
		}
		// init filters
		if (isAccessible(SrmViewsRepository.Timing.Properties.resCtrlPolicy)) {
			timingPart.addFilterToResCtrlPolicy(new ViewerFilter() {
				/**
				 * {@inheritDoc}
				 * 
				 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
				 */
				public boolean select(Viewer viewer, Object parentElement, Object element) {
					return (element instanceof ResourceControlPolicy);
				}
		
			});
			// Start of user code for additional businessfilters for resCtrlPolicy
			// End of user code
		}
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:43,代碼來源:SoftwareResourceTimingPropertiesEditionComponent.java

示例12: addFilterToResourceParameterValue

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.analysis.parts.SchedulerPropertiesEditionPart#addFilterResourceParameterValue(ViewerFilter filter)
 * @generated
 */
public void addFilterToResourceParameterValue(ViewerFilter filter) {
	resourceParameterValueFilters.add(filter);
	if (this.resourceParameterValue != null) {
		this.resourceParameterValue.addFilter(filter);
	}
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:13,代碼來源:SchedulerPropertiesEditionPartImpl.java

示例13: addFilterToSchedulableElements

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.polarsys.time4sys.ui.analysis.parts.AnalyzedSystemPropertiesEditionPart#addFilterSchedulableElements(ViewerFilter filter)
 * @generated
 */
public void addFilterToSchedulableElements(ViewerFilter filter) {
	schedulableElementsFilters.add(filter);
	if (this.schedulableElements != null) {
		this.schedulableElements.addFilter(filter);
	}
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:13,代碼來源:AnalyzedSystemPropertiesEditionPartForm.java

示例14: initPart

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final NotificationResource notificationResource = (NotificationResource)elt;
		final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(SrmViewsRepository.Timing.Properties.resCtrlPolicy)) {
			resCtrlPolicySettings = new ReferencesTableSettings(notificationResource, GrmPackage.eINSTANCE.getResourceManager_ResCtrlPolicy());
			timingPart.initResCtrlPolicy(resCtrlPolicySettings);
		}
		if (isAccessible(SrmViewsRepository.Timing.Properties.waitingQueuePolicy)) {
			timingPart.initWaitingQueuePolicy(EEFUtils.choiceOfValues(notificationResource, SrmPackage.eINSTANCE.getSoftwareInteractionResource_WaitingQueuePolicy()), notificationResource.getWaitingQueuePolicy());
		}
		if (isAccessible(SrmViewsRepository.Timing.Properties.waitingQueueCapacity)) {
			timingPart.setWaitingQueueCapacity(EEFConverterUtil.convertToString(EcorePackage.Literals.EINT, notificationResource.getWaitingQueueCapacity()));
		}
		
		if (isAccessible(SrmViewsRepository.Timing.Properties.waitingPolicyElements))
			timingPart.setWaitingPolicyElements(notificationResource.getWaitingPolicyElements());
		
		if (isAccessible(SrmViewsRepository.Timing.Properties.policy)) {
			timingPart.initPolicy(EEFUtils.choiceOfValues(notificationResource, SrmPackage.eINSTANCE.getNotificationResource_Policy()), notificationResource.getPolicy());
		}
		if (isAccessible(SrmViewsRepository.Timing.Properties.mechanism)) {
			timingPart.initMechanism(EEFUtils.choiceOfValues(notificationResource, SrmPackage.eINSTANCE.getNotificationResource_Mechanism()), notificationResource.getMechanism());
		}
		if (isAccessible(SrmViewsRepository.Timing.Properties.occurenceCountElements))
			timingPart.setOccurenceCountElements(notificationResource.getOccurenceCountElements());
		
		// init filters
		if (isAccessible(SrmViewsRepository.Timing.Properties.resCtrlPolicy)) {
			timingPart.addFilterToResCtrlPolicy(new ViewerFilter() {
				/**
				 * {@inheritDoc}
				 * 
				 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
				 */
				public boolean select(Viewer viewer, Object parentElement, Object element) {
					return (element instanceof ResourceControlPolicy);
				}
		
			});
			// Start of user code for additional businessfilters for resCtrlPolicy
			// End of user code
		}
		
		
		
		
		
		
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:68,代碼來源:NotificationResourceTimingPropertiesEditionComponent.java

示例15: initPart

import org.eclipse.jface.viewers.ViewerFilter; //導入依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final StorageResource storageResource = (StorageResource)elt;
		final OtherPropertiesEditionPart otherPart = (OtherPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(GrmViewsRepository.Other.OtherProperties.pServices)) {
			pServicesSettings = new ReferencesTableSettings(storageResource, GrmPackage.eINSTANCE.getResource_PServices());
			otherPart.initPServices(pServicesSettings);
		}
		if (isAccessible(GrmViewsRepository.Other.OtherProperties.rServices)) {
			rServicesSettings = new ReferencesTableSettings(storageResource, GrmPackage.eINSTANCE.getResource_RServices());
			otherPart.initRServices(rServicesSettings);
		}
		// init filters
		if (isAccessible(GrmViewsRepository.Other.OtherProperties.pServices)) {
			otherPart.addFilterToPServices(new ViewerFilter() {
				/**
				 * {@inheritDoc}
				 * 
				 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
				 */
				public boolean select(Viewer viewer, Object parentElement, Object element) {
					return (element instanceof String && element.equals("")) || (element instanceof ResourceService); //$NON-NLS-1$ 
				}
		
			});
			// Start of user code for additional businessfilters for pServices
			// End of user code
		}
		if (isAccessible(GrmViewsRepository.Other.OtherProperties.rServices)) {
			otherPart.addFilterToRServices(new EObjectFilter(GrmPackage.Literals.RESOURCE_SERVICE));
			// Start of user code for additional businessfilters for rServices
			// End of user code
		}
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:52,代碼來源:StorageResourceOtherPropertiesEditionComponent.java


注:本文中的org.eclipse.jface.viewers.ViewerFilter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。