当前位置: 首页>>代码示例>>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;未经允许,请勿转载。