org.eclipse.emf.ecp.view.internal.rule
Class RuleService

java.lang.Object
  extended by org.eclipse.emf.ecp.view.internal.rule.RuleService
All Implemented Interfaces:
ViewModelService

public class RuleService
extends Object
implements ViewModelService

Rule service that, once instantiated, maintains and synchronizes the state of a rule with its VElement.

Author:
emueller, jfaltermeier

Constructor Summary
RuleService()
          Instantiates the rule service.
 
Method Summary
 void dispose()
          Dispose.
 Map<VElement,Boolean> getDisabledRenderables(Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,Object> possibleValues, UniqueSetting setting)
          Returns all VElements, that would we disabled if possibleValues would be set for the given settings.
 Map<VElement,Boolean> getHiddenRenderables(Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,Object> possibleValues, UniqueSetting setting)
          Returns all VElements, that would we hidden if possibleValues would be set for the given settings.
 int getPriority()
          Returns the priority for this view service.
 void instantiate(ViewModelContext context)
          Instantiate the view service.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleService

public RuleService()
Instantiates the rule service.

Method Detail

instantiate

public void instantiate(ViewModelContext context)
Instantiate the view service.

Specified by:
instantiate in interface ViewModelService
Parameters:
context - the ViewModelContext
See Also:
ViewModelService.instantiate(org.eclipse.emf.ecp.view.spi.context.ViewModelContext)

getDisabledRenderables

public Map<VElement,Boolean> getDisabledRenderables(Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,Object> possibleValues,
                                                    UniqueSetting setting)
Returns all VElements, that would we disabled if possibleValues would be set for the given settings.

Parameters:
possibleValues - a mapping of settings to their would-be new value
setting - the changed setting
Returns:
the hidden VElements and their new state if possibleValues would be set

getHiddenRenderables

public Map<VElement,Boolean> getHiddenRenderables(Map<org.eclipse.emf.ecore.EStructuralFeature.Setting,Object> possibleValues,
                                                  UniqueSetting setting)
Returns all VElements, that would we hidden if possibleValues would be set for the given settings.

Parameters:
possibleValues - a mapping of settings to their would-be new value
setting - the setting that was changed
Returns:
the hidden VElements and their new state if possibleValues would be set

dispose

public void dispose()
Dispose.

Specified by:
dispose in interface ViewModelService

getPriority

public int getPriority()
Returns the priority for this view service.

Specified by:
getPriority in interface ViewModelService
Returns:
the priority
See Also:
ViewModelService.getPriority()


Copyright © 2015. All Rights Reserved.