org.eclipse.emf.ecp.view.model.common
Class ECPStaticRendererTester

java.lang.Object
  extended by org.eclipse.emf.ecp.view.model.common.ECPStaticRendererTester
All Implemented Interfaces:
ECPRendererTester

public class ECPStaticRendererTester
extends Object
implements ECPRendererTester

The static tester for renderer.

Author:
Eugen Neufeld

Field Summary
 
Fields inherited from interface org.eclipse.emf.ecp.view.model.common.ECPRendererTester
NOT_APPLICABLE
 
Constructor Summary
ECPStaticRendererTester(int priority, Class<? extends VElement> supportedVElement)
          The constructor of the static tester.
 
Method Summary
 int isApplicable(VElement vElement, ViewModelContext viewModelContext)
          Check whether the provided VElement and ViewModelContext are fitting for the provided renderer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECPStaticRendererTester

public ECPStaticRendererTester(int priority,
                               Class<? extends VElement> supportedVElement)
The constructor of the static tester.

Parameters:
priority - the static priority
supportedVElement - the VElement this tester allows
Method Detail

isApplicable

public int isApplicable(VElement vElement,
                        ViewModelContext viewModelContext)
Check whether the provided VElement and ViewModelContext are fitting for the provided renderer.

Specified by:
isApplicable in interface ECPRendererTester
Parameters:
vElement - the VElement to check
viewModelContext - the ViewModelContext to check
Returns:
ECPRendererTester.NOT_APPLICABLE if the corresponding renderer should not be used, a positive integer value otherwise. The renderer with the highest priority will be taken.
See Also:
ECPRendererTester.isApplicable(VElement, ViewModelContext)


Copyright © 2014. All Rights Reserved.